Esempio n. 1
0
<p>
	<?php 
$plugins = array_keys($plugins);
natcasesort($plugins);
echo gettext('Plugin setup:') . '<br />';
foreach ($plugins as $extension) {
    ?>
		<span>
			<img src="<?php 
    echo FULLWEBPATH . '/' . ZENFOLDER . '/setup/setup_pluginOptions.php?plugin=' . $extension;
    ?>
" title="<?php 
    echo $extension;
    ?>
" alt="<?php 
    echo $extension;
    ?>
" height="16px" width="16px" />
		</span>
		<?php 
}
?>
</p>

<?php 
$_zp_gallery->garbageCollect();
if (extensionEnabled('auto_backup')) {
    //Run the backup since for sure things have changed.
    require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/auto_backup.php';
    auto_backup::timer_handler('');
}
require_once dirname(__FILE__) . '/admin-globals.php';
require_once dirname(__FILE__) . '/template-functions.php';
if (isset($_REQUEST['album'])) {
    $localrights = ALBUM_RIGHTS;
} else {
    $localrights = NULL;
}
admin_securityChecks($localrights, $return = currentRelativeURL(__FILE__));
XSRFdefender('refresh');
$gallery = new Gallery();
$imageid = '';
if (isset($_GET['refresh'])) {
    if (isset($_GET['id'])) {
        $imageid = sanitize_numeric($_GET['id']);
    }
    $imageid = $gallery->garbageCollect(true, true, $imageid);
}
if (isset($_GET['prune'])) {
    $type = 'prune&amp;';
    $title = gettext('Refresh Database');
    $finished = gettext('Finished refreshing the database');
    $incomplete = gettext('Database refresh is incomplete');
    $allset = gettext("We're all set to refresh the database");
    $continue = gettext('Continue refreshing the database.');
} else {
    $type = '';
    $title = gettext('Refresh Metadata');
    $finished = gettext('Finished refreshing the metadata');
    $incomplete = gettext('Metadata refresh is incomplete');
    $allset = gettext("We're all set to refresh the metadata");
    $continue = gettext('Continue refreshing the metadata.');
 * @package admin
 */
define('OFFSET_PATH', 3);
chdir(dirname(dirname(__FILE__)));
require_once dirname(dirname(__FILE__)) . '/admin-globals.php';
require_once dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/image_album_statistics.php';
if (getOption('zp_plugin_zenpage')) {
    require_once dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/zenpage/zenpage-admin-functions.php';
}
$button_text = gettext('Gallery Statistics');
$button_hint = gettext('Shows statistical graphs and info about your gallery\'s images and albums.');
$button_icon = 'images/bar_graph.png';
$button_rights = OVERVIEW_RIGHTS;
admin_securityChecks(OVERVIEW_RIGHTS, currentRelativeURL(__FILE__));
$gallery = new Gallery();
$gallery->garbageCollect();
$webpath = WEBPATH . '/' . ZENFOLDER . '/';
printAdminHeader(gettext('utilities'), gettext('statistics'));
?>
<link rel="stylesheet" href="../admin-statistics.css" type="text/css" media="screen" />
<?php 
/*
 * http://php.net/manual/de/function.filesize.php
 *
 * @author Jonas Sweden
*/
function gallerystats_filesize_r($path)
{
    if (!file_exists($path)) {
        return 0;
    }
Esempio n. 4
0
 }
 // set defaults on any options that need it
 setupLog("Done with database creation and update");
 $prevRel = getOption('zenphoto_release');
 setupLog("Previous Release was {$prevRel}");
 $gallery = new Gallery();
 require dirname(__FILE__) . '/setup-option-defaults.php';
 // 1.1.6 special cleanup section for plugins
 $badplugs = array('exifimagerotate.php', 'flip_image.php', 'image_mirror.php', 'image_rotate.php', 'supergallery-functions.php');
 foreach ($badplugs as $plug) {
     $path = SERVERPATH . '/' . ZENFOLDER . '/plugins/' . $plug;
     @unlink($path);
 }
 if ($prevRel < 1690) {
     // cleanup root album DB records
     $gallery->garbageCollect(true, true);
 }
 // 1.1.7 conversion to the theme option tables
 $albums = $gallery->getAlbums();
 foreach ($albums as $albumname) {
     $album = new Album($gallery, $albumname);
     $theme = $album->getAlbumTheme();
     if (!empty($theme)) {
         $tbl = prefix(getOptionTableName($album->name));
         $sql = "SELECT `name`,`value` FROM " . $tbl;
         $result = query_full_array($sql, true);
         if (is_array($result)) {
             foreach ($result as $row) {
                 setThemeOption($album, $row['name'], $row['value']);
             }
         }