Forum 1.3
Auteur: FangorN - 31 augustus 2004 - 19:39 - Gekeurd door: Dennisvb - Hits: 24020 - Aantal punten: 4.31 (45 stemmen)
Opmerkingen:
* Voordat het forum werkt, dien je ZELF ten minste één categorie aan te maken
dit doe je rechtstreeks in de database - of je gebruikt de nog-zelf-te-beveiligen
pagina addcategory.php
* categorieen.php is de 'startplaats' van het forum, NIET forum.php
Code:
config.php
-------------------------------------------------------------------
<?php
// make connection
if(mysql_connect("host", "user", "pass")) {
mysql_select_db("database");
} else {
echo "connection to database failed.\n";
exit;
}
// name of forum
$forumname = "Forum 1.3";
// maximum number of topics per page
$max = 10;
// colors used for topicrows
$kleur1 ="#eeeeee";
$kleur2 ="#cccccc";
// Na hoeveel posten moet het mapje branden en warm?
$mapwarm = 10;
$mapbrand = 20;
// stel hier je fototjes in bv. nieuws_map.gif
$gif1 = "new_thread.gif";
$gif2 = "thread.gif";
$gif3 = "hot_thread.gif";
?>
<?php
// make connection
} else {
echo "connection to database failed.\n " ; }
// name of forum
$forumname = "Forum 1.3" ;
// maximum number of topics per page
$max = 10 ;
// colors used for topicrows
$kleur1 = "#eeeeee" ;
$kleur2 = "#cccccc" ;
// Na hoeveel posten moet het mapje branden en warm?
$mapwarm = 10 ;
$mapbrand = 20 ;
// stel hier je fototjes in bv. nieuws_map.gif
$gif1 = "new_thread.gif" ;
$gif2 = "thread.gif" ;
$gif3 = "hot_thread.gif" ;
?>
style.css
-------------------------------------------------------------------
BODY {FONT-FAMILY: Verdana, Arial, Helvetica;
FONT-SIZE: 8pt;
COLOR: #000000;}
TABLE, TD {BORDER-STYLE: solid;
BORDER-COLOR: #aaaaaa;
BORDER-WIDTH: 1px;}
TD {FONT-FAMILY: Verdana, Arial, Helvetica;
FONT-SIZE: 8pt;
COLOR: #000000;}
A:LINK {FONT-WEIGHT: bold;
TEXT-DECORATION: underline;
COLOR: #ff0000;}
A:VISITED {FONT-WEIGHT: bold;
TEXT-DECORATION: underline;
COLOR: #ff0000;}
A:ACTIVE {FONT-WEIGHT: bold;
TEXT-DECORATION: underline;
COLOR: #ff0000;}
A:HOVER {FONT-WEIGHT: bold;
TEXT-DECORATION: underline;
COLOR: #ff0000;}
.def {FONT-FAMILY: Verdana, Arial, Helvetica;
FONT-SIZE: 8pt;
COLOR: #000000;}
.tf {BORDER-STYLE: none;
BORDER-WIDTH: 0;}
BODY { FONT- FAMILY: Verdana, Arial, Helvetica;
FONT- SIZE: 8pt;
COLOR: #000000;}
TABLE, TD { BORDER- STYLE: solid;
BORDER- COLOR: #aaaaaa;
BORDER- WIDTH: 1px; }
TD { FONT- FAMILY: Verdana, Arial, Helvetica;
FONT- SIZE: 8pt;
COLOR: #000000;}
A
: LINK { FONT
- WEIGHT
: bold
; TEXT- DECORATION: underline;
COLOR: #ff0000;}
A: VISITED { FONT- WEIGHT: bold;
TEXT- DECORATION: underline;
COLOR: #ff0000;}
A: ACTIVE { FONT- WEIGHT: bold;
TEXT- DECORATION: underline;
COLOR: #ff0000;}
A: HOVER { FONT- WEIGHT: bold;
TEXT- DECORATION: underline;
COLOR: #ff0000;}
. def { FONT- FAMILY: Verdana, Arial, Helvetica;
FONT- SIZE: 8pt;
COLOR: #000000;}
. tf { BORDER- STYLE: none;
BORDER- WIDTH: 0 ; }
addcategory.php
-------------------------------------------------------------------
<?php
include("config.php");
?>
<HTML>
<HEAD>
<TITLE><?php echo $forumname; ?></TITLE>
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<?php
// LET OP !
// Omdat niet iedereen categorieën zou mogen toevoegen, word hier (met
// behulp van de *** login check ***) bepaald of iemand toegang krijgt tot
// het categorie-toevoeg deel. Het is de verantwoordelijkheid van de
// programmeur/webmaster om ervoor te zorgen dat dit stuk beveiligd wordt.
if(*** login check ***) {
echo "Log in first.<BR>\n";
} else {
if(!isset($_POST['submit'])) {
// bepaal nummer van laatste toegevoegde categorie en
// tel hier 1 bij op. Hiervoor had het id-veld in de
// tabel categories ook auto_increment kunnen zijn...
$res = mysql_query("SELECT MAX(id) FROM categories") or die(mysql_error());
if(mysql_num_rows($res)) {
$id = mysql_result($res, 0) + 1;
} else {
// er waren blijkbaar nog geen categorieen
$id = 0;
}
?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="500" COLSPAN="2"><B><?php echo $forumname; ?> > Categorie toevoegen</B><BR></TD>
</TR>
<TR>
<FORM ACTION="" METHOD="post">
<TD WIDTH="125">naam<BR></TD>
<TD WIDTH="375"><INPUT TYPE="text" NAME="naam" SIZE="40" MAXLENGTH="100"><BR></TD>
</TR>
<TR>
<TD WIDTH="125">omschrijving<BR></TD>
<TD WIDTH="375"><INPUT TYPE="text" NAME="descr" SIZE="40" MAXLENGTH="200"><BR></TD>
</TR>
<TR>
<TD COLSPAN="2">
<INPUT TYPE="hidden" NAME="id" VALUE="<?php echo $id; ?>">
<INPUT TYPE="submit" NAME="submit" VALUE="submit"><BR>
</TD>
</FORM>
</TR>
</TABLE>
<?php
} else {
$naam = $_POST['naam'];
$descr = $_POST['descr'];
$id = $_POST['id'];
$error = "";
if(trim($naam) == "") $error = "Geen naam ingevuld...";
elseif(trim($descr) == "") $error = "Geen omschrijving ingevuld...";
if($error == "") {
// update database
$naam = htmlentities($naam);
$descr = htmlentities($descr);
mysql_query("INSERT INTO categories (id, naam, descr) VALUES ($id, '$naam', '$descr')") or die(mysql_error());
echo "Succes!<BR>\n";
echo "De categorie is toegevoegd.<BR>\n";
echo "<A HREF=\"categorieen.php\">naar categorieen</A><BR>\n";
} else {
// errors!
echo "ERROR: ".$error."<BR>\n";
echo "Druk op de \"back\" knop van je browser.<BR>\n";
}
}
} // end login test
?>
</BODY>
</HTML>
<?php
include ( "config.php" ) ;
?>
<HTML>
<HEAD>
<TITLE>
<?php echo $forumname ; ?> </TITLE>
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<?php
// LET OP !
// Omdat niet iedereen categorieën zou mogen toevoegen, word hier (met
// behulp van de *** login check ***) bepaald of iemand toegang krijgt tot
// het categorie-toevoeg deel. Het is de verantwoordelijkheid van de
// programmeur/webmaster om ervoor te zorgen dat dit stuk beveiligd wordt.
if ( *** login check *** ) {
echo "Log in first.<BR>\n " ; } else {
if ( ! isset ( $_POST [ 'submit' ] ) ) { // bepaal nummer van laatste toegevoegde categorie en
// tel hier 1 bij op. Hiervoor had het id-veld in de
// tabel categories ook auto_increment kunnen zijn...
} else {
// er waren blijkbaar nog geen categorieen
$id = 0 ;
}
?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="500" COLSPAN="2"><B>
<?php echo $forumname ; ?> > Categorie toevoegen</B><BR></TD>
</TR>
<TR>
<FORM ACTION="" METHOD="post">
<TD WIDTH="125">naam<BR></TD>
<TD WIDTH="375"><INPUT TYPE="text" NAME="naam" SIZE="40" MAXLENGTH="100"><BR></TD>
</TR>
<TR>
<TD WIDTH="125">omschrijving<BR></TD>
<TD WIDTH="375"><INPUT TYPE="text" NAME="descr" SIZE="40" MAXLENGTH="200"><BR></TD>
</TR>
<TR>
<TD COLSPAN="2">
<INPUT TYPE="hidden" NAME="id" VALUE="
<?php echo $id ; ?> ">
<INPUT TYPE="submit" NAME="submit" VALUE="submit"><BR>
</TD>
</FORM>
</TR>
</TABLE>
<?php
} else {
$naam = $_POST [ 'naam' ] ;
$descr = $_POST [ 'descr' ] ;
$id = $_POST [ 'id' ] ;
$error = "" ;
if ( trim ( $naam ) == "" ) $error = "Geen naam ingevuld..." ; elseif ( trim ( $descr ) == "" ) $error = "Geen omschrijving ingevuld..." ;
if ( $error == "" ) {
// update database
echo "De categorie is toegevoegd.<BR>\n " ; echo "<A HREF=\" categorieen.php\" >naar categorieen</A><BR>\n " ; } else {
// errors!
echo "ERROR: " . $error . "<BR>\n " ; echo "Druk op de \" back\" knop van je browser.<BR>\n " ; }
}
} // end login test
?>
</BODY>
</HTML>
categorieen.php
-------------------------------------------------------------------
<?php
include("config.php");
?>
<HTML>
<HEAD>
<TITLE><?php echo $forumname; ?> - categorieën</TITLE>
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<B><?php echo $forumname; ?></B><BR>
<BR>
<TABLE WIDTH="500" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<?php
$query = mysql_query("SELECT * FROM categories ORDER BY id ASC") or die(mysql_error());
if(mysql_num_rows($query)) {
while($row = mysql_fetch_row($query)) {
$cat = $row[0];
echo "<TR><TD WIDTH=\"500\">\n";
// topic name
echo "<A HREF=\"forum.php?cat=".$cat."\">".$row[1]."</A> ";
// number of topics
$topics = mysql_query("SELECT COUNT(*) FROM forum WHERE cat=$cat") or die(mysql_error());
echo "(".mysql_result($topics, 0).")<BR>\n";
mysql_free_result($topics);
// description of each topic
echo $row[2]."<BR>\n";
echo "</TD></TR>\n";
}
mysql_free_result($query);
} else {
echo "<TR><TD WIDTH=\"500\">\n";
echo "Er zijn nog geen categorieën.<BR>\n";
echo "</TD></TR>\n";
}
?>
</TABLE>
</BODY>
</HTML>
<?php
include ( "config.php" ) ;
?>
<HTML>
<HEAD>
<TITLE>
<?php echo $forumname ; ?> - categorieën</TITLE>
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<B>
<?php echo $forumname ; ?> </B><BR>
<BR>
<TABLE WIDTH="500" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<?php
$cat = $row [ 0 ] ;
echo "<TR><TD WIDTH=\" 500\" >\n " ; // topic name
echo "<A HREF=\" forum.php?cat=" . $cat . "\" >" . $row [ 1 ] . "</A> " ;
// number of topics
// description of each topic
}
} else {
echo "<TR><TD WIDTH=\" 500\" >\n " ; echo "Er zijn nog geen categorieën.<BR>\n " ; }
?>
</TABLE>
</BODY>
</HTML>
forum.php
-------------------------------------------------------------------
<?php
include ("config.php");
$cat = $_GET['cat'];
$pagina = (isset($_GET['pagina']) ? $_GET['pagina'] : 0);
?>
<HTML>
<HEAD>
<TITLE><?php echo $forumname; ?></TITLE>
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<?php
$query = mysql_query("SELECT naam FROM categories WHERE id=$cat") or die(mysql_error());
// category check
if(!mysql_num_rows($query)) {
echo "<CENTER>De geselecteerde categorie bestaat niet (meer).<BR>\n";
echo "<A HREF=\"categorieen.php\">Terug naar Categorieën</A><BR></CENTER>\n";
} else {
echo "<A HREF=\"categorieen.php\">".$forumname."</A> > <B>".mysql_result($query, 0, "naam")."</B><BR>\n";
mysql_free_result($query);
?>
<BR>
<TABLE WIDTH="500" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<?php
$query1 = mysql_query("SELECT COUNT(*) FROM forum WHERE cat=$cat") or die(mysql_error());
$aantal_berichten = mysql_result($query1, 0);
mysql_free_result($query1);
$start = $pagina * $max;
$query2 = mysql_query("SELECT * FROM forum where cat=$cat ORDER BY id DESC LIMIT $start, $max") or die(mysql_error());
if(mysql_num_rows($query2)) {
$i = 0;
?>
<TR>
<TD WIDTH="25">
<BR>
</TD>
<TD WIDTH="200">
<B>Titel</B><BR>
</TD>
<TD WIDTH="100" ALIGN="center">
<B>Gepost door</B><BR>
</TD>
<TD WIDTH="100" ALIGN="center">
<B>Gepost op<B><BR>
</TD>
<TD WIDTH="75" ALIGN="center">
<B>Reacties</B><BR>
</TD>
</TR>
<?php
while($row = mysql_fetch_row($query2)) {
$forumid = $row[0];
$query3 = mysql_query("SELECT COUNT(*) FROM forumreplys WHERE forumid=$forumid") or die("q3: ".mysql_error());
$replys = mysql_result($query3, 0);
if($replys == 0) {
$thread = $gif1;
} elseif($replys > 0 && $replys < $mapbrand) {
$thread = $gif2;
} elseif($replys >= $mapbrand) {
$thread = $gif3;
}
// per rij zal het van kleur verwisselen
$kleur = ($i % 2 ? $kleur1 : $kleur2); //aanpassen in config
echo "<TR BGCOLOR=\"".$kleur."\">";
echo "<TD WIDTH=\"25\" ALIGN=\"center\"><IMG SRC=\"".$thread."\" WIDTH=\"13\" HEIGHT=\"16\" ALT=\"";
echo $row[7]." hit".($row[7] == 1 ? "" : "s")."\"><BR></TD>";
echo "<TD WIDTH=\"200\"><A HREF=\"forumbericht.php?cat=".$cat."&forumid=$forumid\">".$row[1]."</A><BR></TD>";
echo "<TD WIDTH=\"100\" ALIGN=\"center\"><A HREF=\"mailto:".$row[5]."\">".$row[3]."</A></TD>";
echo "<TD WIDTH=\"100\" ALIGN=\"center\">".date("d/m/Y H:i", $row[4])."</TD>";
echo "<TD WIDTH=\"75\" ALIGN=\"center\">".$replys."</TD></TR>";
$i++;
} // end while
mysql_free_result($query2);
?>
<?php
// navigatie
if($aantal_berichten > $max) {
// laat alleen navigatie zien als er meer berichten zijn dan dat er op een pagina passen
// aantal pagina's:
if(!($aantal_berichten % $max)) {
// pagina's passen precies
$npaginas = $aantal_berichten/$max;
} else {
// rest na deling
$npaginas = (integer)($aantal_berichten/$max) + 1;
}
echo "<TR><TD WIDTH=\"500\" COLSPAN=\"5\" ALIGN=\"center\">\n";
echo "Pagina's ";
for($p=0; $p < $npaginas; $p++) {
if($p == $pagina) {
echo "<B>$p</B>";
} else {
echo "<A HREF=\"forum.php?pagina=".$p."&cat=".$cat."\">".$p."</A>";
}
echo (($p+1) < $npaginas ? "|" : "");
}
echo "</TD></TR>\n";
}
} elseif(!$pagina) {
// nog geen forumids in deze categorie OF
// een persoon zit op een niet-bestaande pagina
?>
<TR>
<TD WIDTH="500" COLSPAN="5" ALIGN="center">
<B>Er zijn nog geen forumberichten toegevoegd in deze categorie!</B>
</TD>
</TR>
<?php
} else {
?>
<TR>
<TD WIDTH="500" COLSPAN="5" ALIGN="center">
<B>Er staan geen berichten op deze pagina!</B>
</TD>
</TR>
<?php
}
?>
<TR>
<TD COLSPAN="5" ALIGN="center">
<A HREF="nieuwbericht.php?cat=<?php echo $cat; ?>">Nieuw Topic</A> |
<A HREF="categorieen.php">Terug naar '<?php echo $forumname; ?>'</A><BR>
</TD>
</TR>
</TABLE>
<?php
} // end category exists check
?>
</BODY>
</HTML>
<?php
include ( "config.php" ) ;
$cat = $_GET [ 'cat' ] ;
$pagina = ( isset ( $_GET [ 'pagina' ] ) ?
$_GET [ 'pagina' ] : 0 ) ; ?>
<HTML>
<HEAD>
<TITLE>
<?php echo $forumname ; ?> </TITLE>
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<?php
// category check
echo "<CENTER>De geselecteerde categorie bestaat niet (meer).<BR>\n " ; echo "<A HREF=\" categorieen.php\" >Terug naar Categorieën</A><BR></CENTER>\n " ; } else {
echo "<A HREF=\" categorieen.php\" >" . $forumname . "</A> > <B>" . mysql_result ( $query , 0 , "naam" ) . "</B><BR>\n " ; ?>
<BR>
<TABLE WIDTH="500" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<?php
$start = $pagina * $max ;
$i = 0 ;
?>
<TR>
<TD WIDTH="25">
<BR>
</TD>
<TD WIDTH="200">
<B>Titel</B><BR>
</TD>
<TD WIDTH="100" ALIGN="center">
<B>Gepost door</B><BR>
</TD>
<TD WIDTH="100" ALIGN="center">
<B>Gepost op<B><BR>
</TD>
<TD WIDTH="75" ALIGN="center">
<B>Reacties</B><BR>
</TD>
</TR>
<?php
$forumid = $row [ 0 ] ;
if ( $replys == 0 ) {
$thread = $gif1 ;
} elseif ( $replys > 0 && $replys < $mapbrand ) {
$thread = $gif2 ;
} elseif ( $replys >= $mapbrand ) {
$thread = $gif3 ;
}
// per rij zal het van kleur verwisselen
$kleur = ( $i % 2 ? $kleur1 : $kleur2 ) ; //aanpassen in config
echo "<TR BGCOLOR=\" " . $kleur . "\" >" ; echo "<TD WIDTH=\" 25\" ALIGN=\" center\" ><IMG SRC=\" " . $thread . "\" WIDTH=\" 13\" HEIGHT=\" 16\" ALT=\" " ; echo $row [ 7 ] . " hit" . ( $row [ 7 ] == 1 ?
"" : "s" ) . "\" ><BR></TD>" ; echo "<TD WIDTH=\" 200\" ><A HREF=\" forumbericht.php?cat=" . $cat . "&forumid=$forumid \" >" . $row [ 1 ] . "</A><BR></TD>" ; echo "<TD WIDTH=\" 100\" ALIGN=\" center\" ><A HREF=\" mailto:" . $row [ 5 ] . "\" >" . $row [ 3 ] . "</A></TD>" ; echo "<TD WIDTH=\" 100\" ALIGN=\" center\" >" . date ( "d/m/Y H:i" , $row [ 4 ] ) . "</TD>" ; echo "<TD WIDTH=\" 75\" ALIGN=\" center\" >" . $replys . "</TD></TR>" ; $i ++;
} // end while
?>
<?php
// navigatie
if ( $aantal_berichten > $max ) {
// laat alleen navigatie zien als er meer berichten zijn dan dat er op een pagina passen
// aantal pagina's:
if ( ! ( $aantal_berichten % $max ) ) {
// pagina's passen precies
$npaginas = $aantal_berichten / $max ;
} else {
// rest na deling
$npaginas = ( integer) ( $aantal_berichten / $max ) + 1 ;
}
echo "<TR><TD WIDTH=\" 500\" COLSPAN=\" 5\" ALIGN=\" center\" >\n " ; for ( $p = 0 ; $p < $npaginas ; $p ++ ) {
if ( $p == $pagina ) {
} else {
echo "<A HREF=\" forum.php?pagina=" . $p . "&cat=" . $cat . "\" >" . $p . "</A>" ; }
echo ( ( $p + 1 ) < $npaginas ?
"|" : "" ) ; }
}
} elseif ( ! $pagina ) {
// nog geen forumids in deze categorie OF
// een persoon zit op een niet-bestaande pagina
?>
<TR>
<TD WIDTH="500" COLSPAN="5" ALIGN="center">
<B>Er zijn nog geen forumberichten toegevoegd in deze categorie!</B>
</TD>
</TR>
<?php
} else {
?>
<TR>
<TD WIDTH="500" COLSPAN="5" ALIGN="center">
<B>Er staan geen berichten op deze pagina!</B>
</TD>
</TR>
<?php
}
?>
<TR>
<TD COLSPAN="5" ALIGN="center">
<A HREF="nieuwbericht.php?cat=
<?php echo $cat ; ?> ">Nieuw Topic</A> |
<A HREF="categorieen.php">Terug naar '
<?php echo $forumname ; ?> '</A><BR>
</TD>
</TR>
</TABLE>
<?php
} // end category exists check
?>
</BODY>
</HTML>
forumbericht.php
-------------------------------------------------------------------
<?php
include ("config.php");
$cat = $_GET['cat'];
$forumid = $_GET['forumid'];
?>
<HTML>
<HEAD>
<TITLE><?php echo $forumname; ?></TITLE>
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<?php
$query = mysql_query("SELECT naam FROM categories WHERE id=$cat") or die(mysql_error());
if(!mysql_num_rows($query)) {
echo "<CENTER>De geselecteerde categorie bestaat niet (meer).<BR>\n";
echo "<A HREF=\"categorieen.php\">Terug naar Categorieën</A><BR></CENTER>\n";
} else {
$naam = mysql_result($query, 0, "naam");
mysql_free_result($query);
echo "<A HREF=\"categorieen.php\">".$forumname."</A> > ";
echo "<A HREF=\"forum.php?cat=".$cat."\">".$naam."</A>";
$res = mysql_query("SELECT * FROM forum where id=$forumid") or die(mysql_error());
if(!mysql_num_rows($res)) {
echo "<CENTER>Het geselecteerde forumid bestaat niet (meer).<BR>\n";
echo "<A HREF=\"forum.php?cat=".$cat."\">Terug naar '".$naam."'</A><BR></CENTER>\n";
} else {
mysql_query("UPDATE forum SET hits=hits+1 where id=$forumid") or die(mysql_error());
if(mysql_num_rows($res)) {
$row = mysql_fetch_row($res);
echo " > <B>".$row[1]."</B><BR>\n";
?>
<BR>
<TABLE WIDTH="500" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="500">
<B>Onderwerp:</B> <?php echo $row[1]; ?><BR>
</TD>
</TR>
<TR>
<TD WIDTH="500">
<B>Gepost door:</B> <?php echo "<A HREF=\"mailto:".$row[5]."\">".$row[3]."</A>"; ?><BR>
<B>Gepost op:</B> <?php echo date("d/m/Y H:i", $row[4]); ?>
</TD>
</TR>
<TR>
<TD WIDTH="500">
<?php
echo nl2br($row[6]);
?>
</TD>
</TR>
</TABLE>
<br>
<?php
mysql_free_result($res);
$res2 = mysql_query("SELECT * FROM forumreplys where forumid=$forumid") or die(mysql_error());
if (mysql_num_rows($res2)) {
while($row = mysql_fetch_row($res2)) {
?>
<TABLE WIDTH="500" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="500">
<B>Reply:</B> <?php echo $row[2]; ?><BR>
</TD>
</TR>
<TR>
<TD WIDTH="500">
<B>Gepost door:</B> <?php echo "<A HREF=\"mailto: ".$row[4]."\">".$row[3]."</A>"; ?><BR>
<B>Gepost op:</B> <?php echo date("d/m/Y H:i", $row[5]); ?><BR>
</TD>
</TR>
<TR>
<TD WIDTH="500">
<?php
echo nl2br($row[6]);
?>
</TD>
</TR>
</TABLE>
<BR>
<?php
} // end while
mysql_free_result($res2);
} // end $aantal > 0
} // end message exists
?>
<BR>
<TABLE WIDTH="500" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="500" ALIGN="center">
<A HREF="postreactie.php?cat=<?php echo $cat."&forumid=".$forumid; ?>">Post Reactie</A> |
<A HREF="nieuwbericht.php?cat=<?php echo $cat; ?>">Nieuw Topic</A> |
<A HREF="forum.php?cat=<?php echo $cat; ?>">Terug naar '<?php echo $naam; ?>'</A><BR>
</TD>
</TR>
</TABLE>
<?php
} // end forumid exists check
} // end category exists check
?>
</BODY>
</HTML>
<?php
include ( "config.php" ) ;
$cat = $_GET [ 'cat' ] ;
$forumid = $_GET [ 'forumid' ] ;
?>
<HTML>
<HEAD>
<TITLE>
<?php echo $forumname ; ?> </TITLE>
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<?php
echo "<CENTER>De geselecteerde categorie bestaat niet (meer).<BR>\n " ; echo "<A HREF=\" categorieen.php\" >Terug naar Categorieën</A><BR></CENTER>\n " ; } else {
echo "<A HREF=\" categorieen.php\" >" . $forumname . "</A> > " ; echo "<A HREF=\" forum.php?cat=" . $cat . "\" >" . $naam . "</A>" ;
echo "<CENTER>Het geselecteerde forumid bestaat niet (meer).<BR>\n " ; echo "<A HREF=\" forum.php?cat=" . $cat . "\" >Terug naar '" . $naam . "'</A><BR></CENTER>\n " ; } else {
echo " > <B>" . $row [ 1 ] . "</B><BR>\n " ; ?>
<BR>
<TABLE WIDTH="500" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="500">
<B>Onderwerp:</B>
<?php echo $row [ 1 ] ; ?> <BR>
</TD>
</TR>
<TR>
<TD WIDTH="500">
<B>Gepost door:</B>
<?php echo "<A HREF=\" mailto:" . $row [ 5 ] . "\" >" . $row [ 3 ] . "</A>" ; ?> <BR>
<B>Gepost op:</B>
<?php echo date ( "d/m/Y H:i" , $row [ 4 ] ) ; ?> </TD>
</TR>
<TR>
<TD WIDTH="500">
<?php
?>
</TD>
</TR>
</TABLE>
<br>
<?php
?>
<TABLE WIDTH="500" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="500">
<B>Reply:</B>
<?php echo $row [ 2 ] ; ?> <BR>
</TD>
</TR>
<TR>
<TD WIDTH="500">
<B>Gepost door:</B>
<?php echo "<A HREF=\" mailto: " . $row [ 4 ] . "\" >" . $row [ 3 ] . "</A>" ; ?> <BR>
<B>Gepost op:</B>
<?php echo date ( "d/m/Y H:i" , $row [ 5 ] ) ; ?> <BR>
</TD>
</TR>
<TR>
<TD WIDTH="500">
<?php
?>
</TD>
</TR>
</TABLE>
<BR>
<?php
} // end while
} // end $aantal > 0
} // end message exists
?>
<BR>
<TABLE WIDTH="500" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="500" ALIGN="center">
<A HREF="postreactie.php?cat=
<?php echo $cat . "&forumid=" . $forumid ; ?> ">Post Reactie</A> |
<A HREF="nieuwbericht.php?cat=
<?php echo $cat ; ?> ">Nieuw Topic</A> |
<A HREF="forum.php?cat=
<?php echo $cat ; ?> ">Terug naar '
<?php echo $naam ; ?> '</A><BR>
</TD>
</TR>
</TABLE>
<?php
} // end forumid exists check
} // end category exists check
?>
</BODY>
</HTML>
nieuwbericht.php
-------------------------------------------------------------------
<?php
include ("config.php");
$cat = $_GET['cat'];
?>
<HTML>
<HEAD>
<TITLE><?php echo $forumname; ?></TITLE>
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<?php
$query = mysql_query("SELECT naam FROM categories WHERE id=$cat") or die("q: ".mysql_error());
if(!mysql_num_rows($query)) {
echo "<CENTER>De geselecteerde categorie bestaat niet (meer).<BR>\n";
echo "<A HREF=\"categorieen.php\">Terug naar Categorieën</A><BR></CENTER>\n";
} else {
$naam = mysql_result($query, 0, "naam");
mysql_free_result($query);
echo "<A HREF=\"categorieen.php\">".$forumname."</A> > ";
echo "<A HREF=\"forum.php?cat=".$cat."\">".$naam."</A> > <B>Nieuw bericht</B><BR>\n";
?>
<BR>
<TABLE WIDTH="500" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="500" ALIGN="center">
<?php
if ($_POST['submit']) {
$error = "";
if(trim($_POST['naam']) == "") $error = "Je moet een naam invullen<BR><BR>";
elseif(trim($_POST['email']) == "") $error = "Je moet je emailadres invullen<BR><BR>";
elseif(trim($_POST['titel']) == "") $error = "Je moet een titel invullen<BR><BR>";
elseif(trim($_POST['bericht']) == "") $error = "Je moet een bericht invullen<BR><BR>";
if (!$error) {
$titel = htmlentities($_POST['titel']);
$naam = htmlentities($_POST['naam']);
$datum = time();
$email = htmlentities($_POST['email']);
$bericht = htmlentities($_POST['bericht']);
$query = "INSERT INTO forum (id, titel, cat, naam, datum, email, bericht, hits)
VALUES ('', '$titel', $cat, '$naam', $datum, '$email', '$bericht', 0)";
mysql_query($query) or die(mysql_error());
echo "Het bericht is verzonden.<BR>\n";
echo "klik <A HREF=\"forum.php?cat=".$cat."\">hier</A> om terug naar het forum te gaan.<BR>\n";
} else {
// errors
echo "<B>".$error."</B><BR>\n";
echo "<FORM ACTION=\"".$_SERVER['PHP_SELF']."?cat=".$cat."\" METHOD=\"post\">\n";
echo "<INPUT TYPE=\"submit\" VALUE=\"Terug\">\n";
echo "</FORM>";
}
} else {
?>
<TABLE CLASS="tf" WIDTH="500" BORDER="0" CELLSPACING="0" CELLPADDING="2">
<FORM ACTION="<?php echo $_SERVER['PHP_SELF']."?cat=".$cat; ?>" METHOD="post">
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right"><B>Naam</B> </TD>
<TD CLASS="tf" WIDTH="375"><INPUT TYPE="text" CLASS="def" NAME="naam" SIZE="30" MAXLENGTH="30"></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right"><B>Email</B> </TD>
<TD CLASS="tf" WIDTH="375"><INPUT TYPE="text" CLASS="def" NAME="email" SIZE="30" MAXLENGTH="50"></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right"><B>Titel</B> </TD>
<TD CLASS="tf" WIDTH="375"><INPUT TYPE="text" CLASS="def" NAME="titel" SIZE="30" MAXLENGTH="50"></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right" VALIGN="top"><B>Bericht</B> </TD>
<TD CLASS="tf" WIDTH="375"><TEXTAREA NAME="bericht" CLASS="def" COLS="30" ROWS="4"></TEXTAREA><BR></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="500" COLSPAN="2" ALIGN="center">
<INPUT TYPE="submit" CLASS="def" NAME="submit" VALUE="Post topic">
</TD>
</TR>
</FORM>
</TABLE>
<?php
} // end else
?>
<BR>
</TD>
</TR>
<TR>
<TD WIDTH="500" ALIGN="center"><A HREF="forum.php?cat=<?php echo $cat; ?>">Terug naar Forum</A></TD>
</TR>
</TABLE>
<?php
} // end category exists check
?>
</BODY>
</HTML>
<?php
include ( "config.php" ) ;
$cat = $_GET [ 'cat' ] ;
?>
<HTML>
<HEAD>
<TITLE>
<?php echo $forumname ; ?> </TITLE>
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<?php
echo "<CENTER>De geselecteerde categorie bestaat niet (meer).<BR>\n " ; echo "<A HREF=\" categorieen.php\" >Terug naar Categorieën</A><BR></CENTER>\n " ; } else {
echo "<A HREF=\" categorieen.php\" >" . $forumname . "</A> > " ; echo "<A HREF=\" forum.php?cat=" . $cat . "\" >" . $naam . "</A> > <B>Nieuw bericht</B><BR>\n " ; ?>
<BR>
<TABLE WIDTH="500" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="500" ALIGN="center">
<?php
if ( $_POST [ 'submit' ] ) {
$error = "" ;
if ( trim ( $_POST [ 'naam' ] ) == "" ) $error = "Je moet een naam invullen<BR><BR>" ; elseif ( trim ( $_POST [ 'email' ] ) == "" ) $error = "Je moet je emailadres invullen<BR><BR>" ; elseif ( trim ( $_POST [ 'titel' ] ) == "" ) $error = "Je moet een titel invullen<BR><BR>" ; elseif ( trim ( $_POST [ 'bericht' ] ) == "" ) $error = "Je moet een bericht invullen<BR><BR>" ; if ( ! $error ) {
$query = "INSERT INTO forum (id, titel, cat, naam, datum, email, bericht, hits)
VALUES ('', '$titel ', $cat , '$naam ', $datum , '$email ', '$bericht ', 0)" ;
echo "Het bericht is verzonden.<BR>\n " ; echo "klik <A HREF=\" forum.php?cat=" . $cat . "\" >hier</A> om terug naar het forum te gaan.<BR>\n " ; } else {
// errors
echo "<B>" . $error . "</B><BR>\n " ; echo "<FORM ACTION=\" " . $_SERVER [ 'PHP_SELF' ] . "?cat=" . $cat . "\" METHOD=\" post\" >\n " ; echo "<INPUT TYPE=\" submit\" VALUE=\" Terug\" >\n " ; }
} else {
?>
<TABLE CLASS="tf" WIDTH="500" BORDER="0" CELLSPACING="0" CELLPADDING="2">
<FORM ACTION="
<?php echo $_SERVER [ 'PHP_SELF' ] . "?cat=" . $cat ; ?> " METHOD="post">
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right"><B>Naam</B> </TD>
<TD CLASS="tf" WIDTH="375"><INPUT TYPE="text" CLASS="def" NAME="naam" SIZE="30" MAXLENGTH="30"></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right"><B>Email</B> </TD>
<TD CLASS="tf" WIDTH="375"><INPUT TYPE="text" CLASS="def" NAME="email" SIZE="30" MAXLENGTH="50"></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right"><B>Titel</B> </TD>
<TD CLASS="tf" WIDTH="375"><INPUT TYPE="text" CLASS="def" NAME="titel" SIZE="30" MAXLENGTH="50"></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right" VALIGN="top"><B>Bericht</B> </TD>
<TD CLASS="tf" WIDTH="375"><TEXTAREA NAME="bericht" CLASS="def" COLS="30" ROWS="4"></TEXTAREA><BR></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="500" COLSPAN="2" ALIGN="center">
<INPUT TYPE="submit" CLASS="def" NAME="submit" VALUE="Post topic">
</TD>
</TR>
</FORM>
</TABLE>
<?php
} // end else
?>
<BR>
</TD>
</TR>
<TR>
<TD WIDTH="500" ALIGN="center"><A HREF="forum.php?cat=
<?php echo $cat ; ?> ">Terug naar Forum</A></TD>
</TR>
</TABLE>
<?php
} // end category exists check
?>
</BODY>
</HTML>
postreactie.php
-------------------------------------------------------------------
<?php
include("config.php");
$cat = $_GET['cat'];
$forumid = $_GET['forumid'];
?>
<HTML>
<HEAD>
<TITLE><?php echo $forumname; ?></TITLE>
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<?php
$query = mysql_query("SELECT naam FROM categories WHERE id=$cat") or die(mysql_error());
if(!mysql_num_rows($query)) {
echo "<CENTER>De geselecteerde categorie bestaat niet (meer).<BR>\n";
echo "<A HREF=\"categorieen.php\">Terug naar Categorieën</A><BR></CENTER>\n";
} else {
$naam = mysql_result($query, 0, "naam");
mysql_free_result($query);
$res = mysql_query("SELECT * FROM forum where id=$forumid") or die(mysql_error());
if(!mysql_num_rows($res)) {
echo "<CENTER>Het geselecteerde forumid bestaat niet (meer).<BR>\n";
echo "<A HREF=\"forum.php?cat=".$cat."\">Terug naar '".$naam."'</A><BR></CENTER>\n";
} else {
echo "<A HREF=\"categorieen.php\">".$forumname."</A> > ";
echo "<A HREF=\"forum.php?cat=".$cat."\">".$naam."</A> > ";
echo "<B>Post reactie</B><BR>\n";
?>
<BR>
<TABLE WIDTH="500" BORDER="0" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="500" ALIGN="center">
<?php
if($_POST['submit']) {
if(trim($_POST['naam']) == "") $error = "Je moet je naam invullen<BR><BR>";
elseif(trim($_POST['email']) == "") $error = "Je moet je e-mailadres invullen<BR><BR>";
elseif(trim($_POST['titel']) == "") $error = "Je moet een titel invullen<BR><BR>";
elseif(trim($_POST['bericht']) == "") $error = "Je moet een bericht invullen<BR><BR>";
if (!$error) {
$titel = htmlentities($_POST['titel']);
$naam = htmlentities($_POST['naam']);
$email = htmlentities($_POST['email']);
$datum = time();
$bericht = htmlentities($_POST['bericht']);
$query ="INSERT INTO forumreplys (id, forumid, titel, naam, email, datum, bericht)
VALUES ('', $forumid, '$titel', '$naam', '$email', $datum, '$bericht')";
mysql_query($query) or die(mysql_error());
echo "De reactie is verzonden.<BR>\n";
echo "klik <A HREF=\"forumbericht.php?cat=".$cat."&forumid=".$forumid."\">hier</A> ";
echo "om terug naar het forumbericht te gaan.<BR>\n";
} else {
// errors
echo "<B>".$error."</B><BR>\n";
echo "<FORM ACTION=\"".$_SERVER['PHP_SELF']."?cat=".$cat."&forumid=".$forumid."\" METHOD=\"post\">\n";
echo "<INPUT TYPE=\"submit\" CLASS=\"def\" VALUE=\"Terug\">\n";
echo "</FORM>";
}
} else {
?>
<TABLE CLASS="tf" WIDTH="500" BORDER="0" CELLSPACING="0" CELLPADDING="2">
<FORM ACTION="<?php echo $_SERVER['PHP_SELF']."?cat=".$cat."&forumid=".$forumid;?>" METHOD="post">
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right"><B>Naam</B> </TD>
<TD CLASS="tf" WIDTH="375"><INPUT TYPE="text" CLASS="def" NAME="naam" SIZE="30" MAXLENGTH="30"></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right"><B>Email</B> </TD>
<TD CLASS="tf" WIDTH="375"><INPUT TYPE="text" CLASS="def" NAME="email" SIZE="30" MAXLENGTH="50"></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right"><B>Titel</B> </TD>
<TD CLASS="tf" WIDTH="375"><INPUT TYPE="text" CLASS="def" NAME="titel" SIZE="30" MAXLENGTH="50"></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right" VALIGN="top"><B>Bericht</B> </TD>
<TD CLASS="tf" WIDTH="375"><TEXTAREA NAME="bericht" CLASS="def" COLS="30" ROWS="4"></TEXTAREA><BR></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="500" COLSPAN="2" ALIGN="center">
<INPUT TYPE="submit" CLASS="def" NAME="submit" VALUE="Post reactie">
</TD>
</TR>
</FORM>
</TABLE>
<?php
} // end else
?>
<BR>
</TD>
</TR>
<TR>
<TD WIDTH="500" ALIGN="center"><A HREF="forumbericht.php?cat=<?php echo $cat."&forumid=".$forumid; ?>">Terug naar Forum</A></TD>
</TR>
</TABLE>
<?php
} // end forumid exists check
} // end category exists check
?>
</BODY>
</HTML>
<?php
include ( "config.php" ) ;
$cat = $_GET [ 'cat' ] ;
$forumid = $_GET [ 'forumid' ] ;
?>
<HTML>
<HEAD>
<TITLE>
<?php echo $forumname ; ?> </TITLE>
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<?php
echo "<CENTER>De geselecteerde categorie bestaat niet (meer).<BR>\n " ; echo "<A HREF=\" categorieen.php\" >Terug naar Categorieën</A><BR></CENTER>\n " ; } else {
echo "<CENTER>Het geselecteerde forumid bestaat niet (meer).<BR>\n " ; echo "<A HREF=\" forum.php?cat=" . $cat . "\" >Terug naar '" . $naam . "'</A><BR></CENTER>\n " ; } else {
echo "<A HREF=\" categorieen.php\" >" . $forumname . "</A> > " ; echo "<A HREF=\" forum.php?cat=" . $cat . "\" >" . $naam . "</A> > " ; echo "<B>Post reactie</B><BR>\n " ; ?>
<BR>
<TABLE WIDTH="500" BORDER="0" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="500" ALIGN="center">
<?php
if ( $_POST [ 'submit' ] ) {
if ( trim ( $_POST [ 'naam' ] ) == "" ) $error = "Je moet je naam invullen<BR><BR>" ; elseif ( trim ( $_POST [ 'email' ] ) == "" ) $error = "Je moet je e-mailadres invullen<BR><BR>" ; elseif ( trim ( $_POST [ 'titel' ] ) == "" ) $error = "Je moet een titel invullen<BR><BR>" ; elseif ( trim ( $_POST [ 'bericht' ] ) == "" ) $error = "Je moet een bericht invullen<BR><BR>" ; if ( ! $error ) {
$query = "INSERT INTO forumreplys (id, forumid, titel, naam, email, datum, bericht)
VALUES ('', $forumid , '$titel ', '$naam ', '$email ', $datum , '$bericht ')" ;
echo "De reactie is verzonden.<BR>\n " ; echo "klik <A HREF=\" forumbericht.php?cat=" . $cat . "&forumid=" . $forumid . "\" >hier</A> " ; echo "om terug naar het forumbericht te gaan.<BR>\n " ; } else {
// errors
echo "<B>" . $error . "</B><BR>\n " ; echo "<FORM ACTION=\" " . $_SERVER [ 'PHP_SELF' ] . "?cat=" . $cat . "&forumid=" . $forumid . "\" METHOD=\" post\" >\n " ; echo "<INPUT TYPE=\" submit\" CLASS=\" def\" VALUE=\" Terug\" >\n " ; }
} else {
?>
<TABLE CLASS="tf" WIDTH="500" BORDER="0" CELLSPACING="0" CELLPADDING="2">
<FORM ACTION="
<?php echo $_SERVER [ 'PHP_SELF' ] . "?cat=" . $cat . "&forumid=" . $forumid ; ?
> " METHOD="post">
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right"><B>Naam</B> </TD>
<TD CLASS="tf" WIDTH="375"><INPUT TYPE="text" CLASS="def" NAME="naam" SIZE="30" MAXLENGTH="30"></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right"><B>Email</B> </TD>
<TD CLASS="tf" WIDTH="375"><INPUT TYPE="text" CLASS="def" NAME="email" SIZE="30" MAXLENGTH="50"></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right"><B>Titel</B> </TD>
<TD CLASS="tf" WIDTH="375"><INPUT TYPE="text" CLASS="def" NAME="titel" SIZE="30" MAXLENGTH="50"></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="125" ALIGN="right" VALIGN="top"><B>Bericht</B> </TD>
<TD CLASS="tf" WIDTH="375"><TEXTAREA NAME="bericht" CLASS="def" COLS="30" ROWS="4"></TEXTAREA><BR></TD>
</TR>
<TR>
<TD CLASS="tf" WIDTH="500" COLSPAN="2" ALIGN="center">
<INPUT TYPE="submit" CLASS="def" NAME="submit" VALUE="Post reactie">
</TD>
</TR>
</FORM>
</TABLE>
<?php
} // end else
?>
<BR>
</TD>
</TR>
<TR>
<TD WIDTH="500" ALIGN="center"><A HREF="forumbericht.php?cat=
<?php echo $cat . "&forumid=" . $forumid ; ?> ">Terug naar Forum</A></TD>
</TR>
</TABLE>
<?php
} // end forumid exists check
} // end category exists check
?>
</BODY>
</HTML>
De Mysql db's
--------------------------------------------------
CREATE TABLE categories (
id int(10) NOT NULL,
naam varchar(100) NOT NULL,
descr varchar(200) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
CREATE TABLE forum (
id int(10) NOT NULL auto_increment,
titel varchar(50) NOT NULL,
cat int(10) NOT NULL,
naam varchar(30) NOT NULL,
datum int(10) NOT NULL,
email varchar(50) NOT NULL,
bericht text NOT NULL,
hits int(10) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
CREATE TABLE forumreplys (
id int(10) NOT NULL auto_increment,
forumid int(10) NOT NULL,
titel varchar(50) NOT NULL,
naam varchar(30) NOT NULL,
email varchar(50) NOT NULL,
datum varchar(10) NOT NULL,
bericht text NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
CREATE TABLE categories (
id int( 10 ) NOT NULL ,
naam varchar( 100 ) NOT NULL ,
descr varchar( 200 ) NOT NULL ,
) TYPE= MyISAM;
CREATE TABLE forum (
id int( 10 ) NOT NULL auto_increment,
titel varchar( 50 ) NOT NULL ,
cat int( 10 ) NOT NULL ,
naam varchar( 30 ) NOT NULL ,
datum int( 10 ) NOT NULL ,
email varchar( 50 ) NOT NULL ,
bericht text NOT NULL ,
hits int( 10 ) NOT NULL ,
) TYPE= MyISAM;
CREATE TABLE forumreplys (
id int( 10 ) NOT NULL auto_increment,
forumid int( 10 ) NOT NULL ,
titel varchar( 50 ) NOT NULL ,
naam varchar( 30 ) NOT NULL ,
email varchar( 50 ) NOT NULL ,
datum varchar( 10 ) NOT NULL ,
bericht text NOT NULL ,
) TYPE= MyISAM;
Download code (.txt)
Stemmen
Niet ingelogd.