Changeset 281
- Timestamp:
- 12/11/07 13:45:56 (15 years ago)
- Location:
- dev
- Files:
-
- 1 added
- 18 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/admin/option_generic.php
r254 r281 38 38 options::fadd('Display Alliance Logos on killlists', 'killlist_alogo', 'checkbox'); 39 39 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 .phphas to be 0 to work "public"');40 options::cat('Appearance', 'Generic', 'Public-Mode v0.2 (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 has to be 0 to work "public"'); 42 42 options::fadd('Remove Losses Page', 'public_losses', 'checkbox'); 43 43 options::fadd('Stats Page', 'public_stats', 'select',array('admin_generic', 'createSelectStats')); -
dev/common/alliance_detail.php
r273 r281 34 34 $kill_summary = new KillSummaryTable(); 35 35 $kill_summary->addInvolvedAlliance($alliance); 36 $kill_summary->setBreak( 5);36 $kill_summary->setBreak(6); 37 37 $summary_html = $kill_summary->generate(); 38 38 -
dev/common/cc_detail.php
r240 r281 40 40 $llist = $contract->getLossList(); 41 41 $killsummary = new KillSummaryTable($klist, $llist); 42 $killsummary->setBreak( 5);42 $killsummary->setBreak(6); 43 43 if ($_GET['view'] == "") 44 44 $killsummary->setFilter(false); -
dev/common/corp_detail.php
r273 r281 25 25 $kill_summary = new KillSummaryTable(); 26 26 $kill_summary->addInvolvedCorp($corp); 27 $kill_summary->setBreak( 5);27 $kill_summary->setBreak(6); 28 28 $summary_html = $kill_summary->generate(); 29 29 -
dev/common/home.php
r240 r281 1 1 <?php 2 require_once('common/includes/class.killsummarytable.p hp');2 require_once('common/includes/class.killsummarytable.public.php'); 3 3 require_once('common/includes/class.corp.php'); 4 4 require_once('common/includes/class.alliance.php'); … … 18 18 $kslist->setYear($year); 19 19 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); 20 if (config::get('public_summarytable')){ 21 $summarytable = new KillSummaryTablePublic($kslist); 22 } 23 else 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); 27 32 $html .= $summarytable->generate(); 28 33 -
dev/common/igb_home.php
r240 r281 24 24 25 25 $summarytable = new KillSummaryTable($kslist, $llist); 26 $summarytable->setBreak( 5);26 $summarytable->setBreak(6); 27 27 28 28 if ($week == 1) -
dev/common/includes/class.killsummarytable.php
r215 r281 7 7 { 8 8 $this->klist_ = $klist; 9 if (!config::get('public_summarytable')){ 10 $this->llist_ = $llist; 11 } 9 $this->llist_ = $llist; 12 10 $this->verbose_ = false; 13 11 $this->filter_ = true; … … 142 140 } 143 141 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']; 180 176 } 181 177 } … … 218 214 } 219 215 // 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 } 229 224 } 230 225 else … … 241 236 $counter = 1; 242 237 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>"; 253 241 } 254 242 else 255 243 { 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 258 247 $html .= $header; 259 248 … … 315 304 316 305 $html .= "<td class=".$kclass." align=center>".$v['kills']."</td>"; 317 if ( ($this->verbose_)||config::get('public_summarytable'))306 if ($this->verbose_) 318 307 $html .= "<td class=".$kclass." align=center>".round($v['kills_isk']/1000000, 2)."</td>"; 319 308 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 326 313 $html .= "</tr>"; 327 314 … … 330 317 $this->tkcount_ += $kcount; 331 318 $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; 340 323 } 341 324 if ($this->break_) … … 344 327 $html .= "</tr></table>"; 345 328 346 if (config::get('summarytable_summary') && !config::get('public_summarytable'))329 if (config::get('summarytable_summary')) 347 330 { 348 331 $html .= '<table width=100% border=0 cellspacing=2>' … … 350 333 .$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>'; 351 334 } 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 }357 335 358 336 if ($_GET['scl_id'] != "") -
dev/common/includes/globals.php
r279 r281 1 1 <?php 2 2 // current subversion revision 3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 2 79$', $match);3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 281 $', $match); 4 4 define('SVN_REV', $match[1]); 5 5 -
dev/common/kill_related.php
r277 r281 89 89 90 90 $summarytable = new KillSummaryTable($kslist, $lslist); 91 $summarytable->setBreak( 5);91 $summarytable->setBreak(6); 92 92 $html .= $summarytable->generate(); 93 93 -
dev/common/kills.php
r240 r281 5 5 require_once('common/includes/class.ship.php'); 6 6 require_once('common/includes/class.killlisttable.php'); 7 require_once('common/includes/class.killsummarytable.p hp');7 require_once('common/includes/class.killsummarytable.public.php'); 8 8 require_once('common/includes/class.toplist.php'); 9 9 … … 46 46 involved::load($kslist,'kill'); 47 47 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); 48 if (config::get('public_summarytable')){ 49 $summarytable = new KillSummaryTablePublic($kslist); 50 } 51 else 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); 55 60 $html .= $summarytable->generate(); 56 61 -
dev/common/losses.php
r240 r281 54 54 55 55 $summarytable = new KillSummaryTable($klist, $lslist); 56 $summarytable->setBreak( 5);56 $summarytable->setBreak(6); 57 57 $html .= $summarytable->generate(); 58 58 // $html .= "<table width=\"99%\" align=center><tr><td class=weeknav align=left>"; -
dev/common/pilot_detail.php
r233 r281 56 56 $lpoints = $llist->getPoints(); 57 57 $summary = new KillSummaryTable($klist, $llist); 58 $summary->setBreak( 5);58 $summary->setBreak(6); 59 59 if ($_GET['view'] == "ships_weapons") 60 60 { -
dev/common/system_detail.php
r240 r281 31 31 32 32 $summarytable = new KillSummaryTable($kslist, $lslist); 33 $summarytable->setBreak( 5);33 $summarytable->setBreak(6); 34 34 $html .= $summarytable->generate(); 35 35 -
dev/mods/example_mod/home.php
r240 r281 1 1 <?php 2 require_once('common/includes/class.killsummarytable.p hp');2 require_once('common/includes/class.killsummarytable.public.php'); 3 3 require_once('common/includes/class.corp.php'); 4 4 require_once('common/includes/class.alliance.php'); … … 11 11 $year = kbdate('Y'); 12 12 13 $page = new Page( "omgwtfpwnd!!!1");13 $page = new Page('THIS PAGE IS REPLACED BY THE ONE FROM EXAMPLE MOD!'); 14 14 15 15 $kslist = new KillList(); … … 18 18 $kslist->setYear($year); 19 19 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); 20 if (config::get('public_summarytable')){ 21 $summarytable = new KillSummaryTablePublic($kslist); 22 } 23 else 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); 27 32 $html .= $summarytable->generate(); 28 33 -
dev/mods/forum_post/cc_detail.php
r240 r281 52 52 $llist = $contract->getLossList(); 53 53 $killsummary = new KillSummaryTable($klist, $llist); 54 $killsummary->setBreak( 5);54 $killsummary->setBreak(6); 55 55 if ($_GET['view'] == "") 56 56 $killsummary->setFilter(false); -
dev/mods/forum_post/forum_post.php
r240 r281 15 15 $llist = $contract->getLossList(); 16 16 $killsummary = new KillSummaryTable($klist, $llist); 17 $killsummary->setBreak( 5);17 $killsummary->setBreak(6); 18 18 if ($_GET['view'] == ""){ 19 19 $killsummary->setFilter(false); … … 99 99 100 100 $killsummary = new KillSummaryTable($kslist, $lslist); 101 $killsummary->setBreak( 5);101 $killsummary->setBreak(6); 102 102 $name = $system->getName()." ".substr($firstts,0, 16)." ". substr($lastts,-8,5); 103 103 } -
dev/mods/forum_post/kill_related.php
r240 r281 89 89 90 90 $summarytable = new KillSummaryTable($kslist, $lslist); 91 $summarytable->setBreak( 5);91 $summarytable->setBreak(6); 92 92 $html .= $summarytable->generate(); 93 93 -
dev/mods/known_members/corp_detail.php
r233 r281 67 67 { 68 68 $summarytable = new KillSummaryTable($klist, $llist); 69 $summarytable->setBreak( 5);69 $summarytable->setBreak(6); 70 70 71 71 $html .= $summarytable->generate();