Changeset 118 for trollforge
- Timestamp:
- 11/30/05 14:26:36 (7 years ago)
- File:
-
- 1 edited
-
trollforge/lastmeasure/stats/index.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trollforge/lastmeasure/stats/index.php
r117 r118 3 3 $id = dba_open('../db/hit.db', 'c', 'db4'); 4 4 if(!$id) { 5 echo '< li style="color:red;">Failed to open database!</li>';5 echo '<tr><td colspan="5" style="background-color: #f66;">Failed to open database!</td></tr>'; 6 6 return; 7 7 } 8 8 $key = dba_firstkey($id); 9 9 if($key == false) { 10 echo '< li style="color:red;">No hits found!</li>';10 echo '<tr><td colspan="5" style="background-color: #f66;">No hits found!</td></tr>'; 11 11 return; 12 12 } … … 15 15 list($ip, $port, $hostname, $uagent, 16 16 $referer, $user, $clipboard) = explode(' ', $val); 17 $str = "<li>"; 18 $str .= date('Y-m-d H:i:s', -1 - hexdec(substr($key, 0, 8))); 19 $str .= " $ip:$port ($hostname)"; 20 $str .= " referer: " . base64_decode($referer); 21 $str .= " user: " . base64_decode($user); 22 $str .= " clipboard: " . base64_decode($clipboard); 23 $str .= "</li>"; 17 $str = '<tr>'; 18 $str .= '<td>' . date('Y-m-d H:i:s', -1 - hexdec(substr($key, 0, 8))) . '</td>'; 19 $str .= '<td>' . $ip . ':' . $port; 20 if($hostname) $str .= ' ('.$hostname.')'; 21 $str .= '</td>'; 22 $str .= '<td>' . base64_decode($referer) . '</td>'; 23 $str .= '<td>' . base64_decode($user) . '</td>'; 24 $str .= '<td>' . base64_decode($clipboard) . '</td>'; 25 $str .= '</tr>'; 24 26 echo $str; 25 27 $key = dba_nextkey($id); … … 87 89 <p> Attempt at some lmstats. Unfinished. </p> 88 90 <p> Hits: </p> 91 <table style="border: solid black 1px;"> 92 <tr style="background-color: #8af;"> 93 <td>Date</td><td>Host</td><td>Referer</td><td>User</td><td>Clipboard</td> 94 </tr> 95 </table> 96 89 97 <ul><?php print_hits(); ?></ul> 90 98 <p> Browsers: </p>
Note: See TracChangeset
for help on using the changeset viewer.
