Ejemplo n.º 1
0
$_zp_sortable_list = new jQuerySortable('js');
// $_zp_sortable_list->debug(); // Uncomment this line to display serialized object
if (getOption('zenphoto_release') != ZENPHOTO_RELEASE) {
    header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/setup.php");
    exit;
}
if (!zp_loggedin()) {
    header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/admin.php");
    exit;
}
// Insert the POST operation handler
zenSortablesPostHandler($_zp_sortable_list, 'imageOrder', 'images', 'images');
// Print the admin header
printAdminHeader();
// Print the sortable stuff
zenSortablesHeader($_zp_sortable_list, 'images', 'imageOrder', 'img', "placeholder:'zensortable_img'");
echo "\n</head>";
?>


<body>

<?php 
// Create our gallery
$gallery = new Gallery();
// Create our album
if (!isset($_GET['album'])) {
    die(gettext("No album provided to sort."));
} else {
    $folder = strip($_GET['album']);
    if (!isMyAlbum($folder, EDIT_RIGHTS)) {
Ejemplo n.º 2
0
/** End Action Handling *************************************************************/
/************************************************************************************/
$page = "edit";
if (isset($_GET['tab'])) {
    $subtab = sanitize($_GET['tab']);
} else {
    $subtab = '';
}
if ($sortablepage = empty($subtab) && !isset($_GET['album']) && !isset($_GET['massedit']) || $subtab === 'subalbuminfo') {
    $sortablepage = true;
    zenSortablesPostHandler($_zp_sortable_list, 'albumOrder', 'albumList', 'albums');
}
// Print our header
printAdminHeader();
if ($sortablepage) {
    zenSortablesHeader($_zp_sortable_list, 'albumList', 'albumOrder', 'div', "handle:'.handle', axis:'y', containment:'table', placeholder:'zensortable_row'");
}
if (empty($subtab)) {
    ?>
	<script type="text/javascript" src="js/tag.js"></script>
	<?php 
    $result = mysql_query('SHOW COLUMNS FROM ' . prefix('albums'));
    $dbfields = array();
    while ($row = mysql_fetch_row($result)) {
        $dbfields[] = "'" . $row[0] . "'";
    }
    sort($dbfields);
    $albumdbfields = implode(',', $dbfields);
    $result = mysql_query('SHOW COLUMNS FROM ' . prefix('images'));
    $dbfields = array();
    while ($row = mysql_fetch_row($result)) {