Changeset 104

Show
Ignore:
Timestamp:
11/28/06 22:32:11 (14 years ago)
Author:
knifee
Message:

Changed the class.box.php to use smarty, and changed all pages that use the class to use the options. Menu Boxes can now be created as follows:
$menubox = new box("Menu");
$menubox->setIcon("menu-item.gif"); // only needed if adding a Menu (ie u want the little icon)
$menubox->addOption("caption","View"); // Add a Caption
$menubox->addOption("link","Name","URL"); // Add a Link
$menubox->addOption("points","Points Value"); // Add points to a Points Box
$menubox->addOption("img","/path to img"); // Add an Image

changed the AwardBox? Class to use smarty, that is called in the same way as before so no need to change anything.

Location:
dev/common
Files:
13 modified

Legend:

Unmodified
Added
Removed
  • dev/common/admin_menu.php

    r95 r104  
    22require_once("class.box.php"); 
    33 
    4 $menubox = new MenuBox(); 
    5 $menubox->addOption("Generic", "?a=admin"); 
    6 $menubox->addOption("Contracts", "?a=admin_cc&op=view&type=contract"); 
    7 $menubox->addOption("Campaigns", "?a=admin_cc&op=view&type=campaign"); 
    8 $menubox->addOption("Ship Values", "?a=admin_shp_val"); 
    9 $menubox->addOption("Synchronization", "?a=admin_sync"); 
    10 $menubox->addOption("Map Options", "?a=admin_mapoptions"); 
    11 $menubox->addOption("Post Permissions", "?a=admin_postperm"); 
    12 $menubox->addOption("Mods", "?a=admin_mods"); 
    13 $menubox->addOption("Auditing", "?a=admin_audit"); 
    14 $menubox->addOption("Kill Import - files", "?a=kill_import"); 
    15 $menubox->addOption("Kill Import - csv", "?a=kill_import_csv"); 
    16 $menubox->addOption("Kill Export - files", "?a=kill_export"); 
    17 $menubox->addOption("Kill Export - csv", "?a=kill_export_search"); 
    18 $menubox->addOption("Logout", "?a=logout"); 
     4$menubox = new Box(); 
     5$menubox->setIcon("menu-item.gif"); 
     6$menubox->addOption("link","Generic", "?a=admin"); 
     7$menubox->addOption("link","Contracts", "?a=admin_cc&op=view&type=contract"); 
     8$menubox->addOption("link","Campaigns", "?a=admin_cc&op=view&type=campaign"); 
     9$menubox->addOption("link","Ship Values", "?a=admin_shp_val"); 
     10$menubox->addOption("link","Synchronization", "?a=admin_sync"); 
     11$menubox->addOption("link","Map Options", "?a=admin_mapoptions"); 
     12$menubox->addOption("link","Post Permissions", "?a=admin_postperm"); 
     13$menubox->addOption("link","Mods", "?a=admin_mods"); 
     14$menubox->addOption("link","Auditing", "?a=admin_audit"); 
     15$menubox->addOption("link","Kill Import - files", "?a=kill_import"); 
     16$menubox->addOption("link","Kill Import - csv", "?a=kill_import_csv"); 
     17$menubox->addOption("link","Kill Export - files", "?a=kill_export"); 
     18$menubox->addOption("link","Kill Export - csv", "?a=kill_export_search"); 
     19$menubox->addOption("link","Logout", "?a=logout"); 
    1920?> 
  • dev/common/alliance_detail.php

    r92 r104  
    268268} 
    269269 
    270 $menubox = new MenuBox(); 
    271 $menubox->addCaption("Kills & losses"); 
    272 $menubox->addOption("Recent activity", "?a=alliance_detail&all_id=" . $alliance->getID()); 
    273 $menubox->addOption("Kills", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=kills"); 
    274 $menubox->addOption("Losses", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=losses"); 
    275 $menubox->addCaption("Corp statistics"); 
    276 $menubox->addOption("Top killers", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=corp_kills"); 
    277 $menubox->addOption("Top losers", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=corp_losses"); 
    278  
    279 $menubox->addCaption("Pilot statistics"); 
    280 $menubox->addOption("Top killers", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=pilot_kills"); 
     270$menubox = new Box("Menu"); 
     271$menubox->setIcon("menu-item.gif"); 
     272$menubox->addOption("caption","Kills & losses"); 
     273$menubox->addOption("link","Recent activity", "?a=alliance_detail&all_id=" . $alliance->getID()); 
     274$menubox->addOption("link","Kills", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=kills"); 
     275$menubox->addOption("link","Losses", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=losses"); 
     276$menubox->addOption("caption","Corp statistics"); 
     277$menubox->addOption("link","Top killers", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=corp_kills"); 
     278$menubox->addOption("link","Top losers", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=corp_losses"); 
     279 
     280$menubox->addOption("caption","Pilot statistics"); 
     281$menubox->addOption("link","Top killers", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=pilot_kills"); 
    281282 
    282283$killboard = $page->killboard_; 
     
    284285if ($config->getKillPoints()) 
    285286    $menubox->addOption("Top scorers", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=pilot_scores"); 
    286 $menubox->addOption("Top losers", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=pilot_losses"); 
    287 $menubox->addCaption("Global statistics"); 
    288 $menubox->addOption("Ships & weapons", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=ships_weapons"); 
     287$menubox->addOption("link","Top losers", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=pilot_losses"); 
     288$menubox->addOption("caption","Global statistics"); 
     289$menubox->addOption("link","Ships & weapons", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=ships_weapons"); 
    289290$page->addContext($menubox->generate()); 
    290291 
  • dev/common/awards.php

    r2 r104  
    156156  $html .= "</td></tr></table>"; 
    157157 
    158   $menubox = new MenuBox(); 
    159   $menubox->addCaption( "Navigation" ); 
    160   $menubox->addOption( "Previous month ", "?a=awards&m=".$pmonth."&y=".$pyear ); 
     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 ); 
    161162  if ( ! ($month == date( "m" ) - 1 && $year == date( "Y" ) ) ) 
    162     $menubox->addOption( "Next month", "?a=awards&m=".$nmonth."&y=".$nyear ); 
     163    $menubox->addOption("link", "Next month", "?a=awards&m=".$nmonth."&y=".$nyear ); 
    163164  $page->addContext( $menubox->generate() ); 
    164165   
  • dev/common/campaigns.php

    r2 r104  
    2727  } 
    2828 
    29   $menubox = new MenuBox(); 
    30   $menubox->addOption( "Active campaigns", "?a=campaigns" ); 
    31   $menubox->addOption( "Past campaigns", "?a=campaigns&view=past" ); 
     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" ); 
    3233 
    3334  $page->addContext( $menubox->generate() ); 
  • dev/common/cc_detail.php

    r44 r104  
    183183} 
    184184 
    185 $menubox = new MenuBox(); 
    186 $menubox->addCaption("Overview"); 
    187 $menubox->addOption("Target overview", "?a=cc_detail&ctr_id=" . $_GET['ctr_id']); 
    188 $menubox->addCaption("Kills & losses"); 
    189 $menubox->addOption("Recent activity", "?a=cc_detail&ctr_id=" . $_GET['ctr_id'] . "&view=recent_activity"); 
    190 $menubox->addOption("All kills", "?a=cc_detail&ctr_id=" . $_GET['ctr_id'] . "&view=kills"); 
    191 $menubox->addOption("All losses", "?a=cc_detail&ctr_id=" . $_GET['ctr_id'] . "&view=losses"); 
     185$menubox = new box("Menu"); 
     186$menubox->setIcon("menu-item.gif"); 
     187$menubox->addOption("caption","Overview"); 
     188$menubox->addOption("link","Target overview", "?a=cc_detail&ctr_id=" . $_GET['ctr_id']); 
     189$menubox->addOption("caption","Kills & losses"); 
     190$menubox->addOption("link","Recent activity", "?a=cc_detail&ctr_id=" . $_GET['ctr_id'] . "&view=recent_activity"); 
     191$menubox->addOption("link","All kills", "?a=cc_detail&ctr_id=" . $_GET['ctr_id'] . "&view=kills"); 
     192$menubox->addOption("link","All losses", "?a=cc_detail&ctr_id=" . $_GET['ctr_id'] . "&view=losses"); 
    192193 
    193194$page->addContext($menubox->generate()); 
  • dev/common/class.box.php

    r64 r104  
    1 <?php 
     1<?php  
    22require_once("class.graph.php"); 
     3require_once("globals.php"); 
    34 
    45class Box 
     
    78    { 
    89        $this->title_ = $title; 
     10                $this->box_array = array(); 
    911    } 
    10  
    11     function setContent($html) 
    12     { 
    13         $this->content_ = $html; 
    14     } 
    15  
    16     function setHeight($height) 
    17     { 
    18         $this->height_ = $height; 
    19     } 
    20  
    21     function setIcon($icon) 
     12         
     13    function setIcon($icon)                                     //its called setIcon... and it sets the Icon. 
    2214    { 
    2315        $this->icon_ = $icon; 
    2416    } 
     17         
     18        function addOption($type,$name,$url="") //add something to the array that we send to smarty later... types can be caption, img, link, points. Only link needs all 3 attribues  
     19        { 
     20        $this->box_array[]=array('type' => $type, 'name' => $name, 'url' => $url); 
     21        } 
    2522 
    26     function generate() 
     23        function generate() 
    2724    { 
    28         $html = "<table class=kb-table width=150"; 
    29         if ($this->height_) $html .= " height=" . $this->height_; 
    30         $html .= " cellspacing=\"1\"><tr>"; 
    31         $html .= "<td class=kb-table-header align=center>"; 
    32         if ($this->icon_) $html .= "<img src=\"" . IMG_URL . "/" . $this->icon_ . "\" border=\"0\">"; 
    33         $html .= $this->title_ . "</td></tr>"; 
    34         $html .= "<tr class=kb-table-row-even><td>" . $this->content_ . "</td></tr>"; 
    35         $html .= "</table><p>"; 
    36  
    37         return $html; 
    38     } 
    39 } 
    40  
    41 class MenuBox 
    42 { 
    43     function MenuBox() 
    44     { 
    45         $this->box_ = new Box("Menu"); 
    46         // $this->box_->setIcon( "menu.gif" ); 
    47     } 
    48  
    49     function addCaption($name) 
    50     { 
    51         $this->html_ .= "<div class=menu-caption>" . $name . "</div>"; 
    52     } 
    53  
    54     function addOption($name, $url, $icon = "") 
    55     { 
    56         $this->html_ .= "<div class=menu-item>"; 
    57         if ($icon == "") $icon = "menu-item.gif"; 
    58         $this->html_ .= "<img src=\"" . IMG_URL . "/" . $icon . "\" border=\"0\">&nbsp;<a href=\"" . $url . "\">" . $name . "</a><br>"; 
    59         $this->html_ .= "</div>"; 
    60     } 
    61  
    62     function setHeight($height) 
    63     { 
    64         $this->box_->setHeight($height); 
    65     } 
    66  
    67     function generate() 
    68     { 
    69         $this->box_->setContent("<div class=menu-wrapper>" . $this->html_ . "</div>"); 
    70         return $this->box_->generate(); 
     25        //print_r($this->box_array); 
     26         global $config, $smarty; 
     27        $smarty->assign('count',count($this->box_array)); 
     28        if($this->icon_){ $smarty->assign('icon',IMG_URL . "/" . $this->icon_); } 
     29        $smarty->assign('title',$this->title_ ); 
     30        $smarty->assign('items',$this->box_array); 
     31        return $smarty->fetch('box.tpl'); 
    7132    } 
    7233} 
     
    7637    function AwardBox($list, $title, $comment, $entity, $award) 
    7738    { 
     39 
    7840        $this->toplist_ = $list; 
    79         $this->box_ = new Box($title); 
     41        $this->title_ = $title; 
    8042        $this->comment_ = $comment; 
    8143        $this->entity_ = $entity; 
     
    8547    function generate() 
    8648    { 
     49                global $config, $smarty; 
    8750        $rows = array(); 
    8851        $max = 0; 
     52 
    8953        for ($i = 1; $i < 11; $i++) 
    9054        { 
     
    9357            if ($row['cnt'] > $max) $max = $row['cnt']; 
    9458        } 
     59 
    9560        if (!$rows[0]['plt_id']) return; 
    9661        $pilot = new Pilot($rows[0]['plt_id']); 
    97  
    98         $html .= "<table class=kb-subtable cellspacing=0 border=0 width=\"100%\"><tr class=kb-table-row-odd>"; 
    99         $html .= "<td align=left>"; 
    100         $html .= "<img src=\"" . $pilot->getPortraitURL(64) . "\">"; 
    101         $html .= "</td><td align=center>"; 
    102         $html .= "<img src=\"" . IMG_URL . "/awards/" . $this->award_ . ".gif\">"; 
    103         $html .= "</td>"; 
    104         $html .= "</tr></table>"; 
    105         $html .= "<table class=kb-subtable cellspacing=0 border=0 width=\"100%\">"; 
    106         $html .= "<tr><td width=15><b>1.</b></td><td align=left colspan=2><a class=kb-shipclass href=\"?a=pilot_detail&plt_id=" . $rows[0]['plt_id'] . "\">" . $pilot->getName() . "</a></td><td></td></tr><tr>"; 
     62                $smarty->assign('title',$this->title_); 
     63                $smarty->assign('pilot_portrait',$pilot->getPortraitURL(64)); 
     64                $smarty->assign('award_img',IMG_URL . "/awards/" . $this->award_ . ".gif"); 
     65                $smarty->assign('url',"?a=pilot_detail&plt_id=" . $rows[0]['plt_id'] ); 
     66                $smarty->assign('name',$pilot->getName() ); 
    10767        $bar = new BarGraph($rows[0]['cnt'], $max, 60); 
    108         $html .= "<td></td><td align=left>" . $bar->generate() . "</td>"; 
    109         $html .= "<td align=right><b>" . $rows[0]['cnt'] . "</b></td><td></td></tr>"; 
     68                $smarty->assign('bar',$bar->generate()); 
     69                $smarty->assign('cnt', $rows[0]['cnt']); 
    11070 
    11171        for ($i = 2; $i < 11; $i++) 
    11272        { 
    11373            if (!$rows[$i - 1]['plt_id']) break; 
    114             $pilot = new Pilot($rows[$i - 1]['plt_id']); 
    115             $html .= "<tr><td><b>" . $i . ".</b></td><td colspan=2><a class=kb-shipclass href=\"?a=pilot_detail&plt_id=" . $rows[$i - 1]['plt_id'] . "\">" . $pilot->getName() . "</a></td></tr><tr>"; 
    116             $bar = new BarGraph($rows[$i - 1]['cnt'], $max, 60); 
    117             $html .= "<td></td><td align=left>" . $bar->generate() . "</td>"; 
    118             $html .= "<td align=right><b>" . $rows[$i - 1]['cnt'] . "</b></td></tr>"; 
     74            $pilot = new Pilot($rows[$i - 1]['plt_id']);  
     75                        $bar = new BarGraph($rows[$i - 1]['cnt'], $max, 60); 
     76                        $top[] = array('url'=> "?a=pilot_detail&plt_id=" . $rows[$i - 1]['plt_id'], 'name'=>$pilot->getName(),'bar'=>$bar->generate(),'cnt'=>$rows[$i - 1]['cnt']); 
    11977        } 
    120  
    121         $html .= "<tr><td colspan=3 align=center>(" . $this->comment_ . ")</td></tr>"; 
    122  
    123         $html .= "</table>"; 
    124  
    125         $this->box_->setContent($html); 
    126         return $this->box_->generate(); 
     78                $smarty->assign('top',$top); 
     79                $smarty->assign('comment',$this->comment_); 
     80                return $smarty->fetch('award_box.tpl'); 
    12781    } 
     82         
    12883} 
    12984?> 
  • dev/common/contracts.php

    r2 r104  
    2525  } 
    2626 
    27   $menubox = new MenuBox(); 
    28   $menubox->addOption( "Active contracts", "?a=contracts" ); 
    29   $menubox->addOption( "Past contracts", "?a=contracts&view=past" ); 
     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" ); 
    3031 
    3132  $page->addContext( $menubox->generate() ); 
  • dev/common/corp_detail.php

    r92 r104  
    306306} 
    307307 
    308 $menubox = new MenuBox(); 
    309 $menubox->addCaption("Kills & losses"); 
    310 $menubox->addOption("Recent activity", "?a=corp_detail&crp_id=" . $corp->getID()); 
    311 $menubox->addOption("Kills", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=kills"); 
    312 $menubox->addOption("Losses", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=losses"); 
    313 $menubox->addCaption("Pilot statistics"); 
    314 $menubox->addOption("Top killers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_kills"); 
     308$menubox = new box("Menu"); 
     309$menubox->setIcon("menu-item.gif"); 
     310$menubox->addOption("caption","Kills & losses"); 
     311$menubox->addOption("link","Recent activity", "?a=corp_detail&crp_id=" . $corp->getID()); 
     312$menubox->addOption("link","Kills", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=kills"); 
     313$menubox->addOption("link","Losses", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=losses"); 
     314$menubox->addOption("caption","Pilot statistics"); 
     315$menubox->addOption("link","Top killers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_kills"); 
    315316 
    316317$killboard = $page->killboard_; 
    317318$config = $killboard->getConfig(); 
    318319if ($config->getKillPoints()) 
    319     $menubox->addOption("Top scorers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_scores"); 
    320 $menubox->addOption("Top solokillers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_solo"); 
    321 $menubox->addOption("Top damagedealers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_damage"); 
    322 $menubox->addOption("Top griefers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_griefer"); 
    323 $menubox->addOption("Top losers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_losses"); 
    324 $menubox->addCaption("Global statistics"); 
    325 $menubox->addOption("Ships & weapons", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=ships_weapons"); 
     320    $menubox->addOption("link","Top scorers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_scores"); 
     321$menubox->addOption("link","Top solokillers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_solo"); 
     322$menubox->addOption("link","Top damagedealers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_damage"); 
     323$menubox->addOption("link","Top griefers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_griefer"); 
     324$menubox->addOption("link","Top losers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_losses"); 
     325$menubox->addOption("caption","Global statistics"); 
     326$menubox->addOption("link","Ships & weapons", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=ships_weapons"); 
    326327$page->addContext($menubox->generate()); 
    327328$page->setContent($html); 
  • dev/common/home.php

    r92 r104  
    9393 
    9494$page->setContent($html); 
    95 $menubox = new MenuBox(); 
    96 $menubox->addCaption("Navigation"); 
    97 $menubox->addOption("Previous week", "?a=kills&w=" . $pweek . "&y=" . $pyear); 
     95$menubox = new box("Menu"); 
     96$menubox->setIcon("menu-item.gif"); 
     97$menubox->addOption("caption","Navigation"); 
     98$menubox->addOption("link","Previous week", "?a=kills&w=" . $pweek . "&y=" . $pyear); 
    9899$page->addContext($menubox->generate()); 
    99100 
  • dev/common/kill_detail.php

    r92 r104  
    190190$html .= "</td></tr></table>"; 
    191191 
    192 $menubox = new MenuBox(); 
    193 $menubox->addCaption("View"); 
    194 $menubox->addOption("Killmail", "javascript:openWindow( '?a=kill_mail&kll_id=".$kill->getID()."', null, 355, 430, '' );"); 
     192$menubox = new box("Menu"); 
     193$menubox->setIcon("menu-item.gif"); 
     194$menubox->addOption("Caption","View"); 
     195$menubox->addOption("link","Killmail", "javascript:openWindow( '?a=kill_mail&kll_id=".$kill->getID()."', null, 355, 430, '' );"); 
    195196if ($kill->relatedKillCount() > 1 || $kill->relatedLossCount() > 1) 
    196197{ 
    197     $menubox->addOption("Related kills (".$kill->relatedKillCount()."/".$kill->relatedLossCount().")", "?a=kill_related&kll_id=".$kill->getID()); 
     198    $menubox->addOption("link","Related kills (".$kill->relatedKillCount()."/".$kill->relatedLossCount().")", "?a=kill_related&kll_id=".$kill->getID()); 
    198199} 
    199200if ($page->isAdmin()) 
    200201{ 
    201     $menubox->addCaption("Admin"); 
    202     $menubox->addOption("Delete", "javascript:openWindow('?a=kill_delete&kll_id=".$kill->getID()."', null, 420, 300, '' );"); 
     202    $menubox->addOption("caption","Admin"); 
     203    $menubox->addOption("link","Delete", "javascript:openWindow('?a=kill_delete&kll_id=".$kill->getID()."', null, 420, 300, '' );"); 
    203204} 
    204205$page->addContext($menubox->generate()); 
     
    207208{ 
    208209    $scorebox = new Box("Points awarded"); 
    209     $scorebox->setHeight(64); 
    210     $scorebox->setContent("<div class=kill-points>".$kill->getKillPoints()."</div>"); 
     210    $scorebox->addOption("points",$kill->getKillPoints()); 
    211211    $page->addContext($scorebox->generate()); 
    212212} 
    213213 
    214214$mapbox = new Box("Map"); 
    215 $maphtml = "<img src=\"?a=mapview&sys_id=".$system->getID()."&mode=map&size=145\" border=0><br>"; 
    216 $maphtml .= "<img src=\"?a=mapview&sys_id=".$system->getID()."&mode=region&size=145\" border=0><br>"; 
    217 $maphtml .= "<img src=\"?a=mapview&sys_id=".$system->getID()."&mode=cons&size=145\" border=0>"; 
    218 $mapbox->setContent($maphtml); 
     215$mapbox->addOption("img","?a=mapview&sys_id=".$system->getID()."&mode=map&size=145"); 
     216$mapbox->addOption("img","?a=mapview&sys_id=".$system->getID()."&mode=region&size=145"); 
     217$mapbox->addOption("img","?a=mapview&sys_id=".$system->getID()."&mode=cons&size=145"); 
     218 
    219219$page->addContext($mapbox->generate()); 
    220220 
  • dev/common/kills.php

    r2 r104  
    7676 
    7777  $page->setContent( $html ); 
    78   $menubox = new MenuBox(); 
    79   $menubox->addCaption( "Navigation" ); 
    80   $menubox->addOption( "Previous week ", "?a=kills&w=".$pweek."&y=".$pyear ); 
     78$menubox = new box("Menu"); 
     79$menubox->setIcon("menu-item.gif"); 
     80  $menubox->addOption("caption", "Navigation" ); 
     81  $menubox->addOption("link", "Previous week ", "?a=kills&w=".$pweek."&y=".$pyear ); 
    8182  if ( $week != date( "W" ) ) 
    8283    $menubox->addOption( "Next week", "?a=kills&w=".$nweek."&y=".$nyear ); 
  • dev/common/losses.php

    r2 r104  
    8080  $html .= $table->generate(); 
    8181 
    82   $menubox = new MenuBox(); 
    83   $menubox->addCaption( "Navigation" ); 
    84   $menubox->addOption( "Previous week", "?a=losses&w=".$pweek."&y=".$pyear ); 
     82$menubox = new box("Menu"); 
     83$menubox->setIcon("menu-item.gif"); 
     84  $menubox->addOption("caption", "Navigation" ); 
     85  $menubox->addOption("link", "Previous week", "?a=losses&w=".$pweek."&y=".$pyear ); 
    8586  if ( $week != date( "W" ) ) 
    86     $menubox->addOption( "Next week", "?a=losses&w=".$nweek."&y=".$nyear ); 
     87    $menubox->addOption("link", "Next week", "?a=losses&w=".$nweek."&y=".$nyear ); 
    8788  $page->addContext( $menubox->generate() ); 
    8889 
  • dev/common/pilot_detail.php

    r92 r104  
    146146} 
    147147 
    148 $menubox = new MenuBox(); 
    149 $menubox->addCaption("Kills & losses"); 
    150 $menubox->addOption("Recent activity", "?a=pilot_detail&plt_id=" . $pilot->getID() . "&view=recent"); 
    151 $menubox->addOption("Kills", "?a=pilot_detail&plt_id=" . $pilot->getID() . "&view=kills"); 
    152 $menubox->addOption("Losses", "?a=pilot_detail&plt_id=" . $pilot->getID() . "&view=losses"); 
    153 $menubox->addCaption("Statistics"); 
    154 $menubox->addOption("Ships & weapons", "?a=pilot_detail&plt_id=" . $pilot->getID() . "&view=ships_weapons"); 
     148$menubox = new box("Menu"); 
     149$menubox->setIcon("menu-item.gif"); 
     150$menubox->addOption("caption","Kills & 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"); 
     154$menubox->addOption("caption","Statistics"); 
     155$menubox->addOption("link","Ships & weapons", "?a=pilot_detail&plt_id=" . $pilot->getID() . "&view=ships_weapons"); 
    155156if (strstr($config->getConfig("mods_active"), 'signature_generator')) 
    156157{ 
    157     $menubox->addCaption("Signature"); 
    158     $menubox->addOption("Link", "?a=sig_list&i=" . $pilot->getID()); 
     158    $menubox->addOption("caption","Signature"); 
     159    $menubox->addOption("link","Link", "?a=sig_list&i=" . $pilot->getID()); 
    159160} 
    160161$page->addContext($menubox->generate()); 
     
    165166{ 
    166167    $scorebox = new Box("Kill points"); 
    167     $scorebox->setHeight(64); 
    168     $scorebox->setContent("<div class=kill-points>" . $points . "</div>"); 
     168    $scorebox->setOption($points); 
    169169    $page->addContext($scorebox->generate()); 
    170170}