{{vtScript}} {{vtInclude: includes/initialize.html}} {{vtIf: {vtGetValue:o} .gt. 0}} {{vtUse: {vtGetValue:o} }} {{vtSet: Token="{Token}"}} {{vtIf: {abgeschlossen} .eq. 1 .and. {Bezahlmethode} .in. rechnung|sepa }} {{vtSet: bezahlt="1"}} {{vtElse}} {{vtSet: bezahlt="{bezahlt}"}} {{vtEndIf}} {{vtSet: Warenkorb="{Warenkorb:raw}"}} {{vtSet: User = "{Vorname} {Name}"}} {{vtSet: Bestellnummer = "{Nummer}" }} {{vtEndUse}} {{vtElse}} {{vtSet: Token="x"}} {{vtEndIf}} {{vtIf: {vtGet:bezahlt} .eq. 1 .and. {vtGet:Token} .eq. {vtGetValue:t} .and. {vtGetValue:i} .gt. 0 }} {{vtRepeat:{vtGet:Warenkorb} }} {{vtIf: {vtItem:id} .eq. {vtGetValue:i} .and. {vtItem:type} .eq. file .and. {vtItem:hires_path} .neq.}} {{vtIf: {vtGlobal:pxtcPathHires} .bw. / }} {{vtSet: File="{vtGlobal:pxtcPathHires}/{vtItem:folder}/{vtItem:hires_path}"}} {{vtElse}} {{vtSet: File="{vtConfig:pathToVirthos}{vtGlobal:pxtcPathHires}/{vtItem:folder}/{vtItem:hires_path}"}} {{vtEndIf}} {{vtCalc: realpath( '{vtGet:File,raw}' ) }} {{vtSet: File}} {{vtCalc: basename('{vtGet:File,escaped}') }} {{vtSet: FileName }} {{vtIf: {vtItem:rule} .neq.}} {{vtCalc: substr( '{vtGet:FileName,escaped}', 0, -4 ) . '_' . strtolower('{vtItem:rule}') . '.jpg' }} {{vtSet: FileName }} {{vtCalc: generate_image_file( '{vtGet:File,raw}', '{vtItem:rule}', '{vtItem:image}' ) }} {{vtSet: File }} {{vtSet: DeleteFile }} {{vtIf: {vtGet:File} .bw. - }} {{vtCode: die( 'Could not generate image [' . v::vtget('File') . ']' ); }} {{vtEndIf}} {{vtEndIf}} {{vtCalc: @apache_setenv( 'no-gzip', 1 ) && @ini_set( 'zlib.output_compression', 0 ) }} {{vtDeliver: {vtGet:File}, {vtGet:FileName} }} {{vtIf: {vtResult} .lt. 0 }} {{vtReturn}} {{vtEndIf}} {{vtIf: {vtGlobal:mailRecipient} .neq. .or. {vtGlobal:pxtcNotifyRecipient} .neq. }} {{vtIf: {vtGlobal:pxtcNotifyHiresDownload} .eq. 1 }} {{vtIf: {vtGlobal:pxtcNotifyRecipient} .neq. }} {{vtSet: Recipient = "{vtGlobal:pxtcNotifyRecipient}" }} {{vtElse}} {{vtSet: Recipient = "{vtGlobal:mailRecipient}" }} {{vtEndIf}} {{vtDo: -act="mail", -to="{vtGet:Recipient}", -subject="Pixtacy-Download zu Bestellung Nr. {vtGet:Bestellnummer} ({vtItem:filename})", -message="Die Bilddatei '{vtItem:folder}/{vtItem:hires_path}' wurde am {vtDate|d.m.Y} um {vtDate|H:i} Uhr von IP {vtEcho: getenv( 'REMOTE_ADDR' )} heruntergeladen." }} {{vtEndIf}} {{vtEndIf}} {{vtIf: {vtGet:DeleteFile} .neq. }} {{vtCalc: unlink('{vtGet:DeleteFile,escaped}') }} {{vtEndIf}} {{vtExit}} {{vtEndIf}} {{vtEndRepeat}} {{vtEndIf}} {{vtEndScript}}{{vtInclude:download.html}}