$dbStatement->execute(); $row = $dbStatement->fetch(PDO::FETCH_NUM); if (!$row) { throw new HardStoryException("Problem fetching episode row from the database."); } $parent = $row[0]; $schemeID = $row[1]; $status = $row[2]; $isExtendable = $row[3]; $creationDate = $row[4]; $episodeLockKey = $row[5]; if ($command == "Lock" || $command == "Extend") { $scheme = $schemeID; } } $canEdit = Util::canEditEpisode($sessionID, $userID, $episode); // verify that the selected scheme is in the database $dbStatement = Util::getDbConnection()->prepare("SELECT COUNT( * ) " . "FROM Scheme " . "WHERE SchemeID = :scheme"); $dbStatement->bindParam(":scheme", $scheme, PDO::PARAM_INT); $dbStatement->execute(); $row = $dbStatement->fetch(PDO::FETCH_NUM); if (!$row) { throw new HardStoryException("Unable to fetch scheme count row from the database."); } if ($row[0] == 0) { throw new HardStoryException("The specified scheme does not exist."); } if ($mailto == 1) { $mailtoChecked = " CHECKED"; } else { $mailtoChecked = "";
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For information about Extend-A-Story and its authors, please visit the website: http://www.sir-toby.com/extend-a-story/ */ require __DIR__ . "/include/Extend-A-Story.php"; use Extend_A_Story\Util; Util::getSessionAndUserIDs($sessionID, $userID); $storyName = Util::getStringValue("StoryName"); $siteName = Util::getStringValue("SiteName"); $storyHome = Util::getStringValue("StoryHome"); $siteHome = Util::getStringValue("SiteHome"); $episode = Util::getIntParam($_GET, "episode"); if (!Util::canEditEpisode($sessionID, $userID, $episode)) { ?> <HTML><HEAD> <TITLE>List Edits - Error</TITLE> </HEAD><BODY> <CENTER> <H1>List Edits - Error</H1> <TABLE WIDTH="500"> <TR> <TD> You do not have permission to view the edits for this episode. <P> <A HREF="read.php?episode=<?php