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>");
}
?>
|