* So you can freely upload albums and images then on a periodic basis review which ones to make available
 * to visitors of your gallery.
 *
 * @package admin
 */
define('OFFSET_PATH', 3);
chdir(dirname(dirname(__FILE__)));
require_once dirname(dirname(__FILE__)) . '/admin-globals.php';
require_once dirname(dirname(__FILE__)) . '/template-functions.php';
$button_text = gettext('Publish content');
$button_hint = gettext('Manage un-published content in your gallery.');
$button_icon = 'images/calendar.png';
$button_rights = ALBUM_RIGHTS;
admin_securityChecks(ALBUM_RIGHTS, currentRelativeURL(__FILE__));
$gallery = new Gallery();
printAdminHeader(gettext('utilities'), gettext('content'));
datepickerJS();
?>
<link rel="stylesheet" href="schedule_content.css" type="text/css" media="screen" />
<?php 
function unpublishSubalbums($album)
{
    global $gallery;
    $albums = $album->getAlbums();
    foreach ($albums as $albumname) {
        $subalbum = new Album($gallery, $albumname);
        $subalbum->setShow(false);
        $subalbum->save();
        unpublishSubalbums($subalbum);
    }
}
Example #2
0
if (isset($_GET['id'])) {
    $result = getItem(sanitize($_GET['id']));
}
if (isset($_GET['save'])) {
    XSRFdefender('update_menu');
    if ($_POST['update']) {
        $result = updateMenuItem($reports);
    } else {
        $result = addItem($reports);
    }
}
if (isset($_GET['del'])) {
    XSRFdefender('delete_menu');
    deleteItem($reports);
}
printAdminHeader('menu', is_array($result) && $result['id'] ? gettext('edit') : gettext('add'));
?>
<link rel="stylesheet" href="../zenpage/zenpage.css" type="text/css" />
<?php 
$menuset = checkChosenMenuset();
?>
</head>
<body>
	<?php 
printLogoAndLinks();
?>
	<div id="main">
		<?php 
printTabs();
?>
		<div id="content">
<?php

/**
 */
define('OFFSET_PATH', 1);
require_once dirname(__FILE__) . '/admin-globals.php';
admin_securityChecks(FILES_RIGHTS, currentRelativeURL(__FILE__));
printAdminHeader('upload', 'files');
echo "\n</head>";
?>

<body>

<?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');
    $fields = $search->fields;
    $redirect = $album . '/' . $albumname . ".alb";
    if (!empty($albumname)) {
        $f = fopen(UTF8ToFilesystem(getAlbumFolder() . $redirect), 'w');
        if ($f !== false) {
            fwrite($f, "WORDS={$words}\nTHUMB={$thumb}\nFIELDS={$fields}\n");
            fclose($f);
            // redirct to edit of this album
            header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/admin-edit.php?page=edit&album=" . urlencode($redirect));
            exit;
        }
    }
}
$_GET['page'] = 'edit';
// pretend to be the edit page.
printAdminHeader();
echo "\n</head>";
echo "\n<body>";
printLogoAndLinks();
echo "\n" . '<div id="main">';
printTabs('edit');
echo "\n" . '<div id="content">';
echo "<h1>" . gettext("zenphoto Create Dynamic Album") . "</h1>\n";
if (isset($_POST['savealbum'])) {
    // we fell through, some kind of error
    echo "<div class=\"errorbox space\">";
    echo "<h2>" . gettext("Failed to save the album file") . "</h2>";
    echo "</div>\n";
}
$gallery = new Gallery();
$albumlist = array();
        if (!empty($id)) {
            $imagewhere = "WHERE `albumid`={$id}";
            $r = " {$folder}";
            $albumwhere = "WHERE `parentid`={$id}";
        }
    }
    if (isset($_REQUEST['return'])) {
        $ret = sanitize($_REQUEST['return']);
    }
    if (!empty($ret)) {
        $ret = '&amp;return=' . $ret;
    }
    $metaURL = $starturl = '?' . $type . 'refresh=start' . $albumparm . '&amp;XSRFToken=' . getXSRFToken('refresh') . $ret;
}
$zenphoto_tabs['overview']['subtabs'] = array(gettext('Refresh') => '');
printAdminHeader($tab, 'Refresh');
if (!empty($metaURL)) {
    ?>
	<meta http-equiv="refresh" content="1; url=<?php 
    echo $metaURL;
    ?>
" />
	<?php 
}
echo "\n</head>";
echo "\n<body>";
printLogoAndLinks();
echo "\n" . '<div id="main">';
printTabs();
?>
<div id="content">
Example #6
0
}
if (isset($_GET['delete'])) {
    XSRFdefender('delete');
    $msg = deleteZenpageObj('new' . $new(sanitize($_GET['delete']), 'admin-pages.php'));
    if (!empty($msg)) {
        $reports[] = $msg;
    }
}
/*
 * Here we should restart if any action processing has occurred to be sure that everything is
 * in its proper state. But that would require significant rewrite of the handling and
 * reporting code so is impractical. Instead we will presume that all that needs to be restarted
 * is the CMS object.
 */
