3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the Revised BSD License.
6 This program is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 Revised BSD License for more details.
11 Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
12 Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
14 $FileInfo: stats.php - Last Update: 05/26/2007 SVN 15 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="stats.php"||$File3Name=="/stats.php") {
20 if($_GET['act']=="view"||$_GET['act']=="stats") { $toggle = null;
21 $togglecode = "<span style=\"float: right;\"> </span>";
22 if($ThemeSet['EnableToggle']==true) {
23 $toggle = "toggletag('Stats1'),toggletag('Stats2'),toggletag('Stats3');return false;";
24 $togglecode = "<span style=\"float: right;\"><a href=\"".$filewpath."#Toggle\" onclick=\"".$toggle."\">".$ThemeSet['Toggle']."</a>".$ThemeSet['ToggleExt']."</span>"; }
25 if($ThemeSet['EnableToggle']==false) { $toggle = null;
26 $togglecode = "<span style=\"float: right;\"> </span>"; }
27 $ntquery = query("select * from ".$Settings['sqltable']."topics", array(null));
28 $ntresult = mysql_query($ntquery);
29 $numtopics = mysql_num_rows($ntresult);
30 $npquery = query("select * from ".$Settings['sqltable']."posts", array(null));
31 $npresult = mysql_query($npquery);
32 $numposts = mysql_num_rows($npresult);
33 $nmquery = query("select * from ".$Settings['sqltable']."members", array(null));
34 $nmresult = mysql_query($nmquery);
35 $nummembers = mysql_num_rows($nmresult);
36 $sql_guest_check = mysql_query(query("select * from ".$Settings['sqltable']."members where id = '%s'", array("-1")));
37 $guest_check = mysql_num_rows($sql_guest_check); @mysql_free_result($sql_guest_check);
38 if($guest_check > 0) { $nummembers = $nummembers - 1; }
40 <div class="Table1Border">
41 <table class="Table1">
42 <tr class="TableRow1">
43 <td class="TableRow1" colspan="2"><span style="float: left;">
44 <?php echo $ThemeSet['TitleIcon']; ?><a id="bstats" href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=stats",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>#bstats">Board Statistics</a></span>
45 <?php echo $togglecode; ?></td>
47 <tr id="Stats1" class="TableRow2">
48 <td class="TableRow2" colspan="2" style="width: 100%; font-weight: bold;">Board Stats</td>
50 <tr class="TableRow3" id="Stats2">
51 <td style="width: 4%;" class="TableRow3"><div class="forumicon">
52 <?php echo $ThemeSet['StatsIcon']; ?> </div></td>
53 <td style="width: 96%;" class="TableRow3"><div class="forumname">
54 Our members have made a total of <?php echo $numposts; ?> post(s)<br />
55 We have a total of <?php echo $numtopics; ?> topic(s) made<br />
56 We have <?php echo $nummembers; ?> registered members<br />
59 <tr id="Stats3" class="TableRow4">
60 <td class="TableRow4" colspan="2"> </td>
65 @mysql_free_result($ntresult);
66 @mysql_free_result($npresult);
67 @mysql_free_result($nmresult); }