Example #1
0
$post['posttext'] = isset($HTTP_POST_VARS['post']['posttext']) ? $HTTP_POST_VARS['post']['posttext'] : '';
$post['posttext'] = strip_session($post['posttext']);
if (!isset($post['postcode'])) {
    $post['postcode'] = 0;
}
if (!isset($post['postsmilies'])) {
    $post['postsmilies'] = 0;
}
if (!isset($post['postemailnotify'])) {
    $post['postemailnotify'] = 0;
}
if ($g_user['userid'] == 0 && !$P->has_permission(P_REPLY)) {
    $navpath .= "Neue Antwort";
    message('Fehler', 'Sie müssen registriert sein, um Beiträge erstellen zu können');
}
requires_permission(P_REPLY);
$msg = '';
if (time() - $config['postdelay'] < (!empty($g_user['userlastpost']) ? $g_user['userlastpost'] : 0) && !$P->has_permission(P_NOFLOODPROT)) {
    $navpath .= "Neue Antwort";
    message("Fehler", "Sie k&ouml;nnen nur alle {$config['postdelay']} Sekunden einen neuen Post erstellen.");
}
// ANTI Guest Spamm
if ($g_user['userid'] == 0 && $P->has_permission(P_REPLY)) {
    prevent_guestspam();
}
$testlen = strlen(preg_replace("/(\\s+|(&#032;)+)/", '', strip_tags(parse_code(preparse_code($post['posttext']), 1, $config['imageslevel'] ? 0 : 1, $post['postcode'], $post['postsmilies']))));
if ($testlen < $config['message_minlength']) {
    $msg .= "Der Text ist zu kurz<br>";
}
if ($testlen > $config['message_maxlength']) {
    $msg .= "Der Text ist zu lang<br>";
Example #2
0
    $TQuicklinks = new Template('./templates/' . $style['styletemplate'] . '/quicklinks.html');
    $r_qlink = thwb_query("SELECT linkid, linkalt, linkcaption FROM " . $pref . "qlink");
    while ($qlink = mysql_fetch_array($r_qlink)) {
        $quicklinks .= "<A HREF=\"qlinks.php?id={$qlink['linkid']}\" title=\"{$qlink['linkalt']}\" target=_blank>[ {$qlink['linkcaption']} ]</a> ";
    }
    eval($TQuicklinks->GetTemplate("t_quicklinks"));
}
/*
################################################################################
            permissions
################################################################################
*/
global $P;
if (isset($board['boardid'])) {
    $P = new Permission($g_user['groupids'], $board['boardid']);
    requires_permission(P_VIEW);
} else {
    $P = new Permission($g_user['groupids']);
}
/*
################################################################################
            create navigation path ( forum / board / thread .. )
################################################################################
*/
$navigation[] = "<a class=\"bglink\" href=\"" . build_link("index.php") . "\">{$config['board_name']}</a>";
$navigation = thwb_array_reverse($navigation);
while (list($key, $val) = each($navigation)) {
    $navpath .= "{$val} &raquo; ";
}
/*
################################################################################
Example #3
0
include "./inc/header.inc.php";
// http://www.securiteam.com/securitynews/5FP0C204KE.html
$post['posttext'] = isset($HTTP_POST_VARS['post']) ? $HTTP_POST_VARS['post']['posttext'] : '';
if (!isset($post['postcode'])) {
    $post['postcode'] = 0;
}
if (!isset($post['postsmilies'])) {
    $post['postsmilies'] = 0;
}
if (!isset($post['postemailnotify'])) {
    $post['postemailnotify'] = 0;
}
if ($g_user['userid'] == 0 && !$P->has_permission(P_POSTNEW)) {
    message("Hinweis", "Sie m&uuml;ssen registriert sein, um Beitr&auml;ge erstellen zu k&ouml;nnen");
}
requires_permission(P_POSTNEW);
if (!isset($Submit)) {
    $newtopicicons = '';
    $j = 1;
    while (list($iconid, $img) = each($topicicon)) {
        $newtopicicons .= "<INPUT type=\"radio\" name=\"thread[threadiconid]\" value=\"{$iconid}\" >\n            <img src=\"templates/" . $style['styletemplate'] . "/images/icon/" . $img . "_new.png\">&nbsp;&nbsp;&nbsp;";
        if ($j % 6 == 0) {
            $newtopicicons .= "<br>";
        }
        $j++;
    }
    if ($config['smilies']) {
        $smilies_on_off = "AN";
    } else {
        $smilies_on_off = "AUS";
    }