Changeset 370 for dev/common/kills.php

Show
Ignore:
Timestamp:
06/14/09 06:51:49 (13 years ago)
Author:
kovell
Message:

- SQL queries optimised for speed and error protection.
- feed syndication optimised
- front page includes optional clock and optional kill/loss display
- mysqli support added
- transaction protection of kills added where supported (mysqli and InnoDB)
- summary tables and contracts show total destroyed value instead of ship value
- html errors reduced
- related kill calculation improved
- query caching errors reduced
- minor bugfixes
- Smarty 2.6.25 added
- apoc fitting mod added and modded
- code optimisations
- code comments added (doxygen format)
- conflicting mods are now identified

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/kills.php

    r368 r370  
    11<?php 
     2// Kills page. Display a list of most recent kills and the top killers for  
     3// the week 
    24require_once('common/includes/class.corp.php'); 
    35require_once('common/includes/class.alliance.php'); 
     
    1719    $year = getYear(); 
    1820 
    19 if ($week == 52) 
     21if ($week == 53) 
    2022{ 
    2123    $nweek = 1; 
     
    3032if ($week == 1) 
    3133{ 
    32     $pweek = 52; 
     34    $pweek = 53; 
    3335    $pyear = $year - 1; 
    3436} 
     
    4143$page = new Page("Kills - Week ".$week); 
    4244 
     45// Build summary table 
    4346$kslist = new KillList(); 
    4447$kslist->setWeek($week); 
     
    6265} 
    6366 
     67// Build table of recent kills 
    6468$klist = new KillList(); 
    6569$klist->setOrdered(true); 
     70if (config::get('comments_count')) $klist->setCountComments(true); 
     71if (config::get('killlist_involved')) $klist->setCountInvolved(true); 
    6672$klist->setWeek($week); 
    6773$klist->setYear($year); 
    6874involved::load($klist,'kill'); 
    6975if ($_GET['scl_id']) 
    70     $klist->addVictimShipClass(new ShipClass($_GET['scl_id'])); 
     76    $klist->addVictimShipClass(intval($_GET['scl_id'])); 
    7177else 
    7278    $klist->setPodsNoobShips(false); 
     
    7985 
    8086$page->setContent($html); 
     87 
     88// Create side menu 
    8189$menubox = new box("Menu"); 
    8290$menubox->setIcon("menu-item.gif"); 
     
    8997$page->addContext($menubox->generate()); 
    9098 
     99// Create top kills list 
    91100$tklist = new TopKillsList(); 
    92101$tklist->setWeek($week); 
     
    98107$page->addContext($tkbox->generate()); 
    99108 
     109// If 'kill_points' is set, create top scores list 
    100110if (config::get('kill_points')) 
    101111{