<html>
<head>
<title>Waar heb jij gepost?</title>
<style type="text/css">
body {
background-color: #ECF2F5
scrollbar-face-color: {T_TR_COLOR2};
scrollbar-highlight-color: {T_TD_COLOR2};
scrollbar-shadow-color: {T_TR_COLOR2};
scrollbar-3dlight-color: {T_TR_COLOR3};
scrollbar-arrow-color: {T_BODY_LINK};
scrollbar-track-color: {T_TR_COLOR1};
scrollbar-darkshadow-color: {T_TH_COLOR1};
}
.10px {
font-size: 12px;
}
</style>
</head>
<body>
<?php
echo "<font face='verdana' size='2'>"; include("config.php");
if(isset($_POST['submit'])) { $sql = mysql_query("SELECT * FROM phpbb_users WHERE user_id='".$_POST['naam']."'"); if($aantal_users == 0) {
die("Die user bestaat niet"); }
$sql2 = mysql_query("SELECT forum_id FROM phpbb_forums ORDER BY forum_id DESC LIMIT 1"); $forum_id = 1; ?>
<font size="4">Posts stats</font><br>
<font size="3">Waar en hoeveel heb jij gepost?<br></font>
<font class="10px">Statistieken voor
<? echo $user->username; ?></font><br><br>
<font size="2">
<table border="0" width="90%" class="10px">
<tr class="10px">
<td width="50%" class="10px"><b>Forum</b></td>
<td width="20%" class="10px"><b>Berichten</b></td>
<td width="20%" class="10px"><b>Percentage</b><td>
</tr>
</table><hr><table border="0" width="90%" class="10px"> <?
if($user->user_posts == 0) {
}
while($forum_id <= $laatste_id->forum_id) {
$sql3 = mysql_query("SELECT * FROM phpbb_posts WHERE poster_id='".$user->user_id."' AND forum_id='".$forum_id."'"); $sql4 = mysql_query("SELECT * FROM phpbb_forums WHERE forum_id='".$forum_id."'"); $percentage = round($aantal_berichten / $user->user_posts * 100, 2); if($aantal_berichten != 0) {
?>
<tr class="10px">
<td width="50%" class="10px">
<? echo $forum->forum_name; ?></td>
<td width="20%" class="10px">
<? echo $aantal_berichten; ?></td>
<td width="20%" class="10px">
<? echo $percentage; ?>%<td>
</tr>
</font>
<?
}
$forum_id++;
}
?>
</table>
<hr>
<table border="0" width="90%" class="10px">
<tr class="10px">
<td width="50%" align="right" class="10px">Totaal:</td>
<td width="20%" class="10px">
<? echo $user->user_posts; ?></td>
<td width="20%" class="10px">
<? echo "100%"; ?><td>
</tr></table><br>
<font size="2" class="10px"><center>© 2004 Lucas van Dijk</center></font>
<?
} else {
$sql = mysql_query("SELECT * FROM phpbb_users ORDER BY user_id DESC LIMIT 1"); ?>
<FORM action="posts_stats.php" method="POST">
Selecteer user:<br>
<SELECT name="naam">
<?
$sql = mysql_query("SELECT * FROM phpbb_users where user_id !=-1 ORDER BY username ASC"); $id = 0;
while($id != $laatste_id[user_id]) {
echo "<option value=\"".$user_id."\">".$username."</option>"; $id++;
}
?>
</SELECT>
<br>
<input type="submit" value="Ok" name="submit">
</form>
<? }
</body>
</html>