$_zp_CMS = new CMS();
printAdminHeader($tab, $result->transient ? gettext('add') : gettext('edit'));
zp_apply_filter('texteditor_config', 'zenpage');
zenpageJSCSS();
datepickerJS();
codeblocktabsJS();
$tagsort = getTagOrder();
?>
<script type="text/javascript">
	//<!-- <![CDATA[
	var deleteArticle = "<?php 
echo gettext("Are you sure you want to delete this article? THIS CANNOT BE UNDONE!");
?>
";
	var deletePage = "<?php 
echo gettext("Are you sure you want to delete this page? THIS CANNOT BE UNDONE!");
?>
                    $where = ' WHERE `creator` LIKE ' . db_quote('%' . basename($owner) . '/themeoptions.php');
                }
                $sql = 'DELETE FROM ' . prefix('options') . $where;
                $result = query($sql);
            } else {
                purgeOption('zp_plugin_' . stripSuffix(basename($owner)));
            }
        }
    }
    if (isset($_POST['missingplugin'])) {
        foreach ($_POST['missingplugin'] as $plugin) {
            purgeOption('zp_plugin_' . stripSuffix($plugin));
        }
    }
}
printAdminHeader('options', '');
?>
<link rel="stylesheet" href="purgeOptions.css" type="text/css">
</head>
<body>
	<?php 
printLogoAndLinks();
?>
	<div id="main">
		<?php 
printTabs();
?>
		<div id="content">
			<div id="container">
				<?php 
printSubtabs();
Example #8
0
    $imageobj->save();
    if ($_REQUEST['performcrop'] == 'backend') {
        $return = FULLWEBPATH . '/' . ZENFOLDER . '/admin-edit.php?page=edit&album=' . pathurlencode($albumname) . '&saved&subpage=' . sanitize($_REQUEST['subpage']) . '&tagsort=' . sanitize($_REQUEST['tagsort']) . '&tab=imageinfo';
    } else {
        $return = FULLWEBPATH . $imageobj->getLink();
    }
    header('Location: ' . $return);
    exitZP();
}
if (isset($_REQUEST['subpage'])) {
    $subpage = sanitize($_REQUEST['subpage']);
    $tagsort = sanitize($_REQUEST['tagsort']);
} else {
    $subpage = $tagsort = '';
}
printAdminHeader('edit', gettext('crop image'));
?>

