garbageCollect(); if (isset($_GET['action'])) { $action = $_GET['action']; /** clear the cache ***********************************************************/ /******************************************************************************/ if ($action == "clear_cache") { $gallery->clearCache(); $msg = gettext('Cache cleared.'); } /** Reset hitcounters ***********************************************************/ /********************************************************************************/ if ($action == "reset_hitcounters") { query("UPDATE " . prefix('albums') . " SET `hitcounter`= 0"); query("UPDATE " . prefix('images') . " SET `hitcounter`= 0"); $msg = gettext('Hitcounters reset'); } } /************************************************************************************/ /** End Action Handling *************************************************************/ /************************************************************************************/ if (isset($_GET['page'])) { $page = $_GET['page']; } else if (empty($page)) { $page = "home"; } switch ($page) { case 'comments': if (!($_zp_loggedin & (ADMIN_RIGHTS | COMMENT_RIGHTS))) $page = ''; break; case 'upload': if (!($_zp_loggedin & (ADMIN_RIGHTS | UPLOAD_RIGHTS))) $page = ''; break; case 'edit': if (!($_zp_loggedin & (ADMIN_RIGHTS | EDIT_RIGHTS))) $page = ''; break; case 'themes': if (!($_zp_loggedin & (ADMIN_RIGHTS | THEMES_RIGHTS))) $page = ''; break; case 'plugins': if (!($_zp_loggedin & (ADMIN_RIGHTS | ADMIN_RIGHTS))) $page = ''; break; case 'home': if (!($_zp_loggedin & (ADMIN_RIGHTS | MAIN_RIGHTS))) { $page='options'; } break; } $q = '?page='.$page; foreach ($_GET as $opt=>$value) { if ($opt != 'page') { $q .= '&'.$opt.'='.$value; } } switch ($page) { case 'editcomment': case 'comments': header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/admin-comments.php".$q); exit(); case 'edit': header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/admin-edit.php".$q); exit(); case 'upload': header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/admin-upload.php".$q); exit(); case 'themes': header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/admin-themes.php".$q); exit(); case 'plugins': header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/admin-plugins.php".$q); exit(); case 'options': header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/admin-options.php".$q); exit(); default: } } // Print our header printAdminHeader(); echo "\n"; ?> "; echo "\n"; exit(); } else { /* Admin-only content safe from here on. */ printLogoAndLinks(); ?>
'; echo "

$msg

"; echo '
'; } ?>

  • getNumImages(); $c = $t-$gallery->getNumImages(true); if ($c > 0) { printf(gettext('%1$u images (%2$u not visible)'),$t, $c); } else { printf(gettext('%u images'),$t); } ?>
  • getNumAlbums(true); $c = $t-$gallery->getNumAlbums(true,true); if ($c > 0) { printf(gettext('%1$u albums (%2$u not published)'),$t, $c); } else { printf(gettext('%u albums'),$t); } ?>
  • getNumComments(true); $c = $t - $gallery->getNumComments(false); if ($c > 0) { if ($t != 1) { printf(gettext('%1$u comments (%2$u in moderation)'),$t, $c); } else { printf(gettext('1 comment (%u in moderation)'), $c); } } else { if ($t != 1) { printf(gettext('%u comments'),$t); } else { echo gettext('1 comment'); } } ?>

  • %1$s [%2$s] (%3$s)'),ZENPHOTO_VERSION,ZENPHOTO_RELEASE,$official); ?>
  • %1$s [%2$s]'),$zenpage_version,ZENPAGE_RELEASE); ?>
  • %1$s'),$gallery->getCurrentTheme()); ?>
  • %1$s'),phpversion()); ?>
  • %1$s (Note: Your server might allocate less!)'),INI_GET('memory_limit')); ?>
  • %1$s'),mysql_get_client_info()); ?>
  • %1$s'),$_zp_conf_vars['mysql_database']); ?>
  • %1$s'),$_zp_conf_vars['mysql_prefix']); } ?>
  • %s'), getOption('spam_filter')) ?>
  • %s'), getOption('captcha')) ?>

    0) { natsort($plugins); foreach ($plugins as $extension) { $ext = substr($extension, 0, strlen($extension)-4); echo "
  • ".$ext."
  • "; } } else { echo '
  • '.gettext('none').'
  • '; } ?>

    0) { foreach ($filters as $filter=>$array_of_priority) { foreach ($array_of_priority as $priority=>$array_of_filters) { echo "
  • $filter"; ?>
      $priority: ".$data['script'].' => '.$data['function'].''; } echo ''; ?>
    '.gettext('none').'
  • '; } ?>

".gettext("Could not connect to zenphoto.org")."
\n"; } else { echo "\n
". sprintf(gettext("zenphoto version %s is available."), $v)."
\n"; } } else { echo "\n
".gettext("You are running the latest zenphoto version.")."
\n"; } } ?>
'check_updates', 'action'=>'admin.php?check_for_update', 'icon'=>'images/accept.png', 'title'=>gettext("Queries the Zenphoto web site for the latest version and compares that with the one that is running."), 'alt'=>'', 'hidden'=> '', 'rights'=> ADMIN_RIGHTS ); $buttonlist[gettext("Refresh the Database")] = array( 'formname'=>'prune_gallery', 'action'=>'admin-refresh-metadata.php?prune', 'icon'=>'images/refresh.png', 'title'=>gettext("Cleans the database and removes any orphan entries for comments, images, and albums."), 'alt'=>'', 'hidden'=> '', 'rights'=> ADMIN_RIGHTS ); $buttonlist[gettext("Purge cache")] = array( 'formname'=>'clear_cache', 'action'=>'admin.php?action=clear_cache=true', 'icon'=>'images/edit-delete.png', 'title'=>gettext("Clears the image cache. Images will be re-cached as they are viewed."), 'alt'=>'', 'hidden'=> '', 'rights'=> ADMIN_RIGHTS ); $buttonlist[gettext("Pre-Cache Images")] = array( 'formname'=>'cache_images', 'action'=>'admin-cache-images.php', 'icon'=>'images/cache1.png', 'title'=>gettext("Finds newly uploaded images that have not been cached and creates the cached version. It also refreshes the numbers above. If you have a large number of images in your gallery you might consider using the pre-cache image link for each album to avoid swamping your browser."), 'alt'=>'', 'hidden'=> '', 'rights'=> ADMIN_RIGHTS ); $buttonlist[gettext("Refresh Metadata")] = array( 'formname'=>'refresh_metadata', 'action'=>'admin-refresh-metadata.php', 'icon'=>'images/redo.png', 'title'=>gettext("Forces a refresh of the EXIF and IPTC data for all images."), 'alt'=>'', 'hidden'=> '', 'rights'=> ADMIN_RIGHTS ); $buttonlist[gettext("Reset hitcounters")] = array( 'formname'=>'reset_hitcounters', 'action'=>'admin.php?action=reset_hitcounters=true', 'icon'=>'images/reset1.png', 'title'=>gettext("Sets all album and image hitcounters to zero."), 'alt'=>'Reset hitcounters', 'hidden'=> '', 'rights'=> ADMIN_RIGHTS ); ?>

$utility, 'action'=>'utilities/'.$utility, 'icon'=>$button_icon, 'title'=>$button_hint, 'alt'=>'', 'hidden'=> '', 'rights'=> $button_rights | ADMIN_RIGHTS ); } ksort($buttonlist); $count = 0; foreach ($buttonlist as $name=>$button) { if (zp_loggedin($button['rights'])) { $count ++; } else { unset($buttonlist[$name]); } } $count = round($count/2); ?>
$button) { $button_icon = $button['icon']; ?>



"; ?>