/** * Prints the Shutterfly logo and links to print an image. * */ function printShutterfly() { echo '<script type="text/javascript">' . "\n"; echo '<!--/* Code from http://www.netlobo.com/div_hiding.html */-->' . "\n"; echo ' function toggleLayer(whichLayer) {' . "\n"; echo ' if (document.getElementById) {' . "\n"; echo '// this is the way the standards work' . "\n"; echo ' var style2 = document.getElementById(whichLayer).style;' . "\n"; echo ' style2.display = style2.display? "":"block";' . "\n"; echo ' } else if (document.all) {' . "\n"; echo '// this is the way old msie versions work' . "\n"; echo ' var style2 = document.all[whichLayer].style;' . "\n"; echo ' style2.display = style2.display? "":"block";' . "\n"; echo ' } else if (document.layers) {' . "\n"; echo '// this is the way nn4 works' . "\n"; echo ' var style2 = document.layers[whichLayer].style;' . "\n"; echo ' style2.display = style2.display? "":"block";' . "\n"; echo ' }' . "\n"; echo ' }' . "\n"; echo '</script>' . "\n"; echo "<div id=\"zp-shutterfly\" onClick=\"toggleLayer('extended')\">\n"; echo ' <div id="extended">' . "\n"; echo ' <form action="http://www.shutterfly.com/c4p/UpdateCart.jsp" method="post">' . "\n"; echo ' <input type="hidden" name="addim" value="1" />' . "\n"; echo ' <input type="hidden" name="protocol" value="SFP,100" />' . "\n"; echo ' <input type="hidden" name="pid" value="C4P" />' . "\n"; echo ' <input type="hidden" name="psid" value="AFFL" />' . "\n"; echo ' <input type="hidden" name="puid" value="visitor" />' . "\n"; echo ' <input type="hidden" name="imnum" value="1" />' . "\n"; echo ' <input type="hidden" name="imraw-1" value="http://' . $_SERVER['HTTP_HOST'] . htmlspecialchars(getUnprotectedImageURL()) . '" />' . "\n"; echo ' <input type="hidden" name="imrawwidth-1" value="' . getFullWidth() . '" />' . "\n"; echo ' <input type="hidden" name="imrawheight-1" value="' . getFullHeight() . '" />' . "\n"; echo ' <input type="hidden" name="imthumb-1" value="http://' . $_SERVER['HTTP_HOST'] . getImageThumb() . '" />' . "\n"; echo ' <input type="hidden" name="imthumbheight-1" value="' . getOption('thumb_crop_height') . '" />' . "\n"; echo ' <input type="hidden" name="imthumbwidth-1" value="' . getOption('thumb_crop_width') . '" />' . "\n"; echo ' <input type="hidden" name="returl" value="http://' . $_SERVER['HTTP_HOST'] . htmlspecialchars(getImageLinkURL()) . '" />' . "\n"; echo ' <input type="submit" value="Add to Shutterfly Cart »" />' . "\n"; echo ' </form>' . "\n"; echo ' </div>' . "\n"; echo '</div>' . "\n"; }
/** * Returns true if the image is landscape-oriented (width is greater than height) * * @param $image object the image for which the size is desired. NULL means the current image * * @return bool */ function isLandscape($image = NULL) { if (getFullWidth($image) >= getFullHeight($image)) { return true; } return false; }
/** * @deprecated */ function printCustomSizedImageMaxHeight($maxheight) { deprecated_function_notify(gettext('Use printCustomSizedImageMaxSpace().')); if (getFullWidth() === getFullHeight() or getDefaultHeight() > $maxheight) { printCustomSizedImage(getImageTitle(), null, null, $maxheight, null, null, null, null, null, null); } else { printDefaultSizedImage(getImageTitle()); } }
} ?> <?php if (function_exists('printAddToFavorites')) { printAddToFavorites($_zp_current_album); } if ($zpskel_download) { ?> <a style="margin-bottom:10px;" class="button" href="<?php echo html_encode(getFullImageURL()); ?> " title="<?php echo gettext('Download Original'); ?> "><?php echo gettext('Download Original') . ' (' . getFullWidth() . ' x ' . getFullHeight() . ')'; ?> </a><?php } printPPSlideShowLink(gettext('Start Slideshow')); ?> </div> </div> </div> <div class="wrapper contrast"> <div class="container"> <div class="sixteen columns"> <?php if (function_exists('printAlbumMenu')) { ?> <div class="jump-menu"><?php
</a> <div id="image_data"> <div id="fullsize_download_link"> <em> <a href="<?php echo htmlspecialchars(getFullImageURL()); ?> " title="<?php echo getBareImageTitle(); ?> "><?php echo gettext("Original Size:"); ?> <?php echo getFullWidth() . "x" . getFullHeight(); ?> </a> </em> </div> <div id="meta_link"> <?php if (getImageEXIFData()) { echo "<a href=\"#TB_inline?height=345&width=300&inlineId=imagemetadata\" title=\"" . gettext("Image Info") . "\" class=\"thickbox\">" . gettext("Image Info") . "</a>"; printImageMetadata('', false); } ?> </div> <br clear="all" />
printImageTitle(true); ?> </h2> </div> <div id="main-content"> <div id="fullplate-photo"> <h2><?php printImageDesc(true); ?> </h2> <?php $mw = IMG_MAX_WIDTH; $mh = IMG_MAX_HEIGHT; $iw = getFullWidth(); $ih = getFullHeight(); if (isLandscape()) { if ($iw >= $mw) { list($nw, $nh) = getSizeCustomImage(null, $mw); $iw = $nw; $ih = null; if ($nh > $mh) { list($nw, $nh) = getSizeCustomImage(null, null, $mh); $iw = null; $ih = $nh; } } /* echo 'o: ' . getFullWidth() . 'x' . getFullHeight() . "<br />\n"; echo 'i: ' . $iw . 'x' . $ih . "<br />\n"; echo 'm: ' . $mw . 'x' . $mh . "<br />\n";
/** * Returns true if the image is landscape-oriented (width is greater than height) * * @return bool */ function isLandscape() { if (getFullWidth() >= getFullHeight()) { return true; } return false; }
/** * This function is considered deprecated. * Please use the new replacement get/printCustomSizedImageMaxSpace(). * * Prints out a sized image up to $maxheight tall (as width the value set in the admin option is taken) * * @param int $maxheight how bif the picture should be */ function printCustomSizedImageMaxHeight($maxheight) { trigger_error(gettext('printCustomSizedImageMaxHeight is deprecated. Use printCustomSizedImageMaxSpace().'), E_USER_NOTICE); if (getFullWidth() === getFullHeight() or getDefaultHeight() > $maxheight) { printCustomSizedImage(getImageTitle(), null, null, $maxheight, null, null, null, null, null, null); } else { printDefaultSizedImage(getImageTitle()); } }
echo getCustomImageURL(null, $iw, $ih, $cw, $ch); ?> " alt="<?php echo getImageTitle(); ?> " width="<?php echo $iw; ?> " height="<?php echo $ih; ?> " /> <span><?php echo 'image size: ' . getFullWidth() . 'x' . getFullHeight(); if (getImageDesc() != '') { echo '<br /><br />' . getImageDesc(); } ?> </span></a> </li> <?php } ?> </ul> </div> <div id="fullplate-navigation">