openfirst-cvscommit Mailing List for openFIRST (Page 76)
Brought to you by:
xtimg
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(41) |
Jun
(210) |
Jul
(39) |
Aug
(153) |
Sep
(147) |
Oct
(173) |
Nov
(81) |
Dec
(163) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(33) |
Feb
(18) |
Mar
|
Apr
(62) |
May
|
Jun
(100) |
Jul
(38) |
Aug
(58) |
Sep
(1) |
Oct
|
Nov
(25) |
Dec
(172) |
2005 |
Jan
(31) |
Feb
(12) |
Mar
(67) |
Apr
(92) |
May
(247) |
Jun
(34) |
Jul
(36) |
Aug
(192) |
Sep
(15) |
Oct
(42) |
Nov
(92) |
Dec
(4) |
2006 |
Jan
|
Feb
(21) |
Mar
|
Apr
|
May
|
Jun
(53) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(4) |
Apr
(4) |
May
|
Jun
(15) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <i-...@us...> - 2003-10-01 22:54:02
|
Update of /cvsroot/openfirst/news/rss In directory sc8-pr-cvs1:/tmp/cvs-serv3586/news/rss Modified Files: rss.php Log Message: Added a call to strip_tags to convert news to plaintext. HTML tags can "break" XML output. Index: rss.php =================================================================== RCS file: /cvsroot/openfirst/news/rss/rss.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rss.php 28 Sep 2003 15:33:53 -0000 1.1 --- rss.php 1 Oct 2003 22:53:58 -0000 1.2 *************** *** 74,79 **** $about = $link = $home.$base.'/news/readnews.php?ID='.$news->ID; ! $title = (string) $news->title; ! $description = (string) $news->news; $subject = (string) ''; // optional DC value $date = (string) date('Y-m-d\TH:i:sO'); // optional DC value --- 74,79 ---- $about = $link = $home.$base.'/news/readnews.php?ID='.$news->ID; ! $title = strip_tags($news->title); ! $description = strip_tags($news->news); $subject = (string) ''; // optional DC value $date = (string) date('Y-m-d\TH:i:sO'); // optional DC value *************** *** 82,86 **** $image = (string) $home.$base.'/news/images/'.$news->image; // optional mod_im value for dispaying a different pic for every item ! $rssfile->addItem($about, $title, $link, $description, $subject, $date, $author, $comments, $image); } --- 82,86 ---- $image = (string) $home.$base.'/news/images/'.$news->image; // optional mod_im value for dispaying a different pic for every item ! $rssfile->addItem($about, $title, $link, $description, $subject, $date, $author, $comments, $image); } *************** *** 94,96 **** ob_end_flush(); ! ?> \ No newline at end of file --- 94,96 ---- ob_end_flush(); ! ?> |
From: <i-...@us...> - 2003-10-01 22:52:52
|
Update of /cvsroot/openfirst/news/admin In directory sc8-pr-cvs1:/tmp/cvs-serv3453/news/admin Added Files: editnews.php killnews.php Log Message: Added new admin modules - edit and delete news. Modified scripts to include the DHTML editor (RSS compatible now) --- NEW FILE: editnews.php --- <?php /* * openFIRST.news - admin/editnews.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Greg Inozemtsev <gr...@si...> * Based on admin/index.php by Tim Ginn <tim...@sy...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ include("../../config/globals.php"); include($header); echo("<h1>Edit News Item</h1>"); if(isset($user->membertype)){ if($user->membertype == "administrator") { $articleid=0; if(isset($_GET["id"])){ $articleid=$_GET["id"]; } if(! isset($_POST["news"])) { // Display a form for news. $query = ofirst_dbquery("SELECT * FROM ofirst_news ORDER BY ID DESC"); $title=""; $found=false; if (ofirst_dbnum_rows($query) != 0){ while($news = ofirst_dbfetch_object($query)){ if($news->ID==$articleid){ $found=true; break; } } } if($found){ ?> <form name="NewsForm" id="NewsForm" method="post" action="<?php echo($_SERVER["PHP_SELF"]); ?>"> <p><br /> <br /> </p> <table width="618" align="center"> <tr> <th> </th> <th>Edit News</th> </tr> <tr> <td><div align="right">Headline:</div></td> <td><input name="title" type="text" value="<?php {echo($news->title);} ?>" style="width: 250px;"></td> </tr> <tr> <td width="156"><div align="right">Image:</div></td> <td width="332"> <input type="text" name="image" value="<?php {echo($news->image);} ?>" style="width: 250px;"> </td> </tr> <tr> <td valign="top"> <div align="right">Descriptions</div></td> <td> <?php $dhtml=function_exists("make_wysiwyg"); if($dhtml){ make_wysiwyg("news", 500, 300, $news->news); } else{ echo('<textarea name="news" cols="60" rows="20">$news->news</textarea>'); } ?> </td> </tr> <tr> <td> </td> <td> <?php if($dhtml){ echo('<input name="news2" type="button" id="news" value="Save Changes" onclick="dhtmlEditorPrepareSubmit(); document.NewsForm.submit();" />'); } else { echo('<input name="news2" type="submit" id="news" value="Save Changes" />'); } ?> <input name="reset" type="reset" /> <input name="StoryID" id="StoryID" type="hidden" value="<?php echo($news->ID); ?>"/> </td> </tr> </table> <p> </p> </form> <?php } else { echo('<div>This news item does not exist.</div>'); } } else { // Add the news. $now = date("D M j G:i:s T Y"); $query=ofirst_dbquery("UPDATE ofirst_news SET date='".$now."', poster='".$user->user."', title='".$_POST["title"]."', news='".$_POST["news"]."', image='".$_POST["image"]."' WHERE ID='".$_POST["StoryID"]."';"); echo("The news item "" . $_POST["title"] . "" has been modified. [ <a href='../index.php'>Main</a> ]"); } } } else { echo("You must be logged on as an administrative user to edit news."); } include($footer); ?> --- NEW FILE: killnews.php --- <?php /* * openFIRST.news - admin/killnews.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Greg Inozemtsev <gr...@si...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ include("../../config/globals.php"); include($header); ?> <br> <table width="618" align="center"> <tr> <th>Delete News Item</th> </tr> <tr> <td align="center"> <?php $admin=false; if (isset($user->membertype)){ $admin=($user->membertype == "administrator"); } if($admin) { if(!isset($_POST["StoryID"])) { $query = ofirst_dbquery("SELECT * FROM ofirst_news ORDER BY ID DESC"); $title=""; $found=false; if (ofirst_dbnum_rows($query) != 0){ while($news = ofirst_dbfetch_object($query)){ if($news->ID==$_GET["id"]){ $found=true; $title=$news->title; break; } } } ?> <?php if($found){ echo('<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'); echo('<input name="StoryID" type="hidden" value="'.$_GET["id"].'">'); echo('<div>Delete news item "'.$title.'"?</div><br>'); echo('<input type="submit" value="Confirm"></form>'); } else { echo('<div>This news item does not exist.</div>'); } } else { // Delete the news by ID. ofirst_dbquery("DELETE FROM ofirst_news WHERE ID=".$_POST["StoryID"].";"); echo("The news item has been deleted. [ <a href='../index.php'>Main</a> ]"); } } else { echo("You must be logged on as an administrative user to delete news."); } echo("</td></tr></table>"); include($footer); ?> |
From: <i-...@us...> - 2003-10-01 22:52:13
|
Update of /cvsroot/openfirst/news/admin In directory sc8-pr-cvs1:/tmp/cvs-serv3397/news/admin Modified Files: index.php Log Message: Added new admin modules - edit and delete news. Modified scripts to include the DHTML editor (RSS compatible now) Index: index.php =================================================================== RCS file: /cvsroot/openfirst/news/admin/index.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** index.php 28 Sep 2003 16:17:27 -0000 1.9 --- index.php 1 Oct 2003 22:52:09 -0000 1.10 *************** *** 31,39 **** echo("<h1>Add News</h1>"); ! if($user->membertype == "administrator") { ! if(! isset($_POST["news"])) { ! // Display a form for news. ?> ! <form method="post" action="index.php"> <p><br /> <br /> --- 31,40 ---- echo("<h1>Add News</h1>"); ! if(isset($user->membertype)){ ! if($user->membertype == "administrator") { ! if(! isset($_POST["news"])) { ! // Display a form for news. ?> ! <form name="NewsForm" id="NewsForm" method="post" action="index.php"> <p><br /> <br /> *************** *** 57,66 **** <div align="right">Descriptions</div></td> <td> ! <textarea name="news" cols="60" rows="20">Insert your news here.</textarea> </td> </tr> <tr> <td> </td> ! <td><input name="news2" type="submit" id="news" value="Add News Item" /> <input name="reset" type="reset" value="Clear News Item" /> </td> </tr> --- 58,83 ---- <div align="right">Descriptions</div></td> <td> ! <?php ! $dhtml=function_exists("make_wysiwyg"); ! if($dhtml){ ! make_wysiwyg("news", 500, 300, "Insert your news here."); ! } ! else{ ! echo('<textarea name="news" cols="60" rows="20">Insert your news here.</textarea>'); ! } ! ?> </td> </tr> <tr> <td> </td> ! <td> ! <?php ! if($dhtml){ ! echo('<input name="news2" type="button" id="news" value="Add News Item" onclick="dhtmlEditorPrepareSubmit(); document.NewsForm.submit();" />'); ! } ! else { ! echo('<input name="news2" type="submit" id="news" value="Add News Item" />'); ! } ! ?> <input name="reset" type="reset" value="Clear News Item" /> </td> </tr> *************** *** 77,80 **** --- 94,98 ---- echo("The news item " . $_POST["title"] . " has been added. [ <a href='../index.php'>Main</a> ]"); } + } } else { echo("You must be logged on as an administrative user to add news."); |
From: <i-...@us...> - 2003-10-01 22:51:07
|
Update of /cvsroot/openfirst/news In directory sc8-pr-cvs1:/tmp/cvs-serv3235/news Modified Files: viewnews.php Log Message: Fixed a bug with $basepath value being unavailable to the function and broken navigation as a result. Added navigation for new admin modules - edit and delete. Added new parameter to shownews specifying whether or not to display new admin options. This is controlled by news/index.php. Index: viewnews.php =================================================================== RCS file: /cvsroot/openfirst/news/viewnews.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** viewnews.php 28 Sep 2003 16:19:24 -0000 1.7 --- viewnews.php 1 Oct 2003 22:51:03 -0000 1.8 *************** *** 27,32 **** */ ! function shownews($limit = 5) { ! // Get a list of the users able to // be contacted via the feedback form. --- 27,31 ---- */ ! function shownews($limit = 5,$admin=false) { // Get a list of the users able to // be contacted via the feedback form. *************** *** 38,45 **** echo("<br><table width='500'> <tr><th><strong>$news->title</strong></th></tr> ! <tr><td><center><img src='$news->image' alt='$news->title'></center></td></tr> ! <tr><td class='sub'>Posted on $news->date by $news->poster</td></tr> ! <tr><td>$news->news<br><br><center>[ <a href='$basepath/news/comments.php?ID=$news->ID'>View Comments</a> ]</center></td></tr> ! </table><br>"); } --- 37,48 ---- echo("<br><table width='500'> <tr><th><strong>$news->title</strong></th></tr> ! <tr><td><center><img src='$news->image' alt='$news->title'></center></td></tr> ! <tr><td class='sub'>Posted on $news->date by $news->poster</td></tr> ! <tr><td>$news->news<br><br><center>[ <a href='".$GLOBALS["basepath"]."/news/comments.php?ID=$news->ID'>View Comments</a> ]</center></td></tr>"); ! if($admin){ ! echo('<tr><td class="sub"><div style="" align="right">Admin options: <a href="'.$GLOBALS["basepath"].'/news/admin/editnews.php?id='.$news->ID.'"><img alt="Edit story" border=0 src="'.$GLOBALS["basepath"].'/news/images/newdoc.gif" align=absmiddle>Edit story</a>'); ! echo('<a href="'.$GLOBALS["basepath"].'/news/admin/killnews.php?id='.$news->ID.'"><img alt="Delete story" border=0 src="'.$GLOBALS["basepath"].'/news/images/killdoc.gif" align=absmiddle>Delete story</a></div></td></tr>'); ! } ! echo("</table><br>"); } *************** *** 49,51 **** return(0); } ! ?> \ No newline at end of file --- 52,54 ---- return(0); } ! ?> |
From: <i-...@us...> - 2003-10-01 22:48:06
|
Update of /cvsroot/openfirst/news/images In directory sc8-pr-cvs1:/tmp/cvs-serv2782/images Log Message: Directory /cvsroot/openfirst/news/images added to the repository |
From: <i-...@us...> - 2003-10-01 20:44:11
|
Update of /cvsroot/openfirst/logger In directory sc8-pr-cvs1:/tmp/cvs-serv7901/logger Modified Files: track.php Log Message: Fixed a minor interface bug (table headers for browser and platform showed up even if the corresponding functions were not present). Added new feature: optional browser identification. Index: track.php =================================================================== RCS file: /cvsroot/openfirst/logger/track.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** track.php 1 Oct 2003 00:12:41 -0000 1.10 --- track.php 1 Oct 2003 20:40:07 -0000 1.11 *************** *** 29,32 **** --- 29,39 ---- include("$header"); + $browserid=false; + if (isset($_GET['useragent'])) { + if($_GET['useragent']==1){ + $browserid=true; + }; + } + if (isset($_GET['DELETE'])) { ofirst_dbquery("DELETE FROM ofirst_logger WHERE IPAddress = '".$_GET['ID']."'") or die(ofirst_dberror()); *************** *** 40,43 **** --- 47,61 ---- who has visited a total of <strong><?php echo($amount); ?></strong> pages. <br> <br>[ <a href='track.php?ID=<?php echo $_GET['ID']; ?>&DELETE=true'>Delete all hits by this user ]</a></p> + + <?php + if(function_exists("identify_browser")){ ?> + <div><form action="<?php echo($_SERVER['PHP_SELF']); ?>"> + <input id="useragent" name="useragent" type="checkbox" value="1" <?php if($browserid){ echo("checked"); } ?></input> + <label for="useragent">Identify browser</label> + <input name="ID" type="hidden" value="<?php echo($_GET['ID']); ?>"></input> + <input type="Submit" value="OK"></input> + </form></div> + <?php } ?> + <table> <tr> *************** *** 50,55 **** <th>Member</th> <th>Options</th> ! <th>Browser</th> ! <th>Platform</th> </tr> <? --- 68,77 ---- <th>Member</th> <th>Options</th> ! <?php ! if(function_exists("identify_browser")&&$browserid){ ! echo("<th>Browser</th> ! <th>Platform</th>"); ! } ! ?> </tr> <? *************** *** 64,76 **** if($log->Member != "null"){ echo(" <td>$log->Member</td>"); }else{ echo("<td>NULL</td>"); } echo(" <td>[ <a href='./?DELETE=$log->ID'>Delete</a> ]</td>"); ! echo(" <td>"); ! if(function_exists("identify_browser")){ echo(identify_browser($log->Browser)); } ! echo("</td><td>"); ! if(function_exists("identify_platform")){ echo(identify_platform($log->Browser)); } ! echo("</td></tr>"); } ?> --- 86,100 ---- if($log->Member != "null"){ echo(" <td>$log->Member</td>"); }else{ echo("<td>NULL</td>"); } echo(" <td>[ <a href='./?DELETE=$log->ID'>Delete</a> ]</td>"); ! if(function_exists("identify_browser")&&$browserid){ ! echo(" <td>"); echo(identify_browser($log->Browser)); + echo("</td>"); } ! if(function_exists("identify_platform")&&$browserid){ ! echo(" <td>"); echo(identify_platform($log->Browser)); + echo("</td>"); } ! echo("</tr>"); } ?> |
From: <i-...@us...> - 2003-10-01 16:36:43
|
Update of /cvsroot/openfirst/logger In directory sc8-pr-cvs1:/tmp/cvs-serv19668/logger Modified Files: graph.php Log Message: Improved scale. Index: graph.php =================================================================== RCS file: /cvsroot/openfirst/logger/graph.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** graph.php 30 Sep 2003 23:30:33 -0000 1.1 --- graph.php 1 Oct 2003 16:36:30 -0000 1.2 *************** *** 147,151 **** $scale=0; while($scale<=$step){ ! $scale+=50; } //draw the y scale --- 147,156 ---- $scale=0; while($scale<=$step){ ! if ($max>1000){ ! $scale+=200; ! } ! else { ! $scale+=20; ! } } //draw the y scale |
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 |
From: <dav...@us...> - 2003-10-01 01:54:18
|
Update of /cvsroot/openfirst/logger/setup In directory sc8-pr-cvs1:/tmp/cvs-serv19360/setup Modified Files: setup.mssql setup.mysql Log Message: The admin options should not be for basic users or visitors. I have moved all the links, which are purely for administrators, into the admin section. Index: setup.mssql =================================================================== RCS file: /cvsroot/openfirst/logger/setup/setup.mssql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** setup.mssql 30 Sep 2003 23:47:50 -0000 1.2 --- setup.mssql 1 Oct 2003 01:54:14 -0000 1.3 *************** *** 2,4 **** CREATE TABLE IF NOT EXISTS `ofirst_hitcount` (`ID` int(6) unsigned NOT NULL auto_increment,`Name` tinytext NOT NULL, `Value` int(6) unsigned, PRIMARY KEY (`ID`)) TYPE=MyISAM; ALTER TABLE ofirst_logger ADD column Member TEXT; ! INSERT INTO ofirst_config SET modulename='logger',showonmenu='0',active='0',adminnavigation='<a href="$basepath/logger/reset.php">Reset Logger</a> | <a href="$basepath/logger/rawdata.php">Raw Data</a>',modulenavigation='<a href="$basepath/logger/index.php">Logger</a> | <a href="$basepath/logger/stats.php">Usage Statistics</a>',includes='logger.php'; --- 2,4 ---- CREATE TABLE IF NOT EXISTS `ofirst_hitcount` (`ID` int(6) unsigned NOT NULL auto_increment,`Name` tinytext NOT NULL, `Value` int(6) unsigned, PRIMARY KEY (`ID`)) TYPE=MyISAM; ALTER TABLE ofirst_logger ADD column Member TEXT; ! INSERT INTO ofirst_config SET modulename='logger',showonmenu='0',active='0',adminnavigation='<a href="$basepath/logger/index.php">Logger</a> | <a href="$basepath/logger/stats.php">Usage Statistics</a> | <a href="$basepath/logger/reset.php">Reset Logger</a> | <a href="$basepath/logger/rawdata.php">Raw Data</a>',includes='logger.php'; \ No newline at end of file Index: setup.mysql =================================================================== RCS file: /cvsroot/openfirst/logger/setup/setup.mysql,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** setup.mysql 30 Sep 2003 23:48:00 -0000 1.10 --- setup.mysql 1 Oct 2003 01:54:14 -0000 1.11 *************** *** 2,4 **** CREATE TABLE IF NOT EXISTS `ofirst_hitcount` (`ID` int(6) unsigned NOT NULL auto_increment,`Name` tinytext NOT NULL, `Value` int(6) unsigned, PRIMARY KEY (`ID`)) TYPE=MyISAM; ALTER TABLE ofirst_logger ADD column Member TEXT; ! INSERT INTO ofirst_config SET modulename='logger',showonmenu='0',active='0',adminnavigation='<a href="$basepath/logger/reset.php">Reset Logger</a> | <a href="$basepath/logger/rawdata.php">Raw Data</a>',modulenavigation='<a href="$basepath/logger/index.php">Logger</a> | <a href="$basepath/logger/stats.php">Usage Statistics</a>',includes='logger.php'; --- 2,4 ---- CREATE TABLE IF NOT EXISTS `ofirst_hitcount` (`ID` int(6) unsigned NOT NULL auto_increment,`Name` tinytext NOT NULL, `Value` int(6) unsigned, PRIMARY KEY (`ID`)) TYPE=MyISAM; ALTER TABLE ofirst_logger ADD column Member TEXT; ! INSERT INTO ofirst_config SET modulename='logger',showonmenu='0',active='0',adminnavigation='<a href="$basepath/logger/index.php">Logger</a> | <a href="$basepath/logger/stats.php">Usage Statistics</a> | <a href="$basepath/logger/reset.php">Reset Logger</a> | <a href="$basepath/logger/rawdata.php">Raw Data</a>',includes='logger.php'; \ No newline at end of file |
From: <dav...@us...> - 2003-10-01 01:53:26
|
Update of /cvsroot/openfirst/logger/backgrounds In directory sc8-pr-cvs1:/tmp/cvs-serv19097/backgrounds Modified Files: back.png 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: back.png =================================================================== RCS file: /cvsroot/openfirst/logger/backgrounds/back.png,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsCM2WZK and /tmp/cvsOeiQEl differ |
From: <i-...@us...> - 2003-10-01 00:16:25
|
Update of /cvsroot/openfirst/base/config/functions In directory sc8-pr-cvs1:/tmp/cvs-serv2543/config/functions Added Files: browserid.php Log Message: Identifies the client's browser and OS based on browscap.ini. --- NEW FILE: browserid.php --- <?php /* * openFIRST browserid.php * Last Modified: * David Di Biase, April 13, 2003 * * Copyright (C) 2003, * openFIRST Project * Original Author: Greg Inozemtsev <gr...@si...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ //Functions for browser/platform identification function identify_platform($useragent="") { //(This prevents PHP from displaying an error if use of browscap.ini is not enabled) //only report critical errors $err_prev=error_reporting(E_ERROR); //get OS info from browscap.ini $browser=get_browser($useragent); //restore error reporting level error_reporting($err_prev); $return=""; if($browser!=null){ $return=$browser->platform; if ($return==""){ //returns the original user-agent string return $useragent; } } else { //browscap.ini disabled //returns the original user-agent string return $useragent; } //return platform ID return $return; } function identify_browser($useragent="") { //(This prevents PHP from displaying an error if use of browscap.ini is not enabled) //only report critical errors $err_prev=error_reporting(E_ERROR); //get browser info from browscap.ini $browser=get_browser($useragent); //restore error reporting level error_reporting($err_prev); $return=""; if($browser!=null){ //Get browser name $browsername=$browser->browser; if ($browsername==""){ //could not determine browser name, browscap.ini disabled //return the original user-agent string return $useragent; } else { if ($browsername=="IE"){ //Spell 'IE' as 'Internet Explorer' $browsername="Internet Explorer"; } //Get major version $ver=$browser->majorver; //remove # character at beginning of string if (substr($ver,0,1)=="#"){ $ver=substr($ver,1); } $return=$browsername." ".$ver."."; //Get minor version $ver=$browser->minorver; //remove # character at beginning of string if (substr($ver,0,1)=="#"){ $ver=substr($ver,1); } $return.=$ver; //Identify search engine if (isset($browser->crawler)){ if($browser->crawler==1){ $return.=" (Search Engine)"; } } } } else { //browscap.ini disabled //returns the original user-agent string return $useragent; } //return browser ID return $return; } ?> |
From: <i-...@us...> - 2003-10-01 00:12:56
|
Update of /cvsroot/openfirst/logger In directory sc8-pr-cvs1:/tmp/cvs-serv1965/logger Modified Files: stats.php Log Message: Fixed dependency on config/functions/browserid.php Index: stats.php =================================================================== RCS file: /cvsroot/openfirst/logger/stats.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** stats.php 30 Sep 2003 23:41:38 -0000 1.1 --- stats.php 1 Oct 2003 00:12:52 -0000 1.2 *************** *** 120,124 **** else{ if($browser!="totalpages"){ ! $browse=identify_browser($useragent->Name); if(isset($browsers[$browse])){ $browsers[$browse]+=$useragent->Value; --- 120,129 ---- else{ if($browser!="totalpages"){ ! if(function_exists("identify_browser")){ ! $browse=identify_browser($useragent->Name); ! } ! else { ! $browse=$useragent->Name; ! } if(isset($browsers[$browse])){ $browsers[$browse]+=$useragent->Value; *************** *** 127,131 **** $browsers[$browse]=$useragent->Value; } ! $platform=identify_platform($useragent->Name); if(isset($platforms[$platform])){ $platforms[$platform]+=$useragent->Value; --- 132,141 ---- $browsers[$browse]=$useragent->Value; } ! if(function_exists("identify_platform")){ ! $platform=identify_platform($useragent->Name); ! } ! else { ! $platform=$useragent->Name; ! } if(isset($platforms[$platform])){ $platforms[$platform]+=$useragent->Value; |
From: <i-...@us...> - 2003-10-01 00:12:53
|
Update of /cvsroot/openfirst/logger In directory sc8-pr-cvs1:/tmp/cvs-serv1935/logger Modified Files: track.php Log Message: Fixed dependency on config/functions/browserid.php Index: track.php =================================================================== RCS file: /cvsroot/openfirst/logger/track.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** track.php 30 Sep 2003 23:46:38 -0000 1.9 --- track.php 1 Oct 2003 00:12:41 -0000 1.10 *************** *** 38,42 **** <h1>View Log Information</h1> <p>You are tracking the hits by: <strong><?php print $_GET['ID']; ?></strong>, ! who has visited a total of <strong><?php echo $amount; ?></strong> pages. <br> <br>[ <a href='track.php?ID=<?php echo $_GET['ID']; ?>&DELETE=true'>Delete all hits by this user ]</a></p> <table> --- 38,42 ---- <h1>View Log Information</h1> <p>You are tracking the hits by: <strong><?php print $_GET['ID']; ?></strong>, ! who has visited a total of <strong><?php echo($amount); ?></strong> pages. <br> <br>[ <a href='track.php?ID=<?php echo $_GET['ID']; ?>&DELETE=true'>Delete all hits by this user ]</a></p> <table> *************** *** 55,70 **** <? while($log = ofirst_dbfetch_object($query)) { ! echo "<tr>"; ! echo " <td>$log->ID</td>"; ! echo " <td>$log->Date</td>"; ! echo " <td>$log->IPAddress</td>"; ! echo " <td>$log->HostLookup</td>"; ! echo " <td>$log->Location</td>"; ! echo " <td>$log->QueryString</td>"; ! if($log->Member != "null"){ echo " <td>$log->Member</td>"; }else{ echo "<td>NULL</td>"; } ! echo " <td>[ <a href='./?DELETE=$log->ID'>Delete</a> ]</td>"; ! echo " <td>".identify_browser($log->Browser)."</td>"; ! echo " <td>".identify_platform($log->Browser)."</td>"; ! echo "</tr>"; } ?> --- 55,76 ---- <? while($log = ofirst_dbfetch_object($query)) { ! echo("<tr>"); ! echo(" <td>$log->ID</td>"); ! echo(" <td>$log->Date</td>"); ! echo(" <td>$log->IPAddress</td>"); ! echo(" <td>$log->HostLookup</td>"); ! echo(" <td>$log->Location</td>"); ! echo(" <td>$log->QueryString</td>"); ! if($log->Member != "null"){ echo(" <td>$log->Member</td>"); }else{ echo("<td>NULL</td>"); } ! echo(" <td>[ <a href='./?DELETE=$log->ID'>Delete</a> ]</td>"); ! echo(" <td>"); ! if(function_exists("identify_browser")){ ! echo(identify_browser($log->Browser)); ! } ! echo("</td><td>"); ! if(function_exists("identify_platform")){ ! echo(identify_platform($log->Browser)); ! } ! echo("</td></tr>"); } ?> |
From: <xt...@us...> - 2003-10-01 00:03:22
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1:/tmp/cvs-serv484 Modified Files: first.php Log Message: Fix bug pointed out by Greg about sessions being closed before giving module includes a chance to modify the sessions. Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** first.php 13 Sep 2003 15:31:45 -0000 1.23 --- first.php 1 Oct 2003 00:03:14 -0000 1.24 *************** *** 103,108 **** } - session_write_close(); - \$headers = \"\"; --- 103,106 ---- |
From: <i-...@us...> - 2003-09-30 23:48:06
|
Update of /cvsroot/openfirst/logger/setup In directory sc8-pr-cvs1:/tmp/cvs-serv30441/logger/setup Modified Files: setup.mysql Log Message: Added 1 more table. Required for browser stats. Index: setup.mysql =================================================================== RCS file: /cvsroot/openfirst/logger/setup/setup.mysql,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** setup.mysql 23 Aug 2003 19:50:17 -0000 1.9 --- setup.mysql 30 Sep 2003 23:48:00 -0000 1.10 *************** *** 1,3 **** CREATE TABLE IF NOT EXISTS `ofirst_logger` (`ID` int(6) unsigned NOT NULL auto_increment, `IPAddress` tinytext, `Date` tinytext, `Location` tinytext, `QueryString` tinytext, `HostLookup` tinytext, `Browser` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; ALTER TABLE ofirst_logger ADD column Member TEXT; ! INSERT INTO ofirst_config SET modulename='logger',showonmenu='0',active='0',adminnavigation='<a href="$basepath/logger/reset.php">Reset Logger</a> | <a href="$basepath/logger/rawdata.php">Raw Data</a>',includes='logger.php'; --- 1,4 ---- CREATE TABLE IF NOT EXISTS `ofirst_logger` (`ID` int(6) unsigned NOT NULL auto_increment, `IPAddress` tinytext, `Date` tinytext, `Location` tinytext, `QueryString` tinytext, `HostLookup` tinytext, `Browser` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; + CREATE TABLE IF NOT EXISTS `ofirst_hitcount` (`ID` int(6) unsigned NOT NULL auto_increment,`Name` tinytext NOT NULL, `Value` int(6) unsigned, PRIMARY KEY (`ID`)) TYPE=MyISAM; ALTER TABLE ofirst_logger ADD column Member TEXT; ! INSERT INTO ofirst_config SET modulename='logger',showonmenu='0',active='0',adminnavigation='<a href="$basepath/logger/reset.php">Reset Logger</a> | <a href="$basepath/logger/rawdata.php">Raw Data</a>',modulenavigation='<a href="$basepath/logger/index.php">Logger</a> | <a href="$basepath/logger/stats.php">Usage Statistics</a>',includes='logger.php'; |
From: <i-...@us...> - 2003-09-30 23:47:58
|
Update of /cvsroot/openfirst/logger/setup In directory sc8-pr-cvs1:/tmp/cvs-serv30420/logger/setup Modified Files: setup.mssql Log Message: Added 1 more table. Required for browser stats. Index: setup.mssql =================================================================== RCS file: /cvsroot/openfirst/logger/setup/setup.mssql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** setup.mssql 23 Aug 2003 20:30:12 -0000 1.1 --- setup.mssql 30 Sep 2003 23:47:50 -0000 1.2 *************** *** 1,3 **** CREATE TABLE IF NOT EXISTS `ofirst_logger` (`ID` int(6) unsigned NOT NULL auto_increment, `IPAddress` tinytext, `Date` tinytext, `Location` tinytext, `QueryString` tinytext, `HostLookup` tinytext, `Browser` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; ALTER TABLE ofirst_logger ADD column Member TEXT; ! INSERT INTO ofirst_config SET modulename='logger',showonmenu='0',active='0',adminnavigation='<a href="$basepath/logger/reset.php">Reset Logger</a> | <a href="$basepath/logger/rawdata.php">Raw Data</a>',includes='logger.php'; --- 1,4 ---- CREATE TABLE IF NOT EXISTS `ofirst_logger` (`ID` int(6) unsigned NOT NULL auto_increment, `IPAddress` tinytext, `Date` tinytext, `Location` tinytext, `QueryString` tinytext, `HostLookup` tinytext, `Browser` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; + CREATE TABLE IF NOT EXISTS `ofirst_hitcount` (`ID` int(6) unsigned NOT NULL auto_increment,`Name` tinytext NOT NULL, `Value` int(6) unsigned, PRIMARY KEY (`ID`)) TYPE=MyISAM; ALTER TABLE ofirst_logger ADD column Member TEXT; ! INSERT INTO ofirst_config SET modulename='logger',showonmenu='0',active='0',adminnavigation='<a href="$basepath/logger/reset.php">Reset Logger</a> | <a href="$basepath/logger/rawdata.php">Raw Data</a>',modulenavigation='<a href="$basepath/logger/index.php">Logger</a> | <a href="$basepath/logger/stats.php">Usage Statistics</a>',includes='logger.php'; |
From: <i-...@us...> - 2003-09-30 23:46:42
|
Update of /cvsroot/openfirst/logger In directory sc8-pr-cvs1:/tmp/cvs-serv30212/logger Modified Files: track.php Log Message: Added 2 columns: browser and platform. Requires config/functions/browserid.php. Index: track.php =================================================================== RCS file: /cvsroot/openfirst/logger/track.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** track.php 23 Aug 2003 20:30:12 -0000 1.8 --- track.php 30 Sep 2003 23:46:38 -0000 1.9 *************** *** 50,66 **** <th>Member</th> <th>Options</th> </tr> <? while($log = ofirst_dbfetch_object($query)) { echo "<tr>"; ! echo " <td>$log->ID</td>"; ! echo " <td>$log->Date</td>"; ! echo " <td>$log->IPAddress</td>"; ! echo " <td>$log->HostLookup</td>"; ! echo " <td>$log->Location</td>"; ! echo " <td>$log->QueryString</td>"; if($log->Member != "null"){ echo " <td>$log->Member</td>"; }else{ echo "<td>NULL</td>"; } ! echo " <td>[ <a href='./?DELETE=$log->ID'>Delete</a> ]</td>"; ! echo "</tr>"; } ?> --- 50,70 ---- <th>Member</th> <th>Options</th> + <th>Browser</th> + <th>Platform</th> </tr> <? while($log = ofirst_dbfetch_object($query)) { echo "<tr>"; ! echo " <td>$log->ID</td>"; ! echo " <td>$log->Date</td>"; ! echo " <td>$log->IPAddress</td>"; ! echo " <td>$log->HostLookup</td>"; ! echo " <td>$log->Location</td>"; ! echo " <td>$log->QueryString</td>"; if($log->Member != "null"){ echo " <td>$log->Member</td>"; }else{ echo "<td>NULL</td>"; } ! echo " <td>[ <a href='./?DELETE=$log->ID'>Delete</a> ]</td>"; ! echo " <td>".identify_browser($log->Browser)."</td>"; ! echo " <td>".identify_platform($log->Browser)."</td>"; ! echo "</tr>"; } ?> *************** *** 69,71 **** <?php include("$footer"); ! ?> \ No newline at end of file --- 73,75 ---- <?php include("$footer"); ! ?> |
From: <i-...@us...> - 2003-09-30 23:45:33
|
Update of /cvsroot/openfirst/logger In directory sc8-pr-cvs1:/tmp/cvs-serv30009/logger Modified Files: logger.php Log Message: Added user counter code. Also logs hits by useragent. Requires table ofirst_hitcount. Index: logger.php =================================================================== RCS file: /cvsroot/openfirst/logger/logger.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** logger.php 23 Aug 2003 20:30:12 -0000 1.6 --- logger.php 30 Sep 2003 23:45:29 -0000 1.7 *************** *** 54,56 **** ,'".$MEMBER."')") or die(ofirst_dberror()); ! ?> \ No newline at end of file --- 54,122 ---- ,'".$MEMBER."')") or die(ofirst_dberror()); ! //Total Pages Served counter ! ! //Get current value and increment ! $totalpg=get_totalpages()+1; ! if ($totalpg==1){ ! //First hit ever - add record to table ! ofirst_dbquery("INSERT INTO ofirst_hitcount (Name,Value) values ('totalpages','1');"); ! } ! else { ! //Write new value to DB ! ofirst_dbquery('UPDATE ofirst_hitcount SET Value="'.$totalpg.'" WHERE Name="totalpages";'); ! } ! unset($totalpg); ! ! //Visitor counter ! ! if(!isset($_SESSION["FirstHit"])){ ! //Set session var for this visitor ! $_SESSION["FirstHit"]=1; ! ! //Get current value and increment ! $total=get_visitors()+1; ! if ($total==1){ ! //First hit ever - add record to table ! ofirst_dbquery("INSERT INTO ofirst_hitcount (Name,Value) values ('total','1');"); ! } ! else { ! //Write new value to DB ! ofirst_dbquery('UPDATE ofirst_hitcount SET Value="'.$total.'" WHERE Name="total";'); ! } ! ! //Browser individual hit counter ! $query=ofirst_dbquery('SELECT Value FROM ofirst_hitcount WHERE Name="'.$BROWSER.'"'); ! //Get current value ! $total=ofirst_dbfetch_object($query); ! //Increment ! $total=($total->Value)+1; ! if ($total==1){ ! //First hit by this useragent - add record to table ! ofirst_dbquery("INSERT INTO ofirst_hitcount (Name,Value) values ('".$BROWSER."','1');"); ! } ! else { ! //Write new value to DB ! ofirst_dbquery('UPDATE ofirst_hitcount SET Value="'.$total.'" WHERE Name="'.$BROWSER.'";'); ! } ! unset($total); ! } ! ! ! function get_visitors() ! { ! $query=ofirst_dbquery('SELECT Value FROM ofirst_hitcount WHERE Name="total"'); ! //Get current value ! $visits=ofirst_dbfetch_object($query); ! //Return ! return ($visits->Value); ! } ! ! function get_totalpages() ! { ! $query=ofirst_dbquery('SELECT Value FROM ofirst_hitcount WHERE Name="totalpages"'); ! //Get current value ! $visits=ofirst_dbfetch_object($query); ! //Return ! return ($visits->Value); ! } ! ?> |
From: <i-...@us...> - 2003-09-30 23:41:43
|
Update of /cvsroot/openfirst/logger In directory sc8-pr-cvs1:/tmp/cvs-serv29370/logger Added Files: stats.php Log Message: New file. Displays statistical data and a usage graph. --- NEW FILE: stats.php --- <?php /* * openFIRST.logger - stats.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Greg Inozemtsev <gr...@si...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ include("../config/globals.php"); 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 or visit <a href="http://www.boutell.com/gd/" target="_blank">GDlib homepage</a> 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()); } else { echo ("User counter not installed"); } ?> </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); $browsers=array(); $platforms=array(); $total=0; if ($useragents != 0){ while($useragent = ofirst_dbfetch_object($query)){ $browser=$useragent->Name; if($browser=="total"){ $total=$useragent->Value; } else{ if($browser!="totalpages"){ $browse=identify_browser($useragent->Name); if(isset($browsers[$browse])){ $browsers[$browse]+=$useragent->Value; } else { $browsers[$browse]=$useragent->Value; } $platform=identify_platform($useragent->Name); if(isset($platforms[$platform])){ $platforms[$platform]+=$useragent->Value; } else { $platforms[$platform]=$useragent->Value; } } } } } ?> <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>"); echo('<tr><td colspan=2 align=right><img src="'.$basepath.'/images/back.gif" height=6 width='.round(($value/$total)*150).'></td></tr>'); } ?> <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>"); echo('<tr><td colspan=2 align=right><img src="'.$basepath.'/images/back.gif" height=6 width='.round(($value/$total)*150).'></td></tr>'); } ?> <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"); ?> |
From: <i-...@us...> - 2003-09-30 23:32:39
|
Update of /cvsroot/openfirst/logger/backgrounds In directory sc8-pr-cvs1:/tmp/cvs-serv27891/logger/backgrounds Added Files: back.png Log Message: Sample background for the graph. This will be changed later. --- NEW FILE: back.png --- (This appears to be a binary file; contents omitted.) |
From: <i-...@us...> - 2003-09-30 23:30:37
|
Update of /cvsroot/openfirst/logger In directory sc8-pr-cvs1:/tmp/cvs-serv27522/logger Added Files: graph.php Log Message: New file. Creates the usage statistics graph. --- NEW FILE: graph.php --- <?php /* * openFIRST.logger - graph.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Greg Inozemtsev <gr...@si...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ //include database functions include("../config/globals.php"); //set header header("Content-type: image/png"); //create image resource $im=load_png("./backgrounds/back.png"); //image width and height $height=imagesy($im); $width=imagesx($im); //colours $text_color = imagecolorallocate($im, 233, 14, 91); //graph: RGB, modify if necessary $axis_color = imagecolorallocate($im, 0, 0, 0); //axis, scale: RGB, modify if necessary //axis labels imagestring($im, 1, $width-150, $height-8, "Generated by openFIRST Logger", $axis_color); imagestring($im, 2, $width/2-10, $height-11, "Date", $axis_color); imagestringup($im, 2, 2, $height/2+10, "Hits", $axis_color); //y-axis imageline($im, 15,5,15,$height-25,$axis_color); //x-axis imageline($im, 15,$height-25,$width-5,$height-25,$axis_color); //Get graph type if(isset($_GET["graph"])){ $graphtype=$_GET["graph"]; } else { //default to weekly graph $graphtype=1; } //number of labels on y-axis (hits) $ylabels=5; //set variables according to type //(Note: set $labelskip=0 to remove all labels) switch($graphtype){ //monthly case 2: { $graphtitle="Monthly Usage"; $labelskip=6; $labelformat="%a %b %d"; //total days to graph (counting from 0) $days=30; break; } //yearly case 3: { $graphtitle="Yearly Usage"; $labelskip=49; $labelformat="%b %Y"; //total days to graph (counting from 0) $days=366; break; } //weekly default: { $graphtitle="Weekly Usage"; //print every label $labelskip=1; $labelformat="%a %b %d"; //total days to graph (counting from 0) $days=6; break; } } //create the graph //x scale $dx=($width-20)/($days+1); //print graph title imagestring($im, 4, 50, 2, $graphtitle, $axis_color); //this section gets data from Logger DB table $usedata=array(); for($i=0;$i<=$days;$i++) { //get date (86400 seconds in a day) $unixtime=time()-86400*($days-$i); //get month $date=strftime("%B",$unixtime); //fix for PHP running on Win32 (%e not supported by strftime) $day=strftime("%d",$unixtime); //check for single-digit day if (substr($day,0,1)=="0"){ //remove leading 0 $day=substr($day,1,1); } //complete date in "Logger" format, except the time $date.=" ".$day.", ".strftime("%Y",$unixtime); //Uses INSTR for partial comparison. May not work with all databases. $query = ofirst_dbquery("SELECT * FROM ofirst_logger WHERE (INSTR(Date,'".$date."')!=0)"); //number of hits that day $usedata[$i] = ofirst_dbnum_rows($query); //see how many labels to skip if((($i % $labelskip)==0)&&($labelskip!=0)){ //label on the axis imagestring ($im, 1, 10+$dx*$i, ($height-20), strftime($labelformat,$unixtime), $axis_color); } } //find maximum value $max=max($usedata); //find the y scale $step=round($max/$ylabels); $scale=0; while($scale<=$step){ $scale+=50; } //draw the y scale for($i=0;$i<=$max+$dx;$i+=$scale){ imagestring ($im, 1, 17, ($height-33)-(($height-50)*($i/$max)), $i, $axis_color); } //plot the data $i=0; //initial position $px=16; $py=$height-26-$usedata["0"]; foreach ($usedata as $hits) { $x=20+$dx*$i; //y-coordinate of point (scale up to max hits) $y=($height-26)-(($height-50)*($hits/$max)); //draw the graph segment imageline($im, $px,$py, $x, $y,$text_color); if((($i % $labelskip)==0)&&($labelskip!=0)) { //print point label imagestring ($im, 1, $x-5, $y-10, $hits, $text_color); } //save previous x and y $px=$x; $py=$y; //next point $i++; } //unset the array unset($usedata); //send image to browser imagepng ($im); //destroy image resource imagedestroy ($im); ?> <?php //This function loads PNG file into an image resource. If the file does not //exist, creates a blank image. Based on php.net example code. function load_png($imgname) { $image = @imagecreatefrompng ($imgname); // Attempt to open // See if it failed if (!$image) { // Create a blank image $image = imagecreate (500, 300); //fill with white imagecolorallocate ($image, 255, 255, 255); } return $image; } ?> |
From: <i-...@us...> - 2003-09-30 16:33:54
|
Update of /cvsroot/openfirst/logger/backgrounds In directory sc8-pr-cvs1:/tmp/cvs-serv2330/backgrounds Log Message: Directory /cvsroot/openfirst/logger/backgrounds added to the repository |
From: <xt...@us...> - 2003-09-30 12:00:25
|
Update of /cvsroot/openfirst/news In directory sc8-pr-cvs1:/tmp/cvs-serv6615 Modified Files: rssfeed.php Log Message: Add an actual link where it says there should be one. Index: rssfeed.php =================================================================== RCS file: /cvsroot/openfirst/news/rssfeed.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rssfeed.php 28 Sep 2003 15:30:57 -0000 1.1 --- rssfeed.php 30 Sep 2003 12:00:19 -0000 1.2 *************** *** 32,36 **** <p>Stay up-to-date with the latest information released directly from our teams<br> very own news system using RSS technology. If you are unsure of how to use<br> ! RSS technology then please visit this link to learn more.</p> <?php if(isset($_POST['get'])){ --- 32,37 ---- <p>Stay up-to-date with the latest information released directly from our teams<br> very own news system using RSS technology. If you are unsure of how to use<br> ! RSS technology then please view the <a href="http://blogs.law.harvard.edu/tech/rss">RSS 2.0 Specification</a> ! to learn more.</p> <?php if(isset($_POST['get'])){ *************** *** 89,91 **** <?php include($footer); ! ?> \ No newline at end of file --- 90,92 ---- <?php include($footer); ! ?> |
From: <xt...@us...> - 2003-09-30 11:48:21
|
Update of /cvsroot/openfirst/news/setup In directory sc8-pr-cvs1:/tmp/cvs-serv4124 Modified Files: setup.mssql setup.mysql Log Message: Fix typo, bring MSSQL setup script in sync with MySQL setup script. Index: setup.mssql =================================================================== RCS file: /cvsroot/openfirst/news/setup/setup.mssql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** setup.mssql 23 Aug 2003 20:25:13 -0000 1.1 --- setup.mssql 30 Sep 2003 11:48:16 -0000 1.2 *************** *** 1,3 **** CREATE TABLE IF NOT EXISTS `ofirst_news` (`ID` int(6) unsigned NOT NULL auto_increment, `date` TINYTEXT, `poster` TINYTEXT, `title` TINYTEXT, `news` TEXT, PRIMARY KEY (`ID`)) Type=MyISAM; ALTER TABLE ofirst_news ADD COLUMN image TEXT; ! INSERT INTO ofirst_config SET modulename='news',showonmenu='0',active='0',adminnavigation='<a href="$basepath/news/admin/">Admin Main</a>',modulenavigation='<a href="$basepath/news/">Current News</a>',includes='viewnews.php'; --- 1,4 ---- CREATE TABLE IF NOT EXISTS `ofirst_news` (`ID` int(6) unsigned NOT NULL auto_increment, `date` TINYTEXT, `poster` TINYTEXT, `title` TINYTEXT, `news` TEXT, PRIMARY KEY (`ID`)) Type=MyISAM; ALTER TABLE ofirst_news ADD COLUMN image TEXT; ! CREATE TABLE `ofirst_news_comments` (`ID` tinyint(3) unsigned NOT NULL default '0', `Author` TEXT, `EMail` TINYTEXT, `Website` TINYTEXT, `Comment` TEXT, `Date` TEXT, PRIMARY KEY (`ID`)) TYPE=MyISAM; ! INSERT INTO ofirst_config SET modulename='news',showonmenu='0',active='0',adminnavigation='<a href="$basepath/news/admin/">Edit News</a>',modulenavigation='<a href="$basepath/news/">Current News</a> | <a href="$basepath/news/rssfeed.php">Stream our News</a>',includes='viewnews.php'; Index: setup.mysql =================================================================== RCS file: /cvsroot/openfirst/news/setup/setup.mysql,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** setup.mysql 28 Sep 2003 16:25:08 -0000 1.6 --- setup.mysql 30 Sep 2003 11:48:16 -0000 1.7 *************** *** 2,4 **** ALTER TABLE ofirst_news ADD COLUMN image TEXT; CREATE TABLE `ofirst_news_comments` (`ID` tinyint(3) unsigned NOT NULL default '0', `Author` TEXT, `EMail` TINYTEXT, `Website` TINYTEXT, `Comment` TEXT, `Date` TEXT, PRIMARY KEY (`ID`)) TYPE=MyISAM; ! INSERT INTO ofirst_config SET modulename='news',showonmenu='0',active='0',adminnavigation='<a href="$basepath/news/admin/">Edit News</a>',modulenavigation='<a href="$basepath/news/">Current News</a> | <a href="$basepath/news/rssfeed.php">Steam our News</a>',includes='viewnews.php'; --- 2,4 ---- ALTER TABLE ofirst_news ADD COLUMN image TEXT; CREATE TABLE `ofirst_news_comments` (`ID` tinyint(3) unsigned NOT NULL default '0', `Author` TEXT, `EMail` TINYTEXT, `Website` TINYTEXT, `Comment` TEXT, `Date` TEXT, PRIMARY KEY (`ID`)) TYPE=MyISAM; ! INSERT INTO ofirst_config SET modulename='news',showonmenu='0',active='0',adminnavigation='<a href="$basepath/news/admin/">Edit News</a>',modulenavigation='<a href="$basepath/news/">Current News</a> | <a href="$basepath/news/rssfeed.php">Stream our News</a>',includes='viewnews.php'; |
From: <dav...@us...> - 2003-09-29 23:44:40
|
Update of /cvsroot/openfirst/projects In directory sc8-pr-cvs1:/tmp/cvs-serv16257 Modified Files: index.php Log Message: Added link to manual. Index: index.php =================================================================== RCS file: /cvsroot/openfirst/projects/index.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** index.php 13 Sep 2003 20:48:38 -0000 1.11 --- index.php 29 Sep 2003 23:44:30 -0000 1.12 *************** *** 136,141 **** ! <br> ! <?php } --- 136,142 ---- ! <p>[ <a href="<?php echo $home.$basepath; ?>/manual/openfirst.projects/projects.php#howto">Project Help Manual</a> ! ]<br> ! <?php } *************** *** 143,144 **** --- 144,146 ---- ?> + </p> |