Show
Ignore:
Timestamp:
03/31/08 10:20:31 (12 years ago)
Author:
ralle030583
Message:

-Ticket 81 : german translation
-fixes in forum mod files
-fixes in known member mod files

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/mods/known_members/corp_detail.php

    r291 r325  
    99require_once("common/includes/class.pilot.php"); 
    1010 
    11  
    1211if (!$crp_id = intval($_GET['crp_id'])) 
    1312{ 
    14     echo 'no valid corp id specified<br/>'; 
    15     exit; 
     13    if (CORP_ID) 
     14    { 
     15        $crp_id = CORP_ID; 
     16    } 
     17    else 
     18    { 
     19        echo 'no valid corp id specified<br/>'; 
     20        return; 
     21    } 
    1622} 
    1723$all_id = $_GET['all_id']; 
     
    1925$alliance = $corp->getAlliance(); 
    2026 
    21 $klist = new KillList(); 
    22 $tklist = new KillList(); 
    23 $llist = new KillList(); 
    24 $klist->addInvolvedCorp($corp); 
    25 $tklist->addInvolvedCorp($corp); 
    26 $tklist->setPodsNoobShips(false); 
    27 $llist->addVictimCorp($corp); 
    28 $klist->getAllKills(); 
    29 $llist->getAllKills(); 
    30  
    31 $page = new Page("Corporation details - " . $corp->getName()); 
    32 $html .= "<table class=kb-table width=\"100%\" border=\"0\" cellspacing=1><tr class=kb-table-row-even><td rowspan=8 width=128 align=center>"; 
    33  
    34 if (file_exists("img/corps/".$corp->getID().".jpg")) 
     27$kill_summary = new KillSummaryTable(); 
     28$kill_summary->addInvolvedCorp($corp); 
     29$kill_summary->setBreak(config::get('summarytable_rowcount')); 
     30$summary_html = $kill_summary->generate(); 
     31 
     32$page = new Page('Corporation details - '.$corp->getName()); 
     33$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>"; 
     34 
     35if (file_exists("img/corps/".$corp->getID().".jpg") || file_exists("img/corps/".$corp->getUnique().".jpg")) 
    3536{ 
    3637    $html .= "<img src=\"".$corp->getPortraitURL(128)."\" border=\"0\"></td>"; 
     
    3839else 
    3940{ 
    40     $html .= "<img src=\"" . IMG_URL . "/campaign-big.gif\" border=\"0\"></td>"; 
    41 } 
    42  
    43 // $html .= "</tr>"; 
     41    $html .= "<img src=\"".IMG_URL."/campaign-big.gif\" border=\"0\"></td>"; 
     42} 
     43 
    4444$html .= "<td class=kb-table-cell width=180><b>Alliance:</b></td><td class=kb-table-cell>"; 
    4545if ($alliance->getName() == "Unknown" || $alliance->getName() == "None") 
    46     $html .= "<b>" . $alliance->getName() . "</b>"; 
     46{ 
     47    $html .= "<b>".$alliance->getName()."</b>"; 
     48} 
    4749else 
    48     $html .= "<a href=\"?a=alliance_detail&all_id=" . $alliance->getID() . "\">" . $alliance->getName() . "</a>"; 
     50{ 
     51    $html .= "<a href=\"?a=alliance_detail&all_id=".$alliance->getID()."\">".$alliance->getName()."</a>"; 
     52} 
    4953$html .= "</td></tr>"; 
    50 $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Kills:</b></td><td class=kl-kill>" . $klist->getCount() . "</td></tr>"; 
    51 $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>"; 
    52 $html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Losses:</b></td><td class=kl-loss>" . $llist->getCount() . "</td></tr>"; 
    53 $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>"; 
    54 $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>"; 
    55 if ($klist->getISK()) 
    56     $efficiency = round($klist->getISK() / ($klist->getISK() + $llist->getISK()) * 100, 2); 
     54$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Kills:</b></td><td class=kl-kill>".$kill_summary->getTotalKills()."</td></tr>"; 
     55$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Losses:</b></td><td class=kl-loss>".$kill_summary->getTotalLosses()."</td></tr>"; 
     56$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Damage done (ISK):</b></td><td class=kl-kill>".round($kill_summary->getTotalKillISK()/1000000, 2)."M</td></tr>"; 
     57$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Damage received (ISK):</b></td><td class=kl-loss>".round($kill_summary->getTotalLossISK()/1000000, 2)."M</td></tr>"; 
     58if ($kill_summary->getTotalKillISK()) 
     59{ 
     60    $efficiency = round($kill_summary->getTotalKillISK() / ($kill_summary->getTotalKillISK() + $kill_summary->getTotalLossISK()) * 100, 2); 
     61} 
    5762else 
     63{ 
    5864    $efficiency = 0; 
     65} 
    5966 
    6067$html .= "<tr class=kb-table-row-even><td class=kb-table-cell><b>Efficiency:</b></td><td class=kb-table-cell><b>" . $efficiency . "%</b></td></tr>"; 
    61  
    6268$html .= "</table>"; 
    63  
    6469$html .= "<br/>"; 
    6570 
    6671if ($_GET['view'] == "" || $_GET['view'] == "kills" || $_GET['view'] == "losses") 
    6772{ 
    68     $summarytable = new KillSummaryTable($klist, $llist); 
    69     $summarytable->setBreak(6); 
    70  
    71     $html .= $summarytable->generate(); 
     73    $html .= $summary_html; 
    7274} 
    7375 
     
    149151        $list->addInvolvedCorp($corp); 
    150152        $list->setPodsNoobShips(false); 
    151         $list->setMonth(date("m")); 
    152         $list->setYear(date("Y")); 
     153        $list->setMonth(kbdate("m")); 
     154        $list->setYear(kbdate("Y")); 
    153155        $table = new TopPilotTable($list, "Kills"); 
    154156        $html .= $table->generate(); 
     
    174176        $list = new TopScoreList(); 
    175177        $list->addInvolvedCorp($corp); 
    176         $list->setPodsNoobShips(false); 
    177         $list->setMonth(date("m")); 
    178         $list->setYear(date("Y")); 
     178        $list->setPodsNoobShips(true); 
     179        $list->setMonth(kbdate("m")); 
     180        $list->setYear(kbdate("Y")); 
    179181        $table = new TopPilotTable($list, "Points"); 
    180182        $html .= $table->generate(); 
     
    185187        $list = new TopScoreList(); 
    186188        $list->addInvolvedCorp($corp); 
    187         $list->setPodsNoobShips(false); 
     189        $list->setPodsNoobShips(true); 
    188190        $table = new TopPilotTable($list, "Points"); 
    189191        $html .= $table->generate(); 
     
    201203        $list->addInvolvedCorp($corp); 
    202204        $list->setPodsNoobShips(false); 
    203         $list->setMonth(date("m")); 
    204         $list->setYear(date("Y")); 
     205        $list->setMonth(kbdate("m")); 
     206        $list->setYear(kbdate("Y")); 
    205207        $table = new TopPilotTable($list, "Solokills"); 
    206208        $html .= $table->generate(); 
     
    228230        $list->addInvolvedCorp($corp); 
    229231        $list->setPodsNoobShips(false); 
    230         $list->setMonth(date("m")); 
    231         $list->setYear(date("Y")); 
     232        $list->setMonth(kbdate("m")); 
     233        $list->setYear(kbdate("Y")); 
    232234        $table = new TopPilotTable($list, "Kills"); 
    233235        $html .= $table->generate(); 
     
    254256        $list = new TopGrieferList(); 
    255257        $list->addInvolvedCorp($corp); 
    256         $list->setMonth(date("m")); 
    257         $list->setYear(date("Y")); 
     258        $list->setMonth(kbdate("m")); 
     259        $list->setYear(kbdate("Y")); 
    258260        $table = new TopPilotTable($list, "Kills"); 
    259261        $html .= $table->generate(); 
     
    280282        $list->addVictimCorp($corp); 
    281283        $list->setPodsNoobShips(false); 
    282         $list->setMonth(date("m")); 
    283         $list->setYear(date("Y")); 
     284        $list->setMonth(kbdate("m")); 
     285        $list->setYear(kbdate("Y")); 
    284286        $table = new TopPilotTable($list, "Losses"); 
    285287        $html .= $table->generate(); 
     
    314316 
    315317        break; 
    316                  
    317318    case 'violent_systems': 
    318319        $html .= "<div class=block-header2>Most violent systems</div>"; 
     
    330331        if ($crp_id) 
    331332            $sql .= " and inv.ind_crp_id in (".$crp_id.")"; 
    332         if (ALLIANCE_ID) 
    333             $sql .= " and inv.ind_all_id = ".ALLIANCE_ID; 
    334  
    335         $sql .= "   and date_format( kll.kll_timestamp, \"%c\" ) = ".date("m")." 
    336                     and date_format( kll.kll_timestamp, \"%Y\" ) = ".date("Y")." 
     333        if ($all_id) 
     334            $sql .= " and inv.ind_all_id = ".$all_id; 
     335 
     336        $sql .= "   and date_format( kll.kll_timestamp, \"%c\" ) = ".kbdate("m")." 
     337                    and date_format( kll.kll_timestamp, \"%Y\" ) = ".kbdate("Y")." 
    337338                    group by sys.sys_name 
    338339                    order by kills desc 
     
    526527} 
    527528 
    528 $menubox = new Box("Menu"); 
     529$menubox = new box("Menu"); 
    529530$menubox->setIcon("menu-item.gif"); 
    530531$menubox->addOption("caption","Kills & losses");