Пример #1
0
            exit;
        }
    }
    if ($notify) {
        $notify_message = "{$notify_message}\n\n\n========================================================\n{$subject}\n\n\n{$story}\n\n{$storyext}\n\n{$name}";
        mail($notify_email, $notify_subject, $notify_message, "From: {$notify_from}\nX-Mailer: PHP/" . phpversion());
    }
    include "header.php";
    OpenTable();
    $waiting = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_queue"));
    echo "<center><font class=\"title\">" . _SUBSENT . "</font><br><br>" . "<font class=\"content\"><b>" . _THANKSSUB . "</b><br><br>" . "" . _SUBTEXT . "" . "<br>" . _WEHAVESUB . " {$waiting} " . _WAITING . "";
    CloseTable();
    include "footer.php";
}
if (!isset($address)) {
    $address = "";
}
if (!isset($alanguage)) {
    $alanguage = "";
}
switch ($op) {
    case "" . _PREVIEW . "":
        PreviewStory($name, $address, $subject, $story, $storyext, $topic, $alanguage);
        break;
    case "" . _OK . "":
        SubmitStory($name, $address, $subject, $story, $storyext, $topic, $alanguage);
        break;
    default:
        defaultDisplay();
        break;
}
function allowComments(&$loq, $postid = null)
{
    if (is_null($postid) || $postid === 0) {
        return;
    }
    $sql = 'UPDATE ' . T_POSTS . ' SET allowcomments=IF(allowcomments="allow", "disallow", "allow") WHERE postid=' . intval($postid);
    $loq->_adb->Execute($sql);
    defaultDisplay($loq);
}