Show
Ignore:
Timestamp:
02/17/07 15:24:06 (14 years ago)
Author:
exi
Message:

Changed default td width for options to 160px.
Added the appropiate timeframe to the fast contractlisttable.
Events now can also return a reference to a variable containing additional information.
Killlists now return a non formatted isk-value for losses/kills, please report any errors on other pages.
Added a custom user menu, able to be shownon every page.
Added some code for user logins, please ignore it for now.
Added a small battle statistics frame to the battle overview.
To login as admin now just leave user blank and use the admin password.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/cc_detail.php

    r167 r188  
    1919    $title = "Contract details"; 
    2020 
    21 $page = new Page($title . " - " . $contract->getName()); 
     21$page = new Page($title." - ".$contract->getName()); 
    2222 
    2323$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>"; 
    2424// table class=kb-subtable cellspacing=0><tr class=kb-table-row-even><td width=80 height=80 align=center>"; 
    2525if ($contract->getCampaign()) 
    26     $html .= "<img src=\"" . IMG_URL . "/campaign-big.gif\" align=center>"; 
    27 else 
    28     $html .= "<img src=\"" . IMG_URL . "/contract-big.gif\" align=center>"; 
     26    $html .= "<img src=\"".IMG_URL."/campaign-big.gif\" align=center>"; 
     27else 
     28    $html .= "<img src=\"".IMG_URL."/contract-big.gif\" align=center>"; 
    2929 
    3030$html .= "</td>"; 
     
    3535else 
    3636    $ended = substr($contract->getEndDate(), 0, 10); 
    37 $html .= "<td class=kb-table-cell><b>Start date:</b></td><td class=kb-table-cell width=120><b>" . substr($contract->getStartDate(), 0, 10) . "</b></td><td class=kb-table-cell><b>End date:</b></td><td class=kb-table-cell width=120><b>" . $ended . "</b></td></tr>"; 
    38 $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Kills:</b></td><td class=kl-kill>" . $contract->getKills() . "</td><td class=kb-table-cell><b>Losses:</b></td><td class=kl-loss>" . $contract->getLosses() . "</td></tr>"; 
    39 $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Damage done (ISK):</b></td><td class=kl-kill>" . $contract->getKillISK() . "M</td><td class=kb-table-cell><b>Damage received (ISK):</b></td><td class=kl-loss>" . $contract->getLossISK() . "M</td></tr>"; 
    40 $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Runtime:</b></td><td class=kb-table-cell><b>" . $contract->getRunTime() . " days</b></td><td class=kb-table-cell><b>Efficiency:</b></td><td class=kb-table-cell><b>" . $contract->getEfficiency() . "%</b></td></tr>"; 
     37$html .= "<td class=kb-table-cell><b>Start date:</b></td><td class=kb-table-cell width=120><b>".substr($contract->getStartDate(), 0, 10)."</b></td><td class=kb-table-cell><b>End date:</b></td><td class=kb-table-cell width=120><b>".$ended."</b></td></tr>"; 
     38$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Kills:</b></td><td class=kl-kill>".$contract->getKills()."</td><td class=kb-table-cell><b>Losses:</b></td><td class=kl-loss>".$contract->getLosses()."</td></tr>"; 
     39$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Damage done (ISK):</b></td><td class=kl-kill>".round($contract->getKillISK()/1000000, 2)."M</td><td class=kb-table-cell><b>Damage received (ISK):</b></td><td class=kl-loss>".round($contract->getLossISK()/1000000, 2)."M</td></tr>"; 
     40$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Runtime:</b></td><td class=kb-table-cell><b>".$contract->getRunTime()." days</b></td><td class=kb-table-cell><b>Efficiency:</b></td><td class=kb-table-cell><b>".$contract->getEfficiency()."%</b></td></tr>"; 
    4141$html .= "</table>"; 
    4242// $html .= "</td></tr></table>"; 
     
    6363            $summary->setView('combined'); 
    6464 
    65             $html .= "<br><div class=kb-contract-target-header>Target " . $target->getType() . " - "; 
     65            $html .= "<br><div class=kb-contract-target-header>Target ".$target->getType()." - "; 
    6666            switch ($target->getType()) { 
    6767                case "corp": 
    68                     $html .= "<a class=kb-contract href=\"?a=" . $target->getType() . "_detail&crp_id=" . $target->getID() . "\">" . $target->getName() . "</a>"; 
     68                    $html .= "<a class=kb-contract href=\"?a=".$target->getType()."_detail&crp_id=".$target->getID()."\">".$target->getName()."</a>"; 
    6969                    break; 
    7070                case "alliance": 
    71                     $html .= "<a class=kb-contract href=\"?a=" . $target->getType() . "_detail&all_id=" . $target->getID() . "\">" . $target->getName() . "</a>"; 
     71                    $html .= "<a class=kb-contract href=\"?a=".$target->getType()."_detail&all_id=".$target->getID()."\">".$target->getName()."</a>"; 
    7272                    break; 
    7373                case "system": 
    74                     $html .= "<a class=kb-contract href=\"?a=" .$target->getType() . "_detail&sys_id=" . $target->getID() . "\">" . $target->getName() . "</a>"; 
     74                    $html .= "<a class=kb-contract href=\"?a=" .$target->getType()."_detail&sys_id=".$target->getID()."\">".$target->getName()."</a>"; 
    7575                    break; 
    7676                case "region": 
     
    9090            $bar = new BarGraph($efficiency, 100, 120); 
    9191            $html .= "<table class=kb-table cellspacing=1 border=\"0\" width=\"100%\"><tr class=kb-table-row-even>"; 
    92             $html .= "<td class=kb-table-cell width=108><b>Totals:</b></td><td class=kl-kill-bg width=60 align=center>" . $summary->getTotalKills() . "</td><td class=kl-kill-bg width=60 align=center>" . $summary->getTotalKillISK() . "M</td>"; 
    93             $html .= "<td class=kl-loss-bg width=64 align=center>" . $summary->getTotalLosses() . "</td><td class=kl-loss-bg width=60 align=center>" . $summary->getTotalLossISK() . "M</td></tr></table>"; 
     92            $html .= "<td class=kb-table-cell width=108><b>Totals:</b></td><td class=kl-kill-bg width=60 align=center>".$summary->getTotalKills()."</td><td class=kl-kill-bg width=60 align=center>".round($summary->getTotalKillISK()/1000000, 2)."M</td>"; 
     93            $html .= "<td class=kl-loss-bg width=64 align=center>".$summary->getTotalLosses()."</td><td class=kl-loss-bg width=60 align=center>".round($summary->getTotalLossISK()/1000000, 2)."M</td></tr></table>"; 
    9494 
    9595            $html .= "</td><td align=left>"; 
    9696 
    9797            $html .= "<table class=kb-table cellspacing=1 border=\"0\"><tr class=kb-table-row-even>"; 
    98             $html .= "<td class=kb-table-cell width=108><b>Efficiency:</b></td><td class=kb-table-cell align=center colspan=2 width=120><b>" . $efficiency . "%</b></td>"; 
    99             $html .= "<td class=kb-table-cell colspan=2 width=120>" . $bar->generate() . "</td></tr>"; 
     98            $html .= "<td class=kb-table-cell width=108><b>Efficiency:</b></td><td class=kb-table-cell align=center colspan=2 width=120><b>".$efficiency."%</b></td>"; 
     99            $html .= "<td class=kb-table-cell colspan=2 width=120>".$bar->generate()."</td></tr>"; 
    100100            $html .= "</tr></table>"; 
    101101 
     
    201201$menubox->setIcon("menu-item.gif"); 
    202202$menubox->addOption("caption","Overview"); 
    203 $menubox->addOption("link","Target overview", "?a=cc_detail&ctr_id=" . $_GET['ctr_id']); 
     203$menubox->addOption("link","Target overview", "?a=cc_detail&ctr_id=".$_GET['ctr_id']); 
    204204$menubox->addOption("caption","Kills & losses"); 
    205 $menubox->addOption("link","Recent activity", "?a=cc_detail&ctr_id=" . $_GET['ctr_id'] . "&view=recent_activity"); 
    206 $menubox->addOption("link","All kills", "?a=cc_detail&ctr_id=" . $_GET['ctr_id'] . "&view=kills"); 
    207 $menubox->addOption("link","All losses", "?a=cc_detail&ctr_id=" . $_GET['ctr_id'] . "&view=losses"); 
     205$menubox->addOption("link","Recent activity", "?a=cc_detail&ctr_id=".$_GET['ctr_id']."&view=recent_activity"); 
     206$menubox->addOption("link","All kills", "?a=cc_detail&ctr_id=".$_GET['ctr_id']."&view=kills"); 
     207$menubox->addOption("link","All losses", "?a=cc_detail&ctr_id=".$_GET['ctr_id']."&view=losses"); 
    208208 
    209209$page->addContext($menubox->generate()); 
     
    221221else 
    222222    $campaign = "contract"; 
    223 $tkbox = new AwardBox($tklist, "Top killers", "kills in this " . $campaign, "kills", "eagle"); 
     223$tkbox = new AwardBox($tklist, "Top killers", "kills in this ".$campaign, "kills", "eagle"); 
    224224 
    225225$page->addContext($tkbox->generate()); 
     
    237237 
    238238    $tklist->generate(); 
    239     $tkbox = new AwardBox($tklist, "Top scorers", "points in this " . $campaign, "points", "redcross"); 
     239    $tkbox = new AwardBox($tklist, "Top scorers", "points in this ".$campaign, "points", "redcross"); 
    240240    $page->addContext($tkbox->generate()); 
    241241}