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':
     // Update the comment information
     if (!isset($_REQUEST['cancel'])) {
         $action_result = update_comment($_POST['pid'], $_POST['author'], $_POST['email'], $_POST['url'], $_POST['comment']);
     }
     break;
 case 'add-collection':
Esempio n. 2
0
                    $has_error = true;
                }
                if (empty($recordLabel)) {
                    $recordLabel_error = "Record label cannot be blank";
                    $has_error = true;
                }
                if (empty($releaseDate)) {
                    $releaseDate_error = "Release date cannot be blank";
                    $has_error = true;
                }
                if (!$has_error) {
                    // Successful
                    if ($albumId == -1) {
                        $ret = add_album($title, $recordLabel, $releaseDate);
                    } else {
                        $ret = update_album($albumId, $title, $recordLabel, $releaseDate);
                    }
                    if (!$has_error) {
                        // Get album id from return value(s)
                        if ($albumId != -1) {
                            header('Location: album.php?action=details&id=' . $albumId, true);
                        } else {
                            header('Location: artists.php', true);
                        }
                        die;
                    }
                }
            }
            ?>

	<form action="" method="post" style="display: block;">