* @author Malte Müller (acrylian) * @package plugins * @subpackage zenpage */ define("OFFSET_PATH", 4); require_once dirname(dirname(dirname(__FILE__))) . '/admin-globals.php'; require_once "admin-functions.php"; require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/tag_suggest.php'; if (is_AdminEditPage('page')) { $rights = ZENPAGE_PAGES_RIGHTS; } else { $rights = ZENPAGE_NEWS_RIGHTS; } admin_securityChecks($rights, currentRelativeURL()); updatePublished('news'); updatePublished('pages'); $saveitem = ''; $reports = array(); if (is_AdminEditPage('page')) { $_GET['tab'] = $tab = 'pages'; $new = 'newPage'; $update = 'updatePage'; } else { if (is_AdminEditPage('newsarticle')) { $_GET['tab'] = $tab = 'news'; $new = 'newArticle'; $update = 'updateArticle'; } else { if (is_AdminEditPage('newscategory')) { $tab = 'news'; $_GET['tab'] = 'categories';
XSRFdefender('update'); $obj = newArticle(sanitize($_GET['titlelink'])); $obj->setCommentsAllowed(sanitize_numeric($_GET['commentson'])); $obj->save(); } if (isset($_GET['hitcounter'])) { XSRFdefender('hitcounter'); $obj = newArticle(sanitize($_GET['titlelink'])); $obj->set('hitcounter', 0); $obj->save(); $reports[] = '<p class="messagebox fade-message">' . gettext("Hitcounter reset") . '</p>'; } printAdminHeader('news', 'articles'); zenpageJSCSS(); datepickerJS(); updatePublished('news'); ?> <script type="text/javascript"> //<!-- <![CDATA[ var deleteArticle = "<?php echo gettext("Are you sure you want to delete this article? THIS CANNOT BE UNDONE!"); ?> "; function confirmAction() { if ($('#checkallaction').val() == 'deleteall') { return confirm('<?php echo js_encode(gettext("Are you sure you want to delete the checked items?")); ?> '); } else {
$_zp_HTML_cache->abortHTMLCache(true); $_zp_gallery_page = 'password.php'; $_zp_script = SERVERPATH . '/' . THEMEFOLDER . '/' . $_index_theme . '/password.php'; if (!file_exists(internalToFilesystem($_zp_script))) { $_zp_script = SERVERPATH . '/' . ZENFOLDER . '/password.php'; } } //update publish state, but only on static cache expiry intervals $lastupdate = (int) @file_get_contents(SERVERPATH . '/' . DATA_FOLDER . '/lastPublishCheck'); if (time() - $lastupdate > getOption('static_cache_expire')) { $tables = array('albums', 'images'); if (extensionEnabled('zenpage')) { $tables = array_merge($tables, array('news', 'pages')); } foreach ($tables as $table) { updatePublished($table); } file_put_contents(SERVERPATH . '/' . DATA_FOLDER . '/lastPublishCheck', time()); } // Include the appropriate page for the requested object, and a 200 OK header. header('Content-Type: text/html; charset=' . LOCAL_CHARSET); header("HTTP/1.0 200 OK"); header("Status: 200 OK"); header('Last-Modified: ' . ZP_LAST_MODIFIED); zp_apply_filter('theme_headers'); include internalToFilesystem($_zp_script); } else { // If the requested object does not exist, issue a 404 and redirect to the 404.php // in the zp-core folder. This script will load the theme 404 page if it exists. $_zp_HTML_cache->abortHTMLCache(false); include SERVERPATH . "/" . ZENFOLDER . '/404.php';
/** * admin-edit.php editing of albums. * * @author Stephen Billard (sbillard) * * @package admin */ // force UTF-8 Ø /* Don't put anything before this line! */ define('OFFSET_PATH', 1); require_once dirname(__FILE__) . '/admin-globals.php'; require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/tag_suggest.php'; admin_securityChecks(ALBUM_RIGHTS, $return = currentRelativeURL()); updatePublished('albums'); updatePublished('images'); if (isset($_GET['tab'])) { $subtab = sanitize($_GET['tab']); } else { $subtab = ''; } $subalbum_nesting = 1; $album_nesting = 1; define('ADMIN_IMAGES_STEP', 5); // the step for imges per page $imagesTab_imageCount = 10; processEditSelection($subtab); //check for security incursions $album = NULL; $allow = true; if (isset($_GET['album'])) {