Esempio n. 1
0
        </TD>
    </TR>
</TABLE>

</CENTER>

<?php 
if ($command == "Preview" || $command == "ExtendPreview" || $command == "EditPreview") {
    $displayedExtendedLink = htmlentities($extendedLink);
    $displayedTitle = htmlentities($title);
    $displayedText = htmlentities($text);
    $displayedAuthorName = htmlentities($authorName);
    $displayedAuthorEmail = strtr($authorEmail, Util::getEmailAddressTranslation());
    $displayedExtendedLink = strtr($displayedExtendedLink, Util::getOptionTranslation());
    $displayedText = strtr($displayedText, Util::getEpisodeBodyTranslation());
    ?>

<HR SIZE="10">

<CENTER>

<?php 
    if ($extending) {
        ?>

<B>Option Description Leading to this Extension</B><BR>
<?php 
        echo $displayedExtendedLink;
        ?>
<P>
Esempio n. 2
0
$image = $row[4];
$status = $row[5];
$isLinkable = $row[6];
$isExtendable = $row[7];
$authorMailto = $row[8];
$title = $row[9];
$text = $row[10];
$authorName = $row[11];
$authorEmail = $row[12];
$creationDate = $row[13];
$lockDate = $row[14];
$lockKey = $row[15];
$title = htmlentities($title);
$text = htmlentities($text);
$authorName = htmlentities($authorName);
$text = strtr($text, Util::getEpisodeBodyTranslation());
$authorEmail = strtr($authorEmail, Util::getEmailAddressTranslation());
$lockTime = strtotime($lockDate);
$curTime = time();
$diff = $curTime - $lockTime;
$minutes = $diff / 60;
$minutes = (int) $minutes;
$timeout = 60 - $minutes;
if ($status == 1 && $minutes > 300) {
    $authorSessionID = 0;
    $status = 0;
    $dbStatement = Util::getDbConnection()->prepare("UPDATE Episode " . "SET AuthorSessionID = 0, " . "Status = 0, " . "LockDate = '-', " . "LockKey = 0 " . "WHERE EpisodeID = :episode");
    $dbStatement->bindParam(":episode", $episode, PDO::PARAM_INT);
    $dbStatement->execute();
    if ($dbStatement->rowCount() != 1) {
        throw new HardStoryException("Automatic unlock attempt failed.");