Changeset 325 for dev/mods

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

Location:
dev/mods
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • dev/mods/forum_post/cc_detail.php

    r281 r325  
    5252$llist = $contract->getLossList(); 
    5353$killsummary = new KillSummaryTable($klist, $llist); 
    54 $killsummary->setBreak(6); 
     54$killsummary->setBreak(config::get('summarytable_rowcount')); 
    5555if ($_GET['view'] == "") 
    5656    $killsummary->setFilter(false); 
     
    6868            $summary = new KillSummaryTable($kl, $ll); 
    6969            $summary->setVerbose(true); 
    70             $summary->setBreak(12); 
     70            $summary->setBreak(13); 
    7171            $summary->setView('combined'); 
    7272 
  • dev/mods/forum_post/class.killsummarytable.php

    r227 r325  
    77    { 
    88        $this->klist_ = $klist; 
    9         $this->llist_ = $llist; 
    10  
     9            $this->llist_ = $llist; 
    1110        $this->verbose_ = false; 
    1211        $this->filter_ = true; 
     
    8685    function getkills() 
    8786    { 
    88         global $config; 
    8987        if ($this->mixedinvolved_) 
    9088        { 
     
    141139            $this->tkisk_ += $row['kisk']; 
    142140        } 
     141 
    143142 
    144143        $sql = 'SELECT count(*) AS lnb, scl_id, scl_class,'; 
     
    232231        $odd = false; 
    233232        $prevdate = ""; 
     233        $width = round($this->break_/count($entry)*100); 
     234        $width_abs = round($this->break_/count($entry)*600); 
     235 
    234236        $html .= "<table class=kb-subtable width=\"100%\" border=\"0\" cellspacing=0>"; 
    235237        if ($this->break_) 
    236             $html .= "<tr><td valign=top><table class=kb-table cellspacing=\"1\" width=\"100%\">"; 
     238            $html .= "<tr><td valign=top width=\"$width%\"><table class=kb-table cellspacing=\"1\" width=\"100%\">"; 
    237239        $counter = 1; 
    238240 
    239241        if ($this->verbose_) 
    240242        { 
    241             $header = "<tr class=kb-table-header><td class=kb-table-cell width=110>Ship class</td><td class=kb-table-cell width=60 align=center>Kills</td><td class=kb-table-cell width=60 align=center>ISK (M)</td><td class=kb-table-cell width=60 align=center>Losses</td><td class=kb-table-cell width=60 align=center>ISK (M)</td></tr>"; 
     243            $header = "<tr class=kb-table-header><td class=kb-table-cell width=\"$width_abs\">Ship class</td><td class=kb-table-cell width=60 align=center>Kills</td><td class=kb-table-cell width=60 align=center>ISK (M)</td><td class=kb-table-cell width=60 align=center>Losses</td><td class=kb-table-cell width=60 align=center>ISK (M)</td></tr>"; 
    242244        } 
    243245        else 
    244246        { 
    245             $header = "<tr class=kb-table-header><td class=kb-table-cell width=110>Ship class</td><td class=kb-table-cell width=30 align=center>K</td><td class=kb-table-cell width=30 align=center>L</td></tr>"; 
    246         } 
     247            $header = "<tr class=kb-table-header><td class=kb-table-cell width=\"$width_abs\">Ship class</td><td class=kb-table-cell width=30 align=center>K</td><td class=kb-table-cell width=30 align=center>L</td></tr>"; 
     248        } 
     249 
    247250        $html .= $header; 
    248251 
     
    254257            { 
    255258                $html .= "</table></td>"; 
    256                 $html .= "<td valign=top><table class=kb-table cellspacing=\"1\">"; 
     259                $html .= "<td valign=top width=\"$width%\"><table class=kb-table cellspacing=\"1\">"; 
    257260                $html .= $header; 
    258261                $counter = 1; 
     
    285288                $lclass = "kl-loss"; 
    286289 
    287             if ($this->verbose_) 
    288             { 
    289                 $kclass .= "-bg"; 
    290                 $lclass .= "-bg"; 
    291             } 
    292  
    293290            $html .= "<tr class=".$class.">"; 
    294291 
     
    299296                $qrystring .= '&view='.$this->view_; 
    300297            } 
    301             $html .= "<td class=kb-table-cell><b>"; 
     298            $html .= "<td nowrap class=kb-table-cell><b>"; 
    302299 
    303300            if ($this->filter_) $html .= "<a class=kb-shipclass".$highlight." href=\"?".$qrystring."&scl_id=".$v['id']."\">"; 
     
    312309            if ($this->verbose_) 
    313310                $html .= "<td class=".$kclass." align=center>".round($v['kills_isk']/1000000, 2)."</td>"; 
     311 
    314312            $html .= "<td class=".$lclass." align=center>".$v['losses']."</td>"; 
    315             if ($this->verbose_) 
    316                 $html .= "<td class=".$lclass." align=center>".round($v['losses_isk']/1000000, 2)."</td>"; 
     313                if ($this->verbose_) 
     314                    $html .= "<td class=".$lclass." align=center>".round($v['losses_isk']/1000000, 2)."</td>"; 
    317315 
    318316            $html .= "</tr>"; 
    319317 
    320318            $counter++; 
     319 
    321320            $this->tkcount_ += $kcount; 
     321            $this->tkisk_ += $kisk; 
     322            $this->tkpoints_ += $kpoints; 
    322323            $this->tlcount_ += $lcount; 
    323             $this->tkisk_ += $kisk; 
    324324            $this->tlisk_ += $lisk; 
    325             $this->tkpoints_ += $kpoints; 
    326325            $this->tlpoints_ += $lpoints; 
    327326        } 
     
    335334            $html .= '<table width=100% border=0 cellspacing=2>' 
    336335                     .'<tr align=center><td width=51%><span align=right class="killcount">' 
    337                      .$this->tkcount_.' Ships killed ('.round($this->tkisk_/1000000, 2).'M ISK)</span></td><td width=49%><span class="losscount">' 
    338                      .$this->tlcount_.' Ships lost ('.round($this->tlisk_/1000000, 2).'M ISK)</span></td></tr></table>'; 
    339         } 
     336                     .$this->tkcount_.' Ships killed ('.round($this->tkisk_/1000000, 2).'M ISK)</span></td><td width=49%><span class="losscount">'.$this->tlcount_.' Ships lost ('.round($this->tlisk_/1000000, 2).'M ISK)</span></td></tr></table>'; 
     337        } 
     338 
    340339        if ($_GET['scl_id'] != "") 
    341340        { 
  • dev/mods/forum_post/kill_related.php

    r281 r325  
    8989 
    9090$summarytable = new KillSummaryTable($kslist, $lslist); 
    91 $summarytable->setBreak(6); 
     91$summarytable->setBreak(config::get('summarytable_rowcount')); 
    9292$html .= $summarytable->generate(); 
    9393 
     
    119119    $qry = new DBQuery(); 
    120120    $sql = "select ind_plt_id, ind_crp_id, ind_all_id, ind_sec_status, ind_shp_id, ind_wep_id, 
    121             itm_name, plt_name, crp_name, all_name, shp_name, scl_points, scl_id, shp_externalid 
     121            typeName, plt_name, crp_name, all_name, shp_name, scl_points, scl_id, shp_externalid 
    122122            from kb3_inv_detail 
    123             left join kb3_items on ind_wep_id=itm_id 
     123            left join kb3_invtypes on ind_wep_id=typeID 
    124124            left join kb3_pilots on ind_plt_id=plt_id 
    125125            left join kb3_corps on ind_crp_id=crp_id 
     
    210210            { 
    211211                $pilots[$side][$kill->getVictimId()][$id]['destroyed'] = true; 
     212 
     213                if (!isset($pilots[$side][$kill->getVictimId()][$id]['kll_id'])) 
     214                { 
     215                    $pilots[$side][$kill->getVictimId()][$id]['kll_id'] = $kill->getID(); 
     216                } 
    212217                return; 
    213218            } 
     
    443448 
    444449if($page->isAdmin()){ 
    445 $menubox->addOption("caption","Admin"); 
    446 $menubox->addOption("link", "Forum Summary", "javascript:sndReq('index.php?a=forum_post&kll_id=".$_GET['kll_id']."');ReverseContentDisplay('popup')"); 
     450        $menubox->addOption("caption","Admin"); 
     451        $menubox->addOption("link", "Forum Summary", "javascript:sndReq('index.php?a=forum_post&kll_id=".$_GET['kll_id']."');ReverseContentDisplay('popup')"); 
    447452} 
    448453$page->addContext($menubox->generate()); 
  • dev/mods/history/history.xml

    r324 r325  
    11<?xml version="1.0" ?> 
    22<history> 
     3        <changeset> 
     4                <rev>325</rev> 
     5                <author>ralle030583</author> 
     6                <date>31.03.2008</date> 
     7                <comment> 
     8                        <type>FIX</type> 
     9                        <text> 
     10                                Ticket #81 : German Killmails (Im Container)=>(In Container) problem solved 
     11                        </text> 
     12                </comment> 
     13                <comment> 
     14                        <type>FIX</type> 
     15                        <text> 
     16                                fix of forum mod, that it didnt break related kills anymore and some other things 
     17                        </text> 
     18                </comment> 
     19                <comment> 
     20                        <type>FIX</type> 
     21                        <text> 
     22                                small fixes in known member mod so get it up to date 
     23                        </text> 
     24                </comment> 
     25        </changeset> 
    326        <changeset> 
    427                <rev>324</rev> 
  • 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");