$oURL = od_clone($goApp->oImageURL); $oURL->addComponent("remove-button.gif"); $oTrashImg = new WYImage($oURL); $oTrashImg->setAttribute("style", "border: 0"); foreach ($aEntries as $dEntry) { if ($iCol == 0) { echo "<tr>"; } $sFilename = $dEntry[FILENAME]; $sDisplayFilename = str_replace("rtimg-", "", $sFilename); $sDisplayFilename = preg_replace('|([-_])|', '\\1­', $sDisplayFilename); $sURL = $dEntry[URL]; $sPath = $dEntry[PATH]; $oImg = new WYImage(new WYURL($sURL)); $iWidth = $oImg->iWidth(); $iHeight = $oImg->iHeight(); if ($iWidth != 0 && $iHeight != 0) { WYImage::bLimitSize($iWidth, $iHeight, IMG_SIZE, IMG_SIZE); } else { $iWidth = $iHeight = IMG_SIZE; } $oImg->setAttribute("width", $iWidth); $oImg->setAttribute("height", $iHeight); $oImg->setAttribute("style", "border: 0"); unset($oTrashLink); unset($oTrashLinkURL); $oTrashLinkURL = od_clone(WYURL::oCurrentURL()); $oTrashLinkURL->dQuery[ACTION] = ACTION_DELETE; $oTrashLinkURL->dQuery[FILENAME] = $sFilename; $oTrashLink = new WYLink($oTrashLinkURL); $oTrashLink->setAttribute("onclick", "return confirmDelete()");
$oP = new WYPath($sFilename); if (!$oP->bCheck(WYPATH_CHECK_NOPATH | WYPATH_CHECK_JUSTIMAGE)) { $goApp->log("illegal filename in image-detail: <{$sFilename}>"); exit(-1); } $oURL = od_clone($goApp->oDataURL); if ($bDemoContent) { $oURL->removeDemoSlotID(); } $oURL->addComponent($sFilename); $oImage = new WYImage($oURL); if ($sAltText) { $oImage->setAttribute("alt", $sAltText); } $iW = $oImage->iWidth(); $iH = $oImage->iHeight(); if (!$sAltText) { $sAltText = WYTS("GalleryCloseWindow"); } } else { exit(-1); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title><?php WYTSD("GalleryDetailTitle", true); ?> </title> <?php