[Openfirst-cvscommit] logger index.php,NONE,1.1
Brought to you by:
xtimg
From: <dav...@us...> - 2003-06-08 02:23:11
|
Update of /cvsroot/openfirst/logger In directory sc8-pr-cvs1:/tmp/cvs-serv17441 Added Files: index.php Log Message: initial upload --- NEW FILE: index.php --- <?php /* * openFIRST.logger - index.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Tim Ginn <tim...@po...> * * 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"); mysql_select_db("openFIRST",$sqlconnection); if (ISSET($_POST['view'])){ $min = $_POST['min']; $max = $_POST['max']; }else{ $min = 0; $max = 50; } if (ISSET($_GET['DELETE'])){ mysql_query("DELETE FROM ofirst_logger WHERE IPAddress = '".$_GET['DELETE']."'") or die(mysql_error()); } $query = mysql_query("SELECT * FROM ofirst_logger GROUP BY IPAddress LIMIT $min,$max"); $amount = mysql_num_rows($query); ?> <h1>View Log Information</h1> <p>[ <a href="viewLog.php">Track User Movement </a>] [<a href="rawdata.php"> View Raw Hits</a> ] [ <a href="reset.php">Reset Logger</a> ]</p> <p> <form action="viewLog.php" method="POST"> <input name="min" type="text" id="min" value="<?php echo $min; ?>" size="10"> to <input name="max" type="text" id="max" value="<?php echo $max; ?>" size="10"> <input name="view" type="submit" id="view" value="View"> (<strong><?php echo $amount; ?></strong> total unique visitors) </form></p> <div align="center"><font size="2">This page previews grouped unique visitors. If you wish to view the exact location that the user has visited click<br> the track button below:<br> </font><br> </div> <table width="100%" border="1" cellpadding="1" cellspacing="0" bordercolor="#999999"> <tr bgcolor="#999999"> <td width="6%"> <div align="center">ID</div></td> <td width="20%"> <div align="center">Date</div></td> <td width="20%"> <div align="center">IP Address</div></td> <td width="30%"> <div align="center">Host Lookup</div></td> <td width="30%"> <div align="center">Option</div></td> </tr> <? while($log = mysql_fetch_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>[ <a href='viewLog.php?DELETE=$log->IPAddress'>Delete</a> ] [ <a href='track.php?ID=$log->IPAddress'>Track</a> ]</td>"; echo "</tr>"; } ?></tr> </table> <p> <?php include("$footer"); ?> |