Пример #1
0
    $classname = strtolower($classname);
    $error = '"' . $classname . '.php" file could not be included!';
    if (!@(include './' . $classname . '.php')) {
        echo '(document.getElementById (\'hashover\') || document.body).innerHTML += \'' . $error . '\';';
        exit;
    }
});
// Mode is based on whether request is AJAX
$mode = isset($_POST['ajax']) ? 'javascript' : 'php';
$data = null;
// Instantiate HashOver class
$hashover = new HashOver($mode);
$hashover->setup->setPageURL('request');
$hashover->setup->setPageTitle('request');
$hashover->initiate();
$hashover->finalize();
// Instantiate class for writing and editing comments
$write_comments = new WriteComments($hashover->readComments, $hashover->locales, $hashover->cookies, $hashover->login, $hashover->misc);
// Various POST data actions
$post_actions = array('login', 'logout', 'post', 'edit', 'delete');
// Execute an action (write/edit/login/etc)
foreach ($post_actions as $action) {
    if (empty($_POST[$action])) {
        continue;
    }
    switch ($action) {
        case 'login':
            if ($hashover->setup->allowsLogin !== true) {
                $write_comments->postComment();
                break;
            }