function printHeadingImage($randomImage) { global $_zp_themeroot; $id = getAlbumId(); echo '<div id="randomhead">'; if (is_null($randomImage)) { echo '<img src="' . $_zp_themeroot . '/images/zen-logo.jpg" alt="' . gettext('There were no images from which to select the random heading.') . '" />'; } else { $randomAlbum = $randomImage->getAlbum(); $randomAlt1 = $randomAlbum->getTitle(); if ($randomAlbum->getAlbumId() != $id) { $randomAlbum = $randomAlbum->getParent(); while (!is_null($randomAlbum) && $randomAlbum->getAlbumId() != $id) { $randomAlt1 = $randomAlbum->getTitle() . ":\n" . $randomAlt1; $randomAlbum = $randomAlbum->getParent(); } } $randomImageURL = html_encode(getURL($randomImage)); if (getOption('allow_upscale')) { $wide = 620; $high = 180; } else { $wide = min(620, $randomImage->getWidth()); $high = min(180, $randomImage->getHeight()); } echo "<a href='" . $randomImageURL . "' title='" . gettext('Random picture...') . "'>"; $html = "<img src='" . html_encode($randomImage->getCustomImage(NULL, $wide, $high, $wide, $high, NULL, NULL, !getOption('Watermark_head_image'))) . "' width='{$wide}' height='{$high}' alt=" . '"' . html_encode($randomAlt1) . ":\n" . html_encode($randomImage->getTitle()) . '" />'; $html = zp_apply_filter('custom_image_html', $html, false); echo $html; echo '</a>'; } echo '</div>'; }
/** * Constructor for class-video * * @param object &$album the owning album * @param sting $filename the filename of the image * @return Image */ function Video(&$album, $filename) { global $_zp_supported_images; // $album is an Album object; it should already be created. if (!is_object($album)) { return NULL; } if (!$this->classSetup($album, $filename)) { // spoof attempt $this->exists = false; return; } $this->sidecars = $_zp_supported_images; $this->video = true; $this->objectsThumb = checkObjectsThumb($album->localpath, $filename); // Check if the file exists. if (!file_exists($this->localpath) || is_dir($this->localpath)) { $this->exists = false; return; } // This is where the magic happens... $album_name = $album->name; $this->updateDimensions(); if (parent::PersistentObject('images', array('filename' => $filename, 'albumid' => $this->album->id), 'filename', false, empty($album_name))) { $this->set('mtime', $ts = filemtime($this->localpath)); $this->updateMetaData(); $this->save(); zp_apply_filter('new_image', $this); } }
static function css() { global $_zp_gallery; $inTheme = false; if (OFFSET_PATH) { $themepath = 'colorbox_js/themes/example4/colorbox.css'; } else { $theme = getOption('colorbox_theme'); if (empty($theme)) { $themepath = 'colorbox_js/themes/example4/colorbox.css'; } else { if ($theme == 'custom') { $themepath = zp_apply_filter('colorbox_themepath', 'colorbox_js/colorbox.css'); } else { $themepath = 'colorbox_js/themes/' . $theme . '/colorbox.css'; } $inTheme = $_zp_gallery->getCurrentTheme(); } } $css = getPlugin($themepath, $inTheme, true); ?> <link rel="stylesheet" href="<?php echo $css; ?> " type="text/css" /> <script type="text/javascript" src="<?php echo FULLWEBPATH . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER; ?> /colorbox_js/jquery.colorbox-min.js"></script> <script> /* Colorbox resize function */ var resizeTimer; function resizeColorBox() { if (resizeTimer) clearTimeout(resizeTimer); resizeTimer = setTimeout(function() { if (jQuery('#cboxOverlay').is(':visible')) { jQuery.colorbox.resize({width: '90%', maxHeight: '90%'}); jQuery('#cboxLoadedContent img').css('max-width', '100%').css('height', 'auto'); } }, 300) } // Resize Colorbox when resizing window or changing mobile device orientation jQuery(window).resize(resizeColorBox); window.addEventListener("orientationchange", resizeColorBox, false); </script> <?php }
function __construct($folder8, $cache = true, $quiet = false) { $folder8 = trim($folder8, '/'); $folderFS = internalToFilesystem($folder8); $localpath = ALBUM_FOLDER_SERVERPATH . $folderFS; $this->linkname = $this->name = $folder8; $this->localpath = rtrim($localpath, '/'); if (!($this->exists = AlbumBase::albumCheck($folder8, $folderFS, $quiet, !file_exists($this->localpath) || is_dir($this->localpath)))) { return; } $data = explode("\n", file_get_contents($localpath)); foreach ($data as $param) { $parts = explode('=', $param); switch (trim($parts[0])) { case 'USER': $owner = trim($parts[1]); break; case 'TITLE': $this->instance = trim($parts[1]); break; case 'THUMB': $this->set('thumb', trim($parts[1])); break; } } $new = $this->instantiate('albums', array('folder' => $this->name), 'folder', $cache); $title = $this->getTitle('all'); $desc = $this->getDesc('all'); parent::__construct($owner); $this->exists = true; if (!is_dir(stripSuffix($this->localpath))) { $this->linkname = stripSuffix($folder8); } $this->name = $folder8; $this->setTitle($title); $this->setDesc($desc); if ($new) { $title = $this->get('title'); $this->set('title', stripSuffix($title)); // Strip the suffix $this->setDateTime(strftime('%Y-%m-%d %H:%M:%S', $this->get('mtime'))); $this->save(); zp_apply_filter('new_album', $this); } zp_apply_filter('album_instantiate', $this); }
/** * @param object $album the owner album * @param string $filename the filename of the media file */ function __construct(&$album, $filename) { global $_zp_supported_images; // $album is an Album object; it should already be created. if ( ! is_object($album)) return NULL; if ( ! $this->classSetup($album, $filename)) { // spoof attempt $this->exists = FALSE; return; } $this->sidecars = $_zp_supported_images; $this->objectsThumb = checkObjectsThumb($album->localpath, $filename); // Check if the file exists. if ( ! file_exists($this->localpath) || is_dir($this->localpath)) { $this->exists = FALSE; return; } /* check the file extension, and then set the mediaType if supported */ $extension = substr(strtolower(strrchr($this->localpath,'.')),1); foreach ($this->mediaTypes AS $t => $l) { if (in_array($extension,$l)) { $this->mediaType = $t; break; } } unset($t,$l); $this->updateDimensions(); if (parent::PersistentObject('images', array('filename'=>$filename, 'albumid'=>$this->album->id), 'filename', FALSE, FALSE)) { $this->set('mtime', $ts = filemtime($this->localpath)); $this->updateMetaData(); $this->save(); zp_apply_filter('new_image', $this); } }
<?php printContactForm(); ?> </div> </div> <!-- Footer --> <div class="footlinks"> <?php printThemeInfo(); ?> <?php printZenphotoLink(); ?> </div> <!-- footerlinks --> <?php zp_apply_filter('theme_body_close'); ?> </body> </html> <?php } else { include SERVERPATH . '/' . ZENFOLDER . '/404.php'; }
</head> <body> <?php printLogoAndLinks(); ?> <div id="main"> <?php printTabs(); ?> <div id="content"> <?php printSubtabs('Mailing'); ?> <div class="tabbox"> <?php zp_apply_filter('admin_note', 'user_mailing', ''); ?> <h1><?php echo gettext('User mailing list'); ?> </h1> <p><?php echo gettext("A tool to send e-mails to all registered users who have provided an e-mail address. There is always a copy sent to the current admin and all e-mails are sent as <em>blind copies</em>."); ?> </p> <?php if (!zp_has_filter('sendmail')) { $disabled = ' disabled="disabled"'; ?> <p class="notebox"> <?php
<?php printLogoAndLinks(); ?> <div id="main"> <?php printTabs(); ?> <div id="content"> <div id="container"> <?php $subtab = printSubtabs(); ?> <div class="tabbox"> <?php zp_apply_filter('admin_note', 'upload', $subtab); ?> <h1><?php echo gettext('File Manager'); ?> </h1> <?php $locale = substr(getOption("locale"), 0, 2); if (empty($locale)) { $locale = 'en'; } ?> <iframe src="zp-extensions/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php?language=<?php echo $locale; ?> &tab=files" width="100%" height="480" style="border: 0">
$msg = sanitize($_GET['applied']); if ($msg) { echo "<div class=\"errorbox space\">"; echo "<h2>" . $msg . "</h2>"; echo "</div>"; } else { echo '<div class="messagebox fade-message">'; echo "<h2>" . gettext('Processed') . "</h2>"; echo '</div>'; } } $subtab = printSubtabs(); ?> <div id="tab_users" class="tabbox"> <?php zp_apply_filter('admin_note', 'users', $subtab); $groups = array(); $subscription = 86400 * getOption('user_expiry_interval'); $now = time(); $warnInterval = $now + getOption('user_expiry_warn_interval') * 86400; ?> <p> <?php echo gettext("Manage user expiry."); ?> </p> <form action="?action=expiry" method="post" autocomplete="off" > <?php XSRFToken('expiry'); ?> <span class="buttons">
/** * Prints a link to call the slideshow (not shown if there are no images in the album) * To be used on album.php and image.php * A CSS id names 'slideshowlink' is attached to the link so it can be directly styled. * * If the mode is set to "jQuery Colorbox" and the Colorbox plugin is enabled this link starts a Colorbox slideshow * from a hidden HTML list of all images in the album. On album.php it starts with the first always, on image.php with the current image. * * @param string $linktext Text for the link * @param string $linkstyle Style of Text for the link */ function printSlideShowLink($linktext = NULL, $linkstyle = Null) { global $_zp_gallery, $_zp_current_image, $_zp_current_album, $_zp_current_search, $slideshow_instance, $_zp_gallery_page; if (is_null($linktext)) { $linktext = gettext('View Slideshow'); } if (empty($_GET['page'])) { $pagenr = 1; } else { $pagenr = sanitize_numeric($_GET['page']); } $slideshowhidden = ''; $numberofimages = 0; if (in_context(ZP_SEARCH)) { $imagenumber = ''; $imagefile = ''; $albumnr = 0; $slideshowlink = rewrite_path(_PAGE_ . '/slideshow', "index.php?p=slideshow"); $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />'; } else { if (in_context(ZP_IMAGE)) { $imagenumber = imageNumber(); $imagefile = $_zp_current_image->filename; } else { $imagenumber = ''; $imagefile = ''; } if (in_context(ZP_SEARCH_LINKED)) { $albumnr = -$_zp_current_album->getID(); $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />'; } else { $albumnr = $_zp_current_album->getID(); } if ($albumnr) { $slideshowlink = rewrite_path(pathurlencode($_zp_current_album->getFileName()) . '/' . _PAGE_ . '/slideshow', "index.php?p=slideshow&album=" . urlencode($_zp_current_album->getFileName())); } else { $slideshowlink = rewrite_path(_PAGE_ . '/slideshow', "index.php?p=slideshow"); $slideshowhidden = '<input type="hidden" name="favorites_page" value="1" />' . "\n" . '<input type="hidden" name="title" value="' . $_myFavorites->instance . '" />'; } } $numberofimages = getNumImages(); $option = getOption('slideshow_mode'); switch ($option) { case 'jQuery': if ($numberofimages > 1) { ?> <form name="slideshow_<?php echo $slideshow_instance; ?> " method="post" action="<?php echo zp_apply_filter('getLink', $slideshowlink, 'slideshow.php', NULL); ?> "> <?php echo $slideshowhidden; ?> <input type="hidden" name="pagenr" value="<?php echo html_encode($pagenr); ?> " /> <input type="hidden" name="albumid" value="<?php echo $albumnr; ?> " /> <input type="hidden" name="numberofimages" value="<?php echo $numberofimages; ?> " /> <input type="hidden" name="imagenumber" value="<?php echo $imagenumber; ?> " /> <input type="hidden" name="imagefile" value="<?php echo html_encode($imagefile); ?> " /> <?php if (!empty($linkstyle)) { echo '<p style="' . $linkstyle . '">'; } ?> <a class="slideshowlink" id="slideshowlink_<?php echo $slideshow_instance; ?> " href="javascript:document.slideshow_<?php echo $slideshow_instance; ?> .submit()"><?php echo $linktext; ?> </a> <?php if (!empty($linkstyle)) { echo '</p>'; } ?> </form> <?php } $slideshow_instance++; break; case 'colorbox': $theme = $_zp_gallery->getCurrentTheme(); $script = stripSuffix($_zp_gallery_page); if (!getOption('colorbox_' . $theme . '_' . $script)) { setOptionDefault('colorbox_' . $theme . '_' . $script, 1); $themes = $_zp_gallery->getThemes(); ?> <div class="errorbox"><?php printf(gettext('Slideshow not available because colorbox is not enabled on %1$s <em>%2$s</em> pages.'), $themes[$theme]['name'], $script); ?> </div> <?php break; } if ($numberofimages > 1) { if (in_context(ZP_SEARCH_LINKED) && !in_context(ZP_ALBUM_LINKED) || in_context(ZP_SEARCH) && is_null($_zp_current_album)) { $images = $_zp_current_search->getImages(0); } else { $images = $_zp_current_album->getImages(0); } $count = ''; ?> <script type="text/javascript"> $(document).ready(function() { $("a[rel='slideshow']").colorbox({ slideshow: true, loop: true, transition: '<?php echo getOption('slideshow_colorbox_transition'); ?> ', slideshowSpeed: <?php echo getOption('slideshow_speed'); ?> , slideshowStart: '<?php echo gettext("start slideshow"); ?> ', slideshowStop: '<?php echo gettext("stop slideshow"); ?> ', previous: '<?php echo gettext("prev"); ?> ', next: '<?php echo gettext("next"); ?> ', close: '<?php echo gettext("close"); ?> ', current: '<?php printf(gettext('image %1$s of %2$s'), '{current}', '{total}'); ?> ', maxWidth: '98%', maxHeight: '98%', photo: true }); }); </script> <?php foreach ($images as $image) { if (is_array($image)) { $suffix = getSuffix($image['filename']); } else { $suffix = getSuffix($image); } $suffixes = array('jpg', 'jpeg', 'gif', 'png'); if (in_array($suffix, $suffixes)) { $count++; if (is_array($image)) { $albobj = newAlbum($image['folder']); $imgobj = newImage($albobj, $image['filename']); } else { $imgobj = newImage($_zp_current_album, $image); } if (in_context(ZP_SEARCH_LINKED) || $_zp_gallery_page != 'image.php') { if ($count == 1) { $style = ''; } else { $style = ' style="display:none"'; } } else { if ($_zp_current_image->filename == $image) { $style = ''; } else { $style = ' style="display:none"'; } } switch (getOption('slideshow_colorbox_imagetype')) { case 'fullimage': $imagelink = getFullImageURL($imgobj); break; case 'sizedimage': $imagelink = $imgobj->getCustomImage(getOption("slideshow_width"), NULL, NULL, NULL, NULL, NULL, NULL, false, NULL); break; } $imagetitle = ''; if (getOption('slideshow_colorbox_imagetitle')) { $imagetitle = html_encode(getBare($imgobj->getTitle())); } ?> <a href="<?php echo html_encode(pathurlencode($imagelink)); ?> " rel="slideshow"<?php echo $style; ?> title="<?php echo $imagetitle; ?> "><?php echo $linktext; ?> </a> <?php } } } break; } }
</table> <!-- single plugin page table --> <input type="hidden" name="checkForPostTruncation" value="1" /> <?php } ?> </form> </div> <!-- end of tab_plugin div --> <?php } if ($subtab == 'security' && zp_loggedin(ADMIN_RIGHTS)) { ?> <div id="tab_security" class="tabbox"> <?php zp_apply_filter('admin_note', 'options', $subtab); ?> <form class="dirty-check" id="form_options" action="?action=saveoptions" method="post" autocomplete="off"> <?php XSRFToken('saveoptions'); ?> <input type="hidden" name="savesecurityoptions" value="yes" /> <table class="options"> <tr> <td colspan="3"> <p class="buttons"> <button type="submit" value="<?php echo gettext('save'); ?> "><img src="images/pass.png" alt="" /><strong><?php echo gettext("Apply");
if (!$rightsalbum->isMyItem(UPLOAD_RIGHTS)) { if (!zp_apply_filter('admin_managed_albums_access', false, $return)) { header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php'); exit; } } if ($new) { mkdir_recursive($targetPath, CHMOD_VALUE); $album = new Album($gallery, $folder); $album->setShow($_POST['http_publishalbum']); $album->setTitle(sanitize($_POST['http_albumtitle'])); $album->setOwner($_zp_current_admin_obj->getUser()); $album->save(); } @chmod($targetPath, CHMOD_VALUE); $error = zp_apply_filter('check_upload_quota', UPLOAD_ERR_OK, $tempFile); if (!$error) { if (is_valid_image($name) || is_valid_other_type($name)) { $seoname = seoFriendly($name); if (strrpos($seoname, '.') === 0) { $seoname = sha1($name) . $seoname; } // soe stripped out all the name. $targetFile = $targetPath . '/' . internalToFilesystem($seoname); if (file_exists($targetFile)) { $append = '_' . time(); $seoname = stripSuffix($seoname) . $append . '.' . getSuffix($seoname); $targetFile = $targetPath . '/' . internalToFilesystem($seoname); } if (move_uploaded_file($tempFile, $targetFile)) { @chmod($targetFile, 0666 & CHMOD_VALUE);
?> </head> <body> <link <?php printLogoAndLinks(); ?> <div id="main"> <?php printTabs(); ?> <div id="content"> <?php zp_apply_filter('admin_note', 'development', ''); ?> <div id="container"> <?php printSubtabs(); ?> <div class="tabbox"> <h1><?php echo gettext('ZenPhoto20 filters'); ?> </h1> <?php echo '<div style="float:left;width:70%;">'; include 'intro.html'; echo '</div>'; echo '<div style="float:right;width:30%;">';
/** * forms the i.php parameter list for an image. * * @param array $args * @param string $album the album name * @param string $image the image name * @return string */ function getImageProcessorURI($args, $album, $image) { list($size, $width, $height, $cw, $ch, $cx, $cy, $quality, $thumb, $crop, $thumbstandin, $passedWM, $adminrequest, $effects) = $args; $args[8] = NULL; // not used by image processor $uri = WEBPATH . '/' . ZENFOLDER . '/i.php?a=' . $album; if (is_array($image)) { $uri .= '&i=' . $image['name'] . '&z=' . ($z = $image['source']); } else { $uri .= '&i=' . $image; $z = NULL; } if (empty($size)) { $args[0] = NULL; } else { $uri .= '&s=' . ($args[0] = (int) $size); } if ($width) { $uri .= '&w=' . ($args[1] = (int) $width); } else { $args[1] = NULL; } if ($height) { $uri .= '&h=' . ($args[2] = (int) $height); } else { $args[2] = NULL; } if (is_null($cw)) { $args[3] = NULL; } else { $uri .= '&cw=' . ($args[3] = (int) $cw); } if (is_null($ch)) { $args[4] = NULL; } else { $uri .= '&ch=' . ($args[4] = (int) $ch); } if (is_null($cx)) { $args[5] = NULL; } else { $uri .= '&cx=' . ($args[5] = (int) $cx); } if (is_null($cy)) { $args[6] = NULL; } else { $uri .= '&cy=' . ($args[6] = (int) $cy); } if ($quality) { $uri .= '&q=' . ($args[7] = (int) $quality); } else { $args[7] = NULL; } $args[8] = NULL; if ($crop) { $uri .= '&c=' . ($args[9] = 1); } else { $args[9] = NULL; } if ($thumb || $thumbstandin) { $uri .= '&t=' . ($args[10] = 1); } else { $args[10] = NULL; } if ($passedWM) { $uri .= '&wmk=' . $passedWM; } else { $args[11] = NULL; } if ($adminrequest) { $args[12] = true; $uri .= '&admin=1'; } else { $args[12] = false; } if ($effects) { $uri .= '&effects=' . $effects; } else { $args[13] = NULL; } $args[14] = $z; $uri .= '&check=' . sha1(HASH_SEED . serialize($args)); $uri = zp_apply_filter('image_processor_uri', $uri); return $uri; }
</head> <body> <?php printLogoAndLinks(); ?> <div id="main"> <?php printTabs(); ?> <div id="content"> <?php $subtab = printSubtabs(); ?> <div id="tab_articles" class="tabbox"> <?php zp_apply_filter('admin_note', 'categories', $subtab); foreach ($reports as $report) { echo $report; } ?> <h1> <?php echo gettext('Categories'); ?> <span class="zenpagestats"><?php printCategoriesStatistic(); ?> </span></h1> <form action="admin-categories.php?page=news&tab=categories" method="post" id="checkeditems" name="checkeditems" onsubmit="return confirmAction();"> <?php XSRFToken('checkeditems');
/** * Prints a form for posting comments * * @param bool $showcomments defaults to true for showing list of comments * @param string $addcommenttext alternate text for "Add a comment:" * @param bool $addheader set true to display comment count header * @param string $comment_commententry_mod use to add styles, classes to the comment form div * @param bool $desc_order default false, set to true to change the comment order to descending ( = newest to oldest) */ function printCommentForm($showcomments = true, $addcommenttext = NULL, $addheader = true, $comment_commententry_mod = '', $desc_order = false) { global $_zp_gallery_page, $_zp_current_admin_obj, $_zp_current_comment, $_zp_captcha, $_zp_authority, $_zp_HTML_cache, $_zp_current_image, $_zp_current_album, $_zp_current_page, $_zp_current_article; if (getOption('email_new_comments')) { $email_list = $_zp_authority->getAdminEmail(); if (empty($email_list)) { setOption('email_new_comments', 0); } } if (is_null($addcommenttext)) { $addcommenttext = '<h3>' . gettext('Add a comment:') . '</h3>'; } switch ($_zp_gallery_page) { case 'album.php': if (!getOption('comment_form_albums')) { return; } $obj = $_zp_current_album; break; case 'image.php': if (!getOption('comment_form_images')) { return; } $obj = $_zp_current_image; break; case 'pages.php': if (!getOption('comment_form_pages')) { return; } $obj = $_zp_current_page; break; case 'news.php': if (!getOption('comment_form_articles') || !is_NewsArticle()) { return; } $obj = $_zp_current_article; break; default: return; break; } $comments_open = $obj->getCommentsAllowed(); ?> <!-- printCommentForm --> <div id="commentcontent"> <?php $num = getCommentCount(); if ($showcomments) { if ($num == 0) { if ($addheader) { echo '<h3 class="empty">' . gettext('No Comments') . '</h3>'; } $display = ''; } else { if ($addheader) { echo '<h3>' . sprintf(ngettext('%u Comment', '%u Comments', $num), $num) . '</h3>'; } if (getOption('comment_form_toggle')) { ?> <div id="comment_toggle"><!-- place holder for toggle button --></div> <script type="text/javascript"> // <!-- <![CDATA[ function toggleComments(hide) { if (hide) { $('div.comment').hide(); $('.Pagination').hide(); $('#comment_toggle').html('<button class="button buttons" onclick="toggleComments(false);"><?php echo gettext('show comments'); ?> </button>'); } else { $('div.comment').show(); $('.Pagination').show(); $('#comment_toggle').html('<button class="button buttons" onclick="toggleComments(true);"><?php echo gettext('hide comments'); ?> </button>'); } } $(document).ready(function () { toggleComments(window.location.hash.search(/#zp_comment_id_/)); }); // ]]> --> </script> <?php $display = ' style="display:none"'; } else { $display = ''; } } $hideoriginalcomments = ''; if (getOption('comment_form_pagination') && COMMENTS_PER_PAGE < $num) { $hideoriginalcomments = ' style="display:none"'; // hide original comment display to be replaced by jQuery pagination } if (getOption('comment_form_pagination') && COMMENTS_PER_PAGE < $num) { ?> <div class="Pagination"></div><!-- this is the jquery pagination nav placeholder --> <div id="Commentresult"></div> <?php } ?> <div id="comments"<?php echo $hideoriginalcomments; ?> > <?php while (next_comment($desc_order)) { if (!getOption('comment_form_showURL')) { $_zp_current_comment['website'] = ''; } ?> <div class="comment" <?php echo $display; ?> > <div class="commentinfo"> <h4 id="zp_comment_id_<?php echo $_zp_current_comment['id']; ?> "><?php printCommentAuthorLink(); ?> : <?php echo gettext('on'); ?> <?php echo getCommentDateTime(); printEditCommentLink(gettext('Edit'), ', ', ''); ?> </h4> </div><!-- class "commentinfo" --> <div class="commenttext"><?php echo html_encodeTagged(getCommentBody(), false); ?> </div><!-- class "commenttext" --> </div><!-- class "comment" --> <?php } ?> </div><!-- id "comments" --> <?php } if (getOption('comment_form_pagination') && COMMENTS_PER_PAGE < $num) { ?> <div class="Pagination"></div><!-- this is the jquery pagination nav placeholder --> <?php } ?> <!-- Comment Box --> <?php if ($comments_open) { if (MEMBERS_ONLY_COMMENTS && !zp_loggedin(POST_COMMENT_RIGHTS)) { echo gettext('Only registered users may post comments.'); } else { $disabled = array('name' => '', 'website' => '', 'anon' => '', 'private' => '', 'comment' => '', 'street' => '', 'city' => '', 'state' => '', 'country' => '', 'postal' => ''); $stored = array_merge(array('email' => '', 'custom' => ''), $disabled, getCommentStored()); $custom = getSerializedArray($stored['custom']); foreach ($custom as $key => $value) { if (!empty($value)) { $stored[$key] = $value; } } foreach ($stored as $key => $value) { $disabled[$key] = false; } if (zp_loggedin()) { if (extensionEnabled('userAddressFields')) { $address = userAddressFields::getCustomData($_zp_current_admin_obj); foreach ($address as $key => $value) { if (!empty($value)) { $disabled[$key] = true; $stored[$key] = $value; } } } $name = $_zp_current_admin_obj->getName(); if (!empty($name)) { $stored['name'] = $name; $disabled['name'] = ' disabled="disabled"'; } else { $user = $_zp_current_admin_obj->getUser(); if (!empty($user)) { $stored['name'] = $user; $disabled['name'] = ' disabled="disabled"'; } } $email = $_zp_current_admin_obj->getEmail(); if (!empty($email)) { $stored['email'] = $email; $disabled['email'] = ' disabled="disabled"'; } if (!empty($address['website'])) { $stored['website'] = $address['website']; $disabled['website'] = ' disabled="disabled"'; } } $data = zp_apply_filter('comment_form_data', array('data' => $stored, 'disabled' => $disabled)); $disabled = $data['disabled']; $stored = $data['data']; foreach ($data as $check) { foreach ($check as $v) { if ($v) { $_zp_HTML_cache->disable(); // shouldn't cache partially filled in pages break 2; } } } if (!empty($addcommenttext)) { echo $addcommenttext; } ?> <div id="commententry" <?php echo $comment_commententry_mod; ?> > <?php $theme = getCurrentTheme(); $form = getPlugin('comment_form/comment_form.php', $theme); require $form; ?> </div><!-- id="commententry" --> <?php } } else { ?> <div id="commententry"> <h3><?php echo gettext('Closed for comments.'); ?> </h3> </div><!-- id="commententry" --> <?php } ?> </div><!-- id="commentcontent" --> <?php if (getOption('comment_form_rss') && getOption('RSS_comments')) { ?> <br clear="all" /> <?php if (class_exists('RSS')) { switch ($_zp_gallery_page) { case "image.php": printRSSLink("Comments-image", "", gettext("Subscribe to comments"), ""); break; case "album.php": printRSSLink("Comments-album", "", gettext("Subscribe to comments"), ""); break; case "news.php": printRSSLink("Comments-news", "", gettext("Subscribe to comments"), ""); break; case "pages.php": printRSSLink("Comments-page", "", gettext("Subscribe to comments"), ""); break; } } } ?> <!-- end printCommentForm --> <?php }
header("HTTP/1.0 302 Found"); header("Status: 302 Found"); header('Location: ' . WEBPATH . '/index.php'); exitZP(); } $obj = @$_zp_gallery_page; $_zp_gallery_page = '404.php'; if (isset($_index_theme)) { $_zp_script = SERVERPATH . "/" . THEMEFOLDER . '/' . internalToFilesystem($_index_theme) . '/404.php'; } else { $_zp_script = NULL; } header('Content-Type: text/html; charset=' . LOCAL_CHARSET); header("HTTP/1.0 404 Not Found"); header("Status: 404 Not Found"); zp_apply_filter('theme_headers'); debug404($album, $image, @$_index_theme); if ($_zp_script && file_exists($_zp_script)) { if (isset($custom) && $custom) { require_once $custom; } include $_zp_script; } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> </head> <body> <?php print404status(isset($album) ? $album : NULL, isset($image) ? $image : NULL, $obj);
']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); <?php } ?> </script> <?php } ?> <?php zp_apply_filter('theme_body_open'); ?> <!-- Pushy Menu --> <nav class="pushy pushy-right"> <?php if (file_exists(UPLOAD_FOLDER . '/logo.png')) { ?> <img id="nav-logo" src="<?php echo WEBPATH . '/' . UPLOAD_FOLDER . '/logo.png'; ?> " alt="<?php printGalleryTitle(); ?> " /> <?php } else {
handleSelectorChange($(this).val()); }); }); //]]> --> </script> <h1> <?php if (is_array($result) && $result['id']) { echo gettext("Menu Manager: Edit Menu Item"); } else { echo gettext("Menu Manager: Add Menu Item"); } ?> </h1> <?php zp_apply_filter('admin_note', 'menu', 'edit'); foreach ($reports as $report) { echo $report; } if (isset($_GET['save']) && !isset($_GET['add'])) { ?> <div class="messagebox fade-message"> <h2> <?php echo gettext("Changes applied"); ?> </h2> </div> <?php } ?>
print_language_string_list($result->getDesc('all'), 'desc', true, NULL, 'desc', '100%', 'zenpage_language_string_list', 10); } else { print_language_string_list($result->getContent('all'), 'content', true, NULL, 'content', '100%', 'zenpage_language_string_list', 13); } ?> </td> </tr> <?php if (is_AdminEditPage("newsarticle")) { $custom = zp_apply_filter('edit_article_custom_data', '', $result); } if (is_AdminEditPage("newscategory")) { $custom = zp_apply_filter('edit_category_custom_data', '', $result); } if (is_AdminEditPage("page")) { $custom = zp_apply_filter('edit_page_custom_data', '', $result); } echo $custom; ?> </table> <span class="buttons"> <strong><a href="<?php echo $backurl; ?> "><img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/arrow_left_blue_round.png" alt="" /><?php echo gettext("Back"); ?> </a></strong>
<?php // force UTF-8 Ø /** * stores all the default values for options * @package setup */ setupLog(gettext('Set Zenphoto default options'), true); require SERVERPATH . '/' . DATA_FOLDER . '/' . CONFIGFILE; require_once dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/security-logger.php'; zp_apply_filter('log_setup', true, 'install', ''); /* fix for NULL theme name */ $active = getOptionList(); $sql = "SELECT * FROM " . prefix('options') . ' WHERE `theme` IS NULL'; $optionlist = query_full_array($sql); if ($optionlist) { foreach ($optionlist as $option) { query('DELETE FROM ' . prefix('options') . ' WHERE `id`=' . $option['id']); setOption($option['name'], $active[$option['name']]); } } $lib_auth_extratext = ""; $salt = 'abcdefghijklmnopqursuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~!@#$%^&*()_+-={}[]|;,.<>?/'; $list = range(0, strlen($salt) - 1); shuffle($list); for ($i = 0; $i < 30; $i++) { $lib_auth_extratext = $lib_auth_extratext . $salt[$list[$i]]; } purgeOption('zenphoto_release'); purgeOption('zenphoto_version'); purgeOption('zenphoto_install');
?> <body> <?php printLogoAndLinks(); ?> <div id="main"> <?php printTabs(); ?> <div id="content"> <?php printSubtabs(); ?> <div class="tabbox"> <?php zp_apply_filter('admin_note', 'schedule', ''); ?> <h1><?php echo gettext('Manage content publication'); ?> </h1> <?php $albpublish = $_zp_gallery->getAlbumPublish(); $imgpublish = $_zp_gallery->getImagePublish(); if (isset($_POST['publish_date'])) { $requestdate = dateTimeConvert(sanitize($_POST['publish_date'])); } else { $requestdate = date('Y-m-d H:i:s'); } $albumidlist = ''; $albumids = '';
<?php /** * The configuration functions for TinyMCE * * Zenpage plugin default light configuration */ $filehandler = zp_apply_filter('tinymce_zenpage_config', NULL); global $_zp_RTL_css; ?> <script type="text/javascript" src="<?php echo WEBPATH . "/" . ZENFOLDER . "/" . PLUGIN_FOLDER; ?> /tinymce4/tinymce.min.js"></script> <script type="text/javascript"> // <!-- <![CDATA[ tinymce.init({ selector: "textarea.texteditor", language: "<?php echo $locale; ?> ", directionality: "<?php echo $_zp_RTL_css ? 'rtl' : 'ltr'; ?> ", relative_urls: false, content_css: "<?php echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER; ?> /tinymce4/config/content.css",
if ($background) { $background = ""; } else { $background = "background-color:#ECF1F2;"; } if ($_zp_current_admin_obj->reset) { $custom_row = NULL; } else { ?> <!-- apply alterrights filter --> <?php $local_alterrights = zp_apply_filter('admin_alterrights', $local_alterrights, $userobj); ?> <!-- apply admin_custom_data filter --> <?php $custom_row = zp_apply_filter('edit_admin_custom_data', '', $userobj, $id, $background, $current, $local_alterrights); } ?> <!-- finished with filters --> <tr> <td colspan="3" style="margin: 0pt; padding: 0pt;border-top: 4px solid #D1DBDF;<?php echo $background; ?> "> <table class="bordered" style="border: 0" id='user-<?php echo $id; ?> '> <tr> <td style="margin-top: 0px; width:20em;<?php echo $background;
/** * Processes the verification POST tickets * @param string $script (we do not use this) * @return string */ static function verify($script) { //process any verifications posted if (isset($_GET['verify_federated_user'])) { $params = unserialize(pack("H*", trim(sanitize($_GET['verify_federated_user']), '.'))); if (time() - $params['date'] < 2592000) { $userobj = Zenphoto_Authority::getAnAdmin(array('`user`=' => $params['user'], '`email`=' => $params['email'], '`valid`>' => 0)); if ($userobj) { $groupname = getOption('federated_login_group'); $groupobj = Zenphoto_Authority::getAnAdmin(array('`user`=' => $groupname, '`valid`=' => 0)); if ($groupobj) { $userobj->setRights($groupobj->getRights()); $userobj->setGroup($groupname); $userobj->setObjects($groupobj->getObjects()); if (getOption('register_user_create_album')) { $userobj->createPrimealbum(); } $userobj->save(); } zp_apply_filter('register_user_verified', $userobj); if (getOption('register_logon_user_notify')) { zp_mail(gettext('Zenphoto Gallery registration'), sprintf(gettext('%1$s (%2$s) has registered for the zenphoto gallery providing an e-mail address of %3$s.'), $userobj->getName(), $userobj->getUser(), $userobj->getEmail())); } Zenphoto_Authority::logUser($userobj); header("Location: " . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php'); exitZP(); } } } return $script; }
/** * Constructor for class-video * * @param object &$album the owning album * @param sting $filename the filename of the image * @return Image */ function __construct($album, $filename, $quiet = false) { global $_zp_supported_images; $msg = false; if (!is_object($album) || !$album->exists) { $msg = gettext('Invalid video instantiation: Album does not exist'); } else { if (!$this->classSetup($album, $filename) || !file_exists($this->localpath) || is_dir($this->localpath)) { $msg = gettext('Invalid video instantiation: file does not exist.'); } } if ($msg) { $this->exists = false; if (!$quiet) { trigger_error($msg, E_USER_ERROR); } return; } $alts = explode(',', extensionEnabled('class-video_videoalt')); foreach ($alts as $alt) { $this->videoalt[] = trim(strtolower($alt)); } $this->sidecars = $_zp_supported_images; $this->video = true; $this->objectsThumb = checkObjectsThumb($this->localpath); // This is where the magic happens... $album_name = $album->name; $this->updateDimensions(); $new = $this->instantiate('images', array('filename' => $filename, 'albumid' => $this->album->getID()), 'filename', true, empty($album_name)); if ($new || $this->filemtime != $this->get('mtime')) { if ($new) { $this->setTitle($this->displayname); } $this->updateMetaData(); $this->set('mtime', $this->filemtime); $this->save(); if ($new) { zp_apply_filter('new_image', $this); } } }
function getNewsPathNav($page) { global $_zp_current_category, $_zp_post_date; if (in_context(ZP_ZENPAGE_NEWS_CATEGORY)) { return $_zp_current_category->getLink($page); } if (in_context(ZP_ZENPAGE_NEWS_DATE)) { return getNewsArchivePath($_zp_post_date, $page); } $rewrite = '/' . _NEWS_ . '/'; $plain = 'index.php?p=news'; if ($page > 1) { $rewrite .= $page; $plain .= '&page=' . $page; } return zp_apply_filter('getLink', rewrite_path($rewrite, $plain), 'news.php', $page); }
$zenphoto_tabs['options'] = array('text' => gettext("options"), 'link' => WEBPATH . "/" . ZENFOLDER . '/admin-options.php?page=options' . $optiondefault, 'subtabs' => $subtabs, 'default' => 'gallery'); } if ($_zp_loggedin & THEMES_RIGHTS) { $zenphoto_tabs['themes'] = array('text' => gettext("themes"), 'link' => WEBPATH . "/" . ZENFOLDER . '/admin-themes.php', 'subtabs' => NULL); } if ($_zp_loggedin & ADMIN_RIGHTS) { list($subtabs, $default) = getPluginTabs(); $zenphoto_tabs['plugins'] = array('text' => gettext("plugins"), 'link' => WEBPATH . "/" . ZENFOLDER . '/admin-plugins.php', 'subtabs' => $subtabs, 'default' => $default); } if ($_zp_loggedin & ADMIN_RIGHTS) { list($subtabs, $default, $new) = getLogTabs(); $zenphoto_tabs['logs'] = array('text' => gettext("logs"), 'link' => WEBPATH . "/" . ZENFOLDER . '/admin-logs.php?page=logs', 'subtabs' => $subtabs, 'alert' => $new, 'default' => $default); } if (!$_zp_current_admin_obj->getID()) { $filelist = safe_glob(SERVERPATH . "/" . BACKUPFOLDER . '/*.zdb'); if (count($filelist) > 0) { $zenphoto_tabs['restore'] = array('text' => gettext("Restore"), 'link' => WEBPATH . "/" . ZENFOLDER . '/utilities/backup_restore.php?page=backup', 'subtabs' => NULL); } } $zenphoto_tabs = zp_apply_filter('admin_tabs', $zenphoto_tabs); foreach ($zenphoto_tabs as $tab => $value) { if (is_null($value)) { unset($zenphoto_tabs[$tab]); } } // so as to make it generally available as we make much use of it if (OFFSET_PATH != 2) { require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/colorbox_js.php'; } loadLocalOptions(false, $_zp_gallery->getCurrentTheme()); }
function __construct($folder8, $cache = true, $quiet = false) { $folder8 = trim($folder8, '/'); $folderFS = internalToFilesystem($folder8); $localpath = ALBUM_FOLDER_SERVERPATH . $folderFS . "/"; $this->linkname = $this->name = $folder8; $this->localpath = $localpath; if (!$this->_albumCheck($folder8, $folderFS, $quiet)) { return; } $this->instantiate('albums', array('folder' => $this->name), 'folder', $cache, empty($folder8)); $this->exists = true; if (!is_dir(stripSuffix($this->localpath))) { $this->linkname = stripSuffix($folder8); } $new = !$this->get('search_params'); if ($new || filemtime($this->localpath) > $this->get('mtime')) { $constraints = ''; $data = file_get_contents($this->localpath); while (!empty($data)) { $data1 = trim(substr($data, 0, $i = strpos($data, "\n"))); if ($i === false) { $data1 = $data; $data = ''; } else { $data = substr($data, $i + 1); } if (strpos($data1, 'WORDS=') !== false) { $words = "words=" . urlencode(substr($data1, 6)); } if (strpos($data1, 'THUMB=') !== false) { $thumb = trim(substr($data1, 6)); $this->set('thumb', $thumb); } if (strpos($data1, 'FIELDS=') !== false) { $fields = "&searchfields=" . trim(substr($data1, 7)); } if (strpos($data1, 'CONSTRAINTS=') !== false) { $constraint = trim(substr($data1, 12)); $constraints = '&' . $constraint; } } if (!empty($words)) { if (empty($fields)) { $fields = '&searchfields=tags'; } $this->set('search_params', $words . $fields . $constraints); } $this->set('mtime', filemtime($this->localpath)); if ($new) { $title = $this->get('title'); $this->set('title', stripSuffix($title)); // Strip the suffix $this->save(); zp_apply_filter('new_album', $this); } } zp_apply_filter('album_instantiate', $this); }
} if (isset($_GET['refresh'])) { if (empty($imageid)) { $metaURL = $backurl; } else { if (!empty($ret)) { $ret = '&return=' . $ret; } $metaURL = $redirecturl = '?' . $type . 'refresh=continue&id=' . $imageid . $albumparm . $ret . '&XSRFToken=' . getXSRFToken('refresh'); } } else { if ($type !== 'prune&') { if (!empty($folder)) { $album = newAlbum($folder); if (!$album->isMyItem(ALBUM_RIGHTS)) { if (!zp_apply_filter('admin_managed_albums_access', false, $return)) { header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php'); exitZP(); } } $sql = "SELECT `id` FROM " . prefix('albums') . " WHERE `folder`=" . db_quote($folder); $row = query_single_row($sql); $id = $row['id']; } if (!empty($id)) { $imagewhere = "WHERE `albumid`={$id}"; $r = " {$folder}"; $albumwhere = "WHERE `parentid`={$id}"; } } if (isset($_REQUEST['return'])) {