break;
 case 'edit-collection':
     // Show the edit collection form
     $output .= plog_edit_collection_form($id);
     $edit_page = 1;
     break;
 case 'edit-comment':
     // Show the edit comment form
     $output .= plog_edit_comment_form($id);
     $edit_page = 1;
     break;
 case 'update-picture':
     // Update the picture information
     if (!isset($_REQUEST['cancel'])) {
         $allow_comments = isset($_REQUEST['allow_comments']) ? $_REQUEST['allow_comments'] : '';
         $action_result = update_picture($_REQUEST['pid'], $_REQUEST['caption'], $allow_comments, $_REQUEST['description']);
     }
     break;
 case 'update-album':
     // Update the album information
     if (!isset($_REQUEST['cancel'])) {
         $action_result = update_album($_POST['pid'], $_POST['name'], $_POST['description'], $_POST['thumbnail_id']);
     }
     break;
 case 'update-collection':
     // Update the collection information
     if (!isset($_REQUEST['cancel'])) {
         $action_result = update_collection($_POST['pid'], $_POST['name'], $_POST['description'], $_POST['thumbnail_id']);
     }
     break;
 case 'update-comment':
Example #2
0
             $output .= plog_edit_album_form($_REQUEST["id"]);
         } else {
             if ($_GET["action"] == "edit-collection") {
                 $output .= plog_edit_collection_form($_GET["id"]);
             } else {
                 if ($_GET["action"] == "edit-comment") {
                     // show the edit form
                     $output .= edit_comment_form($_GET["pid"]);
                 }
             }
         }
     }
 } else {
     if (!empty($_POST["action"])) {
         if ($_POST['action'] == 'update-picture') {
             $action_result = update_picture($_POST['pid'], $_POST['caption'], $_POST['allow_comments'], $_POST['description']);
         } else {
             if ($_POST['action'] == 'update-album') {
                 $action_result = update_album($_POST['pid'], $_POST['name'], $_POST['description'], $_POST['thumbnail_id']);
             } else {
                 if ($_POST["action"] == "update-collection") {
                     $action_result = update_collection($_POST["pid"], $_POST["name"], $_POST["description"], $_POST["thumbnail_id"]);
                 } else {
                     if ($_POST["action"] == "update-comment") {
                         $action_result = update_comment($_POST["pid"], $_POST["author"], $_POST["email"], $_POST["url"], $_POST["comment"]);
                     } else {
                         if ($_POST["action"] == "add-collection") {
                             $action_result = add_collection($_POST["name"], $_POST["description"]);
                         } else {
                             if ($_POST["action"] == "add-album") {
                                 $action_result = add_album($_POST["name"], $_POST["description"], $_POST["parent_collection"]);