Thread: [Openfirst-cvscommit] logger stats.php,1.2,1.3
Brought to you by:
xtimg
From: <dav...@us...> - 2003-10-01 01:55:06
|
Update of /cvsroot/openfirst/logger In directory sc8-pr-cvs1:/tmp/cvs-serv19097 Modified Files: stats.php Log Message: Stats and background image are edited to fit the design of openFIRST. The background image was to dark thus the change in opacity. Index: stats.php =================================================================== RCS file: /cvsroot/openfirst/logger/stats.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** stats.php 1 Oct 2003 00:12:52 -0000 1.2 --- stats.php 1 Oct 2003 01:53:14 -0000 1.3 *************** *** 30,64 **** include("$header"); ! //check if outputting a graph ! if(isset($_GET["graph"])){ ! //output caption switch($_GET["graph"]){ ! //yearly case 3:{ ! echo("<h1>Yearly Usage Graph</h1>"); break; } ! //monthly case 2:{ ! echo("<h1>Monthly Usage Graph</h1>"); break; } ! //weekly default:{ ! echo("<h1>Weekly Usage Graph</h1>"); break; } } ! //start the table ! echo("<table width=500><tr><td><div>"); ! ! //check if GDlib is installed if (function_exists("imagecreatefrompng")){ ! //show a graph echo('<img src="'.$basepath.'/logger/graph.php?graph='.$_GET["graph"].'">'); } else { ! //no GDlib - show error message echo('<b>GDlib</b> extension for PHP is required for this functionality. GDlib is included in PHP 4.2.3 and up. For more information consult the openFIRST manual --- 30,69 ---- include("$header"); ! // Check if outputting a graph ! if(isset($_GET["graph"])){ ! // Output caption ! ! echo("<br><br><table width=500><tr><th>"); ! switch($_GET["graph"]){ ! // Yearly case 3:{ ! echo("Yearly Usage Graph"); break; } ! // Monthly case 2:{ ! echo("Monthly Usage Graph"); break; } ! // Weekly default:{ ! echo("Weekly Usage Graph"); break; } } + + echo('</th></tr><tr><td class="sub"> + <div align=right><a href="'.$_SERVER["PHP_SELF"].'?graph=1">Weekly Graph</a> | + <a href="'.$_SERVER["PHP_SELF"].'?graph=2">Monthly Graph</a> | + <a href="'.$_SERVER["PHP_SELF"].'?graph=3">Yearly Graph</a></div></td></tr><tr><td>'); ! // Check if GDlib is installed if (function_exists("imagecreatefrompng")){ ! // Show a graph echo('<img src="'.$basepath.'/logger/graph.php?graph='.$_GET["graph"].'">'); } else { ! // No GDlib - show error message echo('<b>GDlib</b> extension for PHP is required for this functionality. GDlib is included in PHP 4.2.3 and up. For more information consult the openFIRST manual *************** *** 66,88 **** or <a href="http://www.php.net/" target="_blank">PHP.net</a>'); } ! //finish the table ! echo('</div></td></tr> ! <tr><td background="'.$basepath.'/images/back-light.gif"> ! <div align=right><a href="'.$_SERVER["PHP_SELF"].'?graph=1">Weekly Graph</a> | ! <a href="'.$_SERVER["PHP_SELF"].'?graph=2">Monthly Graph</a> | ! <a href="'.$_SERVER["PHP_SELF"].'?graph=3">Yearly Graph</a></div></td></tr></table><hr><br>'); } ?> <h1>Usage Statistics for <?php echo($title); ?></h1> ! <table cols=2 width=400> ! <tr align=left valign=bottom> ! <td colspan=2 background="<?php echo($basepath); ?>/images/back-light.gif"> ! <h3 style="margin-bottom:0px">Pages</h3><div align=right>(Total Requests)</div></td> ! </tr> ! <tr> ! <td><b>Total Pages Served</b> ! </td><td align=right> ! <?php if (function_exists("get_totalpages")){ echo (get_totalpages()); --- 71,96 ---- or <a href="http://www.php.net/" target="_blank">PHP.net</a>'); } ! ! echo "</td></tr></table><br><br>"; ! } ?> <h1>Usage Statistics for <?php echo($title); ?></h1> ! ! <table cols=2 width=400> ! <tr align=left valign=bottom> ! <td height="23" colspan=2 background="<?php echo($basepath); ?>/images/back-light.gif"> ! <h3 style="margin-bottom:0px">Pages</h3> ! <div align=right></div></td> ! </tr> ! <tr> ! <td width="356" class='sub'> </td> ! <td width="32" align=right class='sub'><div align="center">(Total Requests)</div></td> ! </tr> ! <tr> ! <td><b>Total Pages Served</b> </td> ! <td align=right> ! <?php if (function_exists("get_totalpages")){ echo (get_totalpages()); *************** *** 92,109 **** } ?> ! </td> ! </tr> ! <tr> ! <td><b>Logger Entries</b> ! </td><td align=right> ! <?php $query=ofirst_dbquery("SELECT * FROM ofirst_logger;") or die(ofirst_dberror()); $pages=ofirst_dbnum_rows($query); echo($pages); ?> ! </td> ! </tr> ! ! <?php $query=ofirst_dbquery("SELECT * FROM ofirst_hitcount ORDER BY Value DESC;") or die(ofirst_dberror()); $useragents=ofirst_dbnum_rows($query); --- 100,116 ---- } ?> ! </td> ! </tr> ! <tr> ! <td><b>Logger Entries</b> </td> ! <td align=right> ! <?php $query=ofirst_dbquery("SELECT * FROM ofirst_logger;") or die(ofirst_dberror()); $pages=ofirst_dbnum_rows($query); echo($pages); ?> ! </td> ! </tr> ! <?php $query=ofirst_dbquery("SELECT * FROM ofirst_hitcount ORDER BY Value DESC;") or die(ofirst_dberror()); $useragents=ofirst_dbnum_rows($query); *************** *** 149,167 **** } ?> ! <tr> ! <td><b>Total Visitors</b> ! </td><td align=right><?php echo($total); ?> ! </td> ! </tr> ! ! <tr align=left valign=bottom> ! <td colspan=2 background="<?php echo($basepath); ?>/images/back-light.gif"> ! <h3 style="margin-bottom:0px">Browsers</h3><div align=right>Items: ! <?php echo(sizeof($browsers)); ?> ! </div></td></tr> ! ! <?php foreach ($browsers as $i => $value){ echo("<tr><td><b>".$i."</b></td><td align=right>".$value." visitors (".round(($value/$total)*100,1)."%)</td></tr>"); --- 156,174 ---- } ?> ! <tr> ! <td><b>Total Visitors</b> </td> ! <td align=right><?php echo($total); ?> </td> ! </tr> ! <tr align=left valign=bottom> ! <td colspan=2 background="<?php echo($basepath); ?>/images/back-light.gif"> ! <h3 style="margin-bottom:0px">Browsers</h3></td></tr><tr> ! <td class='sub'> ! </div></td><td class='sub'><div align="center">Items: ! <?php echo(sizeof($browsers)); ?> ! </div></td> ! </tr> ! <?php foreach ($browsers as $i => $value){ echo("<tr><td><b>".$i."</b></td><td align=right>".$value." visitors (".round(($value/$total)*100,1)."%)</td></tr>"); *************** *** 169,182 **** } ?> ! ! <tr align=left valign=bottom> ! <td colspan=2 background="<?php echo($basepath); ?>/images/back-light.gif"> ! <h3 style="margin-bottom:0px">Platforms</h3><div align=right>Items: ! <?php echo(sizeof($platforms)); ?> ! </div></td></tr> ! ! <?php foreach ($platforms as $i => $value) { echo("<tr><td><b>".$i."</b></td><td align=right>".$value." visitors (".round(($value/$total)*100,1)."%)</td></tr>"); --- 176,190 ---- } ?> ! <tr align=left valign=bottom> ! <td colspan=2 background="<?php echo($basepath); ?>/images/back-light.gif"> ! <h3 style="margin-bottom:0px">Platforms</h3></td></tr> ! <tr><td class='sub'> ! </div></td><td class='sub'><div align="center">Items: ! <?php echo(sizeof($platforms)); ?> ! </div></td> ! </tr> ! <?php foreach ($platforms as $i => $value) { echo("<tr><td><b>".$i."</b></td><td align=right>".$value." visitors (".round(($value/$total)*100,1)."%)</td></tr>"); *************** *** 184,193 **** } ?> ! ! <tr><td colspan=2><br><hr><div align=right><b><a href="<?php echo($_SERVER["PHP_SELF"]); ?>?graph=1">Usage Graph</a></b></div></td></tr> ! </table> ! <p align=left style="margin-left:60%;align:left;font-weight:normal;font-size:8pt;"><b>Notice</b>: This statistical data is not guaranteed to be accurate. The browser and platform information is displayed as supplied by the web server. Consult the openFIRST manual for more information.</p> ! <?php include("$footer"); ?> --- 192,208 ---- } ?> ! <tr> ! <td colspan=2><br> <hr> <div align=right><b><a href="<?php echo($_SERVER["PHP_SELF"]); ?>?graph=1">Usage ! Graph</a></b></div></td> ! </tr> ! </table> ! ! <br> ! <font size="1"><strong>Notice:</strong></font><font size="1"> This statistical ! data is not guaranteed to be accurate. The browser and platform information is ! displayed as<br> ! supplied by the web server. Consult the openFIRST manual for more information. <?php include("$footer"); ?> + </font> \ No newline at end of file |