authenticate("write"); if (!$gallery->checkAuthenticatedUser()) { $gallery->error("You do not have permission to edit these details"); } $id = $_REQUEST['id']; $title = $_REQUEST['title']; $description = $_REQUEST['description']; $tags = $_REQUEST['tags']; if (!empty($id)) { $gallery->setMeta($id, stripslashes($title), stripslashes($description)); $gallery->setTags($id, stripslashes($tags)); } header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/photo.php?id=' . $id); ?>