示例#1
0
    $navpath .= "Neue Antwort";
    message("Fehler", "Es sind leider folgende Fehler aufgetreten:<br><br><font color='{$style['color_err']}'>{$msg}</font>");
}
$ctime = time();
if ($g_user['userid'] == 0 && $P->has_permission(P_REPLY)) {
    // check username
    check_username($post['postguestname']);
    // override notify
    $post['postemailnotify'] = 0;
    $g_user['username'] = $config['guestprefix'] . $post['postguestname'];
    $post['postguestname'] = $config['guestprefix'] . addslashes($post['postguestname']);
} else {
    $post['postguestname'] = '';
}
if ($config["usebwordprot"] >= BWORD_POST) {
    $post["posttext"] = check_banned($post["posttext"]);
}
if (isset($config['auto_close']) && $config['auto_close'] > 0) {
    thwb_query("UPDATE  " . $pref . "thread SET threadclosed = '1' WHERE threadtime < '" . (time() - ($config['auto_close'] + 1) * 86400) . "'");
}
if (isset($config['auto_delete']) && $config['auto_delete'] > 0) {
    thwb_query("DELETE FROM " . $pref . "thread WHERE threadtime < " . (time() - $config['auto_delete'] * 86400) . "");
}
// neue nachricht posten
thwb_query("INSERT INTO " . $pref . "post (posttime, posttext, userid, threadid, postemailnotify, postsmilies, postcode, postip, postguestname)\n    VALUES('{$ctime}',\n    '" . addslashes(preparse_code($post['posttext'])) . "',\n    '{$g_user['userid']}',\n    '{$thread['threadid']}',\n    '" . ($post['postemailnotify'] ? 1 : 0) . "',\n    '" . ($post['postsmilies'] ? 1 : 0) . "',\n    '" . ($post['postcode'] ? 1 : 0) . "',\n    '" . addslashes($REMOTE_ADDR) . "',\n    '" . $post['postguestname'] . "')");
// Replys um 1 erh&ouml;hen in der board datenbank
thwb_query("UPDATE " . $pref . "board SET\n    boardlastpost='{$ctime}',\n    boardposts=boardposts+1,\n    boardlastpostby='" . addslashes($g_user['username']) . "',\n    boardthreadtopic='" . addslashes($thread['threadtopic']) . "',\n    boardthreadid={$thread['threadid']} WHERE boardid='{$board['boardid']}'");
if ($g_user['userid']) {
    // Den postings wert des postenden users erh&ouml;hen
    thwb_query("UPDATE " . $pref . "user SET userlastpost={$ctime}, userposts=userposts+1 WHERE userid='{$g_user['userid']}'");
}
<h2><?php 
            echo $MSG_LANG["liveranking"];
            ?>
</h2>

<?php 
            $players = get_ranking($id);
            draw_ranking($players);
        }
        // started
        break;
        // case view
    // case view
    case 'join':
        check_banned($_SESSION['playerID']);
        $id = $_GET['id'];
        $t = mysql_fetch_array(mysql_query("SELECT * FROM tournaments WHERE id = '{$id}'"));
        $name = db_output($t['name']);
        if (strpos($name, "Finals") > 0) {
            echo "<b>Cannot join Finals</b>";
            exit;
        }
        if (joined($id, $_SESSION['playerID'])) {
            echo "<b>{$MSG_LANG['tournamentalready']}</b>";
            exit;
        }
        if (get_num($id) == $t['players']) {
            echo "<b>{$MSG_LANG['tournament44']}</b>";
            exit;
        }
示例#3
0
         $smilies_on_off = "AUS";
     }
     $Tframe = new Template("templates/" . $style['styletemplate'] . "/frame.html");
     $Tform = new Template("templates/" . $style['styletemplate'] . "/edit.html");
     eval($Tform->GetTemplate("CONTENT"));
     eval($Tframe->GetTemplate());
 } else {
     $msg = '';
     $newpost['posttext'] = strip_session($newpost['posttext']);
     // Bannedwords-Protection
     if ($config["usebwordprot"] >= BWORD_POST) {
         $post["posttext"] = check_banned($post["posttext"]);
     }
     if ($firstpost && $P->has_permission(P_EDITTOPIC)) {
         if ($config["usebwordprot"] == BWORD_TOPIC || $config["usebwordprot"] == BWORD_ALL) {
             $thread["threadtopic"] = check_banned($thread["threadtopic"]);
         }
         if (strlen($newpost['threadtopic']) > $config['subject_maxlength']) {
             $msg .= "Das Subject ist zu lang!<br>";
         }
         if (strlen(preparse_code($newpost['threadtopic'])) < $config['subject_minlength']) {
             $msg .= "Das Subject ist zu kurz!<br>";
         }
     }
     if (strlen($newpost['posttext']) < $config['message_minlength']) {
         $msg .= "Ihr Text ist zu kurz!<br>";
     }
     if (strlen($newpost['posttext']) > $config['message_maxlength']) {
         $msg .= "Ihr Text ist zu lang!<br>";
     }
     if (isset($msg) && strlen($msg) > 0) {