Changeset 281

Show
Ignore:
Timestamp:
12/11/07 13:45:56 (12 years ago)
Author:
ralle030583
Message:

- redesign of public mode, so only choosen summarytables are changed not all
- rowcount summarytables increased setBreak(5)-> setBreak(6)

Location:
dev
Files:
1 added
18 modified

Legend:

Unmodified
Added
Removed
  • dev/common/admin/option_generic.php

    r254 r281  
    3838options::fadd('Display Alliance Logos on killlists', 'killlist_alogo', 'checkbox'); 
    3939 
    40 options::cat('Appearance', 'Generic', 'Public-Mode-Beta (Provided by eve-kill.net, the TRUE public KB... *jokeing*)'); 
    41 options::fadd('Only Kills in SummaryTables', 'public_summarytable', 'checkbox','','','CORP_ID and ALLIANCE_ID in config.php has to be 0 to work "public"'); 
     40options::cat('Appearance', 'Generic', 'Public-Mode v0.2 (Provided by eve-kill.net, the TRUE public KB... *jokeing*)'); 
     41options::fadd('Only Kills in SummaryTables', 'public_summarytable', 'checkbox','','','CORP_ID and ALLIANCE_ID in config has to be 0 to work "public"'); 
    4242options::fadd('Remove Losses Page', 'public_losses', 'checkbox'); 
    4343options::fadd('Stats Page', 'public_stats', 'select',array('admin_generic', 'createSelectStats')); 
  • dev/common/alliance_detail.php

    r273 r281  
    3434$kill_summary = new KillSummaryTable(); 
    3535$kill_summary->addInvolvedAlliance($alliance); 
    36 $kill_summary->setBreak(5); 
     36$kill_summary->setBreak(6); 
    3737$summary_html = $kill_summary->generate(); 
    3838 
  • dev/common/cc_detail.php

    r240 r281  
    4040$llist = $contract->getLossList(); 
    4141$killsummary = new KillSummaryTable($klist, $llist); 
    42 $killsummary->setBreak(5); 
     42$killsummary->setBreak(6); 
    4343if ($_GET['view'] == "") 
    4444    $killsummary->setFilter(false); 
  • dev/common/corp_detail.php

    r273 r281  
    2525$kill_summary = new KillSummaryTable(); 
    2626$kill_summary->addInvolvedCorp($corp); 
    27 $kill_summary->setBreak(5); 
     27$kill_summary->setBreak(6); 
    2828$summary_html = $kill_summary->generate(); 
    2929 
  • dev/common/home.php

    r240 r281  
    11<?php 
    2 require_once('common/includes/class.killsummarytable.php'); 
     2require_once('common/includes/class.killsummarytable.public.php'); 
    33require_once('common/includes/class.corp.php'); 
    44require_once('common/includes/class.alliance.php'); 
     
    1818$kslist->setYear($year); 
    1919 
    20 $llist = new KillList(); 
    21 involved::load($llist,'loss'); 
    22 $llist->setWeek($week); 
    23 $llist->setYear($year); 
    24  
    25 $summarytable = new KillSummaryTable($kslist, $llist); 
    26 $summarytable->setBreak(5); 
     20if (config::get('public_summarytable')){ 
     21        $summarytable = new KillSummaryTablePublic($kslist); 
     22} 
     23else 
     24{ 
     25        $llist = new KillList(); 
     26        involved::load($llist,'loss'); 
     27        $llist->setWeek($week); 
     28        $llist->setYear($year); 
     29        $summarytable = new KillSummaryTable($kslist, $llist); 
     30} 
     31$summarytable->setBreak(6); 
    2732$html .= $summarytable->generate(); 
    2833 
  • dev/common/igb_home.php

    r240 r281  
    2424 
    2525$summarytable = new KillSummaryTable($kslist, $llist); 
    26 $summarytable->setBreak(5); 
     26$summarytable->setBreak(6); 
    2727 
    2828if ($week == 1) 
  • dev/common/includes/class.killsummarytable.php

    r215 r281  
    77    { 
    88        $this->klist_ = $klist; 
    9         if (!config::get('public_summarytable')){ 
    10                 $this->llist_ = $llist; 
    11         } 
     9            $this->llist_ = $llist; 
    1210        $this->verbose_ = false; 
    1311        $this->filter_ = true; 
     
    142140        } 
    143141 
    144         if (!config::get('public_summarytable')) 
    145         { 
    146                 $sql = 'SELECT count(*) AS lnb, scl_id, scl_class,'; 
    147                 if (config::get('ship_values')) 
    148                 { 
    149                     $sql .= ' sum(ifnull(ksv.shp_value,scl.scl_value)) AS lisk FROM kb3_kills kll 
    150                             INNER JOIN kb3_ships shp ON ( shp.shp_id = kll.kll_ship_id ) 
    151                             left join kb3_ships_values ksv on (shp.shp_id = ksv.shp_id)'; 
    152                 } 
    153                 else 
    154                 { 
    155                     $sql .= ' sum(scl.scl_value) AS lisk FROM kb3_kills kll 
    156                             INNER JOIN kb3_ships shp ON ( shp.shp_id = kll.kll_ship_id )'; 
    157                 } 
    158                 $sql .= ' INNER JOIN kb3_ship_classes scl ON ( scl.scl_id = shp.shp_class )'; 
    159          
    160                 if ($this->inv_crp_) 
    161                 { 
    162                     $sql .= ' where kll.kll_crp_id in ( '.join(',', $this->inv_crp_).' ) '; 
    163                 } 
    164                 elseif ($this->inv_all_) 
    165                 { 
    166                     $sql .= ' where kll.kll_all_id in ( '.join(',', $this->inv_all_).' ) '; 
    167                 } 
    168                 $sql .= 'GROUP BY scl_class order by scl_class'; 
    169          
    170                 $qry = new DBQuery(); 
    171                 $qry->execute($sql); 
    172                 while ($row = $qry->getRow()) 
    173                 { 
    174                     $this->entry_[$row['scl_class']]['losses'] = $row['lnb']; 
    175                     $this->entry_[$row['scl_class']]['losses_isk'] =  $row['lisk']; 
    176          
    177                     $this->tlcount_ += $row['lnb']; 
    178                     $this->tlisk_ += $row['lisk']; 
    179                 } 
     142       
     143        $sql = 'SELECT count(*) AS lnb, scl_id, scl_class,'; 
     144        if (config::get('ship_values')) 
     145        { 
     146            $sql .= ' sum(ifnull(ksv.shp_value,scl.scl_value)) AS lisk FROM kb3_kills kll 
     147                    INNER JOIN kb3_ships shp ON ( shp.shp_id = kll.kll_ship_id ) 
     148                    left join kb3_ships_values ksv on (shp.shp_id = ksv.shp_id)'; 
     149        } 
     150        else 
     151        { 
     152            $sql .= ' sum(scl.scl_value) AS lisk FROM kb3_kills kll 
     153                    INNER JOIN kb3_ships shp ON ( shp.shp_id = kll.kll_ship_id )'; 
     154        } 
     155        $sql .= ' INNER JOIN kb3_ship_classes scl ON ( scl.scl_id = shp.shp_class )'; 
     156 
     157        if ($this->inv_crp_) 
     158        { 
     159            $sql .= ' where kll.kll_crp_id in ( '.join(',', $this->inv_crp_).' ) '; 
     160        } 
     161        elseif ($this->inv_all_) 
     162        { 
     163            $sql .= ' where kll.kll_all_id in ( '.join(',', $this->inv_all_).' ) '; 
     164        } 
     165        $sql .= 'GROUP BY scl_class order by scl_class'; 
     166 
     167        $qry = new DBQuery(); 
     168        $qry->execute($sql); 
     169        while ($row = $qry->getRow()) 
     170        { 
     171            $this->entry_[$row['scl_class']]['losses'] = $row['lnb']; 
     172            $this->entry_[$row['scl_class']]['losses_isk'] =  $row['lisk']; 
     173 
     174            $this->tlcount_ += $row['lnb']; 
     175            $this->tlisk_ += $row['lisk']; 
    180176        } 
    181177    } 
     
    218214            } 
    219215            // losses 
    220             if (!config::get('public_summarytable')) 
    221                     while ($kill = $this->llist_->getKill()) 
    222                     { 
    223                         $classname = $kill->getVictimShipClassName(); 
    224                         $entry[$classname]['losses']++; 
    225                         $entry[$classname]['losses_isk'] += $kill->getVictimShipValue(); 
    226                         $this->tlcount_++; 
    227                         $this->tlisk_ += $kill->getVictimShipValue(); 
    228                     } 
     216            while ($kill = $this->llist_->getKill()) 
     217            { 
     218                $classname = $kill->getVictimShipClassName(); 
     219                $entry[$classname]['losses']++; 
     220                $entry[$classname]['losses_isk'] += $kill->getVictimShipValue(); 
     221                $this->tlcount_++; 
     222                $this->tlisk_ += $kill->getVictimShipValue(); 
     223            } 
    229224        } 
    230225        else 
     
    241236        $counter = 1; 
    242237 
    243         if (!config::get('public_summarytable')) 
    244         { 
    245                 if ($this->verbose_)  
    246                 { 
    247                     $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>"; 
    248                 } 
    249                 else 
    250                 { 
    251                     $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>"; 
    252                 } 
     238        if ($this->verbose_)  
     239        { 
     240            $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>"; 
    253241        } 
    254242        else 
    255243        { 
    256             $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></tr>"; 
    257         } 
     244            $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>"; 
     245        } 
     246         
    258247        $html .= $header; 
    259248 
     
    315304 
    316305            $html .= "<td class=".$kclass." align=center>".$v['kills']."</td>"; 
    317             if (($this->verbose_)||config::get('public_summarytable')) 
     306            if ($this->verbose_) 
    318307                $html .= "<td class=".$kclass." align=center>".round($v['kills_isk']/1000000, 2)."</td>"; 
    319308             
    320             if (!config::get('public_summarytable'))     
    321             {    
    322                     $html .= "<td class=".$lclass." align=center>".$v['losses']."</td>"; 
    323                     if ($this->verbose_) 
    324                         $html .= "<td class=".$lclass." align=center>".round($v['losses_isk']/1000000, 2)."</td>"; 
    325             } 
     309            $html .= "<td class=".$lclass." align=center>".$v['losses']."</td>"; 
     310                if ($this->verbose_) 
     311                    $html .= "<td class=".$lclass." align=center>".round($v['losses_isk']/1000000, 2)."</td>"; 
     312 
    326313            $html .= "</tr>"; 
    327314 
     
    330317            $this->tkcount_ += $kcount; 
    331318            $this->tkisk_ += $kisk; 
    332             $this->tkpoints_ += $kpoints; 
    333              
    334             if (!config::get('public_summarytable')) 
    335             { 
    336                     $this->tlcount_ += $lcount; 
    337                     $this->tlisk_ += $lisk; 
    338                     $this->tlpoints_ += $lpoints; 
    339             } 
     319            $this->tkpoints_ += $kpoints;      
     320            $this->tlcount_ += $lcount; 
     321            $this->tlisk_ += $lisk; 
     322            $this->tlpoints_ += $lpoints; 
    340323        } 
    341324        if ($this->break_) 
     
    344327        $html .= "</tr></table>"; 
    345328 
    346         if (config::get('summarytable_summary') && !config::get('public_summarytable')) 
     329        if (config::get('summarytable_summary')) 
    347330        { 
    348331            $html .= '<table width=100% border=0 cellspacing=2>' 
     
    350333                     .$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>'; 
    351334        } 
    352         if (config::get('summarytable_summary') && config::get('public_summarytable')) 
    353         { 
    354             $html .= '<table width=100% border=0 cellspacing=2>' 
    355                      .'<tr align=center><th>'.$this->tkcount_.' Ships killed ('.round($this->tkisk_/1000000, 2).'M ISK)</th></tr></table>'; 
    356         } 
    357335         
    358336        if ($_GET['scl_id'] != "") 
  • dev/common/includes/globals.php

    r279 r281  
    11<?php 
    22// current subversion revision 
    3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 279 $', $match); 
     3preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 281 $', $match); 
    44define('SVN_REV', $match[1]); 
    55 
  • dev/common/kill_related.php

    r277 r281  
    8989 
    9090$summarytable = new KillSummaryTable($kslist, $lslist); 
    91 $summarytable->setBreak(5); 
     91$summarytable->setBreak(6); 
    9292$html .= $summarytable->generate(); 
    9393 
  • dev/common/kills.php

    r240 r281  
    55require_once('common/includes/class.ship.php'); 
    66require_once('common/includes/class.killlisttable.php'); 
    7 require_once('common/includes/class.killsummarytable.php'); 
     7require_once('common/includes/class.killsummarytable.public.php'); 
    88require_once('common/includes/class.toplist.php'); 
    99 
     
    4646involved::load($kslist,'kill'); 
    4747 
    48 $llist = new KillList(); 
    49 $llist->setWeek($week); 
    50 $llist->setYear($year); 
    51 involved::load($llist,'loss'); 
    52  
    53 $summarytable = new KillSummaryTable($kslist, $llist); 
    54 $summarytable->setBreak(5); 
     48if (config::get('public_summarytable')){ 
     49        $summarytable = new KillSummaryTablePublic($kslist); 
     50} 
     51else 
     52{ 
     53        $llist = new KillList(); 
     54        $llist->setWeek($week); 
     55        $llist->setYear($year); 
     56        involved::load($llist,'loss'); 
     57        $summarytable = new KillSummaryTable($kslist, $llist); 
     58} 
     59$summarytable->setBreak(6); 
    5560$html .= $summarytable->generate(); 
    5661 
  • dev/common/losses.php

    r240 r281  
    5454 
    5555$summarytable = new KillSummaryTable($klist, $lslist); 
    56 $summarytable->setBreak(5); 
     56$summarytable->setBreak(6); 
    5757$html .= $summarytable->generate(); 
    5858// $html .= "<table width=\"99%\" align=center><tr><td class=weeknav align=left>"; 
  • dev/common/pilot_detail.php

    r233 r281  
    5656$lpoints = $llist->getPoints(); 
    5757$summary = new KillSummaryTable($klist, $llist); 
    58 $summary->setBreak(5); 
     58$summary->setBreak(6); 
    5959if ($_GET['view'] == "ships_weapons") 
    6060{ 
  • dev/common/system_detail.php

    r240 r281  
    3131 
    3232$summarytable = new KillSummaryTable($kslist, $lslist); 
    33 $summarytable->setBreak(5); 
     33$summarytable->setBreak(6); 
    3434$html .= $summarytable->generate(); 
    3535 
  • dev/mods/example_mod/home.php

    r240 r281  
    11<?php 
    2 require_once('common/includes/class.killsummarytable.php'); 
     2require_once('common/includes/class.killsummarytable.public.php'); 
    33require_once('common/includes/class.corp.php'); 
    44require_once('common/includes/class.alliance.php'); 
     
    1111$year = kbdate('Y'); 
    1212 
    13 $page = new Page("omgwtfpwnd!!!1"); 
     13$page = new Page('THIS PAGE IS REPLACED BY THE ONE FROM EXAMPLE MOD!'); 
    1414 
    1515$kslist = new KillList(); 
     
    1818$kslist->setYear($year); 
    1919 
    20 $llist = new KillList(); 
    21 involved::load($llist,'loss'); 
    22 $llist->setWeek($week); 
    23 $llist->setYear($year); 
    24  
    25 $summarytable = new KillSummaryTable($kslist, $llist); 
    26 $summarytable->setBreak(5); 
     20if (config::get('public_summarytable')){ 
     21        $summarytable = new KillSummaryTablePublic($kslist); 
     22} 
     23else 
     24{ 
     25        $llist = new KillList(); 
     26        involved::load($llist,'loss'); 
     27        $llist->setWeek($week); 
     28        $llist->setYear($year); 
     29        $summarytable = new KillSummaryTable($kslist, $llist); 
     30} 
     31$summarytable->setBreak(6); 
    2732$html .= $summarytable->generate(); 
    2833 
  • dev/mods/forum_post/cc_detail.php

    r240 r281  
    5252$llist = $contract->getLossList(); 
    5353$killsummary = new KillSummaryTable($klist, $llist); 
    54 $killsummary->setBreak(5); 
     54$killsummary->setBreak(6); 
    5555if ($_GET['view'] == "") 
    5656    $killsummary->setFilter(false); 
  • dev/mods/forum_post/forum_post.php

    r240 r281  
    1515$llist = $contract->getLossList(); 
    1616$killsummary = new KillSummaryTable($klist, $llist); 
    17 $killsummary->setBreak(5); 
     17$killsummary->setBreak(6); 
    1818        if ($_GET['view'] == ""){ 
    1919                $killsummary->setFilter(false); 
     
    9999 
    100100$killsummary = new KillSummaryTable($kslist, $lslist); 
    101 $killsummary->setBreak(5); 
     101$killsummary->setBreak(6); 
    102102$name = $system->getName()." ".substr($firstts,0, 16)." ". substr($lastts,-8,5); 
    103103} 
  • dev/mods/forum_post/kill_related.php

    r240 r281  
    8989 
    9090$summarytable = new KillSummaryTable($kslist, $lslist); 
    91 $summarytable->setBreak(5); 
     91$summarytable->setBreak(6); 
    9292$html .= $summarytable->generate(); 
    9393 
  • dev/mods/known_members/corp_detail.php

    r233 r281  
    6767{ 
    6868    $summarytable = new KillSummaryTable($klist, $llist); 
    69     $summarytable->setBreak(5); 
     69    $summarytable->setBreak(6); 
    7070 
    7171    $html .= $summarytable->generate();