nogle der kan kode dette om
Heyjeg har prøvet i 3 dage nu og kode nogt om men opgaver nu....
jeg vil gerne for kodt en forum index side om...
koden ser sådan ud
<?php
$side = ".";
require "$side/tjek.func.php";
require "$side/includes/funcs.php";
if($_GET['emneId']){
$query = mysql_query("SELECT * FROM forum_emne WHERE id = '$_GET[emneId]' LIMIT 1");
$r = mysql_fetch_array($query);
$side_titel = "$r[emne]";
}
$hvor = "<b>" . $side_titel . "</b>";
include "$side/includes/header.php";
?>
<!-- indhold start -->
<div class="indhold">
<b><a href="?emneId=all">Fold alle emner ud</a></b><br /><br />
<table align="left" cellspacing="1" cellpadding="2" class="tabelBox">
<?php if(!$_GET['emneId']){
$_GET['emneId'] = "all";
}
if(($_COOKIE['login']) && ($_USER['rang'] == 2) || ($_USER['rang'] == 3)){
$queryEmne = mysql_query("SELECT * FROM forum_emne ORDER BY sort");
} else {
$queryEmne = mysql_query("SELECT * FROM forum_emne WHERE public = '1' ORDER BY sort");
}
while($r = mysql_fetch_array($queryEmne)){
$id = $r["id"];
$emne = $r["emne"];
echo "
<tr class=\"tr\">
<td>
<a href=\"?emneId=$id\"><b>+ $emne:</b></a>
</td>
<td width=\"60\">
<b>Tråde:</b>
</td>
<td width=\"60\">
<b>Indlæg:</b>
</td>
<td width=\"200\">
<b>Sidste svar:</b>
</td></tr>";
if(($_GET['emneId'] == $id) || ($_GET['emneId'] == 'all')){
$i = 0;
if(($_COOKIE['loginId']) && ($_USER['rang'] == 2) || ($_USER['rang'] == 3)){
$queryBoard = mysql_query("SELECT * FROM forum_board WHERE emneId = '$id' ORDER BY sort");
} else {
$queryBoard = mysql_query("SELECT * FROM forum_board WHERE emneId = '$id' AND public = '1' ORDER BY sort");
}
while($r = mysql_fetch_array($queryBoard)){
$boardId = $r["id"];
$board = $r["board"];
$emneId = $r["emneId"];
$countTraad = mysql_query("SELECT * FROM forum_thread WHERE board = '$boardId'");
$traad = mysql_num_rows($countTraad);
$countReply = mysql_query("SELECT * FROM forum_reply WHERE board = '$boardId'");
$svar = mysql_num_rows($countReply);
$i++;
if ($i%2 == 1) {
$class = "tdUlige";
} else {
$class = "tdLige";
}
echo "
<tr class=\"$class\" height=\"32\">
<td>
<a href=\"forum/board.php?emneId=$emneId&board=$boardId\">$board</a>
</td>
<td align=\"center\">
[$traad]
</td>
<td align=\"center\">
[$svar]
</td>
<td align=\"center\" width=\"200\">";
if($traad == 0){
echo "
<font class=\"alt\">ingen svar</font>";
} else {
$traadDate = mysql_query("SELECT * FROM forum_thread WHERE board = '$boardId' ORDER BY last_reply_stamp DESC LIMIT 1");
$r = mysql_fetch_array($traadDate);
$c = mysql_query("SELECT * FROM forum_reply WHERE reply_to = '$r[id]'");
$c = mysql_num_rows($c);
$date = date("$_SETS[dato_form]", $r[last_reply_stamp]);
if($c == 0){
echo "[$date]";
echo "<font size=\"1\">";
echo "<br />af <a href=\"./users/show.php?brugerId=$r2[brugerId]\">$r2[bruger]</a> i <a href=\"forum/read.php?emneId=$r[emneId]&board=$r[board]&id=$r[id]\">denne tråd</a>";
} else {
$query = mysql_query("SELECT * FROM forum_reply WHERE reply_to = '$r[id]' ORDER BY id DESC LIMIT 1");
$r2 = mysql_fetch_array($query);
echo "[$date]";
if($r2['brugerId'] == '-gæst'){
echo "<font size=\"1\">";
echo "<br />af $r2[bruger] i <a href=\"forum/read.php?emneId=$r[emneId]&board=$r[board]&id=$r[id]\">denne tråd</a>";
} else {
echo "<font size=\"1\">";
echo "<br />af <a href=\"./users/show.php?brugerId=$r2[brugerId]\">$r2[bruger]</a> i <a href=\"forum/read.php?emneId=$r[emneId]&board=$r[board]&id=$r[id]\">denne tråd</a>";
}
}
echo "</font>";
}
echo "
</td></tr>";
}
} else {
echo "
<tr class=\"trBackground\">
<td colspan=\"4\">
</td></tr>";
}
}
?></table>
</div>
<!-- indhold slut -->
<?php include "$side/includes/footer.php"; ?>
jeg vil gerne havde kodet det ind i dette
<TABLE cellSpacing=0 cellPadding=0 width=500 border=0>
<TR>
<TD vAlign=top>
<P><font face="Times New Roman"><b><a href="">
<font color="#000000">Gruppe</font></a></b> <BR><font size="-1" color="#000000">
<a href="">undergruppe</a>,
<a href="">undergruppe</a> ...</font></font>
<P><font face="Times New Roman"><b><a href="">
<font color="#000000">Gruppe</font></a></b> <BR><font size="-1" color="#000000">
<a href="">undergruppe</a>,
<a href="">undergruppe</a> ...</font></font>
<P><font face="Times New Roman"><b><a href="">
<font color="#000000">Gruppe</font></a></b> <BR><font size="-1" color="#000000">
<a href="">undergruppe</a>,
<a href="">undergruppe</a> ...</font></font>
<P><font face="Times New Roman"><b><a href="">
<font color="#000000">Gruppe</font></a></b> <BR><font size="-1" color="#000000">
<a href="">undergruppe</a>,
<a href="">undergruppe</a> ...</font></font>
<P><font face="Times New Roman"><b><a href="">
<font color="#000000">Gruppe</font></a></b> <BR><font size="-1" color="#000000">
<a href="">undergruppe</a>,
<a href="">undergruppe</a> ...</font></font>
<P><font face="Times New Roman"><b><a href="">
<font color="#000000">Gruppe</font></a></b> <BR><font size="-1" color="#000000">
<a href="">undergruppe</a>,
<a href="">undergruppe</a> ...</font></font></P>
</TD>
<TD vAlign=top width="50%">
<P><font face="Times New Roman"><b><a href="">
<font color="#000000">Gruppe</font></a></b> <BR><font size="-1" color="#000000">
<a href="">undergruppe</a>,
<a href="">undergruppe</a> ...</font></font>
<P><font face="Times New Roman"><b><a href="">
<font color="#000000">Gruppe</font></a></b> <BR><font size="-1" color="#000000">
<a href="">undergruppe</a>,
<a href="">undergruppe</a> ...</font></font>
<P><font face="Times New Roman"><b><a href="">
<font color="#000000">Gruppe</font></a></b> <BR><font size="-1" color="#000000">
<a href="">undergruppe</a>,
<a href="">undergruppe</a> ...</font></font>
<P><font face="Times New Roman"><b><a href="">
<font color="#000000">Gruppe</font></a></b> <BR><font size="-1" color="#000000">
<a href="">undergruppe</a>,
<a href="">undergruppe</a> ...</font></font>
<P><font face="Times New Roman"><b><a href="">
<font color="#000000">Gruppe</font></a></b> <BR><font size="-1" color="#000000">
<a href="">undergruppe</a>,
<a href="">undergruppe</a> ...</font></font>
<P><font face="Times New Roman"><b><a href="">
<font color="#000000">Gruppe</font></a></b> <BR><font size="-1" color="#000000">
<a href="">undergruppe</a>,
<a href="">undergruppe</a> ...</font></font></P>
</TD>
</TR>
</TABLE>
</div>
så det næsten liner det her på E