<p> <label class="strong" for="description">' . plog_tr('Description') . ':</label><br /> <textarea name="description" id="description" cols="60" rows="5">' . htmlspecialchars(SmartStripSlashes($photo['description'])) . '</textarea> </p> <p><input type="checkbox" id="allow_comments" name="allow_comments" value="1" ' . $state . ' /><label class="strong" for="allow_comments" accesskey="w">' . plog_tr('Allo<em>w</em> Comments') . '?</label></p>'; $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'])) {
} $output .= '" method="post">'; $thumbpath = generate_thumb(SmartStripSlashes($photo['path']), $photo['id'], THUMB_SMALL); $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']);