<script src="<?php 
echo WEBPATH . '/' . ZENFOLDER;
?>
/js/jquery.Jcrop.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php 
echo WEBPATH . '/' . ZENFOLDER;
?>
/js/jquery.Jcrop.css" type="text/css" />
<link rel="stylesheet" href="<?php 
echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
?>
/crop_image/crop_image.css" type="text/css" />
<script type="text/javascript" >
Example #9
0
    // admin access without overview rights, redirect to first tab
    $tab = array_shift($zenphoto_tabs);
    $link = $tab['link'];
    header('location:' . $link);
    exit;
}
if (!zp_loggedin()) {
    if (isset($_GET['from'])) {
        $from = sanitize($_GET['from']);
        $from = urldecode($from);
    } else {
        $from = urldecode(currentRelativeURL(__FILE__));
    }
}
// Print our header
printAdminHeader('overview');
echo "\n</head>";
if (!zp_loggedin()) {
    ?>
	<body style="background-image: none">
	<?php 
} else {
    ?>
	<body>
	<?php 
}
// If they are not logged in, display the login form and exit
if (!zp_loggedin()) {
    $_zp_authority->printLoginForm($from);
    echo "\n</body>";
    echo "\n</html>";
// user plugin variant
require_once '../../zp-core/admin-globals.php';
require_once '../../zp-core/template-functions.php';
admin_securityChecks(ADMIN_RIGHTS, currentRelativeURL(__FILE__));
if (getOption('zenphoto_release') != ZENPHOTO_RELEASE) {
    header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/setup.php");
    exit;
}
if (!zp_loggedin(OVERVIEW_RIGHTS)) {
    // prevent nefarious access to this page.
    header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php?from=' . currentRelativeURL(__FILE__));
    exit;
}
$gallery = new Gallery();
$webpath = WEBPATH . '/' . ZENFOLDER . '/';
printAdminHeader(gettext('utilities'), gettext('Sitemap tools'));
if (isset($_GET['generatesitemaps'])) {
    $sitemap_number = sanitize_numeric($_GET['number']);
    $sitemap_index = getSitemapIndexLinks();
    $sitemap_albums = getSitemapAlbums();
    $sitemap_images = getSitemapImages();
    if (getOption('zp_plugin_zenpage')) {
        $sitemap_newsindex = getSitemapZenpageNewsIndex();
        $sitemap_articles = getSitemapZenpageNewsArticles();
        $sitemap_categories = getSitemapZenpageNewsCategories();
        $sitemap_pages = getSitemapZenpagePages();
    }
    $numberAppend = '';
    if (isset($_GET['generatesitemaps']) && (!empty($sitemap_index) || !empty($sitemap_albums) || !empty($sitemap_images) || !empty($sitemap_newsindex) || !empty($sitemap_articles) || !empty($sitemap_categories) || !empty($sitemap_pages))) {
        $numberAppend = '-' . $sitemap_number;
        $metaURL = 'sitemap-extended-admin.php?generatesitemaps&amp;number=' . ($sitemap_number + SITEMAP_CHUNK);
Example #11
0
            }
            if (isset($_POST['email'])) {
                $comment->setEmail(sanitize($_POST['email'], 3));
            }
            if (isset($_POST['website'])) {
                $comment->setWebsite(sanitize($_POST['website'], 3));
            }
            $comment->setDateTime(sanitize($_POST['date'], 3));
            $comment->setComment(sanitize($_POST['comment'], 1));
            $comment->setCustomData($_comment_form_save_post = serialize(getCommentAddress(0)));
            $comment->save();
            header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/comment_form/admin-comments.php?saved&page=editcomment&id=' . $comment->getID());
            exitZP();
    }
}
printAdminHeader('comments');
zp_apply_filter('texteditor_config', 'admin_comments');
?>
<script type="text/javascript">
	//<!-- <![CDATA[
	function confirmAction() {
		if ($('#checkallaction').val() == 'deleteall') {
			return confirm('<?php 
echo js_encode(gettext("Are you sure you want to delete the checked items?"));
?>
');
		} else {
			return true;
		}
	}
	// ]]> -->
Example #12
0
if (isset($_GET['album']) && !isset($_GET['massedit'])) {
    $folder = sanitize_path($_GET['album']);
    if ($folder == '/' || $folder == '.') {
        $parent = '';
    } else {
        $parent = '&amp;album=' . $folder . '&amp;tab=subalbuminfo';
    }
    $album = newAlbum($folder);
    $subtab = setAlbumSubtabs($album);
}
if (empty($subtab)) {
    if (isset($_GET['album'])) {
        $subtab = 'albuminfo';
    }
}
printAdminHeader('edit', $subtab);
datepickerJS();
codeblocktabsJS();
if (!isset($_GET['massedit']) && !isset($_GET['album']) || $subtab == 'subalbuminfo') {
    printSortableHead();
}
if (isset($_GET['album']) && (empty($subtab) || $subtab == 'albuminfo') || isset($_GET['massedit'])) {
    $result = db_list_fields('albums');
    $dbfields = array();
    if ($result) {
        foreach ($result as $row) {
            $dbfields[] = "'" . $row['Field'] . "'";
        }
    }
    sort($dbfields);
    $albumdbfields = implode(',', $dbfields);
require_once dirname(dirname(__FILE__)) . '/admin-globals.php';
require_once dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/image_album_statistics.php';
$tables = array('albums', 'images');
if (extensionEnabled('zenpage')) {
    require_once dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/zenpage/admin-functions.php';
    $tables = array_merge($tables, array('news', 'pages'));
}
// Include the appropriate page for the requested object, and a 200 OK header.
foreach ($tables as $table) {
    updatePublished($table);
}
$buttonlist[] = array('category' => gettext('Info'), 'enable' => true, 'button_text' => gettext('Gallery Statistics'), 'formname' => 'gallery_statistics.php', 'action' => FULLWEBPATH . '/' . ZENFOLDER . '/utilities/gallery_statistics.php', 'icon' => 'images/bar_graph.png', 'title' => gettext('Shows statistical graphs and info about your gallery’s images and albums.'), 'alt' => '', 'hidden' => '', 'rights' => ADMIN_RIGHTS);
admin_securityChecks(OVERVIEW_RIGHTS, currentRelativeURL());
$_zp_gallery->garbageCollect();
$zenphoto_tabs['overview']['subtabs'] = array(gettext('Statistics') => '');
printAdminHeader('overview', '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;
    }
    if (is_file($path)) {
        return filesize($path);
Example #14
0
        $linecounter++;
        if (@$line[0] != '#') {
            return $line;
        }
    }
    return NULL;
}
if (defined('OFFSET_PATH')) {
    zp_register_filter('admin_utilities_buttons', 'findQuotes_button');
} else {
    define('OFFSET_PATH', 3);
    require_once dirname(dirname($_SERVER['SCRIPT_NAME'])) . '/zp-core/functions.php';
    require_once SERVERPATH . '/' . ZENFOLDER . '/admin-globals.php';
    zp_register_filter('admin_tabs', 'findQuotes_admin_tab');
    setOptionDefault('findingQuotes_target', 'de_DE');
    printAdminHeader('overview', 'findQuotes');
    echo '</head>';
    $list = generateLanguageList('all');
    $lang = NULL;
    if (isset($_POST['language'])) {
        $selected = $lang = sanitize($_POST['language']);
        setOption('findingQuotes_target', $lang);
    } else {
        $selected = getOption('findingQuotes_target');
    }
    ?>
	<body>
		<?php 
    printLogoAndLinks();
    ?>
		<div id="main">
if (isset($_GET['save'])) {
    XSRFdefender('save_categories');
    addCategory($reports);
}
if (isset($_GET['id'])) {
    $x = $_zp_zenpage->getCategory(sanitize_numeric($_GET['id']));
    $result = new ZenpageCategory($x['titlelink']);
} else {
    if (isset($_GET['update'])) {
        XSRFdefender('update_categories');
        $result = updateCategory($reports);
    } else {
        $result = new ZenpageCategory('');
    }
}
printAdminHeader('news', 'categories');
zp_apply_filter('texteditor_config', '', 'zenpage');
printSortableHead();
zenpageJSCSS();
?>
<script type="text/javascript">
	//<!-- <![CDATA[
	var deleteCategory = "<?php 
echo gettext("Are you sure you want to delete this category? 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?"));
?>
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;
    }
    if (is_file($path)) {
        return filesize($path);
Example #17
0
<?php

/**
 * This is the "files" upload tab
 *
 * @package plugins
 * @subpackage development
 */
define('OFFSET_PATH', 3);
require_once dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME']))) . "/zp-core/admin-globals.php";
admin_securityChecks(DEBUG_RIGHTS, $return = currentRelativeURL());
printAdminHeader('development', gettext('rewriteTokens'));
?>
</head>

<body>

	<link
	<?php 
printLogoAndLinks();
?>
		<div id="main">
			<?php 
printTabs();
?>
		<div id="content">
			<?php 
zp_apply_filter('admin_note', 'development', '');
?>
			<div id="container">
				<?php 
Example #18
0
if ($alb) {
    $folder = sanitize_path($alb);
    $object = $folder;
    $tab = 'edit';
    $album = new Album($gallery, $folder);
    if (!$album->isMyItem(ALBUM_RIGHTS)) {
        if (!zp_apply_filter('admin_managed_albums_access', false, $return)) {
            header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php');
            exit;
        }
    }
} else {
    $object = '<em>' . gettext('Gallery') . '</em>';
    $tab = gettext('utilities');
}
printAdminHeader($tab, gettext('pre-cache'));
echo "\n</head>";
echo "\n<body>";
printLogoAndLinks();
echo "\n" . '<div id="main">';
printTabs();
echo "\n" . '<div id="content">';
zp_apply_filter('admin_note', 'cache', '');
$clear = sprintf(gettext('Refreshing cache for %s'), $object);
$count = 0;
if ($alb) {
    echo "\n<h2>" . $clear . "</h2>";
    $album = new Album($gallery, $folder);
    $count = loadAlbum($album);
} else {
    echo "\n<h2>" . $clear . "</h2>";
Example #19
0
                }
                $report = 'pages';
                break;
        }
    }
}
if ($report) {
    header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/publishContent/publishContent.php?report=' . $report);
    exitZP();
} else {
    if (isset($_GET['report'])) {
        $report = sanitize($_GET['report']);
    }
}
$zenphoto_tabs['overview']['subtabs'] = array(gettext('Content') => '');
printAdminHeader('overview', gettext('Content'));
datepickerJS();
?>
<link rel="stylesheet" href="publishContent.css" type="text/css" media="screen" />
<?php 
echo '</head>';
?>
<body>
	<?php 
