help forum

Hulp nodig bij je installatie of kom je ergens niet uit? Probeer phpBB3! Problemen lossen we samen met je op.
phpBB 3.0 is End of support per 1 januari 2017. Dit forum is hier enkel ter archief. Het wordt aangeraden te upgraden naar phpBB 3.2
Forumregels
phpBB 3.0 is End of support per 1 januari 2017. Dit forum is hier enkel ter archief. Het wordt aangeraden te upgraden naar phpBB 3.2
Gesloten
jenzoo
Berichten: 2
Lid geworden op: 18 apr 2010, 11:32

help forum

Bericht door jenzoo » 18 apr 2010, 11:39

ik heb een forum script, maar als ik deze online zet verschijnt er niemand, weet iemand waar de fout zit???
Spoiler: bekijk
<?php /* ------------------------- */
include_once("_include-config.php");
if(! check_login()) {
header("Location: login.php");
exit;
}


if(isset($_GET['sub'])){
$_GET['sub']=htmlspecialchars(addslashes($_GET['sub']));
}
if(isset($_GET['p'])){
$_GET['p']=htmlspecialchars(addslashes($_GET['p']));
}
if(isset($_GET['topic'])){
$_GET['topic']=htmlspecialchars(addslashes($_GET['topic']));
}
if(isset($_GET['slotje'])){
$_GET['slotje']=htmlspecialchars(addslashes($_GET['slotje']));
}
if(isset($_GET['delreply'])){
$_GET['delreply']=htmlspecialchars(addslashes($_GET['delreply']));
}
if(isset($_GET['verplaats'])){
$_GET['verplaats']=htmlspecialchars(addslashes($_GET['verplaats']));
}
if(isset($_POST['forum'] )){
$_POST['forum'] =htmlspecialchars(addslashes($_POST['forum'] ));
}
if(isset($_GET['reageer'])){
$_GET['reageer']=htmlspecialchars(addslashes($_GET['reageer']));
}
if(isset($_GET['quote'])){
$_GET['quote']=htmlspecialchars(addslashes($_GET['quote']));
}
if(isset($_GET['edittopic'])){
$_GET['edittopic']=htmlspecialchars(addslashes($_GET['edittopic']));
}
if(isset($_GET['editreply'])){
$_GET['editreply']=htmlspecialchars(addslashes($_GET['editreply']));
}
if(isset($_GET['delreply'])){
$_GET['delreply']=htmlspecialchars(addslashes($_GET['delreply']));
}
if(isset($_GET['sub'])){
$_GET['sub']=htmlspecialchars(addslashes($_GET['sub']));
}
if(isset($_GET['sub'])){
$_GET['sub']=htmlspecialchars(addslashes($_GET['sub']));
}
if(isset($_GET['sub'])){
$_GET['sub']=htmlspecialchars(addslashes($_GET['sub']));
}
if(isset($_GET['sub'])){
$_GET['sub']=htmlspecialchars(addslashes($_GET['sub']));
}

if(! $_GET['p']) {
$begin = 0;
}
else {
$begin = $_GET['p'];
}

/* ------------------------- */ ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" type="text/css" href="css-v1.css">
</head>




