{{vtIf: {vtCurrentAccessRights} .ncn. update}}{{vtRedirect}}{{vtEndIf}}{{vtScript}} ### sucht das x-te (URL-Parameter "-pos") zu aktualisierende Bild und aktualisiert es ### {{vtIf: {vtSession:update_recursive} .neq. 1}} {{vtSet: depth="1"}} {{vtEndIf}} {{vtIf: {vtSession:update_ignore} .eq. 1}} {{vtCalc: time() - 60*{vtSession:update_ignore_minutes} }} {{vtSelect: -type="image", -depth="{vtGet:depth}", -skip="{vtGetValue:-pos}", -max="2", -sortfield[]="Verzeichnis", -sortfield[]="Dateiname", -filter="{LastCheck} .lt. {vtResult}"}} {{vtElse}} {{vtSelect: -type="image", -depth="{vtGet:depth}", -skip="{vtGetValue:-pos}", -max="2", -sortfield[]="Verzeichnis", -sortfield[]="Dateiname"}} {{vtEndIf}} {{vtIf: {vtCountSelection} .gt. 1}} {{vtSet: Result[last_image]="0"}} {{vtElse}} {{vtSet: Result[last_image]="1"}} {{vtEndIf}} {{vtLoop}} {{vtSet: Result[link]="{vtLink}", Result[id]="{vtID}", Result[path]="{Verzeichnis}/{Dateiname}"}} {{vtSet: ImagePath="{vtGlobal:pxtcPathLores}/{Verzeichnis}/{Dateiname}" }} {{vtCalc: file_exists('{vtGet:ImagePath,raw}') ? '1' : '0' }} {{vtIf: {vtResult} .eq. 0}} {{vtSet: Result[error]="1"}} {{vtExit}} {{vtEndIf}} {{vtCalc: filemtime( '{vtGet:ImagePath,raw}' ) }} {{vtSet: Timestamp}} {{vtCalc: time() }} {{vtSet: CurrentTimestamp}} {{vtIf: {Format} .eq. }} {{vtLoad: templates/pixtacy/resources/functions.php}} {{vtCalc: getImageOrientation( '{vtGet:ImagePath,raw}', 0.01 ) }} {{vtDo: -act="update", -obj="{vtID}", Format="{vtResult}" }} {{vtSet: Result[status_format]="1"}} {{vtEndIf}} {{vtIf: {vtSession:update_iptc} .gt. 0}} {{vtSet: DoUpdate="1"}} {{vtIf: {vtSession:update_iptc} .eq. 1}} {{vtIf: {vtGet:Timestamp} .eq. {Timestamp} }} {{vtSet: DoUpdate="0"}} {{vtSet: Result[status_iptc]="0"}} {{vtEndIf}} {{vtEndIf}} {{vtIf: {vtGet:DoUpdate} .eq. 1}} {{vtLoad: templates/pixtacy/resources/functions.php}} {{vtSet: charset="{vtGlobal:pxtcIPTCCharset}" }} {{vtIf: {vtGet:charset} .eq. latin1 }} {{vtSet:charset=""}} {{vtEndIf}} {{vtRepeat: Category, Keywords, ReferenceNumber, CreationDate, CreationTime, Photographer, City, State, CountryCode, Country, Title, Credit, Copyright, Description, Instructions }} {{vtCalc: getIPTCHeader('{vtGet:ImagePath,raw}', '{vtItem}', '{vtGet:charset}' ) }} {{vtSet: {vtItem}="{vtResult}"}} {{vtEndRepeat}} {{vtDo: -act="update", -obj="{vtID}", Timestamp="{vtGet:Timestamp}", LastCheck="{vtGet:CurrentTimestamp}", Name="{vtGet:Title}", Remarks="{vtGet:Description}", Keywords="{vtGet:Keywords}", Category="{vtGet:Category}", ReferenceNumber="{vtGet:ReferenceNumber}", CreationDate="{vtGet:CreationDate}", CreationTime="{vtGet:CreationTime}", Photographer="{vtGet:Photographer}", City="{vtGet:City}", State="{vtGet:State}", CountryCode="{vtGet:CountryCode}", Country="{vtGet:Country}", Credit="{vtGet:Credit}", Copyright="{vtGet:Copyright}", Instructions="{vtGet:Instructions}" }} {{vtSet: Result[status_iptc]="1"}} {{vtEndIf}} {{vtEndIf}} {{vtIf: {vtSession:update_thumbs} .gt. 0}} {{vtInclude: includes/initialize.html}} {{vtLoad: templates/pixtacy/resources/functions.php}} {{vtSet: Result[status_thumbs]=""}} {{vtIf: {vtSession:update_thumbs} .eq. 1}} {{vtCalc: makeThumbnail('{vtGet:ImagePath,raw}','{vtGet:thumbnailURL}/{Verzeichnis}/{Dateiname}', false ) }} {{vtElse}} {{vtCalc: makeThumbnail('{vtGet:ImagePath,raw}','{vtGet:thumbnailURL}/{Verzeichnis}/{Dateiname}', true ) }} {{vtEndIf}} {{vtSet: Result[status_thumbs]="{vtResult}"}} {{vtEndIf}} {{vtIf: {vtGet:DoUpdate} .eq. 0 }} {{vtDo: -act="update", -obj="{vtID}", LastCheck="{vtGet:CurrentTimestamp}" }} {{vtEndIf}} {{vtExit}} {{vtEndLoop}} {{vtEndSelect}} {{vtEndScript}}{{vtGet:Result}}