<?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)) {
        die(gettext("You do not have rights to sort this album"));
    }
    $album = new Album($gallery, $folder);
    if (isset($_GET['saved'])) {
        $album->setSortType("manual");
        $album->setSortDirection('image', 0);
        $album->save();
    }
    // Layout the page
    printLogoAndLinks();
    ?>

<div id="main"><?php 
    printTabs('edit');
    ?>


<div id="content">

<h1>Sort Album: <?php 
    echo $album->getTitle();
Example #2
0
     $gallery->save();
     $notify = postAlbumSort(NULL);
     if (isset($_POST['ids'])) {
         $action = processAlbumBulkActions();
         if (!empty($action)) {
             $action = '&bulkmessage=' . $action;
         }
     }
     header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin-edit.php?page=edit' . $action . '&saved' . $notify);
     exit;
     break;
 case 'savesubalbumorder':
     XSRFdefender('savealbumorder');
     $album = new Album($gallery, $folder);
     $album->setSubalbumSortType('manual');
     $album->setSortDirection('album', 0);
     $album->save();
     $notify = postAlbumSort($album->get('id'));
     if (isset($_POST['ids'])) {
         $action = processAlbumBulkActions();
         if (!empty($action)) {
             $action = '&bulkmessage=' . $action;
         }
     }
     header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin-edit.php?page=edit' . $action . '&album=' . $folder . '&tab=subalbuminfo&saved' . $notify);
     exit;
     break;
 case 'sorttags':
     if (isset($_GET['subpage'])) {
         $pg = '&subpage=' . $_GET['subpage'];
         $tab = '&tab=imageinfo';