<?
if($_GET['sub']) {
$query2 = mysql_query("SELECT * FROM `[forum_sub]` WHERE `id`={$_GET['sub']}");
$sub = mysql_fetch_object($query2);
if($sub->mods == "") {
$mods = "Geen";
} else {
$mods = $sub->mods;
}
if($data->forumstatus == "gwsp2") {
}
elseif($data->forumstatus == "gwsp1") {
}
else {
if($_GET['sub'] == 12 && $data->type != 1) {
print " <table width=\"100%\" cellspacing=0><tr><td class=\"subTitle\"><b>Forum</b></td></tr><tr><td class=\"mainTxt\"><table width=\"100%\" align=\"center\"><tr><td>Dit forum is alleen voor gangsters.</td></tr></table></td></tr></table>\n";
exit;
}
if($_GET['sub'] == 13 && $data->type != 2) {
print " <table width=\"100%\" cellspacing=0><tr><td class=\"subTitle\"><b>Forum</b></td></tr><tr><td class=\"mainTxt\"><table width=\"100%\" align=\"center\"><tr><td>Dit forum is alleen voor terroristen.</td></tr></table></td></tr></table>\n";
exit;
}
if($_GET['sub'] == 14 && $data->type != 3 ) {
print " <table width=\"100%\" cellspacing=0><tr><td class=\"subTitle\"><b>Forum</b></td></tr><tr><td class=\"mainTxt\"><table width=\"100%\" align=\"center\"><tr><td>Dit forum is alleen voor agenten.</td></tr></table></td></tr></table>\n";
exit;
}
}

print " <table width=\"100%\" cellspacing=0><tr><td class=\"subTitle\"><b>Forum</b></td></tr><tr><td class=\"mainTxt\"><table width=\"100%\" align=\"center\"><tr><td><div align=\"left\"><a href=\"forum.php?newtopic={$_GET['sub']}\"><b>Nieuw Onderwerp</b></a></div><div align=\"right\">\n";
print " </div></td></tr><tr><td align=\"left\">Moderator(s): <font color=red><b>$mods</b></font></td></tr><tr><td><table align=\"center\" width=\"100%\"><tr><td width=\"5%\" align=\"left\" class=\"subTitle\" style=\"letter-spacing: normal;\">&nbsp;</td><td align=\"left\" class=\"subTitle\" style=\"letter-spacing: normal;\" width=\"40%\"><b>Topic</b></td><td align=\"center\" class=\"subTitle\" style=\"letter-spacing: normal;\" width=\"10%\"><b>Door</b></td><td align=\"center\" class=\"subTitle\" style=\"letter-spacing: normal;\" width=\"10%\"><b>Reacties</b></td><td align=\"left\" class=\"subTitle\" style=\"letter-spacing: normal;\" width=\"30%\"><b>Laatste reactie</b></td></tr>\n";
$query = mysql_query("SELECT * FROM `[forum_topics]` WHERE `subid`={$_GET['sub']} ORDER BY `date`
DESC");
while($forum = mysql_fetch_object($query)) {
$forum->title = eregi_replace("kanker", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("pik", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("penis", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("vagina", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("kanker", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("cancer", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("leier", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("neuk", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
$forum->title = eregi_replace("anaal", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $forum->title );
if($forum->slotje == 0) {
$image = "opentopic.gif";
}
else {
$image = "closed.gif";
}
if($forum->datum == "") {
$forum->datum = "Geen";
}
if($forum->title == "") {
$forum->title = "Geen";
}
print " <tr><td width=\"5%\"><a href=\"forum.php?verplaats={$forum->id}\"><img src=\"http://www.members.lycos.nl/psychowarga ... es/{$image}\" border=0></a></td><td width=\"45%\"><a href=\"forum.php?topic={$forum->id}\"><b>$forum->title</b></a></td><td align=\"center\" width=\"10%\"><a href=\"profile.php?x={$forum->login}\">$forum->login</a></td><td align=\"center\" width=\"10%\">$forum->replys</td><td width=\"30%\">$forum->datum</td></tr><tr>\n";
}
print " </table></tr></td></table></td></tr></table>\n";
}
elseif($_GET['topic']) {
if(isset($_POST['add'])) {
$id = $_GET['topic'];
$bericht = $_POST['message'];
$datum = date("d-m-Y H:i");
$query = mysql_query("SELECT * FROM `[forum_topics]` WHERE `id`={$_GET['topic']}");
$lol = mysql_fetch_object($query);
print " <table width=\"100%\" cellspacing=0><tr><td class=\"subTitle\"><b>Forum</b></td></tr><tr><td class=\"mainTxt\"><table width=\"100%\" align=\"center\"><tr><td align=\"center\">Je bericht is geplaatst.<BR><BR><a href=\"forum.php?topic={$_GET['topic']}\">Terug</a></td></tr></table></td></tr></table>\n";
mysql_query("INSERT INTO `[foum_replys]`(topicid,datum,login,title,text,date) values($id,'$datum','$data->login','RE:','$bericht',NOW())") or die("er is een fout opgetreden. Ging het volgende mis: <br>\n".mysql_error()."<br>Extra informatie:".mysql_errno());
mysql_query("UPDATE `[forum_topics]` SET `replys`=`replys`+1,`datum`='$datum',`date1`=NOW() WHERE `id`={$_GET['topic']}") or die("er is een fout opgetreden. Ging het volgende mis: <br>\n".mysql_error()."<br>Extra informatie:".mysql_errno());
mysql_query("UPDATE `[forum_sub]` SET `replys`=`replys`+1 WHERE `id`={$lol->subid}") or die("er is een fout opgetreden. Ging het volgende mis: <br>\n".mysql_error()."<br>Extra informatie:".mysql_errno());
mysql_query("UPDATE `[users]` SET `forumposts`=`forumposts`+1 WHERE `login`='{$data->login}'") or die("er is een fout opgetreden. Ging het volgende mis: <br>\n".mysql_error()."<br>Extra informatie:".mysql_errno());
}
else {
$query = mysql_query("SELECT * FROM `[forum_topics]` WHERE `id`={$_GET['topic']}");
$topic = mysql_fetch_object($query);
$user_query2 = mysql_query("SELECT UNIX_TIMESTAMP(`online`) AS `online`,`forumstatus`,`login`,`forumposts`,`avaurl` FROM `[users]` WHERE `login`='{$topic->login}'");
$user2 = mysql_fetch_object($user_query2);


if($user2->forumstatus == "gwsp1") {
$status = "<font color=green><b>Moderator</b></font>";
}
elseif($user2->forumstatus == "gwsp2") {
$status = "<font color=red><b>Webmaster</b></font>";
}
elseif($user2->forumposts <= 50) {
$status = "Forum Beginner";
}
elseif($user2->forumposts <= 150) {
$status = "Forum Freak";
}
elseif($user2->forumposts > 150) {
$status = "Forum God";
}
elseif($user2->forumposts > 750) {
$status = "Forum Piraat";
}
else {
$status = "Normaal";
}
if(time() - $user2->online < 300) {
$online2 = "<img src=\"http://www.members.lycos.nl/psychowarga ... online.gif\"> <font color=green><b>Online</b></font>";
}
else {
$online2 = "<img src=\"http://www.members.lycos.nl/psychowarga ... ffline.gif\"> <font color=red><b>Offline</b></font>";
}
$topic->text = htmlspecialchars($topic->text);
$topic->text = nl2br($topic->text);
$topic->text = str_replace("", "<b>",$topic->text);
$topic->text = str_replace("
", "</b>",$topic->text);
$topic->text = str_replace("", "<i>",$topic->text);
$topic->text = str_replace("
", "</i>",$topic->text);
$topic->text = str_replace("", "<u>",$topic->text);
$topic->text = str_replace("
", "</u>",$topic->text);
$topic->text = eregi_replace("\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]","<font color=\"\\1\">\\2</font>",$topic->text);
$topic->text = eregi_replace("\\[email=([^\\[]*)\\]([^\\[]*)\\[/email\\]", "<a href=\"mailto:\\1\">\\2</a>",$topic->text);
$topic->text = eregi_replace("\\[url=([^\\[]*)\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=_blank>\\2</a>",$topic->text);
$topic->text = eregi_replace("\\[img]([^\\[]*)\\[/img\\]","<img src=\"\\1\">",$topic->text);
$topic->text = eregi_replace("\\[wmv]([^\\[]*)\\[/wmv\\]","<embed src=\"\\1\"><align=center>",$topic->text);

$topic->text = eregi_replace("\\
([^\\[ schreef:*)\\]([^\\[]*)\\[/quote\\]","<center><table width=90%><tr><td>Quote:<br><hr color=\"#FFFFFF\" size=1 width=100%></td></tr><tr><td><b>\\1 schreef:</b></td></tr><tr><td>\\2</td></tr><tr><td><hr color=\"#FFFFFF\" size=1 width=100%></td></tr></table></center>",$topic->text);
$topic->text = eregi_replace("\\
([^\\[]*)\\[/quote\\]","<center><table width=90%><tr><td>Quote:<br><hr color=\"#FFFFFF\" size=1 width=100%></td></tr><tr><td>\\1</td></tr><tr><td><hr color=\"#FFFFFF\" size=1 width=100%></td></tr></table></center>",$topic->text);
$topic->text = str_replace("(h)", "<img src=\"http://www.members.lycos.nl/psychowarga ... n_cool.gif\" border=0>",$topic->text);
$topic->text = str_replace("(H)", "<img src=\"http://www.members.lycos.nl/psychowarga ... n_cool.gif\" border=0>",$topic->text);
$topic->text = str_replace(":$", "<img src=\"http://www.members.lycos.nl/psychowarga ... rassed.gif\" border=0>",$topic->text);
$topic->text = str_replace(":(", "<img src=\"http://www.members.lycos.nl/psychowarga ... _frown.gif\" border=0>",$topic->text);
$topic->text = str_replace("(a)", "<img src=\"http://www.members.lycos.nl/psychowarga ... nocent.gif\" border=0>",$topic->text);
$topic->text = str_replace("(A)", "<img src=\"http://www.members.lycos.nl/psychowarga ... nocent.gif\" border=0>",$topic->text);
$topic->text = str_replace("(k)", "<img src=\"http://www.members.lycos.nl/psychowarga ... n_kiss.gif\" border=0>",$topic->text);
$topic->text = str_replace("(K)", "<img src=\"http://www.members.lycos.nl/psychowarga ... n_kiss.gif\" border=0>",$topic->text);
$topic->text = str_replace(":D", "<img src=\"http://www.members.lycos.nl/psychowarga ... _smile.gif\" border=0>",$topic->text);
$topic->text = str_replace(":d", "<img src=\"http://www.members.lycos.nl/psychowarga ... _smile.gif\" border=0>",$topic->text);
$topic->text = str_replace("(m)", "<img src=\"http://www.members.lycos.nl/psychowarga ... nmouth.gif\" border=0>",$topic->text);
$topic->text = str_replace("(M)", "<img src=\"http://www.members.lycos.nl/psychowarga ... nmouth.gif\" border=0>",$topic->text);
$topic->text = str_replace(":#", "<img src=\"http://www.members.lycos.nl/psychowarga ... sealed.gif\" border=0>",$topic->text);
$topic->text = str_replace(":)", "<img src=\"http://www.members.lycos.nl/psychowarga ... _smile.gif\" border=0>",$topic->text);
$topic->text = str_replace(":0", "<img src=\"http://www.members.lycos.nl/psychowarga ... prised.gif\" border=0>",$topic->text);
$topic->text = str_replace(":o", "<img src=\"http://www.members.lycos.nl/psychowarga ... prised.gif\" border=0>",$topic->text);
$topic->text = str_replace(":O", "<img src=\"http://www.members.lycos.nl/psychowarga ... prised.gif\" border=0>",$topic->text);
$topic->text = str_replace(":p", "<img src=\"ihttp://www.members.lycos.nl/psychowargamev2/ma ... n_razz.gif\" border=0>",$topic->text);
$topic->text = str_replace(":P", "<img src=\"http://www.members.lycos.nl/psychowarga ... n_razz.gif\" border=0>",$topic->text);
$topic->text = str_replace(";)", "<img src=\"http://www.members.lycos.nl/psychowarga ... n_wink.gif\" border=0>",$topic->text);
$topic->text = str_replace(":@", "<img src=\"http://www.members.lycos.nl/psychowarga ... n_yell.gif\" border=0>",$topic->text);

$topic->text = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("pik", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("penis", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("vagina", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("kanker", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("cancer", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("leier", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("*beep*", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("neuk", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );
$topic->text = eregi_replace("anaal", "<img src=\"http://www.members.lycos.nl/psychowarga ... nsored.gif\">", $topic->text );


$topic->text = str_replace("\\\'", "'", $topic->text);
$topic->text = str_replace("\\\'", "'", $topic->text);
$topic->text = str_replace("\'", "'", $topic->text);
$topic->text = str_replace("\'", "'", $topic->text);
$topic->text = str_replace("\'", "'", $topic->text);
$topic->text = str_replace("\'", "'", $topic->text);
$topic->text = str_replace("\'", "'", $topic->text);
$topic->text = str_replace("\'", "'", $topic->text);
$topic->text = str_replace("\r'", "'", $topic->text);
$topic->text = str_replace("\n'", "'", $topic->text);

print " <table width=\"100%\" cellspacing=0><tr><td class=\"subTitle\"><b>Forum</b></td></tr><table align=\"center\" width=\"100%\" cellspacing=0><tr><td class=\"mainTxt\"><table width=\"100%\"><tr><td width=\"110\" valign=\"top\"><b><a href=\"profile.php?x={$topic->login}\">$topic->login</a></b><BR>$status<BR><BR><img src=\"{$user2->avaurl}\" width=\"100\" height=\"100\"><BR><BR>$online2<BR>Berichten: $user2->forumposts</td><td valign=\"top\" align=\"left\">$topic->text</td></tr>\n";
if($data->login == $topic->login) {
print " <tr><td><i>$topic->datum1</i></td><td colspan=2 align=\"right\"><a href=\"forum.php?edittopic={$topic->id}\">Bewerken</a></td></tr></table></td></tr>\n";
}
else {
print " <tr><td><i>$topic->datum1</i></td><td colspan=2>&nbsp;</td></tr></table></td></tr>\n";
}
$query2 = mysql_query("SELECT * FROM `[foum_replys]` WHERE `topicid`={$_GET['topic']} AND `del`=0 ORDER BY `date` ASC LIMIT $begin,10");
while($forum = mysql_fetch_object($query2)) {
$user_query = mysql_query("SELECT UNIX_TIMESTAMP(`online`) AS `online`,`forumstatus`,`login`,`forumposts`,`avaurl` FROM `[users]` WHERE `login`='{$forum->login}'");
$user = mysql_fetch_object($user_query);
$forum->text = htmlspecialchars($forum->text);
$forum->text = nl2br($forum->text);
$forum->text = str_replace("", "<b>",$forum->text);
$forum->text = str_replace("
", "</b>",$forum->text);
$forum->text = str_replace("", "<i>",$forum->text);
$forum->text = str_replace("
", "</i>",$forum->text);
$forum->text = str_replace("", "<u>",$forum->text);
$forum->text = str_replace("
", "</u>",$forum->text);
$forum->text = eregi_replace("\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]","<font color=\"\\1\">\\2</font>",$forum->text);
$forum->text = eregi_replace("\\[email=([^\\[]*)\\]([^\\[]*)\\[/email\\]", "<a href=\"mailto:\\1\">\\2</a>",$forum->text);
$forum->text = eregi_replace("\\[url=([^\\[]*)\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=_blank>\\2</a>",$forum->text);
$forum->text = eregi_replace("\\[wmv]([^\\[]*)\\[/wmv\\]","<wmv src=\"\\1\">",$forum->text);
$forum->text = eregi_replace("\\[img]([^\\[]*)\\[/img\\]","<img src=\"\\1\">",$forum->text);


$forum->text = eregi_replace("\\
([^\\[ schreef:*)\\]([^\\[]*)\\[/quote\\]","<center><table width=90%><tr><td>Quote:<br><hr color=\"#FFFFFF\" size=1 width=100%></td></tr><tr><td><b>\\1 schreef:</b></td></tr><tr><td>\\2</td></tr><tr><td><hr color=\"#FFFFFF\" size=1 width=100%></td></tr></table></center>",$forum->text);
$forum->text = eregi_replace("\\')">
<input type="button" value="[img]Plaatje[/img]" style="text-decoration: none; width: 140px" onClick="javascript:icon(' ')">
<input type="button" value="[wmv]Video[/wmv]" style="text-decoration: none; width: 140px" onClick="javascript:icon('[wmv] [/wmv]')">

<textarea rows="15" name="message" cols="50" maxlength="10000"></textarea></td><td width="100%"></td>
</tr>
<tr><td></td><td align="right"><input type="submit" name="add" value="Toevoegen"></td><td width="100%"></td><td width="100%"></td></tr>
</form>
</table>
</tr></td>
</table>
</td></tr>
</table>
ENDHTML;
}
}
elseif($_GET['edittopic']) {
$query = mysql_query("SELECT * FROM `[forum_topics]` WHERE `id`={$_GET['edittopic']} AND `login`='{$data->login}'");
$num = mysql_num_rows($query);
$topic = mysql_fetch_object($query);
if($num == 1) {
if(isset($_POST['change'])) {
$titel = htmlspecialchars(addslashes($_POST['title']));
$bericht = htmlspecialchars(addslashes($_POST['message']));
$id = htmlspecialchars(addslashes($_GET['edittopic']));
print " <table width=\"100%\" cellspacing=0><tr><td class=\"subTitle\"><b>Forum</b></td></tr><tr><td class=\"mainTxt\"><table width=\"100%\" align=\"center\"><tr><td align=\"center\">Je bericht is gewijzigt.</tr></td></table></td></tr></table>\n";
mysql_query("UPDATE `[forum_topics]` SET `title`='{$titel}',`text`='{$bericht}' WHERE `id`={$id}") or die("er is een fout opgetreden. Ging het volgende mis: <br>\n".mysql_error()."<br>Extra informatie:".mysql_errno());
}
else {
print " <table width=\"100%\" cellspacing=0>\n";
print " <tr><td class=\"subTitle\"><b>Forum</b></td></tr>\n";
print " <tr><td class=\"mainTxt\">\n";
print " <table width=\"100%\" align=\"center\">\n";
print " <tr><td class=\"mainTxt\">\n";
print " <table align=\"center\" width=\"100%\"><form method=\"post\">\n";
print " <tr><td class=\"mainTxt\" colspan=3>Topic bewerken</td></tr>\n";
print " <tr><td>Titel:</td><td><input type=\"text\" value=\"$topic->title\" size=\"20\" name=\"title\"></td><td width=\"100%\"></td></tr>\n";
print " <tr><td>Bericht:</td><td><textarea name=\"message\" cols=40 rows=10>$topic->text</textarea></td><td width=\"





\"></td></tr>\n";
print " <tr><td></td><td align=\"right\"><input type=\"submit\" name=\"change\" value=\"Verander\"></td><td width=\"100%\"></td></tr>\n";
print " </form</table>\n";
print " </tr></td>\n";
print " </table>\n";
print " </td></tr>\n";
print " </table>\n";
}
}
else {
print " <table width=\"100%\" cellspacing=0>\n";
print " <tr><td class=\"subTitle\"><b>Forum</b></td></tr>\n";
print " <tr><td class=\"mainTxt\">\n";
print " <table width=\"100%\" align=\"center\">\n";
print " <tr><td align=\"center\">\n";
print " Error!\n";
print " </tr></td>\n";
print " </table>\n";
print " </td></tr>\n";
print " </table>\n";
}
}
elseif($_GET['editreply']) {
$query = mysql_query("SELECT * FROM `[foum_replys]` WHERE `id`={$_GET['editreply']} AND `login`='{$data->login}'");
$num = mysql_num_rows($query);
$topic = mysql_fetch_object($query);
if($num == 1) {
if(isset($_POST['change'])) {
$titel = htmlspecialchars(addslashes($_POST['title']));
$bericht = htmlspecialchars(addslashes($_POST['message']));
$id = htmlspecialchars(addslashes($_GET['editreply']));
print " <table width=\"100%\" cellspacing=0><tr><td class=\"subTitle\"><b>Forum</b></td></tr><tr><td class=\"mainTxt\"><table width=\"100%\" align=\"center\"><tr><td align=\"center\">Je bericht is gewijzigt.</tr></td></table></td></tr></table>\n";
mysql_query("UPDATE `[foum_replys]` SET `text`='{$bericht}' WHERE `id`={$id}") or die("er is een fout opgetreden. Ging het volgende mis: <br>\n".mysql_error()."<br>Extra informatie:".mysql_errno());

}
else {
print " <table width=\"100%\" cellspacing=0>\n";
print " <tr><td class=\"subTitle\"><b>Forum</b></td></tr>\n";
print " <tr><td class=\"mainTxt\">\n";
print " <table width=\"100%\" align=\"center\">\n";
print " <tr><td class=\"mainTxt\">\n";
print " <table align=\"center\" width=\"100%\"><form method=\"post\">\n";
print " <tr><td class=\"mainTxt\" colspan=3>Reactie bewerken</td></tr>\n";
print " <tr><td>Bericht:</td><td><textarea name=\"message\" cols=40 rows=10>$topic->text</textarea></td><td width=\"100%\"></td></tr>\n";
print " <tr><td></td><td align=\"right\"><input type=\"submit\" name=\"change\" value=\"Verander\"></td><td width=\"100%\"></td></tr>\n";
print " </form</table>\n";
print " </tr></td>\n";
print " </table>\n";
print " </td></tr>\n";
print " </table>\n";
}
}
elseif($data->forumstatus == "gwsp1" || $data->forumstatus == "gwsp2") {
$query2 = mysql_query("SELECT * FROM `[foum_replys]` WHERE `id`={$_GET['editreply']}");
$topic2 = mysql_fetch_object($query2);
if(isset($_POST['change'])) {
$titel = $_POST['title'];
$bericht = $_POST['message'];
$id = $_GET['editreply'];
print " <table width=\"100%\" cellspacing=0><tr><td class=\"subTitle\"><b>Forum</b></td></tr><tr><td class=\"mainTxt\"><table width=\"100%\" align=\"center\"><tr><td align=\"center\">Je bericht is gewijzigt.</tr></td></table></td></tr></table>\n";
mysql_query("UPDATE `[foum_replys]` SET `text`='{$bericht}' WHERE `id`={$id}") or die("er is een fout opgetreden. Ging het volgende mis: <br>\n".mysql_error()."<br>Extra informatie:".mysql_errno());

}
else {
print " <table width=\"100%\" cellspacing=0>\n";
print " <tr><td class=\"subTitle\"><b>Forum</b></td></tr>\n";
print " <tr><td class=\"mainTxt\">\n";
print " <table width=\"100%\" align=\"center\">\n";
print " <tr><td class=\"mainTxt\">\n";
print " <table align=\"center\" width=\"100%\"><form method=\"post\">\n";
print " <tr><td class=\"mainTxt\" colspan=3>Reactie bewerken</td></tr>\n";
print " <tr><td>Bericht:</td><td><textarea name=\"message\" cols=40 rows=10>$topic2->text</textarea></td><td width=\"100%\"></td></tr>\n";
print " <tr><td></td><td align=\"right\"><input type=\"submit\" name=\"change\" value=\"Verander\"></td><td width=\"100%\"></td></tr>\n";
print " </form</table>\n";
print " </tr></td>\n";
print " </table>\n";
print " </td></tr>\n";
print " </table>\n";
}
}
else {
print " <table width=\"100%\" cellspacing=0>\n";
print " <tr><td class=\"subTitle\"><b>Forum</b></td></tr>\n";
print " <tr><td class=\"mainTxt\">\n";
print " <table width=\"100%\" align=\"center\">\n";
print " <tr><td align=\"center\">\n";
print " Error!\n";
print " </tr></td>\n";
print " </table>\n";
print " </td></tr>\n";
print " </table>\n";
}
}
elseif($_GET['delreply']) {
$query = mysql_query("SELECT * FROM `[foum_replys]` WHERE `id`={$_GET['delreply']} AND `login`='{$data->login}'");
$num = mysql_num_rows($query);
$topic = mysql_fetch_object($query);
if($num == 1) {
$query2 = mysql_query("SELECT * FROM `[foum_topics]` WHERE `id`={$topic->topicid}");
$sub = mysql_fetch_object($query2);
$id = $_GET['delreply'];
print " <table width=\"100%\" cellspacing=0><tr><td class=\"subTitle\"><b>Forum</b></td></tr><tr><td class=\"mainTxt\"><table width=\"100%\" align=\"center\"><tr><td align=\"center\">Je bericht is verwijdert.</tr></td></table></td></tr></table>\n";
mysql_query("DELETE FROM `[foum_replys]` WHERE `id`='{$id}'");
mysql_query("UPDATE `[forum_topics]` SET `replys`=`replys`-1 WHERE `id`='{$topic->topicid}'");
mysql_query("UPDATE `[forum_sub]` SET `replys`=`replys`-1 WHERE `id`='{$sub->subid}'") or die("er is een fout opgetreden. Ging het volgende mis: <br>\n".mysql_error()."<br>Extra informatie:".mysql_errno());
}
else {
print " <table width=\"100%\" cellspacing=0>\n";
print " <tr><td class=\"subTitle\"><b>Forum</b></td></tr>\n";
print " <tr><td class=\"mainTxt\">\n";
print " <table width=\"100%\" align=\"center\">\n";
print " <tr><td align=\"center\">\n";
print " Error!\n";
print " </tr></td>\n";
print " </table>\n";
print " </td></tr>\n";
print " </table>\n";
}
}
else {

print " <table width=100%><tr><td class=Subtitle colspan=2>Forum</tr></td><tr><td class=Maintxt>Welkom op het <b>Jenzoo</b> forum
<tr><td class=Maintxt>Houd je aan de regels!</a></tr></td></td></tr></table>\n";

print " <table width=\"100%\" align=\"center\"></tr></td></table><tr><td><table align=\"center\" width=\"100%\"><tr><td align=\"center\" class=\"subTitle\" style=\"letter-spacing: normal;\" width=\"70%\" colspan=\"1\"><b>Algemeen</b></td><td align=\"center\" class=\"subTitle\" style=\"letter-spacing: normal;\" width=\"15%\"><b>Topics</b></td><td align=\"center\" class=\"subTitle\" style=\"letter-spacing: normal;\" width=\"15%\"><b>Reacties</b></td></tr>\n";
$query = mysql_query("SELECT * FROM `[forum_sub]` WHERE `area`=1");
while($forum = mysql_fetch_object($query)) {
print " <tr onClick=\"window.location.href='forum.php?sub={$forum->id}'\"><td class=maintxt width=\"70%\"><a href=\"forum.php?sub={$forum->id}\" target=\"_self\"><b>$forum->title</b></a><br>$forum->text</td><td align=\"center\" class=maintxt width=\"15%\">$forum->topics</td><td class=maintxt align=\"center\" width=\"15%\">$forum->replys</td></tr>\n";
}


}
?>
</body>

</html>
<?PHP
include("advertentie.php");
?>
<? mysql_close(); ?>
Alvast bedankt!!

Gebruikersavatar
EelkeB
Berichten: 865
Lid geworden op: 13 mar 2009, 12:35
Locatie: Bussum

Re: help forum

Bericht door EelkeB » 19 apr 2010, 08:49

Dit is geen phpBB-forum, wij kunnen je hier niet mee helpen. Je kunt het beste te rade gaan bij de auteur/leverancier van dit script. Of phpBB installeren, natuurlijk ;)
Dutch Open Projects
Mini Seven Club Nederland - Het grote forum voor het kleine autootje
Geen support via PM of mail

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20316
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Re: help forum

Bericht door Paul » 19 apr 2010, 09:07

en ook deze gesloten. Graag voortaan geen cross posts plaatsen.

Gesloten