/*
DirectTopics 2
http://www.directtopics.nl
http://forum.directtopics.nl
*/
include 'includes/include.inc.php';
?>
Index |
|
Forum: |
Topics: |
Posts: |
Laatste post: |
Moderator(s): |
$select = mysql_query("SELECT id, naam, starter, datum, tijd FROM dt_topic WHERE announcement = '1' AND soort = '0' ORDER BY id DESC") or die(mysql_error());
$aantal = mysql_num_rows($select);
if ($aantal != 0){
?>
Forum Announcements |
while ($topic = mysql_fetch_array($select)){
$lids = mysql_query("SELECT nickname FROM dt_leden WHERE id = '".$topic['starter']."'");
$members = mysql_fetch_array($lids);
?>
|
echo ''.htmlspecialchars(stripslashes($topic['naam'])).''; ?> |
echo $topic['datum'] . ' / ' . $topic['tijd']; ?> |
echo htmlspecialchars(stripslashes($members['nickname'])); ?> |
} }
if ($forumstatus == 2 || $forumstatus == 1 || $forumstatus == 3){
$select = mysql_query("SELECT id, naam, starter, datum, tijd FROM dt_topic WHERE announcement = '1' AND soort = '1' ORDER BY id DESC") or die(mysql_error());
$aantal = mysql_num_rows($select);
if ($aantal != 0){
$lids = mysql_query("SELECT nickname FROM dt_leden WHERE id = '".$topic['starter']."'");
$members = mysql_fetch_array($lids);?>
Crew Announcements |
while ($topic = mysql_fetch_array($select)){
?>
|
echo ''.htmlspecialchars(stripslashes($topic['naam'])).''; ?> |
echo $topic['datum'] . ' / ' . $topic['tijd']; ?> |
echo htmlspecialchars(stripslashes($members['nickname'])); ?> |
} } }
$select = mysql_query("SELECT id, naam FROM dt_categorie ORDER BY sort ASC");
while ($cat = mysql_fetch_array($select)){
?>
echo htmlspecialchars(stripslashes($cat['naam'])); ?> |
if ($forumstatus == 0 OR $ingelogd == 0){
$header_select = mysql_query("SELECT id, naam, uitleg, soort, moderator, status, posts, last_date FROM dt_header WHERE soort = '".$cat[id]."' AND status = '1' ORDER BY id");
} elseif ($forumstatus == 1 || $forumstatus == 3){
$header_select = mysql_query("SELECT id, naam, uitleg, soort, moderator, status, posts, last_date FROM dt_header WHERE soort = '".$cat[id]."' AND status = '1' OR soort = '".$cat[id]."' AND status = '2' ORDER BY id");
} elseif ($forumstatus == 2){
$header_select = mysql_query("SELECT id, naam, uitleg, soort, moderator, status, posts, last_date FROM dt_header WHERE soort = '".$cat[id]."' AND status = '1' OR soort = '".$cat[id]."' AND status = '2' OR soort = '".$cat[id]."' AND status = '3' ORDER BY id");
}
while ($header = mysql_fetch_array($header_select)){
$moderator = $header['moderator'];
$active = $lid['last_active'] - 30;
if ($header['last_date'] >= $active){
$image = 'images/on.gif';
} elseif ($header['last_date'] < $active){
$image = 'images/off.gif';
}
$mod_select = mysql_query("SELECT id, nickname FROM dt_leden WHERE id = '".$header[moderator2]."'");
$mod = mysql_fetch_array($mod_select);
$mod2_aantal = mysql_num_rows($mod_select);
$topic_select = mysql_query("SELECT id FROM dt_topic WHERE forum = '".$header[id]."'");
$topics = mysql_num_rows($topic_select);
$top_sel = mysql_query("SELECT lastpost, lastpost2, lastpost3 FROM dt_topic WHERE forum = '".$header[id]."' ORDER BY lastpostjaar DESC, last2 DESC, last DESC LIMIT 0, 1");
$top = mysql_fetch_array($top_sel);
$lid_select = mysql_query("SELECT id, nickname FROM dt_leden WHERE id = '".$top[lastpost]."'");
$last = mysql_fetch_array($lid_select);
?>
echo ''; ?> |
echo nl2br(htmlspecialchars(stripslashes($header['uitleg']))); ?> |
echo $topics; ?> |
echo $header['posts']; ?> |
echo ''.htmlspecialchars(stripslashes($last['nickname'])).' '.$top['lastpost2'].' / '.$top['lastpost3']; ?> |
echo $moderator; ?>
|
} }
$result = mysql_query("SELECT DISTINCT ip FROM dt_online WHERE id = ''");
$online3 = mysql_num_rows($result);
$result = mysql_query("SELECT DISTINCT id FROM dt_online");
$online = mysql_num_rows($result);
$result = mysql_query("SELECT DISTINCT id FROM dt_online WHERE id != '' ORDER BY id ASC");
$online2 = mysql_num_rows($result);
$online = $online2 + $online3;
$leden = mysql_num_rows(mysql_query("SELECT id FROM dt_leden"));
$topics = mysql_num_rows(mysql_query("SELECT id FROM dt_topic"));
$posts = mysql_num_rows(mysql_query("SELECT id FROM dt_posts"));
?>
Index |
Aantal leden: echo $leden; ?>
Aantal posts: echo $posts; ?>
Aantal topics: echo $topics; ?>
|
Nieuwste 5 leden:
$last_led = mysql_query("SELECT id, nickname FROM dt_leden ORDER BY id DESC LIMIT 0, 5");
while ($led = mysql_fetch_array($last_led)){
$nicknam = htmlspecialchars(stripslashes($led['nickname']));
echo '' . htmlspecialchars(stripslashes($nicknam)) . ', ';
}
?>
|
|
if ($show_online == 1){ ?>
Gebruikers online: echo $online; ?> |
Online:
while ($online = mysql_fetch_array($result)){
$sel = mysql_query("SELECT id, nickname, status, hide FROM dt_leden WHERE id = '".$online[id]."' ORDER BY id");
$mem = mysql_fetch_array($sel);
$nickname = $mem['nickname'];
if ($mem['hide'] == 1 AND $forumstatus != 0 AND $ingelogd == 1){
echo ''.htmlspecialchars(stripslashes($nickname)).', ';
} elseif ($mem['hide'] == 1 AND $forumstatus == 0 OR $mem['hide'] == 1 AND $ingelogd == 0){
echo "";
} elseif ($mem['status'] == 1){
echo ''.htmlspecialchars(stripslashes($nickname)).', ';
} elseif ($mem['status'] == 2){
echo ''.htmlspecialchars(stripslashes($nickname)).', ';
} elseif ($mem['status'] == 3) {
echo ''.htmlspecialchars(stripslashes($nickname)).', ';
} else {
echo ''.htmlspecialchars(stripslashes($nickname)).', ';
} }
mysql_close();
?>
|
} ?>
|
footer(); ?>