login}'");
/* ------------------------- */ ?>
level < 10 && $_GET['m'] > 3 OR $_GET['m'] <= 0) {
echo "Ongeldig forum Identificatie! ";
exit;
}
if($_GET['m'] <= 0 OR $_GET['m'] > 3 && $_GET['m'] != 278) {
echo "Ongeldig forum Identificatie! ";
exit;
}
?>
if ($_GET['x'] == "post"){
if (isset($_POST['submit'])){
if (trim($_POST['title']) && trim($_POST['message'])){
$_POST['title'] = htmlspecialchars($_POST['title']);
if($data->level >= 50)
$title = preg_replace('/\','<',substr($_POST['title'],0,300));
else
$title = preg_replace('/\','<',substr($_POST['title'],0,30));
$_POST['message'] = htmlspecialchars($_POST['message']);
$message = preg_replace('/\','<',substr($_POST['message'],0,25000));
$dbres = mysql_query("SELECT * FROM `playermess`");
$idn1 = mysql_num_rows($dbres) + 1;
$forum = $_GET['m'];
mysql_query("INSERT INTO `playermess` (datum,titel,text,poster,forum,last,type) values(NOW(),'$title','$message','$data->login','$forum',NOW(),'1')");
mysql_query("UPDATE `[users]` SET `posts`=`posts`+'1' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `postdate`=NOW() WHERE `login`='{$data->login}'");
echo "";
} else
echo "Type een titel";
}
print <<
Nieuw onderwerp |
|
ENDHTML;
if (isset($_POST['message'])){
if (trim($_POST['message'])){
$_POST['message'] = htmlspecialchars($_POST['message']);
$message = preg_replace('/\','<',substr($_POST['message'],0,100000));
$message = $_POST['message'];
$id = mysql_insert_id();
$dbres5 = mysql_query("SELECT * FROM `forummess`");
$idn1 = mysql_num_rows($dbres5) + 1;
$forum = $_GET['m'];
$messid = $_GET['id'];
mysql_query("INSERT INTO `forummess`(datum,titel,text,schrijver,forum) values(NOW(),'$messid','$message','$data->login','$forum')");
mysql_query("UPDATE `[users]` SET `posts`=`posts`+'1' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `postdate`=NOW() WHERE `login`='{$data->login}'");
mysql_query("UPDATE `playermess` SET `last`=NOW() WHERE `id`='{$messid}'");
print "
Bericht toegevoegd";
} else
echo "Type een bericht";
}
} else
echo "Dit onderwerp is gesloten";
}
?>