printLogoAndLinks();
?>
	<div id="main">
		<?php 
printTabs();
?>
		<div id="content">
Example #20
0
                    foreach ($orderArray as $key => $id) {
                        $sql = 'UPDATE ' . prefix('images') . ' SET `sort_order`=' . db_quote(sprintf('%03u', $key)) . ' WHERE `id`=' . sanitize_numeric($id);
                        query($sql);
                    }
                    $album->setSortType("manual");
                    $album->setSortDirection(false, 'image');
                    $album->save();
                    $_GET['saved'] = 1;
                }
            }
        }
    }
}
// Print the admin header
setAlbumSubtabs($album);
printAdminHeader('edit', 'sort');
?>
<script type="text/javascript">
	//<!-- <![CDATA[
	$(function() {
		$('#images').sortable();
	});
	// ]]> -->
</script>
<?php 
echo "\n</head>";
?>


<body>
Example #21
0
                $messages['messagebox fade-message'][] = array(gettext('Could not write file. Please check its write permissions'), 'notebox');
            }
        } else {
            $messages['errorbox'][] = gettext('Could not write file. Please check its write permissions');
        }
    }
    // Get file contents
    if ($file_to_edit && !isset($messages['errorbox'])) {
        $file_content = @file_get_contents($file_to_edit);
        $file_content = html_encode($file_content);
        $what = 'edit»' . basename($file_to_edit);
    }
} else {
    $messages['errorbox'][] = gettext('Cannot edit this theme!');
}
printAdminHeader('themes', $what);
echo "\n</head>";
echo "\n<body>";
printLogoAndLinks();
echo "\n" . '<div id="main">';
printTabs();
echo "\n" . '<div id="content">';
?>


