root/original/common/audit.php

Revision 1, 1.6 KB (checked in by andrewgunn, 14 years ago)

Added original EVE-Killboard.net source code.

Line 
1<?
2  require_once( "page.php" );
3  require_once( "db.php" );
4 
5  global $site;
6
7  $sql = "select log_kll_id, log_ip_address, log_timestamp, kll_timestamp, plt_name
8            from kb3_log log, _".KB_SITE."_kills kll, kb3_pilots plt
9          where log.log_kll_id = kll.kll_id
10            and plt.plt_id = kll.kll_victim_id
11      and kll.kll_site = '".KB_SITE."'
12          order by log_timestamp desc limit 250";
13
14  $dbconn = new DBConnection();
15
16  $qry = new DBQuery( $dbconn, $sql );
17  $qry->execute() or die( $qry->getErrorMsg() );
18
19  $html .= "<table class=kb-table>";
20  $html .= "<tr class=kb-table-header><td align=center width=60>ID</td><td width=150>Posted</td><td align=center width=120>IP Address</td><td width=150>Killmail date</td><td width=150>Victim</td></tr>";
21  $odd = false;
22  while ( $row = $qry->getRow() ) {
23    if ( $odd ) {
24      $class = "kb-table-row-even";
25      $odd = false;
26    } else {
27      $class = "kb-table-row-odd";
28      $odd = true;
29    }
30    $html .= "<tr class=".$class." style=\"cursor: pointer;\" onmouseover=\"this.className='kb-table-row-hover';\" onmouseout=\"this.className='".$class."';\" onClick=\"window.location.href='?a=kill_detail&kll_id=".$row['log_kll_id']."';\">";
31    $html .= "<td align=center><b>".$row['log_kll_id']."</b></td>";
32    $html .= "<td>".$row['log_timestamp']."</td>";
33    $html .= "<td align=center>".$row['log_ip_address']."</td>";
34    $html .= "<td>".$row['kll_timestamp']."</td>";
35    $html .= "<td>".$row['plt_name']."</td>";
36    $html .= "</tr>";
37  }
38  $html .= "</table>";
39
40  $page = new Page( "Audit log" );
41  $page->generate( $html );
42       
43?>
Note: See TracBrowser for help on using the browser.