Changeset 190

Show
Ignore:
Timestamp:
03/16/07 17:12:55 (14 years ago)
Author:
exi
Message:

This is a big update...
Moved all admin scripts to common/admin.
Moved all includes and classes to common/includes.
Edited all include-paths to reflect the movement.
Fixed a bug with the session system allowing every registered user to access admin pages.
Replaced calls to date() to use a wrapper so gmdate can be used.
Replaced some calls to $config with calls to the static object.
Fixed a big which caused the portrait_grab to not download a new picute.
Added a classified-state to kills.
Removed the sync_server server script in this tree.
Added code to help modules find the includes to index.php.

Location:
dev
Files:
62 added
58 removed
39 modified

Legend:

Unmodified
Added
Removed
  • dev/README.txt

    r139 r190  
    1 This is the EDK - EVE Development Network Killboard v1.2 
     1This is the EDK - EVE Development Network Killboard v1.3 - Tigerduck Memorial Edition 
    22 
    33Check out the EVE-Development Network for support,  
    44bugfixes and new versions at www.eve-dev.net... 
    55Developers wanted! 
    6 If you'd like to contibute to further version of this killboard, sign up for the EVE-Dev forums! 
     6If you'd like to contribute to further version of this killboard, sign up for the EVE-Dev forums! 
    77 
    88Requirements: 
  • dev/common/about.php

    r98 r190  
    11<?php 
    2 require_once("db.php"); 
    3 require_once("class.page.php"); 
    4 require_once("class.ship.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.ship.php'); 
    54 
    6 $page = new Page("About"); 
     5$page = new Page('About'); 
    76 
    8 $html .= "<div class=block-header2>The Killboard</div>"; 
     7// i store the names here for an easy edit 
     8$developer = array('exi (Lead Developer)', 
     9                   'knifee (Developer)', 
     10                   'Andrew Gunn (Siteadmin)', 
     11                   'Ganja (Fluff girl)'); 
     12 
     13$contributor = array('JaredC01', 
     14                     'liquidism', 
     15                     'ralle030583', 
     16                     'Mitchman', 
     17                     'Coni', 
     18                     'beansman'); 
     19sort($contributor); 
     20 
     21$html .= '<div class=block-header2>The Killboard</div>'; 
    922 
    1023// Please leave the information on the next line as is so that other people can easily find the EVE-Dev website. 
    1124// Remember to share any modifications to the EVE-Dev Killboard. 
    12 $html .= "This is the EVE Development Network Killboard running version 1.2, created for <a href=\"http://www.eve-online.com/\">EVE Online</a> corporations and alliances.<br/>Based on the EVE-Killboard created by <a href=\"mailto:rig0r@eve-killboard.net\">rig0r</a> it is now developed and maintained by the <a href=\"http://www.eve-dev.net/\">EVE-Dev</a> group.<br/>All EVE graphics and data used are property of <a href=\"http://www.ccpgames.com/\">CCP</a>.<br/><br/>"; 
     25$html .= "This is the EVE Development Network Killboard running version 1.3 (Tigerduck Memorial Edition), created for <a href=\"http://www.eve-online.com/\">EVE Online</a> corporations and alliances.<br/>" 
     26        ."Based on the EVE-Killboard created by <a href=\"mailto:rig0r@eve-killboard.net\">rig0r</a> it is now developed and maintained by the <a href=\"http://www.eve-dev.net/\">EVE-Dev</a> group.<br/>" 
     27        ."All EVE graphics and data used are property of <a href=\"http://www.ccpgames.com/\">CCP</a>.<br/><br/>"; 
     28$html .= '<a href="http://www.eve-dev.net/" target="_blank"><img src="http://www.eve-dev.net/e107_images/evedev_button.png" border="0"/></a><br/><br/>'; 
     29 
     30$html .= '<b>Staff:</b><br/>'; 
     31$html .= join(', ', $developer); 
     32$html .= '<br/><br/><b>Contributors:</b><br/>'; 
     33$html .= join(', ', $contributor); 
     34$html .= '<br/><br/>'; 
     35 
    1336$qry = new DBQuery(); 
    1437$qry->execute("select count(*) as cnt from kb3_kills"); 
     
    2750$row = $qry->getRow(); 
    2851$alliances = $row['cnt']; 
     52 
    2953// $html .= "<div class=block-header2>Killboard stats</div>"; 
    3054$html .= "This killboard currently contains: <b>" . number_format($kills, 0, ',', '.') . "</b> killmails, <b>" . number_format($items, 0, ',', '.') . "</b> destroyed items, <b>" . number_format($pilots, 0, ',', '.') . "</b> pilots, <b>" . number_format($corps, 0, ',', '.') . "</b> corporations and <b>" . number_format($alliances, 0, ',', '.') . "</b> alliances.<br><br>"; 
    31 $html .= '<a href="http://www.eve-dev.net/" target="_blank"><img src="http://www.eve-dev.net/e107_images/evedev_button.png" border="0"/></a><br/><br/>'; 
    3255 
    3356$html .= "<div class=block-header2>Portraits</div>"; 
     
    85108} 
    86109 
    87 if ($config->getConfig('ship_values')) 
     110if (config::get('ship_values')) 
    88111{ 
    89112    $sql = 'select kbs.shp_id as id, shp.shp_name, kbs.shp_value, 
  • dev/common/alliance_detail.php

    r172 r190  
    11<?php 
    2 require_once("db.php"); 
    3 require_once("class.page.php"); 
    4 require_once("class.corp.php"); 
    5 require_once("class.alliance.php"); 
    6 require_once("class.killlist.php"); 
    7 require_once("class.killlisttable.php"); 
    8 require_once("class.killsummarytable.php"); 
    9 require_once("class.box.php"); 
    10 require_once("class.toplist.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.corp.php'); 
     4require_once('common/includes/class.alliance.php'); 
     5require_once('common/includes/class.killlist.php'); 
     6require_once('common/includes/class.killlisttable.php'); 
     7require_once('common/includes/class.killsummarytable.php'); 
     8require_once('common/includes/class.toplist.php'); 
    119 
    1210$all_id = $_GET['all_id']; 
    1311$alliance = new Alliance(intval($all_id)); 
    14 $page = new Page("Alliance details - " . $alliance->getName()); 
     12$page = new Page('Alliance details - '.$alliance->getName()); 
    1513 
    1614$html .= "<table class=kb-table width=\"100%\" border=\"0\" cellspacing=1><tr class=kb-table-row-even><td rowspan=8 width=128 align=center bgcolor=black>"; 
     
    129127        $list->addInvolvedAlliance($alliance); 
    130128        $list->setPodsNoobShips(false); 
    131         $list->setMonth(date("m")); 
    132         $list->setYear(date("Y")); 
     129        $list->setMonth(kbdate("m")); 
     130        $list->setYear(kbdate("Y")); 
    133131        $table = new TopCorpTable($list, "Kills"); 
    134132        $html .= $table->generate(); 
     
    155153        $list->addVictimAlliance($alliance); 
    156154        $list->setPodsNoobShips(false); 
    157         $list->setMonth(date("m")); 
    158         $list->setYear(date("Y")); 
     155        $list->setMonth(kbdate("m")); 
     156        $list->setYear(kbdate("Y")); 
    159157        $table = new TopCorpTable($list, "Losses"); 
    160158        $html .= $table->generate(); 
     
    181179        $list->addInvolvedAlliance($alliance); 
    182180        $list->setPodsNoobShips(false); 
    183         $list->setMonth(date("m")); 
    184         $list->setYear(date("Y")); 
     181        $list->setMonth(kbdate("m")); 
     182        $list->setYear(kbdate("Y")); 
    185183        $table = new TopPilotTable($list, "Kills"); 
    186184        $html .= $table->generate(); 
     
    207205        $list->addInvolvedAlliance($alliance); 
    208206        $list->setPodsNoobShips(true); 
    209         $list->setMonth(date("m")); 
    210         $list->setYear(date("Y")); 
     207        $list->setMonth(kbdate("m")); 
     208        $list->setYear(kbdate("Y")); 
    211209        $table = new TopPilotTable($list, "Points"); 
    212210        $html .= $table->generate(); 
     
    233231        $list->addVictimAlliance($alliance); 
    234232        $list->setPodsNoobShips(false); 
    235         $list->setMonth(date("m")); 
    236         $list->setYear(date("Y")); 
     233        $list->setMonth(kbdate("m")); 
     234        $list->setYear(kbdate("Y")); 
    237235        $table = new TopPilotTable($list, "Losses"); 
    238236        $html .= $table->generate(); 
     
    285283            $sql .= " and inv.ind_all_id = ".$all_id; 
    286284 
    287         $sql .= "   and date_format( kll.kll_timestamp, \"%c\" ) = ".date("m")." 
    288                     and date_format( kll.kll_timestamp, \"%Y\" ) = ".date("Y")." 
     285        $sql .= "   and date_format( kll.kll_timestamp, \"%c\" ) = ".kbdate("m")." 
     286                    and date_format( kll.kll_timestamp, \"%Y\" ) = ".kbdate("Y")." 
    289287                    group by sys.sys_name 
    290288                    order by kills desc 
  • dev/common/awards.php

    r104 r190  
    1 <? 
    2   require_once( "class.page.php" ); 
    3   require_once( "class.box.php" ); 
    4   require_once( "class.toplist.php" ); 
    5    
    6   $page = new Page( "Awards" ); 
     1<?php 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.toplist.php'); 
    74 
    8   $month = $_GET['m']; 
    9   $year = $_GET['y']; 
    10    
    11   if ( $month == "" ) 
    12     $month = date( "m" ) - 1; 
    13    
    14   if ( $year == "" ) 
    15     $year = date( "Y" ); 
     5$page = new Page('Awards'); 
    166 
    17   if ( $month == 0 ) { 
     7$month = $_GET['m']; 
     8$year = $_GET['y']; 
     9 
     10if ($month == '') 
     11    $month = kbdate('m') - 1; 
     12 
     13if ($year == '') 
     14    $year = kbdate('Y'); 
     15 
     16if ($month == 0) 
     17{ 
    1818    $month = 12; 
    1919    $year = $year - 1; 
    20   } 
    21      
    22   if ( $month == 12 ) { 
     20} 
     21 
     22if ($month == 12) 
     23{ 
    2324    $nmonth = 1; 
    2425    $nyear = $year + 1; 
    25   } 
    26   else { 
     26} 
     27else 
     28{ 
    2729    $nmonth = $month + 1; 
    2830    $nyear = $year; 
    29   } 
    30   if ( $month == 1 ) { 
     31} 
     32if ($month == 1) 
     33{ 
    3134    $pmonth = 12; 
    3235    $pyear = $year - 1; 
    33   } 
    34   else { 
     36} 
     37else 
     38{ 
    3539    $pmonth = $month - 1; 
    3640    $pyear = $year; 
    37   } 
     41} 
    3842 
    39   $monthname = date( "F", strtotime( "2000-".$month."-1" ) ); 
    40      
    41   $html .= "<div class=block-header2>Awards for ".$monthname." ".$year."</div>"; 
    42    
    43   // main table 
    44   $html .= "<table height=600 width=\"100%\"><tr>"; 
     43$monthname = kbdate("F", strtotime("2000-".$month."-1")); 
    4544 
    46   // top killers 
    47   $tklist = new TopKillsList(); 
    48   $tklist->setMonth( $month ); 
    49   $tklist->setYear( $year ); 
    50   if ( CORP_ID ) 
    51     $tklist->addInvolvedCorp( new Corporation( CORP_ID ) ); 
    52   if ( ALLIANCE_ID ) 
    53     $tklist->addInvolvedAlliance( new Alliance( ALLIANCE_ID ) ); 
    54      
    55   $tklist->generate(); 
    56   $tkbox = new AwardBox( $tklist, "Top killers", "kills", "kills", "eagle" ); 
    57   $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     45$html .= "<div class=block-header2>Awards for ".$monthname." ".$year."</div>"; 
     46// main table 
     47$html .= "<table height=600 width=\"100%\"><tr>"; 
     48// top killers 
     49$tklist = new TopKillsList(); 
     50$tklist->setMonth($month); 
     51$tklist->setYear($year); 
     52if (CORP_ID) 
     53    $tklist->addInvolvedCorp(new Corporation(CORP_ID)); 
     54if (ALLIANCE_ID) 
     55    $tklist->addInvolvedAlliance(new Alliance(ALLIANCE_ID)); 
    5856 
    59   // top scorers 
    60   $killboard = $page->killboard_; 
    61   $config = $killboard->getConfig(); 
    62   if ( $config->getKillPoints() ) { 
     57$tklist->generate(); 
     58$tkbox = new AwardBox($tklist, "Top killers", "kills", "kills", "eagle"); 
     59$html .= "<td align=center>".$tkbox->generate()."</td>"; 
     60// top scorers 
     61$killboard = $page->killboard_; 
     62$config = $killboard->getConfig(); 
     63if ($config->getKillPoints()) 
     64{ 
    6365    $tklist = new TopScoreList(); 
    64     $tklist->setMonth( $month ); 
    65     $tklist->setYear( $year ); 
    66     if ( CORP_ID ) 
    67       $tklist->addInvolvedCorp( new Corporation( CORP_ID ) ); 
    68     if ( ALLIANCE_ID ) 
    69       $tklist->addInvolvedAlliance( new Alliance( ALLIANCE_ID ) ); 
    70      
     66    $tklist->setMonth($month); 
     67    $tklist->setYear($year); 
     68    if (CORP_ID) 
     69        $tklist->addInvolvedCorp(new Corporation(CORP_ID)); 
     70    if (ALLIANCE_ID) 
     71        $tklist->addInvolvedAlliance(new Alliance(ALLIANCE_ID)); 
     72 
    7173    $tklist->generate(); 
    72     $tkbox = new AwardBox( $tklist, "Top scorers", "points", "points", "redcross" ); 
     74    $tkbox = new AwardBox($tklist, "Top scorers", "points", "points", "redcross"); 
    7375    $html .= "<td align=center>".$tkbox->generate()."</td>"; 
    74   } 
     76} 
     77// top solo killers 
     78$tklist = new TopSoloKillerList(); 
     79$tklist->setMonth($month); 
     80$tklist->setYear($year); 
     81if (CORP_ID) 
     82    $tklist->addInvolvedCorp(new Corporation(CORP_ID)); 
     83if (ALLIANCE_ID) 
     84    $tklist->addInvolvedAlliance(new Alliance(ALLIANCE_ID)); 
    7585 
    76   // top solo killers 
    77   $tklist = new TopSoloKillerList(); 
    78   $tklist->setMonth( $month ); 
    79   $tklist->setYear( $year ); 
    80   if ( CORP_ID ) 
    81     $tklist->addInvolvedCorp( new Corporation( CORP_ID ) ); 
    82   if ( ALLIANCE_ID ) 
    83     $tklist->addInvolvedAlliance( new Alliance( ALLIANCE_ID ) ); 
    84      
    85   $tklist->generate(); 
    86   $tkbox = new AwardBox( $tklist, "Top solokillers", "solo kills", "kills", "cross" ); 
    87   $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     86$tklist->generate(); 
     87$tkbox = new AwardBox($tklist, "Top solokillers", "solo kills", "kills", "cross"); 
     88$html .= "<td align=center>".$tkbox->generate()."</td>"; 
     89// top damage dealers 
     90$tklist = new TopDamageDealerList(); 
     91$tklist->setMonth($month); 
     92$tklist->setYear($year); 
     93if (CORP_ID) 
     94    $tklist->addInvolvedCorp(new Corporation(CORP_ID)); 
     95if (ALLIANCE_ID) 
     96    $tklist->addInvolvedAlliance(new Alliance(ALLIANCE_ID)); 
    8897 
    89   // top damage dealers 
    90   $tklist = new TopDamageDealerList(); 
    91   $tklist->setMonth( $month ); 
    92   $tklist->setYear( $year ); 
    93   if ( CORP_ID ) 
    94     $tklist->addInvolvedCorp( new Corporation( CORP_ID ) ); 
    95   if ( ALLIANCE_ID ) 
    96     $tklist->addInvolvedAlliance( new Alliance( ALLIANCE_ID ) ); 
    97      
    98   $tklist->generate(); 
    99   $tkbox = new AwardBox( $tklist, "Top damagedealers", "kills w/ most damage", "kills", "wing1" ); 
    100   $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     98$tklist->generate(); 
     99$tkbox = new AwardBox($tklist, "Top damagedealers", "kills w/ most damage", "kills", "wing1"); 
     100$html .= "<td align=center>".$tkbox->generate()."</td>"; 
    101101 
    102   $html .= "</tr><tr>"; 
     102$html .= "</tr><tr>"; 
     103// top final blows 
     104$tklist = new TopFinalBlowList(); 
     105$tklist->setMonth($month); 
     106$tklist->setYear($year); 
     107if (CORP_ID) 
     108    $tklist->addInvolvedCorp(new Corporation(CORP_ID)); 
     109if (ALLIANCE_ID) 
     110    $tklist->addInvolvedAlliance(new Alliance(ALLIANCE_ID)); 
    103111 
    104   // top final blows 
    105   $tklist = new TopFinalBlowList(); 
    106   $tklist->setMonth( $month ); 
    107   $tklist->setYear( $year ); 
    108   if ( CORP_ID ) 
    109     $tklist->addInvolvedCorp( new Corporation( CORP_ID ) ); 
    110   if ( ALLIANCE_ID ) 
    111     $tklist->addInvolvedAlliance( new Alliance( ALLIANCE_ID ) ); 
    112      
    113   $tklist->generate(); 
    114   $tkbox = new AwardBox( $tklist, "Top finalblows", "final blows", "kills", "skull" ); 
    115   $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     112$tklist->generate(); 
     113$tkbox = new AwardBox($tklist, "Top finalblows", "final blows", "kills", "skull"); 
     114$html .= "<td align=center>".$tkbox->generate()."</td>"; 
     115// top podkillers 
     116$tklist = new TopPodKillerList(); 
     117$tklist->setMonth($month); 
     118$tklist->setYear($year); 
     119if (CORP_ID) 
     120    $tklist->addInvolvedCorp(new Corporation(CORP_ID)); 
     121if (ALLIANCE_ID) 
     122    $tklist->addInvolvedAlliance(new Alliance(ALLIANCE_ID)); 
    116123 
    117   // top podkillers 
    118   $tklist = new TopPodKillerList(); 
    119   $tklist->setMonth( $month ); 
    120   $tklist->setYear( $year ); 
    121   if ( CORP_ID ) 
    122     $tklist->addInvolvedCorp( new Corporation( CORP_ID ) ); 
    123   if ( ALLIANCE_ID ) 
    124     $tklist->addInvolvedAlliance( new Alliance( ALLIANCE_ID ) ); 
    125      
    126   $tklist->generate(); 
    127   $tkbox = new AwardBox( $tklist, "Top podkillers", "podkills", "kills", "globe" ); 
    128   $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     124$tklist->generate(); 
     125$tkbox = new AwardBox($tklist, "Top podkillers", "podkills", "kills", "globe"); 
     126$html .= "<td align=center>".$tkbox->generate()."</td>"; 
     127// top griefers 
     128$tklist = new TopGrieferList(); 
     129$tklist->setMonth($month); 
     130$tklist->setYear($year); 
     131if (CORP_ID) 
     132    $tklist->addInvolvedCorp(new Corporation(CORP_ID)); 
     133if (ALLIANCE_ID) 
     134    $tklist->addInvolvedAlliance(new Alliance(ALLIANCE_ID)); 
    129135 
    130   // top griefers 
    131   $tklist = new TopGrieferList(); 
    132   $tklist->setMonth( $month ); 
    133   $tklist->setYear( $year ); 
    134   if ( CORP_ID ) 
    135     $tklist->addInvolvedCorp( new Corporation( CORP_ID ) ); 
    136   if ( ALLIANCE_ID ) 
    137     $tklist->addInvolvedAlliance( new Alliance( ALLIANCE_ID ) ); 
    138      
    139   $tklist->generate(); 
    140   $tkbox = new AwardBox( $tklist, "Top griefers", "carebear kills", "kills", "star" ); 
    141   $html .= "<td align=center>".$tkbox->generate()."</td>"; 
    142    
    143   // top capital killers 
    144   $tklist = new TopCapitalShipKillerList(); 
    145   $tklist->setMonth( $month ); 
    146   $tklist->setYear( $year ); 
    147   if ( CORP_ID ) 
    148     $tklist->addInvolvedCorp( new Corporation( CORP_ID ) ); 
    149   if ( ALLIANCE_ID ) 
    150     $tklist->addInvolvedAlliance( new Alliance( ALLIANCE_ID ) ); 
    151      
    152   $tklist->generate(); 
    153   $tkbox = new AwardBox( $tklist, "Top ISK killers", "capital shipkills", "kills", "wing2" ); 
    154   $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     136$tklist->generate(); 
     137$tkbox = new AwardBox($tklist, "Top griefers", "carebear kills", "kills", "star"); 
     138$html .= "<td align=center>".$tkbox->generate()."</td>"; 
     139// top capital killers 
     140$tklist = new TopCapitalShipKillerList(); 
     141$tklist->setMonth($month); 
     142$tklist->setYear($year); 
     143if (CORP_ID) 
     144    $tklist->addInvolvedCorp(new Corporation(CORP_ID)); 
     145if (ALLIANCE_ID) 
     146    $tklist->addInvolvedAlliance(new Alliance(ALLIANCE_ID)); 
    155147 
    156   $html .= "</td></tr></table>"; 
     148$tklist->generate(); 
     149$tkbox = new AwardBox($tklist, "Top ISK killers", "capital shipkills", "kills", "wing2"); 
     150$html .= "<td align=center>".$tkbox->generate()."</td>"; 
    157151 
    158   $menubox = new Box("Menu"); 
    159   $menubox->setIcon("menu-item.gif"); 
    160   $menubox->addOption("caption", "Navigation" ); 
    161   $menubox->addOption("link", "Previous month ", "?a=awards&m=".$pmonth."&y=".$pyear ); 
    162   if ( ! ($month == date( "m" ) - 1 && $year == date( "Y" ) ) ) 
    163     $menubox->addOption("link", "Next month", "?a=awards&m=".$nmonth."&y=".$nyear ); 
    164   $page->addContext( $menubox->generate() ); 
    165    
    166   $page->setContent( $html ); 
    167   $page->generate(); 
     152$html .= "</td></tr></table>"; 
     153 
     154$menubox = new Box("Menu"); 
     155$menubox->setIcon("menu-item.gif"); 
     156$menubox->addOption("caption", "Navigation"); 
     157$menubox->addOption("link", "Previous month ", "?a=awards&m=".$pmonth."&y=".$pyear); 
     158if (! ($month == kbdate("m") - 1 && $year == kbdate("Y"))) 
     159    $menubox->addOption("link", "Next month", "?a=awards&m=".$nmonth."&y=".$nyear); 
     160$page->addContext($menubox->generate()); 
     161 
     162$page->setContent($html); 
     163$page->generate(); 
    168164?> 
  • dev/common/campaigns.php

    r104 r190  
    1 <? 
    2   require_once( "class.page.php" ); 
    3   require_once( "class.contract.php" ); 
    4   require_once( "class.box.php" ); 
    5    
    6   $page = new Page( "Campaigns" ); 
     1<?php 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.contract.php'); 
    74 
    8   switch( $_GET['view'] ) { 
    9     case "": 
    10       $activelist = new ContractList(); 
    11       $activelist->setCampaigns( true ); 
    12       $activelist->setActive( "yes" ); 
    13       $page->setTitle( "Active campaigns" ); 
    14       $table = new ContractListTable( $activelist ); 
    15       $table->paginate( 10, $_GET['page'] ); 
    16       $html .= $table->generate(); 
    17       break; 
    18     case "past": 
    19       $pastlist = new ContractList(); 
    20       $pastlist->setCampaigns( true ); 
    21       $pastlist->setActive( "no" ); 
    22       $page->setTitle( "Past campaigns" ); 
    23       $table = new ContractListTable( $pastlist ); 
    24       $table->paginate( 10, $_GET['page'] ); 
    25       $html .= $table->generate(); 
    26       break; 
    27   } 
     5$page = new Page('Campaigns'); 
    286 
    29   $menubox = new Box("Menu"); 
    30   $menubox->setIcon("menu-item.gif"); 
    31   $menubox->addOption("link", "Active campaigns", "?a=campaigns" ); 
    32   $menubox->addOption("link", "Past campaigns", "?a=campaigns&view=past" ); 
     7switch ($_GET['view']) 
     8{ 
     9    case '': 
     10        $activelist = new ContractList(); 
     11        $activelist->setCampaigns(true); 
     12        $activelist->setActive('yes'); 
     13        $page->setTitle('Active campaigns'); 
     14        $table = new ContractListTable($activelist); 
     15        $table->paginate(10, $_GET['page']); 
     16        $html .= $table->generate(); 
     17        break; 
     18    case 'past': 
     19        $pastlist = new ContractList(); 
     20        $pastlist->setCampaigns(true); 
     21        $pastlist->setActive('no'); 
     22        $page->setTitle('Past campaigns'); 
     23        $table = new ContractListTable($pastlist); 
     24        $table->paginate(10, $_GET['page']); 
     25        $html .= $table->generate(); 
     26        break; 
     27} 
    3328 
    34   $page->addContext( $menubox->generate() ); 
    35   $page->setContent( $html ); 
    36   $page->generate(); 
     29$menubox = new Box('Menu'); 
     30$menubox->setIcon('menu-item.gif'); 
     31$menubox->addOption('link', 'Active campaigns', '?a=campaigns'); 
     32$menubox->addOption('link', 'Past campaigns', '?a=campaigns&view=past'); 
     33 
     34$page->addContext($menubox->generate()); 
     35$page->setContent($html); 
     36$page->generate(); 
    3737?> 
  • dev/common/cc_detail.php

    r188 r190  
    11<?php 
    2 require_once("db.php"); 
    3 require_once("class.page.php"); 
    4 require_once("class.killlist.php"); 
    5 require_once("class.killlisttable.php"); 
    6 require_once("class.killsummarytable.php"); 
    7 require_once("class.contract.php"); 
    8 require_once("class.box.php"); 
    9 require_once("class.toplist.php"); 
    10 require_once("class.graph.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.killlist.php'); 
     4require_once('common/includes/class.killlisttable.php'); 
     5require_once('common/includes/class.killsummarytable.php'); 
     6require_once('common/includes/class.contract.php'); 
     7require_once('common/includes/class.toplist.php'); 
    118 
    129$ctr_id = $_GET['ctr_id']; 
     
    1512 
    1613if ($contract->getCampaign()) 
    17     $title = "Campaign details"; 
    18 else 
    19     $title = "Contract details"; 
    20  
    21 $page = new Page($title." - ".$contract->getName()); 
     14    $title = 'Campaign details'; 
     15else 
     16    $title = 'Contract details'; 
     17 
     18$page = new Page($title.' - '.$contract->getName()); 
    2219 
    2320$html .= "<table align=center class=kb-table width=\"100%\" height=\"80\" border=\"0\" cellspacing=1><tr class=kb-table-row-even><td rowspan=5 align=center width=80 height=80>"; 
  • dev/common/comments.php

    r130 r190  
    11<?php 
    2 require_once('class.comments.php'); 
     2require_once('common/includes/class.comments.php'); 
    33 
    44$comments = new Comments($kll_id); 
     
    1414        if ($_POST['comment'] == '') 
    1515        { 
    16             $html .= "Error: Silent type hey? good for you, bad for a comment."; 
     16            $html .= 'Error: Silent type hey? good for you, bad for a comment.'; 
    1717        } 
    1818        else 
     
    2222            if ($name == null) 
    2323            { 
    24                 $name = "Anonymous"; 
     24                $name = 'Anonymous'; 
    2525            } 
    2626            $comments->addComment($name, $comment); 
     
    3030    { 
    3131        // Password is wrong 
    32         $html .= "Error: Wrong Password"; 
     32        $html .= 'Error: Wrong Password'; 
    3333    } 
    3434} 
  • dev/common/contracts.php

    r104 r190  
    1 <? 
    2   require_once( "class.page.php" ); 
    3   require_once( "class.contract.php" ); 
    4   require_once( "class.box.php" ); 
    5    
    6   $page = new Page( "Contracts" ); 
     1<?php 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.contract.php'); 
    74 
    8   switch( $_GET['view'] ) { 
    9     case "": 
    10       $activelist = new ContractList(); 
    11       $activelist->setCampaigns( false ); 
    12       $activelist->setActive( "yes" ); 
    13       $page->setTitle( "Active contracts" ); 
    14       $table = new ContractListTable( $activelist ); 
    15       $html .= $table->generate(); 
    16     break; 
    17     case "past": 
    18       $pastlist = new ContractList(); 
    19       $pastlist->setCampaigns( false ); 
    20       $pastlist->setActive( "no" ); 
    21       $page->setTitle( "Past contracts" ); 
    22       $table = new ContractListTable( $pastlist ); 
    23       $html .= $table->generate(); 
    24     break; 
    25   } 
     5$page = new Page('Contracts'); 
    266 
    27 $menubox = new box("Menu"); 
    28 $menubox->setIcon("menu-item.gif"); 
    29   $menubox->addOption("link", "Active contracts", "?a=contracts" ); 
    30   $menubox->addOption("link", "Past contracts", "?a=contracts&view=past" ); 
     7switch ($_GET['view']) 
     8{ 
     9    case '': 
     10        $activelist = new ContractList(); 
     11        $activelist->setCampaigns(false); 
     12        $activelist->setActive('yes'); 
     13        $page->setTitle('Active contracts'); 
     14        $table = new ContractListTable($activelist); 
     15        $html .= $table->generate(); 
     16        break; 
     17    case 'past': 
     18        $pastlist = new ContractList(); 
     19        $pastlist->setCampaigns(false); 
     20        $pastlist->setActive('no'); 
     21        $page->setTitle('Past contracts'); 
     22        $table = new ContractListTable($pastlist); 
     23        $html .= $table->generate(); 
     24        break; 
     25} 
    3126 
    32   $page->addContext( $menubox->generate() ); 
    33   $page->setContent( $html ); 
    34   $page->generate(); 
     27$menubox = new box('Menu'); 
     28$menubox->setIcon('menu-item.gif'); 
     29$menubox->addOption('link', 'Active contracts', '?a=contracts'); 
     30$menubox->addOption('link', 'Past contracts', '?a=contracts&view=past'); 
     31 
     32$page->addContext($menubox->generate()); 
     33$page->setContent($html); 
     34$page->generate(); 
    3535?> 
  • dev/common/corp_detail.php

    r171 r190  
    11<?php 
    2 require_once("db.php"); 
    3 require_once("class.page.php"); 
    4 require_once("class.corp.php"); 
    5 require_once("class.alliance.php"); 
    6 require_once("class.killlist.php"); 
    7 require_once("class.killlisttable.php"); 
    8 require_once("class.killsummarytable.php"); 
    9 require_once("class.box.php"); 
    10 require_once("class.toplist.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.corp.php'); 
     4require_once('common/includes/class.alliance.php'); 
     5require_once('common/includes/class.killlist.php'); 
     6require_once('common/includes/class.killlisttable.php'); 
     7require_once('common/includes/class.killsummarytable.php'); 
     8require_once('common/includes/class.toplist.php'); 
    119 
    1210if (!$crp_id = intval($_GET['crp_id'])) 
     
    2422$summary_html = $kill_summary->generate(); 
    2523 
    26 $page = new Page("Corporation details - " . $corp->getName()); 
     24$page = new Page('Corporation details - '.$corp->getName()); 
    2725$html .= "<table class=kb-table width=\"100%\" border=\"0\" cellspacing=1><tr class=kb-table-row-even><td rowspan=8 width=128 align=center bgcolor=black>"; 
    2826 
     
    145143        $list->addInvolvedCorp($corp); 
    146144        $list->setPodsNoobShips(false); 
    147         $list->setMonth(date("m")); 
    148         $list->setYear(date("Y")); 
     145        $list->setMonth(kbdate("m")); 
     146        $list->setYear(kbdate("Y")); 
    149147        $table = new TopPilotTable($list, "Kills"); 
    150148        $html .= $table->generate(); 
     
    171169        $list->addInvolvedCorp($corp); 
    172170        $list->setPodsNoobShips(true); 
    173         $list->setMonth(date("m")); 
    174         $list->setYear(date("Y")); 
     171        $list->setMonth(kbdate("m")); 
     172        $list->setYear(kbdate("Y")); 
    175173        $table = new TopPilotTable($list, "Points"); 
    176174        $html .= $table->generate(); 
     
    197195        $list->addInvolvedCorp($corp); 
    198196        $list->setPodsNoobShips(false); 
    199         $list->setMonth(date("m")); 
    200         $list->setYear(date("Y")); 
     197        $list->setMonth(kbdate("m")); 
     198        $list->setYear(kbdate("Y")); 
    201199        $table = new TopPilotTable($list, "Solokills"); 
    202200        $html .= $table->generate(); 
     
    224222        $list->addInvolvedCorp($corp); 
    225223        $list->setPodsNoobShips(false); 
    226         $list->setMonth(date("m")); 
    227         $list->setYear(date("Y")); 
     224        $list->setMonth(kbdate("m")); 
     225        $list->setYear(kbdate("Y")); 
    228226        $table = new TopPilotTable($list, "Kills"); 
    229227        $html .= $table->generate(); 
     
    250248        $list = new TopGrieferList(); 
    251249        $list->addInvolvedCorp($corp); 
    252         $list->setMonth(date("m")); 
    253         $list->setYear(date("Y")); 
     250        $list->setMonth(kbdate("m")); 
     251        $list->setYear(kbdate("Y")); 
    254252        $table = new TopPilotTable($list, "Kills"); 
    255253        $html .= $table->generate(); 
     
    276274        $list->addVictimCorp($corp); 
    277275        $list->setPodsNoobShips(false); 
    278         $list->setMonth(date("m")); 
    279         $list->setYear(date("Y")); 
     276        $list->setMonth(kbdate("m")); 
     277        $list->setYear(kbdate("Y")); 
    280278        $table = new TopPilotTable($list, "Losses"); 
    281279        $html .= $table->generate(); 
     
    328326            $sql .= " and inv.ind_all_id = ".$all_id; 
    329327 
    330         $sql .= "   and date_format( kll.kll_timestamp, \"%c\" ) = ".date("m")." 
    331                     and date_format( kll.kll_timestamp, \"%Y\" ) = ".date("Y")." 
     328        $sql .= "   and date_format( kll.kll_timestamp, \"%c\" ) = ".kbdate("m")." 
     329                    and date_format( kll.kll_timestamp, \"%Y\" ) = ".kbdate("Y")." 
    332330                    group by sys.sys_name 
    333331                    order by kills desc 
  • dev/common/feed.php

    r175 r190  
    11<?php 
    2         ////// 
    3 //////  ////// 
     2//////////// 
     3////// 
     4//////  feed writer after 
    45//////  liq's feed syndication mod v1.5 
     6////// 
    57//////////// 
    6 //////////// 
    7 //////////// 
    8 //////////// 
    9   
    108 
    11 @set_time_limit(0); 
    12 require_once("class.corp.php"); 
    13 require_once("class.alliance.php"); 
    14 require_once("class.killlist.php"); 
    15 require_once("class.kill.php"); 
    16 require_once("db.php"); 
    17 require_once("globals.php"); 
     9@set_time_limit(120); 
     10require_once('common/includes/db.php'); 
     11require_once('common/includes/class.corp.php'); 
     12require_once('common/includes/class.alliance.php'); 
     13require_once('common/includes/class.killlist.php'); 
     14require_once('common/includes/class.kill.php'); 
    1815 
    19   $html .= "<rss version=\"2.0\"> 
     16$html .= '<rss version="2.0"> 
    2017        <channel> 
    21         <title>" . KB_TITLE . "</title> 
    22         <link>http://" . KB_HOST . "</link> 
     18        <title>'.KB_TITLE.'</title> 
     19        <link>http://'.KB_HOST.'</link> 
    2320        <description>Kill Feed v1.5</description> 
    24         <copyright>" . KB_TITLE . "</copyright>\n"; 
    25    
    26   $klist = new KillList(); 
    27   $klist->setPodsNoobShips(true); 
    28    
    29   if ($_GET['week']) 
    30   { 
    31       $klist->setWeek($_GET['week']); 
    32   } 
    33   elseif (!$_GET['lastkllid']) 
    34   { 
    35       $klist->setWeek(date("W")); 
    36   } 
    37    
    38   if ($_GET['year']) 
    39   { 
    40       $klist->setYear($_GET['year']); 
    41   } 
    42   elseif (!$_GET['lastkllid']) 
    43   { 
    44       $klist->setYear(date("Y")); 
    45   }     
    46    
    47   if ($_GET['lastkllid'] && method_exists($klist, 'setMinKllID')) 
    48   { 
    49           $klist->setMinKllID($_GET['lastkllid']); 
    50   } 
    51    
    52   if ($_GET['corp'] || $_GET['corp_name']) 
    53   { 
    54       if ($_GET['corp']) 
    55       { 
    56           $c = $_GET['corp']; 
    57       } 
    58       if ($_GET['corp_name']) 
    59       { 
    60           $c = $_GET['corp_name']; 
    61       } 
    62       $corp = new Corporation(); 
    63       $corp->lookup(urldecode($c)); 
    64   } 
    65    
    66   if ($_GET['alli'] || $_GET['alliance_name']) 
    67   { 
    68       if ($_GET['alli']) 
    69       { 
    70           $a = $_GET['alli']; 
    71       } 
    72       if ($_GET['alliance_name']) 
    73       { 
    74           $a = $_GET['alliance_name']; 
    75       } 
    76       $alli = new Alliance(); 
    77       $alli->add(urldecode($a)); 
    78   } 
    79    
    80   if ($_GET['losses']) 
    81   { 
    82       if (CORP_ID) //local  
    83       { 
    84           $klist->addVictimCorp(new Corporation(CORP_ID)); 
    85       } 
    86       if (ALLIANCE_ID) //local  
    87       { 
    88           $klist->addVictimAlliance(new Alliance(ALLIANCE_ID)); 
    89       } 
    90       if ($corp && !$_GET['friend']) //remote 
    91       { 
    92           $klist->addInvolvedCorp($corp); 
    93       } 
    94       if ($alli && !$_GET['friend']) //remote 
    95       { 
    96           $klist->addInvolvedAlliance($alli); 
    97       } 
    98   } 
    99   else 
    100   { 
    101       if (CORP_ID) //local  
    102       { 
    103           $klist->addInvolvedCorp(new Corporation(CORP_ID)); 
    104       } 
    105       if (ALLIANCE_ID) //local  
    106       { 
    107           $klist->addInvolvedAlliance(new Alliance(ALLIANCE_ID)); 
    108       } 
    109       if ($corp && !$_GET['friend']) //remote 
    110       { 
    111           $klist->addVictimCorp($corp); 
    112       } 
    113       if ($alli && !$_GET['friend']) //remote 
    114       { 
    115           $klist->addVictimAlliance($alli); 
    116       } 
    117   } 
    118    
    119   $kills = array(); 
    120   while ($kill = $klist->getKill()) 
    121   { 
    122       $kills[$kill->getID()] = $kill->getTimestamp(); 
    123   } 
    124   asort($kills); 
    125    
    126   foreach ($kills as $id => $timestamp) 
    127   { 
    128       $kill = new Kill($id); 
    129       $html .= "<item> 
     21        <copyright>'.KB_TITLE.'</copyright>'."\n"; 
     22 
     23$klist = new KillList(); 
     24$klist->setPodsNoobShips(true); 
     25 
     26if ($_GET['week']) 
     27{ 
     28    $klist->setWeek($_GET['week']); 
     29} 
     30elseif (!$_GET['lastkllid']) 
     31{ 
     32    $klist->setWeek(kbdate("W")); 
     33} 
     34 
     35if ($_GET['year']) 
     36{ 
     37    $klist->setYear($_GET['year']); 
     38} 
     39elseif (!$_GET['lastkllid']) 
     40{ 
     41    $klist->setYear(kbdate("Y")); 
     42} 
     43 
     44if ($_GET['lastkllid'] && method_exists($klist, 'setMinKllID')) 
     45{ 
     46    $klist->setMinKllID($_GET['lastkllid']); 
     47} 
     48 
     49if ($_GET['corp'] || $_GET['corp_name']) 
     50{ 
     51    if ($_GET['corp']) 
     52    { 
     53        $c = $_GET['corp']; 
     54    } 
     55    if ($_GET['corp_name']) 
     56    { 
     57        $c = $_GET['corp_name']; 
     58    } 
     59    $corp = new Corporation(); 
     60    $corp->lookup(urldecode($c)); 
     61} 
     62 
     63if ($_GET['alli'] || $_GET['alliance_name']) 
     64{ 
     65    if ($_GET['alli']) 
     66    { 
     67        $a = $_GET['alli']; 
     68    } 
     69    if ($_GET['alliance_name']) 
     70    { 
     71        $a = $_GET['alliance_name']; 
     72    } 
     73    $alli = new Alliance(); 
     74    $alli->add(urldecode($a)); 
     75} 
     76 
     77if ($_GET['losses']) 
     78{ 
     79    if (CORP_ID) // local 
     80    { 
     81            $klist->addVictimCorp(new Corporation(CORP_ID)); 
     82    } 
     83    if (ALLIANCE_ID) // local 
     84    { 
     85            $klist->addVictimAlliance(new Alliance(ALLIANCE_ID)); 
     86    } 
     87    if ($corp && !$_GET['friend']) // remote 
     88    { 
     89            $klist->addInvolvedCorp($corp); 
     90    } 
     91    if ($alli && !$_GET['friend']) // remote 
     92    { 
     93            $klist->addInvolvedAlliance($alli); 
     94    } 
     95} 
     96else 
     97{ 
     98    if (CORP_ID) // local 
     99    { 
     100            $klist->addInvolvedCorp(new Corporation(CORP_ID)); 
     101    } 
     102    if (ALLIANCE_ID) // local 
     103    { 
     104            $klist->addInvolvedAlliance(new Alliance(ALLIANCE_ID)); 
     105    } 
     106    if ($corp && !$_GET['friend']) // remote 
     107    { 
     108            $klist->addVictimCorp($corp); 
     109    } 
     110    if ($alli && !$_GET['friend']) // remote 
     111    { 
     112            $klist->addVictimAlliance($alli); 
     113    } 
     114} 
     115 
     116$kills = array(); 
     117while ($kill = $klist->getKill()) 
     118{ 
     119    if ($kill->isClassified()) 
     120    { 
     121        continue; 
     122    } 
     123 
     124    $kills[$kill->getID()] = $kill->getTimestamp(); 
     125} 
     126asort($kills); 
     127 
     128foreach ($kills as $id => $timestamp) 
     129{ 
     130    $kill = new Kill($id); 
     131    $html .= "<item> 
    130132                                <title>" . $id . "</title> 
    131                                 <description><![CDATA[ " . $kill->getRawMail() . " ]]></description> 
    132                                 <guid>?a=kill_detail&amp;kll_id=" . $id . "</guid> 
     133                                <description><![CDATA[ ".$kill->getRawMail()." ]]></description> 
     134                                <guid>?a=kill_detail&amp;kll_id=".$id."</guid> 
    133135                                <pubDate>" . strftime("%a, %d %b %Y %T %Z", strtotime($timestamp)) . "</pubDate> 
    134136                                </item>\n"; 
    135   } 
    136    
    137   $html .= "</channel></rss>"; 
    138    
    139   if ($_GET['gz']) 
    140   { 
    141       echo gzdeflate($html, 9); 
    142   } 
    143   else 
    144   { 
    145       echo $html; 
    146   } 
     137} 
     138$html .= "</channel></rss>"; 
     139 
     140if ($_GET['gz']) 
     141{ 
     142    echo gzdeflate($html, 9); 
     143} 
     144else 
     145{ 
     146    echo $html; 
     147} 
    147148?> 
    148  
  • dev/common/home.php

    r135 r190  
    11<?php 
    2 require_once("class.page.php"); 
    3 require_once("class.killsummarytable.php"); 
    4 require_once("class.box.php"); 
    5 require_once("class.corp.php"); 
    6 require_once("class.alliance.php"); 
    7 require_once("class.killlist.php"); 
    8 require_once("class.killlisttable.php"); 
    9 require_once("class.contract.php"); 
    10 require_once("class.graph.php"); 
    11 require_once("class.toplist.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.killsummarytable.php'); 
     4require_once('common/includes/class.corp.php'); 
     5require_once('common/includes/class.alliance.php'); 
     6require_once('common/includes/class.killlist.php'); 
     7require_once('common/includes/class.killlisttable.php'); 
     8require_once('common/includes/class.contract.php'); 
     9require_once('common/includes/class.toplist.php'); 
    1210 
    13 $week = date("W"); 
    14 $year = date("Y"); 
     11$week = kbdate('W'); 
     12$year = kbdate('Y'); 
    1513 
    16 $page = new Page("Week " . $week); 
     14$page = new Page('Week '.$week); 
    1715 
    1816$kslist = new KillList(); 
     
    4038if ($week == 1) 
    4139{ 
    42     $pyear = date("Y") - 1; 
     40    $pyear = kbdate("Y") - 1; 
    4341    $pweek = 52; 
    4442} 
    4543else 
    4644{ 
    47     $pyear = date("Y"); 
     45    $pyear = kbdate("Y"); 
    4846    $pweek = $week - 1; 
    4947} 
  • dev/common/igb.php

    r154 r190  
    11<?php 
    2 require_once("class.page.php"); 
     2require_once('common/includes/class.page.php'); 
    33 
    4 $page = new Page("Killboard IGB Menu"); 
     4$page = new Page('Killboard IGB Menu'); 
    55 
    66$page->setContent($smarty->fetch(get_tpl('igb'))); 
  • dev/common/igb_home.php

    r154 r190  
    11<?php 
    2 require_once("class.page.php"); 
    3 require_once("class.killsummarytable.php"); 
    4 require_once("class.box.php"); 
    5 require_once("class.corp.php"); 
    6 require_once("class.alliance.php"); 
    7 require_once("class.killlist.php"); 
    8 require_once("class.killlisttable.php"); 
    9 require_once("class.contract.php"); 
    10 require_once("class.graph.php"); 
    11 require_once("class.toplist.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.killsummarytable.php'); 
     4require_once('common/includes/class.corp.php'); 
     5require_once('common/includes/class.alliance.php'); 
     6require_once('common/includes/class.killlist.php'); 
     7require_once('common/includes/class.killlisttable.php'); 
     8require_once('common/includes/class.contract.php'); 
     9require_once('common/includes/class.toplist.php'); 
    1210 
    13 $week = date("W"); 
    14 $year = date("Y"); 
     11$week = kbdate('W'); 
     12$year = kbdate('Y'); 
    1513 
    16 $page = new Page("Week " . $week); 
     14$page = new Page('Week '.$week); 
    1715 
    1816$kslist = new KillList(); 
     
    3937if ($week == 1) 
    4038{ 
    41     $pyear = date("Y") - 1; 
     39    $pyear = kbdate("Y") - 1; 
    4240    $pweek = 52; 
    4341} 
    4442else 
    4543{ 
    46     $pyear = date("Y"); 
     44    $pyear = kbdate("Y"); 
    4745    $pweek = $week - 1; 
    4846} 
  • dev/common/index.php

    r188 r190  
    11<?php 
     2 
     3/** 
     4 * The EVE-Development Network Killboard 
     5 * based on eve-killboard.net created by rig0r 
     6 * 
     7 * This program is free software; you can redistribute it and/or modify 
     8 * it under the terms of the GNU General Public License as published by 
     9 * the Free Software Foundation; either version 2 of the License, or 
     10 * any later version. 
     11 * 
     12 * This program is distributed in the hope that it will be useful, but 
     13 * WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU General Public License 
     18 * along with this program; if not, write to the Free Software 
     19 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  02110-1301, USA. 
     20 * 
     21 */ 
     22 
    223// many ppl had issues with pear and relative paths 
    3 require_once('common/db.php'); 
     24require_once('common/includes/db.php'); 
     25require_once('common/includes/class.killboard.php'); 
     26require_once('common/includes/class.page.php'); 
     27require_once('common/includes/class.event.php'); 
     28require_once('common/includes/class.roles.php'); 
     29#require_once('common/includes/class.titles.php'); 
     30require_once('common/includes/class.user.php'); 
     31require_once('common/includes/class.session.php'); 
    432require_once('smarty/Smarty.class.php'); 
    5 require_once('class.killboard.php'); 
    6 require_once('class.event.php'); 
    7 require_once('class.roles.php'); 
    8 require_once('class.user.php'); 
    933 
    1034// smarty doesnt like it 
    1135@set_magic_quotes_runtime(0); 
    1236 
     37// remove some chars from the request string to avoid 'hacking'-attempts 
    1338$page = str_replace('.', '', $_GET['a']); 
    1439$page = str_replace('/', '', $page); 
     
    3257} 
    3358 
    34 $killboard = new Killboard(KB_SITE); 
    35 $config = $killboard->getConfig(); 
     59// killboard is instantiated by class::Page 
     60//$killboard = new Killboard(KB_SITE); 
    3661 
    37 // setting up smarty 
     62// load the config from the database 
     63$config = new Config(KB_SITE); 
     64 
     65// setting up smarty and feed it with some config 
    3866$smarty = new Smarty(); 
    3967$smarty->template_dir = './templates'; 
     
    4371$smarty->assign('img_url', IMG_URL); 
    4472$smarty->assign_by_ref('config', $config); 
     73 
     74// set up titles/roles 
     75role::init(); 
     76#title::init(); 
     77 
     78// start session management 
     79Session::init(); 
    4580 
    4681// this is to make sure that smarty is able to create output 
     
    5792} 
    5893 
     94// all admin files are now in the admin directory and preload the menu 
     95if (substr($page, 0, 5) == 'admin') 
     96{ 
     97    require_once('common/admin/admin_menu.php'); 
     98    $page = 'admin/'.$page; 
     99} 
     100 
     101// old modcode for loading settings 
    59102if (substr($page, 0, 9) == 'settings_') 
    60103{ 
     
    65108    $settingsPage = false; 
    66109} 
    67 $mods_active = explode(',', $config->getConfig('mods_active')); 
     110$mods_active = explode(',', config::get('mods_active')); 
    68111$modOverrides = false; 
    69112foreach ($mods_active as $mod) 
  • dev/common/kill_detail.php

    r155 r190  
    11<?php 
    2 require_once("class.kill.php"); 
    3 require_once("class.page.php"); 
    4 require_once("class.pilot.php"); 
    5 require_once("class.corp.php"); 
    6 require_once("class.box.php"); 
    7 require_once("class.alliance.php"); 
    8 require_once("globals.php"); 
    9  
    10 $page = new Page("Kill details"); 
     2require_once('common/includes/class.kill.php'); 
     3require_once('common/includes/class.page.php'); 
     4require_once('common/includes/class.pilot.php'); 
     5require_once('common/includes/class.corp.php'); 
     6require_once('common/includes/class.alliance.php'); 
     7 
     8$page = new Page('Kill details'); 
    119 
    1210if ($config->getConfig('item_values')) 
     
    2119            $IID = $_POST['IID']; 
    2220            $Val = $_POST[$IID]; 
    23             //echo "UPDATE kb3_items SET itm_value ='" . $Val . "' WHERE itm_id='" . $IID . "'"; 
     21            //echo "UPDATE kb3_items SET itm_value ='".$Val."' WHERE itm_id='".$IID."'"; 
    2422            $qry = new DBQuery(); 
    2523            $qry->execute("UPDATE kb3_items SET itm_value ='".$Val."' WHERE itm_id='".$IID."'"); 
     
    4745// victim $smarty->assign('',); 
    4846$smarty->assign('VictimPortrait', $kill->getVictimPortrait(64)); 
    49 $smarty->assign('VictimURL', "?a=pilot_detail&plt_id=" . $kill->getVictimID()); 
     47$smarty->assign('VictimURL', "?a=pilot_detail&plt_id=".$kill->getVictimID()); 
    5048$smarty->assign('VictimName', $kill->getVictimName()); 
    51 $smarty->assign('VictimCorpURL', "?a=corp_detail&crp_id=" . $kill->getVictimCorpID()); 
     49$smarty->assign('VictimCorpURL', "?a=corp_detail&crp_id=".$kill->getVictimCorpID()); 
    5250$smarty->assign('VictimCorpName', $kill->getVictimCorpName()); 
    53 $smarty->assign('VictimAllianceURL', "?a=alliance_detail&all_id=" . $kill->getVictimAllianceID()); 
     51$smarty->assign('VictimAllianceURL', "?a=alliance_detail&all_id=".$kill->getVictimAllianceID()); 
    5452$smarty->assign('VictimAllianceName', $kill->getVictimAllianceName()); 
    5553 
     
    6664 
    6765    $involved[$i]['shipImage'] = $ship->getImage(64); 
    68     $involved[$i]['PilotURL'] = "?a=pilot_detail&plt_id=" . $pilot->getID(); 
     66    $involved[$i]['PilotURL'] = "?a=pilot_detail&plt_id=".$pilot->getID(); 
    6967    $involved[$i]['PilotName'] = $pilot->getName(); 
    70     $involved[$i]['CorpURL'] = "?a=corp_detail&crp_id=" . $corp->getID(); 
     68    $involved[$i]['CorpURL'] = "?a=corp_detail&crp_id=".$corp->getID(); 
    7169    $involved[$i]['CorpName'] = $corp->getName(); 
    72     $involved[$i]['AlliURL'] = "?a=alliance_detail&all_id=" . $alliance->getID(); 
     70    $involved[$i]['AlliURL'] = "?a=alliance_detail&all_id=".$alliance->getID(); 
    7371    $involved[$i]['AlliName'] = $alliance->getName(); 
    7472    $involved[$i]['ShipName'] = $ship->getName(); 
     
    115113$smarty->assign('ShipName', $ship->getName()); 
    116114$smarty->assign('ClassName', $shipclass->getName()); 
    117 $smarty->assign('System', $system->getName()); 
    118 $smarty->assign('SystemURL', "?a=system_detail&amp;sys_id=".$system->getID()); 
    119 $smarty->assign('SystemSecurity', $system->getSecurity(true)); 
     115 
     116if ($kill->isClassified()) 
     117{ 
     118    $smarty->assign('System', 'Classified'); 
     119    $smarty->assign('SystemURL', ""); 
     120    $smarty->assign('SystemSecurity', '0.0'); 
     121} 
     122else 
     123{ 
     124    $smarty->assign('System', $system->getName()); 
     125    $smarty->assign('SystemURL', "?a=system_detail&amp;sys_id=".$system->getID()); 
     126    $smarty->assign('SystemSecurity', $system->getSecurity(true)); 
     127} 
    120128$smarty->assign('TimeStamp', $kill->getTimeStamp()); 
    121129$smarty->assign('VictimShipImg', $ship->getImage(64)); 
     
    146154                { 
    147155                    $Formatted = number_format($value, 2); 
    148                     $Formatted = $Formatted . " isk"; 
     156                    $Formatted = $Formatted." isk"; 
    149157                } 
    150158 
     
    154162 
    155163                    $Formatted = number_format($Formatted, 2); 
    156                     $Formatted = $Formatted . " K"; 
     164                    $Formatted = $Formatted." K"; 
    157165                } 
    158166 
     
    161169                    $Formatted = round($value / 1000000, 2); 
    162170                    $Formatted = number_format($Formatted, 2); 
    163                     $Formatted = $Formatted . " M"; 
     171                    $Formatted = $Formatted." M"; 
    164172                } 
    165173            } 
     
    195203if ($kill->relatedKillCount() > 1 || $kill->relatedLossCount() > 1) 
    196204{ 
    197     $menubox->addOption("link", "Related kills (" . $kill->relatedKillCount() . "/" . $kill->relatedLossCount() . ")", "?a=kill_related&kll_id=" . $kill->getID()); 
     205    $menubox->addOption("link", "Related kills (".$kill->relatedKillCount()."/".$kill->relatedLossCount().")", "?a=kill_related&kll_id=".$kill->getID()); 
    198206} 
    199207if ($page->isAdmin()) 
    200208{ 
    201209    $menubox->addOption("caption", "Admin"); 
    202     $menubox->addOption("link", "Delete", "javascript:openWindow('?a=kill_delete&kll_id=" . $kill->getID() . "', null, 420, 300, '' );"); 
     210    $menubox->addOption("link", "Delete", "javascript:openWindow('?a=admin_kill_delete&kll_id=".$kill->getID()."', null, 420, 300, '' );"); 
    203211} 
    204212$page->addContext($menubox->generate()); 
    205213 
    206 if ($config->getKillPoints()) 
     214if (config::get('kill_points')) 
    207215{ 
    208216    $scorebox = new Box("Points"); 
     
    211219} 
    212220 
    213 $mapbox = new Box("Map"); 
    214 $mapbox->addOption("img", "?a=mapview&sys_id=" . $system->getID() . "&mode=map&size=145"); 
    215 $mapbox->addOption("img", "?a=mapview&sys_id=" . $system->getID() . "&mode=region&size=145"); 
    216 $mapbox->addOption("img", "?a=mapview&sys_id=" . $system->getID() . "&mode=cons&size=145"); 
    217 $page->addContext($mapbox->generate()); 
     221if (!$kill->isClassified()) 
     222{ 
     223    $mapbox = new Box("Map"); 
     224    $mapbox->addOption("img", "?a=mapview&sys_id=".$system->getID()."&mode=map&size=145"); 
     225    $mapbox->addOption("img", "?a=mapview&sys_id=".$system->getID()."&mode=region&size=145"); 
     226    $mapbox->addOption("img", "?a=mapview&sys_id=".$system->getID()."&mode=cons&size=145"); 
     227    $page->addContext($mapbox->generate()); 
     228} 
    218229 
    219230$html = $smarty->fetch(get_tpl('kill_detail')); 
  • dev/common/kill_mail.php

    r132 r190  
    11<?php 
    2 require_once("db.php"); 
    3 require_once("class.page.php"); 
    4 require_once("class.kill.php"); 
    5 require_once("globals.php"); 
     2require_once('common/includes/db.php'); 
     3require_once('common/includes/class.page.php'); 
     4require_once('common/includes/class.kill.php'); 
    65 
    76$kll_id = intval($_GET['kll_id']); 
  • dev/common/kill_related.php

    r188 r190  
    11<?php 
    2 require_once("class.page.php"); 
    3 require_once("class.corp.php"); 
    4 require_once("class.alliance.php"); 
    5 require_once("class.killlist.php"); 
    6 require_once("class.killlisttable.php"); 
    7 require_once("class.killsummarytable.php"); 
    8 require_once("class.box.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.corp.php'); 
     4require_once('common/includes/class.alliance.php'); 
     5require_once('common/includes/class.killlist.php'); 
     6require_once('common/includes/class.killlisttable.php'); 
     7require_once('common/includes/class.killsummarytable.php'); 
    98 
    109if (!$kll_id = intval($_GET['kll_id'])) 
     
    1413} 
    1514 
    16 $page = new Page("Related kills & losses"); 
     15$page = new Page('Related kills & losses'); 
    1716 
    1817// this is a fast query to get the system and timestamp 
  • dev/common/kills.php

    r188 r190  
    11<?php 
    2 require_once("class.page.php"); 
    3 require_once("class.box.php"); 
    4 require_once("class.corp.php"); 
    5 require_once("class.alliance.php"); 
    6 require_once("class.killlist.php"); 
    7 require_once("class.ship.php"); 
    8 require_once("class.killlisttable.php"); 
    9 require_once("class.killsummarytable.php"); 
    10 require_once("class.toplist.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.corp.php'); 
     4require_once('common/includes/class.alliance.php'); 
     5require_once('common/includes/class.killlist.php'); 
     6require_once('common/includes/class.ship.php'); 
     7require_once('common/includes/class.killlisttable.php'); 
     8require_once('common/includes/class.killsummarytable.php'); 
     9require_once('common/includes/class.toplist.php'); 
    1110 
    1211$week = $_GET['w']; 
    1312$year = $_GET['y']; 
    1413 
    15 if ($week == "") 
    16     $week = date("W"); 
     14if ($week == '') 
     15    $week = kbdate('W'); 
    1716 
    18 if ($year == "") 
    19     $year = date("Y"); 
     17if ($year == '') 
     18    $year = kbdate('Y'); 
    2019 
    2120if ($week == 52) 
     
    8483$menubox->addOption("caption", "Navigation"); 
    8584$menubox->addOption("link", "Previous week ", "?a=kills&w=".$pweek."&y=".$pyear); 
    86 if ($week != date("W")) 
     85if ($week != kbdate("W")) 
    8786{ 
    8887    $menubox->addOption('link', "Next week", "?a=kills&w=".$nweek."&y=".$nyear); 
  • dev/common/login.php

    r188 r190  
    11<?php 
    2 require_once('class.page.php'); 
    3 require_once('class.user.php'); 
     2require_once('common/includes/class.page.php'); 
    43 
    54$page = new Page('Login'); 
     
    98    if ($_POST['usrlogin'] == '' && $_POST['usrpass'] == ADMIN_PASSWORD) 
    109    { 
    11         $page->session_->create(1); 
     10        Session::create(true); 
    1211 
    1312        header('Location: ?a=admin'); 
  • dev/common/logout.php

    r95 r190  
    11<?php 
    2 require_once("db.php"); 
    3 require_once("class.session.php"); 
     2require_once('common/includes/class.session.php'); 
    43 
    54$session = new Session(); 
  • dev/common/losses.php

    r149 r190  
    11<?php 
    2 require_once("class.page.php"); 
    3 require_once("class.box.php"); 
    4 require_once("class.corp.php"); 
    5 require_once("class.alliance.php"); 
    6 require_once("class.killlist.php"); 
    7 require_once("class.killlisttable.php"); 
    8 require_once("class.killsummarytable.php"); 
    9 require_once("class.toplist.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.corp.php'); 
     4require_once('common/includes/class.alliance.php'); 
     5require_once('common/includes/class.killlist.php'); 
     6require_once('common/includes/class.killlisttable.php'); 
     7require_once('common/includes/class.killsummarytable.php'); 
     8require_once('common/includes/class.toplist.php'); 
    109 
    1110$week = $_GET['w']; 
    1211$year = $_GET['y']; 
    1312 
    14 if ($week == "") 
    15     $week = date("W"); 
     13if ($week == '') 
     14    $week = kbdate('W'); 
    1615 
    17 if ($year == "") 
    18     $year = date("Y"); 
     16if ($year == '') 
     17    $year = kbdate('Y'); 
    1918 
    2019if ($week == 52) 
     
    6160$html .= $summarytable->generate(); 
    6261// $html .= "<table width=\"99%\" align=center><tr><td class=weeknav align=left>"; 
    63 // if ( $week != date( "W" ) ) 
     62// if ( $week != kbdate( "W" ) ) 
    6463// $html .= "[<a href=\"?a=losses&w=".$nweek."&y=".$nyear."\"><<</a>]"; 
    6564// $html .= "</td><td class=weeknav align=right>[<a href=\"?a=losses&w=".$pweek."&y=".$pyear."\">>></a>]</td></tr></table>"; 
     
    8483$menubox->addOption("caption", "Navigation"); 
    8584$menubox->addOption("link", "Previous week", "?a=losses&w=".$pweek."&y=".$pyear); 
    86 if ($week != date("W")) 
     85if ($week != kbdate("W")) 
    8786{ 
    8887    $menubox->addOption("link", "Next week", "?a=losses&w=".$nweek."&y=".$nyear); 
  • dev/common/mapview.php

    r155 r190  
    11<?php 
    2 require_once("class.map.php"); 
     2require_once('common/includes/class.map.php'); 
    33 
    44function checkColors($context) 
    55{ 
    6     global $config, $view; 
     6    global $view; 
    77 
    88    $a = array('line', 'bg', 'hl', 'normal', 'capt'); 
    99    foreach ($a as $b) 
    1010    { 
    11         if ($string = $config->getConfig('map_'.$context.'_cl_'.$b)) 
     11        if ($string = config::get('map_'.$context.'_cl_'.$b)) 
    1212        { 
    1313            $tmp = explode(',', $string); 
    1414            $function = 'set'.$b.'color'; 
    15             eval('$view->'.$function.'($tmp[0], $tmp[1], $tmp[2]);'); 
     15            $view->$function($tmp[0], $tmp[1], $tmp[2]); 
    1616        } 
    1717    } 
     
    2424    case "map": 
    2525        $view->setTitle("Region"); 
    26         $view->showLines($config->getConfig('map_map_showlines')); 
    27         $view->paintSecurity($config->getConfig('map_map_security')); 
     26        $view->showLines(config::get('map_map_showlines')); 
     27        $view->paintSecurity(config::get('map_map_security')); 
    2828        checkColors('map'); 
    2929        break; 
    3030    case "region": 
    3131        $view->setTitle("Constellation"); 
    32         $view->showLines($config->getConfig('map_reg_showlines')); 
    33         $view->paintSecurity($config->getConfig('map_reg_security')); 
     32        $view->showLines(config::get('map_reg_showlines')); 
     33        $view->paintSecurity(config::get('map_reg_security')); 
    3434        $view->setOffset(25); 
    3535        checkColors('reg'); 
    3636        break; 
    3737    case "cons": 
    38         $view->showLines($config->getConfig('map_con_showlines')); 
    39         $view->showSysNames($config->getConfig('map_con_shownames')); 
    40         $view->paintSecurity($config->getConfig('map_con_security')); 
     38        $view->showLines(config::get('map_con_showlines')); 
     39        $view->showSysNames(config::get('map_con_shownames')); 
     40        $view->paintSecurity(config::get('map_con_security')); 
    4141        $view->setOffset(25); 
    4242        checkColors('con'); 
  • dev/common/pilot_detail.php

    r165 r190  
    11<?php 
    2 require_once("class.page.php"); 
    3 require_once("class.pilot.php"); 
    4 require_once("class.corp.php"); 
    5 require_once("class.alliance.php"); 
    6 require_once("class.kill.php"); 
    7 require_once("class.killlist.php"); 
    8 require_once("class.killlisttable.php"); 
    9 require_once("class.killsummarytable.php"); 
    10 require_once("class.box.php"); 
    11 require_once("class.toplist.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.pilot.php'); 
     4require_once('common/includes/class.corp.php'); 
     5require_once('common/includes/class.alliance.php'); 
     6require_once('common/includes/class.kill.php'); 
     7require_once('common/includes/class.killlist.php'); 
     8require_once('common/includes/class.killlisttable.php'); 
     9require_once('common/includes/class.killsummarytable.php'); 
     10require_once('common/includes/class.toplist.php'); 
    1211 
    1312$pilot = new Pilot($_GET['plt_id']); 
    1413$corp = $pilot->getCorp(); 
    1514$alliance = $corp->getAlliance(); 
    16 $page = new Page("Pilot details - " . $pilot->getName()); 
     15$page = new Page('Pilot details - '.$pilot->getName()); 
    1716 
    1817if (!$pilot->exists()) 
    1918{ 
    20     $html = "That pilot doesn't exist."; 
     19    $html = 'That pilot doesn\'t exist.'; 
    2120    $page->generate($html); 
    2221    exit; 
     
    3635 
    3736$html .= "<tr class=kb-table-row-even>"; 
    38 $html .= "<td rowspan=8 width=128><img src=\"" . $pilot->getPortraitURL(128) . "\" border=\"0\" width=\"128\" heigth=\"128\"></td>"; 
     37$html .= "<td rowspan=8 width=128><img src=\"".$pilot->getPortraitURL(128)."\" border=\"0\" width=\"128\" heigth=\"128\"></td>"; 
    3938 
    40 $html .= "<td class=kb-table-cell width=160><b>Corporation:</b></td><td class=kb-table-cell><a href=\"?a=corp_detail&crp_id=" . $corp->getID() . "\">" . $corp->getName() . "</a></td></tr>"; 
     39$html .= "<td class=kb-table-cell width=160><b>Corporation:</b></td><td class=kb-table-cell><a href=\"?a=corp_detail&crp_id=".$corp->getID()."\">".$corp->getName()."</a></td></tr>"; 
    4140$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Alliance:</b></td><td class=kb-table-cell>"; 
    4241if ($alliance->getName() == "Unknown" || $alliance->getName() == "None") 
    43     $html .= "<b>" . $alliance->getName() . "</b>"; 
     42    $html .= "<b>".$alliance->getName()."</b>"; 
    4443else 
    45     $html .= "<a href=\"?a=alliance_detail&all_id=" . $alliance->getID() . "\">" . $alliance->getName() . "</a>"; 
    46 $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Kills:</b></td><td class=kl-kill>" . $klist->getCount() . "</td></tr>"; 
    47 $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Real kills:</b></td><td class=kl-kill>" . $tklist->getCount() . "</td></tr>"; 
    48 $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Losses:</b></td><td class=kl-loss>" . $llist->getCount() . "</td></tr>"; 
    49 $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Damage done (ISK):</b></td><td class=kl-kill>" . $klist->getISK() . "M</td></tr>"; 
    50 $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Damage received (ISK):</b></td><td class=kl-loss>" . $llist->getISK() . "M</td></tr>"; 
     44    $html .= "<a href=\"?a=alliance_detail&all_id=".$alliance->getID()."\">".$alliance->getName()."</a>"; 
     45$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Kills:</b></td><td class=kl-kill>".$klist->getCount()."</td></tr>"; 
     46$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Real kills:</b></td><td class=kl-kill>".$tklist->getCount()."</td></tr>"; 
     47$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Losses:</b></td><td class=kl-loss>".$llist->getCount()."</td></tr>"; 
     48$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Damage done (ISK):</b></td><td class=kl-kill>".round($klist->getISK()/1000000,2)."M</td></tr>"; 
     49$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Damage received (ISK):</b></td><td class=kl-loss>".round($llist->getISK()/1000000,2)."M</td></tr>"; 
    5150 
    5251$html .= "</td></tr>"; 
     
    150149$menubox->setIcon("menu-item.gif"); 
    151150$menubox->addOption("caption","Kills & losses"); 
    152 $menubox->addOption("link","Recent activity", "?a=pilot_detail&plt_id=" . $pilot->getID() . "&view=recent"); 
    153 $menubox->addOption("link","Kills", "?a=pilot_detail&plt_id=" . $pilot->getID() . "&view=kills"); 
    154 $menubox->addOption("link","Losses", "?a=pilot_detail&plt_id=" . $pilot->getID() . "&view=losses"); 
     151$menubox->addOption("link","Recent activity", "?a=pilot_detail&plt_id=".$pilot->getID()."&view=recent"); 
     152$menubox->addOption("link","Kills", "?a=pilot_detail&plt_id=".$pilot->getID()."&view=kills"); 
     153$menubox->addOption("link","Losses", "?a=pilot_detail&plt_id=".$pilot->getID()."&view=losses"); 
    155154$menubox->addOption("caption","Statistics"); 
    156 $menubox->addOption("link","Ships & weapons", "?a=pilot_detail&plt_id=" . $pilot->getID() . "&view=ships_weapons"); 
    157 if (strstr($config->getConfig("mods_active"), 'signature_generator')) 
     155$menubox->addOption("link","Ships & weapons", "?a=pilot_detail&plt_id=".$pilot->getID()."&view=ships_weapons"); 
     156if (strstr(config::get("mods_active"), 'signature_generator')) 
    158157{ 
    159158    $menubox->addOption("caption","Signature"); 
    160     $menubox->addOption("link","Link", "?a=sig_list&i=" . $pilot->getID()); 
     159    $menubox->addOption("link","Link", "?a=sig_list&i=".$pilot->getID()); 
    161160} 
    162161$page->addContext($menubox->generate()); 
    163162 
    164 if ($config->getKillPoints()) 
     163if (config::get('kill_points')) 
    165164{ 
    166165    $scorebox = new Box("Kill points"); 
     
    168167    $page->addContext($scorebox->generate()); 
    169168} 
    170 if ($config->getConfig('loss_points')) 
     169if (config::get('loss_points')) 
    171170{ 
    172171    $scorebox = new Box("Loss points"); 
     
    174173    $page->addContext($scorebox->generate()); 
    175174} 
    176 if ($config->getConfig('total_points')) 
     175if (config::get('total_points')) 
    177176{ 
    178177    $scorebox = new Box("Total points"); 
  • dev/common/portrait_grab.php

    r47 r190  
    11<?php 
    2 require_once("class.page.php"); 
    3 require_once("class.pilot.php"); 
    4 require_once("class.corp.php"); 
    5 require_once("class.alliance.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.pilot.php'); 
     4require_once('common/includes/class.corp.php'); 
     5require_once('common/includes/class.alliance.php'); 
    66 
    7 $page = new Page("Capture portrait"); 
     7$page = new Page('Capture portrait'); 
    88 
    9 $html .= "<html><head><title>Update portrait</title></head><body>"; 
     9$html .= '<html><head><title>Update portrait</title></head><body>'; 
    1010 
    1111if (!$page->igb()) 
    1212{ 
    13     $html .= "You need to access this page from the EVE ingame browser."; 
     13    $html .= 'You need to access this page from the EVE ingame browser.'; 
    1414} 
    1515else 
     
    1717    if (($_SERVER['HTTP_EVE_TRUSTED'] == 'no')) 
    1818    { 
    19         Header('eve.trustme:http://' . $_SERVER['HTTP_HOST'] . '/::Need trust to grab character portrait.'); 
     19        Header('eve.trustme:http://'.$_SERVER['HTTP_HOST'].'/::Need trust to grab character portrait.'); 
    2020        $html .= '<h1>Trust Required</h1>'; 
    2121        $html .= 'This site needs to be trusted in order to grab your character portrait.'; 
     
    3232        $plt_id = $pilot->add($_SERVER['HTTP_EVE_CHARNAME'], $corp, $now); 
    3333        $pilot->setCharacterID($_SERVER['HTTP_EVE_CHARID']); 
    34         @unlink("cache/portraits/" . $_SERVER['HTTP_EVE_CHARID'] . "_32.jpg"); 
    35         @unlink("cache/portraits/" . $_SERVER['HTTP_EVE_CHARID'] . "_64.jpg"); 
    36         @unlink("cache/portraits/" . $_SERVER['HTTP_EVE_CHARID'] . "_128.jpg"); 
    37         @unlink("cache/portraits/" . $_SERVER['HTTP_EVE_CHARID'] . "_512.jpg"); 
    38         //$html .= "<img src=\"".$pilot->getPortraitURL(64).".jpg\" border=\"0\">"; 
     34        @unlink("cache/portraits/".$_SERVER['HTTP_EVE_CHARID']."_32.jpg"); 
     35        @unlink("cache/portraits/".$_SERVER['HTTP_EVE_CHARID']."_64.jpg"); 
     36        @unlink("cache/portraits/".$_SERVER['HTTP_EVE_CHARID']."_128.jpg"); 
     37        @unlink("cache/portraits/".$_SERVER['HTTP_EVE_CHARID']."_256.jpg"); 
     38        @unlink("cache/portraits/".$_SERVER['HTTP_EVE_CHARID']."_512.jpg"); 
     39        $html .= "<img src=\"".$pilot->getPortraitURL(64).".jpg\" border=\"0\">"; 
    3940        $html .= "Character portrait updated !<br>"; 
    4041        $html .= "<a href=\"?a=igb\">Return</a><br>"; 
     
    4647$html .= "</body></html>"; 
    4748 
    48 echo $html; 
     49$page->setContent($html); 
     50$page->generate(); 
     51 
     52/* 
    4953if ($updated) 
    5054{ 
     
    6771    } 
    6872} 
     73*/ 
    6974?> 
  • dev/common/post.php

    r181 r190  
    11<?php 
    2 require_once("class.page.php"); 
    3 require_once("class.killboard.php"); 
    4 require_once("class.parser.php"); 
    5 require_once("class.phpmailer.php"); 
    6 require_once("class.kill.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.killboard.php'); 
     4require_once('common/includes/class.parser.php'); 
     5require_once('common/includes/class.phpmailer.php'); 
     6require_once('common/includes/class.kill.php'); 
    77 
    8 $page = new Page("Post killmail"); 
     8$page = new Page('Post killmail'); 
    99$kb = new Killboard(KB_SITE); 
    1010 
     
    1616 
    1717        // Filtering 
    18         if (config::get("filter_apply")) 
     18        if (config::get('filter_apply')) 
    1919        { 
    20             $filterdate = config::get("filter_date"); 
     20            $filterdate = config::get('filter_date'); 
    2121            $year = substr($_POST['killmail'], 0, 4); 
    2222            $month = substr($_POST['killmail'], 5, 2); 
     
    6565            elseif ($killid == -3) 
    6666            { 
    67                 $filterdate = date("j F Y", config::get("filter_date")); 
     67                $filterdate = kbdate("j F Y", config::get("filter_date")); 
    6868                $html = "You are not allowed to post killmails older than $filterdate."; 
    6969            } 
  • dev/common/post_igb.php

    r157 r190  
    11<?php 
    2 require_once("class.page.php"); 
    3 require_once("class.killboard.php"); 
    4 require_once("class.parser.php"); 
    5 require_once("class.phpmailer.php"); 
    6 require_once("class.kill.php"); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.killboard.php'); 
     4require_once('common/includes/class.parser.php'); 
     5require_once('common/includes/class.phpmailer.php'); 
     6require_once('common/includes/class.kill.php'); 
    77 
    88$kb = new Killboard(KB_SITE); 
    99 
    10 $html = "<html><head><title>" . KB_TITLE . " Killboard - Post Mail" . "</title></head></html><body>"; 
     10$html = '<html><head><title>'.KB_TITLE.' Killboard - Post Mail</title></head></html><body>'; 
    1111 
    1212if (isset($_POST['killmail'])) 
     
    3434            elseif ($killid == -3) 
    3535            { 
    36                 $filterdate = date("j F Y", $config->getConfig("filter_date")); 
     36                $filterdate = kbdate("j F Y", $config->getConfig("filter_date")); 
    3737                $html = "You are not allowed to post killmails older than $filterdate."; 
    3838            } 
  • dev/common/register.php

    r188 r190  
    11<?php 
    2 require_once('class.killboard.php'); 
    3 require_once('class.page.php'); 
     2require_once('common/includes/class.killboard.php'); 
     3require_once('common/includes/class.page.php'); 
    44 
    55$killboard = new Killboard(KB_SITE); 
  • dev/common/search.php

    r92 r190  
    11<?php 
    2 require_once("db.php"); 
    3 require_once("class.page.php"); 
    4 require_once("globals.php"); 
     2require_once('common/includes/class.page.php'); 
    53 
    6 $page = new Page("Search"); 
     4$page = new Page('Search'); 
    75 
    86$html .= "<form id=search action=\"?a=search\" method=post>"; 
  • dev/common/standings.php

    r134 r190  
    11<?php 
    2 require_once('db.php'); 
    3 require_once('class.page.php'); 
    4 require_once('class.corp.php'); 
    5 require_once('class.alliance.php'); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.corp.php'); 
     4require_once('common/includes/class.alliance.php'); 
    65 
    76$page = new Page(); 
  • dev/common/system_detail.php

    r155 r190  
    11<?php 
    2 require_once("db.php"); 
    3 require_once("class.page.php"); 
    4 require_once('class.system.php'); 
    5 require_once('class.killlist.php'); 
    6 require_once('class.killlisttable.php'); 
    7 require_once('class.killsummarytable.php'); 
    8 require_once('class.box.php'); 
     2require_once('common/includes/class.page.php'); 
     3require_once('common/includes/class.system.php'); 
     4require_once('common/includes/class.killlist.php'); 
     5require_once('common/includes/class.killlisttable.php'); 
     6require_once('common/includes/class.killsummarytable.php'); 
    97 
    108$sys_id = intval($_GET['sys_id']); 
  • dev/common/thumb.php

    r158 r190  
    11<?php 
    2 require_once('class.thumb.php'); 
     2require_once('common/includes/class.thumb.php'); 
    33 
    44$thumb = new thumb($_GET['id'], $_GET['size'], $_GET['type']); 
  • dev/index.php

    r181 r190  
    11<?php 
     2 
     3/* 
     4* Request forwarder, look at common/index.php for the action and license 
     5*/ 
     6 
    27@error_reporting(E_ALL ^ E_NOTICE); 
     8if (PHP_OS != 'Linux') 
     9{ 
     10    @ini_set('include_path', ini_get('include_path').';.\\common\\includes'); 
     11} 
     12else 
     13{ 
     14    @ini_set('include_path', ini_get('include_path').':./common/includes'); 
     15} 
    316include('common/index.php'); 
    417?> 
  • dev/install/index.php

    r88 r190  
    3434</div></td> 
    3535</tr></table> 
    36 <div class="counter"><font style="font-size: 9px;">&copy;2006 <a href="http://www.eve-dev.net/" target="_blank">EVE Development Network</a></font></div> 
     36<div class="counter"><font style="font-size: 9px;">&copy;2006-2007 <a href="http://www.eve-dev.net/" target="_blank">EVE Development Network</a></font></div> 
    3737</td></tr></table> 
    3838</body> 
  • dev/mods/mail_forward/init.php

    r185 r190  
    66    function handler($object) 
    77    { 
    8         require_once('common/class.http.php'); 
     8        require_once('common/includes/class.http.php'); 
    99 
    1010        $req = new http_request(config::get('forward_site').'?a=post'); 
  • dev/mods/rss_feed/rss.php

    r149 r190  
    77*/ 
    88 
    9 require_once("common/class.corp.php"); 
    10 require_once("common/class.alliance.php"); 
    11 require_once("common/class.killlist.php"); 
    12 require_once("common/class.killlisttable.php"); 
     9require_once("common/includes/class.corp.php"); 
     10require_once("common/includes/class.alliance.php"); 
     11require_once("common/includes/class.killlist.php"); 
     12require_once("common/includes/class.killlisttable.php"); 
    1313require_once("class.rss.php"); 
    1414 
  • dev/mods/signature_generator/sig.php

    r165 r190  
    2323    errorPic('No pilot id specified.'); 
    2424} 
    25 require_once("common/class.pilot.php"); 
    26 require_once("common/class.corp.php"); 
    27 require_once("common/class.alliance.php"); 
    28 require_once("common/class.killlist.php"); 
     25require_once("common/includes/class.pilot.php"); 
     26require_once("common/includes/class.corp.php"); 
     27require_once("common/includes/class.alliance.php"); 
     28require_once("common/includes/class.killlist.php"); 
    2929 
    3030$pilot = new Pilot($plt_id); 
  • dev/mods/signature_generator/sig_list.php

    r87 r190  
    11<?php 
    2 require_once("common/class.page.php"); 
     2require_once('common/includes/class.page.php'); 
    33 
    4 $page = new Page("Signature Listing"); 
     4$page = new Page('Signature Listing'); 
    55 
    66$signatures = array(); 
  • dev/templates/admin_options_field_head.tpl

    r177 r190  
    1 <form id="options2 name="options" method="post" action="?a=admin&amp;field={$field}&amp;sub={$sub}"> 
     1<form id="options" name="options" method="post" action="?a=admin&amp;field={$field}&amp;sub={$sub}"> 
    22<input type="hidden" name="field" value="{$field}"> 
    33<input type="hidden" name="sub" value="{$sub}"> 
  • dev/templates/block_comments.tpl

    r133 r190  
    1313            <p>{$comments[i].comment}</p> 
    1414{if $page->isAdmin()} 
    15             <a href="javascript:openWindow('?a=comments_delete&c_id={$comments[i].id}', null, 480, 350, '' );">Delete Comment</a> 
     15            <a href="javascript:openWindow('?a=admin_comments_delete&c_id={$comments[i].id}', null, 480, 350, '' );">Delete Comment</a> 
    1616{/if} 
    1717          </td>