$output .= "\n\t\t\t\t" . '<input type="hidden" name="pid" value="' . $photo['id'] . '" />
				<input type="hidden" name="action" value="update-picture" />
				<input class="submit" name="update" value="' . plog_tr('Update') . '" type="submit" />
				<input class="submit-cancel" name="cancel" value="' . plog_tr('Cancel') . '" type="submit" />
			</div>
		</form>' . "\n";
            $edit_page = 1;
            break;
        case 'edit-album':
            // Show the edit album form
            $output .= plog_edit_album_form($id);
            $edit_page = 1;
            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':
Exemple #2
0
                    $output .= "<div style='float:right'><img src='{$thumbpath}'/></div>";
                    $output .= '<label accesskey="c" for="caption"><em>C</em>aption:</label><input size="80" name="caption" id="caption" value="' . SmartStripSlashes($photo['caption']) . '"><br />
							<label>Description:</label><br />
							<textarea name="description" id="description" cols="60" rows="5">' . SmartStripSlashes($photo['description']) . '</textarea><br />
						
					    <label for="allow_comments" accesskey="w">Allo<em>w</em> Comments?<label><br /><input type="checkbox" id="allow_comments" name="allow_comments" value="1"' . " {$state}>";
                    $output .= '<input type="hidden" name="pid" value="' . $photo['id'] . '"><input type="hidden" 
						name="action" value="update-picture"><button class="submit" type="submit">Update</button>';
                    $output .= '</form>';
                } else {
                    if ($_GET["action"] == "edit-album") {
                        // show the edit form
                        $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']);