{{vtScript}} {{vtInclude: includes/initialize.html}} {{vtInclude: includes/checkdownloadallowed_global.html}} {{vtIf: {vtGetValue:rule} .neq. }} {{vtRepeat: {vtGlobal:pxtcImagingRules} }} {{vtIf: {vtItem:name} .eq. {vtGetValue:rule} }} {{vtIf: {vtUser:admin} .eq. 1 .or. {vtItem:privilege} .eq. 1 .or. {vtItem:privilege} .eq. 1 .and. {vtUser:name} .gt. 0 .or. {vtItem:privilege} .eq. 3 .and. {vtItem:groups} .cn1of. {vtUser:groups} }} {{vtSet: Allowed="1"}} {{vtSet: Zipname="bilder_{vtItem:name}.zip"}} {{vtIf: {vtItem:log} .eq. 1 }} {{vtSet: LogType="{vtItem:name}"}} {{vtElse}} {{vtSet: LogType=""}} {{vtEndIf}} {{vtSet: Notify="{vtItem:notify}"}} {{vtEndIf}} {{vtEndIf}} {{vtEndRepeat}} {{vtElseIf: {vtGetValue:v} .neq. }} {{vtSet: Allowed="{vtGet:HiresDownloadAllowed}"}} {{vtSet: Directory="{vtGlobal:pxtcPathHires}"}} {{vtSet: Zipname="bilder_hires.zip"}} {{vtIf: {vtGlobal:pxtcDownloadLogHires} .eq. 1 }} {{vtSet: LogType="hires"}} {{vtEndIf}} {{vtElse}} {{vtSet: Allowed="{vtGet:LoresDownloadAllowed}"}} {{vtSet: Directory="{vtGlobal:pxtcPathLores}"}} {{vtSet: Zipname="bilder_lores.zip"}} {{vtIf: {vtGlobal:pxtcDownloadLogLores} .eq. 1 }} {{vtSet: LogType="lores"}} {{vtEndIf}} {{vtEndIf}} {{vtIf: {vtGet:Allowed} .eq. 1}} {{vtCalc: str_replace( ',', '|', '{vtGet:Lightbox}' ) }} {{vtSet: LightboxListe}} {{vtSelect: -origin="{vtGet:ID_Bilder}", -type="image", -filter="{vtID} .in. {vtGet:LightboxListe}", -sortfield="vtName" }} {{vtLoop}} {{vtSet:hideThumbnail=""}} {{vtIf:userhasadminprivileges}} {{vtElseIf:{vtPageUserID}.neq.52}} {{vtElse}} {{vtIf: {vtGet:InvitationList} .ncn. {vtContainerID} }} {{vtUse:\imagelist}} {{vtIf:{Token} .neq. {vtSession:token} .and. {Token} .nin. {vtCookie:pxtc_tklist} }} {{vtSet:hideThumbnail="1"}} {{vtEndIf}} {{vtEndUse}} {{vtIf: {vtGet:hideThumbnail} .neq. 1}} {{vtSet:InvitationList="{vtGet:InvitationList}|{vtContainerID}"}} {{vtEndIf}} {{vtEndIf}} {{vtEndIf}} {{vtIf:{vtGet:hideThumbnail} .neq. 1}} {{vtCalc: substr( '{Verzeichnis:escaped}', 0, 1 ) == '/' ? substr( '{Verzeichnis:escaped}', 1 ) : '{Verzeichnis:raw}' }} {{vtSet: Verzeichnis}} {{vtIf: {vtGetValue:rule} .neq. }} {{vtCalc: generate_image_file( '{vtGlobal:pxtcPathHires}/{vtGet:Verzeichnis,raw}/{vtName}', '{vtGetValue:rule}', '{vtId}' ) }} {{vtSet: TempFile }} {{vtIf: {vtGet:TempFile} .bw. - }} {{vtLogError: Error generating image for file {vtGet:Verzeichnis,raw}/{vtName} with rule '{vtGetValue:rule}' ({vtGet:TempFile}) }} {{vtElse}} {{vtCalc: substr( '{vtName:escaped}', 0, -4 ) . '_' . strtolower('{vtGetValue:rule}') . '.' . pathinfo( v::vtget('TempFile'), PATHINFO_EXTENSION ) }} {{vtSet: FinalList[] = "{vtGet:Verzeichnis,raw}/{vtResult}|{vtGet:TempFile}" }} {{vtSet: NumberList="{vtGet:NumberList},{vtID}"}} {{vtSet: DeleteList[] = "{vtGet:TempFile}" }} {{vtEndIf}} {{vtElseIf: {vtGetValue:v} .eq. }} {{vtSet: File="{vtGet:Verzeichnis,raw}/{vtName}"}} {{vtElseIf: {vtGetValue:v} .eq. *}} {{vtSet: File="{vtGet:Verzeichnis,raw}/{vtName}"}} {{vtElseIf: {vtGetValue:v} .cn. * .and. {vtGetValue:v} .ncn. .. }} {{vtCalc: str_replace( '*', substr( '{vtName:escaped}', 0, -4 ), '{vtGetValue:v,escaped}' ) }} {{vtSet: File="{vtGet:Verzeichnis,raw}/{vtResult}"}} {{vtElse}} {{vtSet: File="{vtGet:Verzeichnis,raw}/{vtGetValue:v}/{vtName}"}} {{vtEndIf}} {{vtIf: {vtGet:File} .neq. .and. {vtGetValue:rule} .eq. }} {{vtCalc: substr( '{vtGet:File,raw}', 0, strrpos( '{vtGet:File,raw}', '.' ) ) . '.' }} {{vtSet: BaseName }} {{vtIf: {vtConfig:pxtcHiresSuffixes} .neq. }} {{vtSet: Suffixes = "{vtConfig:pxtcHiresSuffixes}" }} {{vtElse}} {{vtSet: Suffixes = "jpg,JPG,jpeg,JPEG,tif,TIF,tiff,TIFF" }} {{vtEndIf}} {{vtRepeat: {vtGet:Suffixes} }} {{vtCalc: file_exists( '{vtConfig:pathToVirthos}{vtGet:Directory}/{vtGet:BaseName}{vtItem}' ) ? '1' : '' }} {{vtIf: {vtResult} .eq. 1}} {{vtSet: FinalList[]="{vtGet:BaseName}{vtItem}"}} {{vtSet: NumberList="{vtGet:NumberList},{vtID}"}} {{vtExit}} {{vtEndIf}} {{vtEndRepeat}} {{vtEndIf}} {{vtEndIf}} {{vtEndLoop}} {{vtEndSelect}} {{vtEndIf}} {{vtIf: {vtGet:FinalList} .neq.}} {{vtCalc: getZipMethod() }} {{vtSet: ZipMethod }} {{vtIf: {vtGet:ZipMethod} .eq. external }} {{vtCalc: create_zip_file( '{vtGet:Zipname}', '{vtConfig:pathToVirthos}{vtGet:Directory,escaped}', '{vtGet:FinalList,escaped}' ) }} {{vtSet: ZipFile}} {{vtElse}} {{vtCalc: deliver_zip_file( '{vtGet:Zipname}', '{vtConfig:pathToVirthos}{vtGet:Directory,escaped}', '{vtGet:FinalList,escaped}' ) }} {{vtSet: SuccessfulDelivery }} {{vtEndIf}} {{vtIf: {vtGet:ZipFile} .cn. : .or. {vtGet:SuccessfulDelivery} .eq. 1 }} {{vtIf: {vtGlobal:mailRecipient} .neq. .or. {vtGlobal:pxtcNotifyRecipient} .neq. }} {{vtIf: {vtUser:realname}.neq.}} {{vtSet: User="{vtUser:realname}"}} {{vtElse}} {{vtSet: User="Benutzer '{vtUser:name}'"}} {{vtEndIf}} {{vtIf: {vtGlobal:pxtcNotifyRecipient} .neq. }} {{vtSet: Recipient = "{vtGlobal:pxtcNotifyRecipient}" }} {{vtElse}} {{vtSet: Recipient = "{vtGlobal:mailRecipient}" }} {{vtEndIf}} {{vtSet: Mailtext="{vtInclude:mails/notify_download.txt}"}} {{vtIf: {vtGetValue:rule} .neq. }} {{vtIf: {vtGet:Notify} .eq. 1 }} {{vtDo: -act="mail", -to="{vtGet:Recipient}", -subject="Pixtacy-Download von {vtGet:User} (Lightbox/{vtGetValue:rule})", -message="{vtGet:Mailtext,raw}" }} {{vtEndIf}} {{vtElseIf: {vtGetValue:v} .neq. }} {{vtIf: {vtGlobal:pxtcNotifyHiresDownload} .eq. 1}} {{vtDo: -act="mail", -to="{vtGet:Recipient}", -subject="Pixtacy-Download von {vtGet:User} (Lightbox/High-res)", -message="{vtGet:Mailtext,raw}" }} {{vtEndIf}} {{vtElse}} {{vtIf: {vtGlobal:pxtcNotifyLoresDownload} .eq. 1}} {{vtDo: -act="mail", -to="{vtGet:Recipient}", -subject="Pixtacy-Download von {vtGet:User} (Lightbox/Low-res)", -message="{vtGet:Mailtext,raw}" }} {{vtEndIf}} {{vtEndIf}} {{vtEndIf}} {{vtIf: {vtGet:LogType} .neq.}} {{vtRepeat: {vtGet:FinalList} }} {{vtCalc: array_shift( explode( '|', '{vtItem:escaped}' ) ) }} {{vtSet: ImagePath }} {{vtDbQuery: INSERT INTO {vtDbTable:table_downloads_log} SET `timestamp` = CURRENT_TIMESTAMP, `ip_address` = '{vtEcho: getenv( 'REMOTE_ADDR' ) }', `session_id` = '{vtSession:id}', `type` = '{vtGet:LogType}', `user` = '{vtUser:name}', `realname` = '{vtUser:realname}', `organization` = '{vtUser:Contact_Company}', `image_path` = '/{vtGet:ImagePath,raw}' }} {{vtEndRepeat}} {{vtEndIf}} {{vtRepeat: {vtGet:DeleteList} }} {{vtCalc: unlink('{vtItem:escaped}') }} {{vtEndRepeat}} {{vtIf: {vtGet:ZipMethod} .eq. external }} {{vtRedirect: -url="{vtGet:ZipFile}" }} {{vtEndIf}} {{vtEndIf}} {{vtReturn}} {{vtEndIf}} {{vtEndScript}}
{{vtGet:s_msg_0053}}
{{vtGet:s_msg_0034}}
{{vtTemplate: views/empty.html }}