<h1><?php 
echo gettext('Theme File Editor');
?>
</h1>
<h2><?php 
echo html_encode($themes[$theme]['name']);
Example #22
0
 * @author Stephen Billard (sbillard)
 * @package plugins
 */
define('OFFSET_PATH', 4);
require_once dirname(dirname(dirname(__FILE__))) . '/admin-globals.php';
admin_securityChecks(OVERVIEW_RIGHTS, currentRelativeURL());
if (isset($_GET['reset'])) {
    admin_securityChecks(ADMIN_RIGHTS, currentRelativeURL());
    XSRFdefender('search_statistics');
    $sql = 'DELETE FROM ' . prefix('plugin_storage') . ' WHERE `type`="search_statistics"';
    query($sql);
    header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/search_statistics/search_analysis.php');
    exitZP();
}
$zenphoto_tabs['overview']['subtabs'] = array(gettext('Analysis') => '');
printAdminHeader('overview', 'analysis');
echo '</head>';
$sql = 'SELECT * FROM ' . prefix('plugin_storage') . ' WHERE `type`="search_statistics"';
$data = query($sql);
$ip_maxvalue = $criteria_maxvalue = $criteria_maxvalue_f = $terms_maxvalue = 1;
$results_f = $results = $terms = $sites = array();
$bargraphmaxsize = 400;
$maxiterations = array();
$opChars = array('(', ')', '&', '|', '!', ',');
if ($data) {
    while ($datum = db_fetch_assoc($data)) {
        $element = getSerializedArray($datum['data']);
        $ip = $datum['aux'];
        if (array_key_exists($ip, $sites)) {
            $sites[$ip]++;
            if ($ip_maxvalue < $sites[$ip]) {
Example #23
0
<?php

/**
 * This is the "files" upload tab
 *
 * @package plugins
 * @subpackage admin
 */
require_once dirname(dirname(dirname(__FILE__))) . '/admin-globals.php';
require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/deprecated-functions.php';
printAdminHeader('development', gettext('deprecated'));
echo "\n</head>";
?>

<body>

	<?php 
printLogoAndLinks();
?>
	<div id="main">
		<?php 
printTabs();
?>
		<div id="content">
			<div id="container">
				<?php 
printSubtabs();
?>
				<div class="tabbox">
					<h1><?php 
echo gettext('Deprecated Functions');
Example #24
0
require_once dirname(dirname(dirname(__FILE__))) . '/admin-globals.php';
require_once SERVERPATH . '/' . ZENFOLDER . '/template-functions.php';
admin_securityChecks(ADMIN_RIGHTS, currentRelativeURL());
if (!zp_loggedin(OVERVIEW_RIGHTS)) {
    // prevent nefarious access to this page.
    header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php?from=' . currentRelativeURL());
    exitZP();
}
if (isset($_GET['clearsitemapcache'])) {
    clearSitemapCache();
    header('location:' . WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/sitemap-extended/sitemap-extended-admin.php');
    exitZP();
}
$webpath = WEBPATH . '/' . ZENFOLDER . '/';
$zenphoto_tabs['overview']['subtabs'] = array(gettext('Sitemap') => '');
printAdminHeader('overview', 'sitemap');
if (isset($_GET['generatesitemaps'])) {
    $_zp_loggedin = NULL;
    $sitemap_number = sanitize_numeric($_GET['number']);
    $sitemap_index = getSitemapIndexLinks();
    $sitemap_albums = getSitemapAlbums();
    $sitemap_images = getSitemapImages();
    if (extensionEnabled('zenpage')) {
        $sitemap_newsindex = getSitemapZenpageNewsIndex();
        $sitemap_articles = getSitemapZenpageNewsArticles();
        $sitemap_categories = getSitemapZenpageNewsCategories();
        $sitemap_pages = getSitemapZenpagePages();
    }
    $numberAppend = '';
    if (isset($_GET['generatesitemaps']) && (!empty($sitemap_index) || !empty($sitemap_albums) || !empty($sitemap_images) || !empty($sitemap_newsindex) || !empty($sitemap_articles) || !empty($sitemap_categories) || !empty($sitemap_pages))) {
        $numberAppend = '-' . $sitemap_number;
Example #25
0
            $_zp_gallery->save();
            $returntab = "&tab=security";
        }
        /*		 * * custom options ** */
        if (!$themeswitch) {
            // was really a save.
            $returntab = processCustomOptionSave($returntab, $themename, $themealbum);
        }
        if (empty($notify)) {
            $notify = '?saved';
        }
        header("Location: " . $notify . $returntab);
        exitZP();
    }
}
printAdminHeader($_current_tab);
?>
<script type="text/javascript" src="js/farbtastic.js"></script>
<link rel="stylesheet" href="js/farbtastic.css" type="text/css" />
<?php 
if ($_zp_admin_subtab == 'gallery' || $_zp_admin_subtab == 'image') {
    if ($_zp_admin_subtab == 'image') {
        $table = 'images';
        $targetid = 'customimagesort';
    } else {
        $table = 'albums';
        $targetid = 'customalbumsort';
    }
    $result = db_list_fields($table);
    $dbfields = array();
    if ($result) {
Example #26
0
                } else {
                    $existing = false;
                }
                if ($existing) {
                    query('DELETE FROM ' . prefix('tags') . ' WHERE `id`=' . $oldtag['id']);
                    query('UPDATE ' . prefix('obj_to_tag') . ' SET `tagid`=' . $newtag['id'] . ' WHERE `tagid`=' . $oldtag['id']);
                } else {
                    query('UPDATE ' . prefix('tags') . ' SET `name`=' . db_quote($newName) . ' WHERE `id`=' . $oldtag['id']);
                }
            }
        }
        $action = gettext('Tags renamed');
    }
    // rename
}
printAdminHeader('tags');
?>
</head>
<body>
	<?php 
printLogoAndLinks();
?>
	<div id="main">
		<?php 
printTabs();
?>
		<div id="content">
			<?php 
if (!empty($action)) {
    ?>
				<div class="messagebox fade-message">
                            $user_e = $userobj->getEmail();
                            $user = $userobj->getUser();
                            $key = bin2hex(serialize(array('user' => $user, 'email' => $user_e, 'date' => time())));
                            $link = FULLWEBPATH . '/index.php?user_expiry_reverify=' . $key;
                            $message = sprintf(gettext('Your %1$s credentials need to be renewed. Visit %2$s to renew your logon credentials.'), $site, $link);
                            $msg = zp_mail(sprintf(gettext('%s renewal required'), $site), $message, array($user => $user_e));
                            break;
                    }
                }
            }
        }
        header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER . '/user-expiry/user-expiry-tab.php?page=users&tab=groups&applied=' . $msg);
        exit;
    }
}
printAdminHeader('users');
echo '</head>' . "\n";
?>

<body>
	<?php 
printLogoAndLinks();
?>
	<div id="main">
		<?php 
printTabs();
?>
		<div id="content">
			<?php 
if (isset($_GET['applied'])) {
    $msg = sanitize($_GET['applied']);
Example #28
0
                debugLogVar('Wordpress import - Comments for "' . $post['title'] . '" (' . $post['type'] . ')', $comments);
                $postinfo .= '</ul></li>';
                $postcount++;
            }
            // posts foreach
            $metaURL = 'wordpress_import.php?refresh=' . $postcount . '&amp;dbname=' . $wp_dbname . '&amp;dbuser='******'&amp;dbpass='******'&amp;dbhost=' . $wp_dbhost . '&amp;tableprefix=' . $wp_prefix . '&amp;convertlinefeeds=' . getcheckboxState('convertlinefeeds') . '&amp;XSRFToken=' . getXSRFToken('wordpress');
        } else {
            // if posts are available at all
            $metaURL = '';
            // to be sure...
            $postinfo .= "<li class='import-nothing'>" . gettext("No posts or pages to import.") . "</li>";
        }
    }
    // if db data set
    $zenphoto_tabs['overview']['subtabs'] = array(gettext('Wordpress') => '');
    printAdminHeader('overview', 'wordpress');
    if (!empty($metaURL) && $postcount < $posttotalcount) {
        ?>
		<meta http-equiv="refresh" content="1; url=<?php 
        echo $metaURL;
        ?>
" />
		<?php 
    }
    ?>
	<style type="text/css">
		.import-success {
			color: darkgreen;
		}
		.import-nothing {
			color: #663300;
            }
        }
        $buttons[] = $button;
        return $buttons;
    }
} else {
    define('OFFSET_PATH', 3);
    chdir(dirname(dirname(__FILE__)));
    require_once dirname(dirname(__FILE__)) . '/admin-globals.php';
    admin_securityChecks(NULL, currentRelativeURL());
    if (isset($_GET['sendmail'])) {
        XSRFdefender('mailing_list');
    }
    $admins = $_zp_authority->getAdministrators();
    $zenphoto_tabs['overview']['subtabs'] = array(gettext('Mailing') => '');
    printAdminHeader('overview', 'Mailing');
    ?>
	</head>
	<body>
		<?php 
    printLogoAndLinks();
    ?>
		<div id="main">
			<?php 
    printTabs();
    ?>
			<div id="content">
				<?php 
    printSubtabs('Mailing');
    ?>
				<div class="tabbox">
Example #30
0
                $albumcount++;
                ?>
				<script type="text/javascript">
				<!--
					albumcount = <?php 
                echo $albumcount;
                ?>
;
				//-->
				</script>
				<?php 
            }
        }
    }
}
printAdminHeader(gettext('utilities'), gettext('SEO cleaner'));
if (isset($_GET['todo'])) {
    $count = sanitize_numeric($_GET['imagecount']);
    $albumcount = sanitize_numeric($_GET['albumcount']);
    $albums = array();
    foreach (explode(',', sanitize(sanitize($_GET['todo']))) as $album) {
        $albums[] = sanitize($album);
    }
} else {
    $count = 0;
    $albumcount = 0;
    $albums = $gallery->getAlbums();
}
?>
<script type="text/javascript">
<!--