Changeset 155
- Timestamp:
- 12/15/06 17:13:13 (16 years ago)
- Location:
- dev
- Files:
-
- 1 removed
- 16 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/admin_mapoptions.php
r134 r155 16 16 $config->checkCheckbox('map_con_showlines'); 17 17 $config->checkCheckbox('map_con_shownames'); 18 $config->checkCheckbox('map_map_security'); 19 $config->checkCheckbox('map_reg_security'); 20 $config->checkCheckbox('map_con_security'); 18 21 19 22 foreach ($_POST as $key => $value) … … 67 70 $options[0]['name'] = 'Region Options'; 68 71 $options[0]['option'][] = array('descr' => 'Show Lines', 'name' => 'map_map_showlines'); 72 $options[0]['option'][] = array('descr' => 'Paint Security', 'name' => 'map_map_security'); 69 73 $options[0]['color'][] = array('descr' => 'Linecolor', 'name' => 'map_map_cl_line'); 70 74 $options[0]['color'][] = array('descr' => 'Captioncolor', 'name' => 'map_map_cl_capt'); … … 75 79 $options[1]['name'] = 'Constellation Options'; 76 80 $options[1]['option'][] = array('descr' => 'Show Lines', 'name' => 'map_reg_showlines'); 81 $options[1]['option'][] = array('descr' => 'Paint Security', 'name' => 'map_reg_security'); 77 82 $options[1]['color'][] = array('descr' => 'Linecolor', 'name' => 'map_reg_cl_line'); 78 83 $options[1]['color'][] = array('descr' => 'Captioncolor', 'name' => 'map_reg_cl_capt'); … … 84 89 $options[2]['option'][] = array('descr' => 'Show Lines', 'name' => 'map_con_showlines'); 85 90 $options[2]['option'][] = array('descr' => 'Show Sytem Names', 'name' => 'map_con_shownames'); 91 $options[2]['option'][] = array('descr' => 'Paint Security', 'name' => 'map_con_security'); 86 92 $options[2]['color'][] = array('descr' => 'Linecolor', 'name' => 'map_con_cl_line'); 87 93 $options[2]['color'][] = array('descr' => 'Captioncolor', 'name' => 'map_con_cl_capt'); -
dev/common/alliance_detail.php
r130 r155 266 266 267 267 break; 268 case 'violent_systems': 269 $html .= "<div class=block-header2>Most violent systems</div>"; 270 $html .= "<table width=\"99%\"><tr><td align=center valign=top>"; 271 272 $html .= "<div class=block-header>This month</div>"; 273 $html .= "<table class=kb-table>"; 274 $html .= "<tr class=kb-table-header><td>#</td><td width=180>System</td><td width=40 align=center >Kills</td></tr>"; 275 276 $sql = "select sys.sys_name, sys.sys_sec, sys.sys_id, count(distinct kll.kll_id) as kills 277 from kb3_systems sys, kb3_kills kll, kb3_inv_detail inv 278 where kll.kll_system_id = sys.sys_id 279 and inv.ind_kll_id = kll.kll_id"; 280 281 if (CORP_ID) 282 $sql .= " and inv.ind_crp_id in (".CORP_ID.")"; 283 if (ALLIANCE_ID) 284 $sql .= " and inv.ind_all_id = ".ALLIANCE_ID; 285 286 $sql .= " and date_format( kll.kll_timestamp, \"%c\" ) = ".date("m")." 287 and date_format( kll.kll_timestamp, \"%Y\" ) = ".date("Y")." 288 group by sys.sys_name 289 order by kills desc 290 limit 25"; 291 292 $qry = new DBQuery(); 293 $qry->execute($sql); 294 $odd = false; 295 $counter = 1; 296 while ($row = $qry->getRow()) 297 { 298 if (!$odd) 299 { 300 $odd = true; 301 $rowclass = 'kb-table-row-odd'; 302 } 303 else 304 { 305 $odd = false; 306 $rowclass = 'kb-table-row-even'; 307 } 308 309 $html .= "<tr class=".$rowclass."><td><b>".$counter.".</b></td><td class=kb-table-cell width=180><b><a href=\"?a=system_detail&sys_id=".$row['sys_id']."\">".$row['sys_name']."</a></b> (".roundsec($row['sys_sec']).")</td><td align=center>".$row['kills']."</td></tr>"; 310 $counter++; 311 } 312 313 $html .= "</table>"; 314 315 $html .= "</td><td align=center valign=top>"; 316 $html .= "<div class=block-header>All-Time</div>"; 317 $html .= "<table class=kb-table>"; 318 $html .= "<tr class=kb-table-header><td>#</td><td width=180>System</td><td width=40 align=center>Kills</td></tr>"; 319 320 $sql = "select sys.sys_name, sys.sys_id, sys.sys_sec, count(distinct kll.kll_id) as kills 321 from kb3_systems sys, kb3_kills kll, kb3_inv_detail inv 322 where kll.kll_system_id = sys.sys_id 323 and inv.ind_kll_id = kll.kll_id"; 324 325 if (CORP_ID) 326 $sql .= " and inv.ind_crp_id in (".CORP_ID.")"; 327 if (ALLIANCE_ID) 328 $sql .= " and inv.ind_all_id = ".ALLIANCE_ID; 329 330 $sql .= " group by sys.sys_name 331 order by kills desc 332 limit 25"; 333 334 $qry = new DBQuery(); 335 $qry->execute($sql); 336 $odd = false; 337 $counter = 1; 338 while ($row = $qry->getRow()) 339 { 340 if (!$odd) 341 { 342 $odd = true; 343 $rowclass = 'kb-table-row-odd'; 344 } 345 else 346 { 347 $odd = false; 348 $rowclass = 'kb-table-row-even'; 349 } 350 351 $html .= "<tr class=".$rowclass."><td><b>".$counter.".</b></td><td class=kb-table-cell><b><a href=\"?a=system_detail&sys_id=".$row['sys_id']."\">".$row['sys_name']."</a></b> (".roundsec($row['sys_sec']).")</td><td align=center>".$row['kills']."</td></tr>"; 352 $counter++; 353 } 354 $html .= "</table>"; 355 $html .= "</td></tr></table>"; 356 break; 268 357 } 269 358 … … 287 376 $menubox->addOption("caption","Global statistics"); 288 377 $menubox->addOption("link","Ships & weapons", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=ships_weapons"); 378 $menubox->addOption("link","Most violent systems", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=violent_systems"); 289 379 $page->addContext($menubox->generate()); 290 380 -
dev/common/class.alliance.php
r44 r155 44 44 if ($qry->recordCount() == 0) 45 45 { 46 $qry->execute("insert into kb3_alliances values ( null,'".slashfix($name)."','default')");46 $qry->execute("insert into kb3_alliances values (null,'".slashfix($name)."')"); 47 47 $this->id_ = $qry->getInsertID(); 48 48 } -
dev/common/class.graph.php
r2 r155 1 <? 1 <?php 2 2 3 4 5 function BarGraph( $value = 0, $max = 100, $width = 75, $text = "")3 class BarGraph 4 { 5 function BarGraph($value = 0, $max = 100, $width = 75, $text = "") 6 6 { 7 $this->value_ = $value;8 $this->width_ = $width;9 $this->text_ = $text;10 $this->max_ = $max;7 $this->value_ = $value; 8 $this->width_ = $width; 9 $this->text_ = $text; 10 $this->max_ = $max; 11 11 12 $this->class_ = "bar";12 $this->class_ = "bar"; 13 13 } 14 14 15 15 function generate() 16 16 { 17 if ( $this->text_ == "") $this->text_ = " ";18 if ( $this->value_)19 $width = $this->width_ / ( $this->max_ / $this->value_);20 else21 $width = 0;22 $html = "<div class=".$this->class_." style=\"width: ".$width."px;\">".$this->text_."</div>";23 return $html;17 if ($this->text_ == "") $this->text_ = " "; 18 if ($this->value_) 19 $width = $this->width_ / ($this->max_ / $this->value_); 20 else 21 $width = 0; 22 $html = "<div class=".$this->class_." style=\"width: ".$width."px;\">".$this->text_."</div>"; 23 return $html; 24 24 } 25 25 26 function setLow( $low, $class)26 function setLow($low, $class) 27 27 { 28 if ( $this->value_ <= $low)29 $this->class_ = "bar-".$class;28 if ($this->value_ <= $low) 29 $this->class_ = "bar-".$class; 30 30 } 31 } 32 31 } 33 32 ?> -
dev/common/class.kill.php
r154 r155 308 308 kb3_alliances ali, kb3_alliances fbali, kb3_corps fbcrp, 309 309 kb3_pilots fbplt 310 where kll.kll_id = ".$this->id_."310 where kll.kll_id = '".$this->id_."' 311 311 and plt.plt_id = kll.kll_victim_id 312 312 and crp.crp_id = kll.kll_crp_id … … 318 318 $this->qry_->execute($this->sql_); 319 319 $row = $this->qry_->getRow(); 320 if (!$row) 321 { 322 $this->valid_ = false; 323 return false; 324 } 325 else 326 { 327 $this->valid_ = true; 328 } 329 320 330 $this->setTimeStamp($row['kll_timestamp']); 321 331 $this->setSolarSystem(new SolarSystem($row['kll_system_id'])); … … 337 347 $this->fbplt_ext_ = $row['fbplt_externalid']; 338 348 339 if (!$row)340 $this->valid_ = false;341 else342 $this->valid_ = true;343 349 // involved 344 350 $sql = "select ind_plt_id, ind_crp_id, ind_all_id, ind_sec_status, -
dev/common/class.map.php
r123 r155 12 12 $this->ly_ = 0.4 / 1000000000000000; 13 13 $this->offset_ = 10; 14 // colors 15 /* unused, must have been some kind of painting by security 14 16 15 $this->sys_colors_[0] = array(200, 20, 48); 17 16 $this->sys_colors_[1] = array(200, 20, 48); … … 25 24 $this->sys_colors_[9] = array(99, 241, 255); 26 25 $this->sys_colors_[10] = array(99, 241, 255); 27 */28 26 29 27 $this->linecolor_ = array(75, 75, 75); … … 57 55 { 58 56 $this->hlcolor_ = array($r, $g, $b); 57 } 58 59 function paintSecurity($bool) 60 { 61 $this->psec_ = $bool; 59 62 } 60 63 … … 109 112 { 110 113 $this->title_ = $title; 114 } 115 116 function secColor($img, $security) 117 { 118 if ($this->psec_) 119 { 120 if ($security > 0.05) 121 { 122 $sec_status = round($security * 10); 123 return imagecolorallocate($img, $this->sys_colors_[$sec_status][0], 124 $this->sys_colors_[$sec_status][1], 125 $this->sys_colors_[$sec_status][2]); 126 } 127 } 128 129 return imagecolorallocate($img, $this->normalcolor_[0], $this->normalcolor_[1], $this->normalcolor_[2]); 111 130 } 112 131 … … 264 283 $color = imagecolorallocate($img, $this->hlcolor_[0], $this->hlcolor_[1], $this->hlcolor_[2]); 265 284 else 266 $color = imagecolorallocate($img, $this->normalcolor_[0], $this->normalcolor_[1], $this->normalcolor_[2]);285 $color = $this->secColor($img, $sys[$n][6]); 267 286 } 268 287 if ($this->mode_ == "region") … … 271 290 $color = imagecolorallocate($img, $this->hlcolor_[0], $this->hlcolor_[1], $this->hlcolor_[2]); 272 291 else 273 $color = imagecolorallocate($img, $this->normalcolor_[0], $this->normalcolor_[1], $this->normalcolor_[2]);292 $color = $this->secColor($img, $sys[$n][6]); 274 293 } 275 294 if ($this->mode_ == "cons") … … 278 297 $color = imagecolorallocate($img, $this->hlcolor_[0], $this->hlcolor_[1], $this->hlcolor_[2]); 279 298 else 280 $color = imagecolorallocate($img, $this->normalcolor_[0], $this->normalcolor_[1], $this->normalcolor_[2]); 281 } 282 // if ( $sys[$n][3] > 0 ) 283 // $sec_status = round( $sys[$n][3] * 10 ); 284 // else 285 // $sec_status = 0; 286 // $color = imagecolorallocate( $img, $this->sys_colors_[$sec_status][0], 287 // $this->sys_colors_[$sec_status][1], 288 // $this->sys_colors_[$sec_status][2] ); 299 $color = $this->secColor($img, $sys[$n][6]); 300 } 301 289 302 if ($this->showsysnames_) 290 303 { -
dev/common/class.pagesplitter.php
r2 r155 1 <? 2 3 4 function PageSplitter( $max, $split)1 <?php 2 class PageSplitter 3 { 4 function PageSplitter($max, $split) 5 5 { 6 $this->max_ = $max;7 $this->split_ = $split;6 $this->max_ = $max; 7 $this->split_ = $split; 8 8 } 9 9 10 10 function getSplit() 11 11 { 12 return $this->split_;12 return $this->split_; 13 13 } 14 14 15 15 function generate() 16 16 { 17 if ( $this->max_ / $this->split_ <= 1)18 return;17 if ($this->max_ / $this->split_ <= 1) 18 return; 19 19 20 $html = "<br><p><b>[</b> Page: "; 21 $endpage = ceil( $this->max_ / $this->split_ ); 22 if ( $_GET['page'] ) { 23 $url = preg_replace( "/&page=([0-9]?[0-9]?[0-9])/", "", 24 $_SERVER['QUERY_STRING'] ); 25 $page = $_GET['page']; 26 } else { 27 $url = $_SERVER['QUERY_STRING']; 28 $page = 1; 29 } 30 for ( $i = 1; $i <= $endpage; $i++ ) { 31 32 if ( $i != $page ) { 33 if ( $i == 1 || $i == $endpage || ( ( $i >= $page - 1 && $i <= $page + 1 ) ) ) { 34 if ( $i != 1 ) 35 $html .= "<a href=\"?".$url."&page=".$i."\">".$i."</a> "; 36 else 37 $html .= "<a href=\"?".$url."\">".$i."</a> "; 38 } elseif ( $i < $page && !$dotted ) { 39 $dotted = true; 40 $html .= "<b>.. </b>"; 41 } elseif ( $i > $page && !$ldotted ) { 42 $ldotted = true; 43 $html .= "<b>.. </b>"; 44 } 20 $html = "<br><p><b>[</b> Page: "; 21 $endpage = ceil($this->max_ / $this->split_); 22 if ($_GET['page']) 23 { 24 $url = preg_replace("/&page=([0-9]?[0-9]?[0-9])/", "", 25 $_SERVER['QUERY_STRING']); 26 $page = $_GET['page']; 45 27 } 46 28 else 47 $html .= "<b>".$i."</b> "; 48 } 49 $html .= "<b>]</b>"; 50 return $html; 29 { 30 $url = $_SERVER['QUERY_STRING']; 31 $page = 1; 32 } 33 for ($i = 1; $i <= $endpage; $i++) 34 { 35 if ($i != $page) 36 { 37 if ($i == 1 || $i == $endpage || (($i >= $page - 1 && $i <= $page + 1))) 38 { 39 if ($i != 1) 40 $html .= "<a href=\"?".$url."&page=".$i."\">".$i."</a> "; 41 else 42 $html .= "<a href=\"?".$url."\">".$i."</a> "; 43 }elseif ($i < $page && !$dotted) 44 { 45 $dotted = true; 46 $html .= "<b>.. </b>"; 47 }elseif ($i > $page && !$ldotted) 48 { 49 $ldotted = true; 50 $html .= "<b>.. </b>"; 51 } 52 } 53 else 54 $html .= "<b>".$i."</b> "; 55 } 56 $html .= "<b>]</b>"; 57 return $html; 51 58 } 52 59 } 53 60 ?> -
dev/common/class.profiler.php
r2 r155 1 <? 2 3 1 <?php 2 class Profiler 3 { 4 4 function Profiler() 5 5 { … … 8 8 function start() 9 9 { 10 $this->starttime_ = strtok( microtime(), ' ' ) + strtok( '');10 $this->starttime_ = strtok(microtime(), ' ') + strtok(''); 11 11 } 12 12 13 13 function stop() 14 14 { 15 $this->stoptime_ = strtok( microtime(), ' ' ) + strtok( '');15 $this->stoptime_ = strtok(microtime(), ' ') + strtok(''); 16 16 } 17 17 18 18 function getTime() 19 19 { 20 return $this->stoptime_ - $this->starttime_;20 return $this->stoptime_ - $this->starttime_; 21 21 } 22 22 } 23 23 ?> -
dev/common/corp_detail.php
r104 r155 10 10 require_once("class.toplist.php"); 11 11 12 $corp = new Corporation(intval($_GET['crp_id'])); 12 if (!$crp_id = intval($_GET['crp_id'])) 13 { 14 echo 'no valid corp id specified<br/>'; 15 exit; 16 } 17 $corp = new Corporation($crp_id); 13 18 $alliance = $corp->getAlliance(); 14 19 … … 304 309 305 310 break; 311 case 'violent_systems': 312 $html .= "<div class=block-header2>Most violent systems</div>"; 313 $html .= "<table width=\"99%\"><tr><td align=center valign=top>"; 314 315 $html .= "<div class=block-header>This month</div>"; 316 $html .= "<table class=kb-table>"; 317 $html .= "<tr class=kb-table-header><td>#</td><td width=180>System</td><td width=40 align=center >Kills</td></tr>"; 318 319 $sql = "select sys.sys_name, sys.sys_sec, sys.sys_id, count(distinct kll.kll_id) as kills 320 from kb3_systems sys, kb3_kills kll, kb3_inv_detail inv 321 where kll.kll_system_id = sys.sys_id 322 and inv.ind_kll_id = kll.kll_id"; 323 324 if (CORP_ID) 325 $sql .= " and inv.ind_crp_id in (".CORP_ID.")"; 326 if (ALLIANCE_ID) 327 $sql .= " and inv.ind_all_id = ".ALLIANCE_ID; 328 329 $sql .= " and date_format( kll.kll_timestamp, \"%c\" ) = ".date("m")." 330 and date_format( kll.kll_timestamp, \"%Y\" ) = ".date("Y")." 331 group by sys.sys_name 332 order by kills desc 333 limit 25"; 334 335 $qry = new DBQuery(); 336 $qry->execute($sql); 337 $odd = false; 338 $counter = 1; 339 while ($row = $qry->getRow()) 340 { 341 if (!$odd) 342 { 343 $odd = true; 344 $rowclass = 'kb-table-row-odd'; 345 } 346 else 347 { 348 $odd = false; 349 $rowclass = 'kb-table-row-even'; 350 } 351 352 $html .= "<tr class=".$rowclass."><td><b>".$counter.".</b></td><td class=kb-table-cell width=180><b><a href=\"?a=system_detail&sys_id=".$row['sys_id']."\">".$row['sys_name']."</a></b> (".roundsec($row['sys_sec']).")</td><td align=center>".$row['kills']."</td></tr>"; 353 $counter++; 354 } 355 356 $html .= "</table>"; 357 358 $html .= "</td><td align=center valign=top>"; 359 $html .= "<div class=block-header>All-Time</div>"; 360 $html .= "<table class=kb-table>"; 361 $html .= "<tr class=kb-table-header><td>#</td><td width=180>System</td><td width=40 align=center>Kills</td></tr>"; 362 363 $sql = "select sys.sys_name, sys.sys_id, sys.sys_sec, count(distinct kll.kll_id) as kills 364 from kb3_systems sys, kb3_kills kll, kb3_inv_detail inv 365 where kll.kll_system_id = sys.sys_id 366 and inv.ind_kll_id = kll.kll_id"; 367 368 if (CORP_ID) 369 $sql .= " and inv.ind_crp_id in (".CORP_ID.")"; 370 if (ALLIANCE_ID) 371 $sql .= " and inv.ind_all_id = ".ALLIANCE_ID; 372 373 $sql .= " group by sys.sys_name 374 order by kills desc 375 limit 25"; 376 377 $qry = new DBQuery(); 378 $qry->execute($sql); 379 $odd = false; 380 $counter = 1; 381 while ($row = $qry->getRow()) 382 { 383 if (!$odd) 384 { 385 $odd = true; 386 $rowclass = 'kb-table-row-odd'; 387 } 388 else 389 { 390 $odd = false; 391 $rowclass = 'kb-table-row-even'; 392 } 393 394 $html .= "<tr class=".$rowclass."><td><b>".$counter.".</b></td><td class=kb-table-cell><b><a href=\"?a=system_detail&sys_id=".$row['sys_id']."\">".$row['sys_name']."</a></b> (".roundsec($row['sys_sec']).")</td><td align=center>".$row['kills']."</td></tr>"; 395 $counter++; 396 } 397 $html .= "</table>"; 398 $html .= "</td></tr></table>"; 399 break; 306 400 } 307 401 … … 325 419 $menubox->addOption("caption","Global statistics"); 326 420 $menubox->addOption("link","Ships & weapons", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=ships_weapons"); 421 $menubox->addOption("link","Most violent systems", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=violent_systems"); 327 422 $page->addContext($menubox->generate()); 328 423 $page->setContent($html); -
dev/common/db.php
r134 r155 39 39 $this->resid_ = mysql_query($sql, $this->dbconn_->id()); 40 40 41 if ( !$this->resid_)41 if ($this->resid_ == false) 42 42 { 43 if (defined( DB_HALTONERROR) && DB_HALTONERROR)43 if (defined('DB_HALTONERROR') && DB_HALTONERROR) 44 44 { 45 45 echo "Database error: " . mysql_error($this->dbconn_->id()) . "<br>"; -
dev/common/index.php
r134 r155 51 51 $settingsPage = true; 52 52 } 53 else 54 { 55 $settingsPage = false; 56 } 53 57 $mods_active = explode(',', $config->getConfig('mods_active')); 54 58 $modOverrides = false; … … 73 77 { 74 78 $docache = true; 79 } 80 else 81 { 82 $docache = false; 75 83 } 76 84 -
dev/common/kill_detail.php
r154 r155 116 116 $smarty->assign('ClassName', $shipclass->getName()); 117 117 $smarty->assign('System', $system->getName()); 118 $smarty->assign('SystemURL', "?a=system_detail& sys_id=" .$system->getID());118 $smarty->assign('SystemURL', "?a=system_detail&sys_id=".$system->getID()); 119 119 $smarty->assign('SystemSecurity', $system->getSecurity(true)); 120 120 $smarty->assign('TimeStamp', $kill->getTimeStamp()); -
dev/common/kill_related.php
r154 r155 34 34 { 35 35 $time = strtotime($row['ts']); 36 $ts[ date('H', $time)][] = $row['ts'];36 $ts[intval(date('H', $time))][] = $row['ts']; 37 37 } 38 38 … … 183 183 } 184 184 185 $pilots = $destroyed = $pods = array(); 185 $destroyed = $pods = array(); 186 $pilots = array('a' => array(), 'e' => array()); 186 187 $kslist->rewind(); 187 188 while ($kill = $kslist->getKill()) -
dev/common/mapview.php
r91 r155 25 25 $view->setTitle("Region"); 26 26 $view->showLines($config->getConfig('map_map_showlines')); 27 $view->paintSecurity($config->getConfig('map_map_security')); 27 28 checkColors('map'); 28 29 break; … … 30 31 $view->setTitle("Constellation"); 31 32 $view->showLines($config->getConfig('map_reg_showlines')); 33 $view->paintSecurity($config->getConfig('map_reg_security')); 32 34 $view->setOffset(25); 33 35 checkColors('reg'); … … 36 38 $view->showLines($config->getConfig('map_con_showlines')); 37 39 $view->showSysNames($config->getConfig('map_con_shownames')); 40 $view->paintSecurity($config->getConfig('map_con_security')); 38 41 $view->setOffset(25); 39 42 checkColors('con'); -
dev/common/system_detail.php
r2 r155 1 <? 2 require_once( "db.php" ); 3 require_once( "class.page.php" ); 1 <?php 2 require_once("db.php"); 3 require_once("class.page.php"); 4 require_once('class.system.php'); 5 require_once('class.killlist.php'); 6 require_once('class.killlisttable.php'); 7 require_once('class.killsummarytable.php'); 8 require_once('class.box.php'); 4 9 5 $sys_id = $_GET['sys_id']; 6 7 $html .= "<html><head><title>System detail</title><link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\"></head>"; 8 $html .= "<body bgcolor=\"#222222\"><table class=kb-table width=\"100%\" height=\"100%\"><tr><td valign=top>"; 10 $sys_id = intval($_GET['sys_id']); 9 11 10 $html .= "<table border=\"0\"><tr>"; 11 $html .= "<td><img src=\"?a=mapview&sys_id=".$sys_id."&mode=map&size=200\" border=0></td>"; 12 $html .= "<td><img src=\"?a=mapview&sys_id=".$sys_id."&mode=region&size=200\" border=0></td>"; 13 $html .= "<td><img src=\"?a=mapview&sys_id=".$sys_id."&mode=cons&size=200\" border=0></td>"; 14 $html .= "</tr></table>"; 12 if (!$sys_id) 13 { 14 echo 'no valid id supplied<br/>'; 15 exit; 16 } 17 $system = new SolarSystem($sys_id); 15 18 16 $html .= "</td></tr>"; 17 $html .= "<tr><td align=center><button id=close name=close value=\"Close\" onclick=\"window.close();\">Close</button></td></tr>"; 18 $html .= "</table></body></html>"; 19 $page = new Page('System details - '.$system->getName()); 19 20 20 echo $html; 21 $html .= "<table border=\"0\" class=\"kb-table\"><tr class=\"kb-table-header\"><td colspan=\"3\">Graphical Overview</td></tr><tr>"; 22 $html .= "<td><img src=\"?a=mapview&sys_id=".$sys_id."&mode=map&size=250\" border=\"0\" width=\"250\" height=\"250\"></td>"; 23 $html .= "<td><img src=\"?a=mapview&sys_id=".$sys_id."&mode=region&size=250\" border=\"0\" width=\"250\" height=\"250\"></td>"; 24 $html .= "<td><img src=\"?a=mapview&sys_id=".$sys_id."&mode=cons&size=250\" border=\"0\" width=\"250\" height=\"250\"></td>"; 25 $html .= "</tr></table><br/>"; 26 27 $kslist = new KillList(); 28 if (CORP_ID) 29 $kslist->addInvolvedCorp(new Corporation(CORP_ID)); 30 if (ALLIANCE_ID) 31 $kslist->addInvolvedAlliance(new Alliance(ALLIANCE_ID)); 32 $kslist->addSystem($system); 33 34 $lslist = new KillList(); 35 if (CORP_ID) 36 $lslist->addVictimCorp(new Corporation(CORP_ID)); 37 if (ALLIANCE_ID) 38 $lslist->addVictimAlliance(new Alliance(ALLIANCE_ID)); 39 $lslist->addSystem($system); 40 41 $summarytable = new KillSummaryTable($kslist, $lslist); 42 $summarytable->setBreak(6); 43 $html .= $summarytable->generate(); 44 45 $klist = new KillList(); 46 $klist->setOrdered(true); 47 if ($_GET['view'] == 'losses') 48 { 49 if (CORP_ID) 50 $klist->addVictimCorp(new Corporation(CORP_ID)); 51 if (ALLIANCE_ID) 52 $klist->addVictimAlliance(new Alliance(ALLIANCE_ID)); 53 } 54 else 55 { 56 if (CORP_ID) 57 $klist->addInvolvedCorp(new Corporation(CORP_ID)); 58 if (ALLIANCE_ID) 59 $klist->addInvolvedAlliance(new Alliance(ALLIANCE_ID)); 60 } 61 $klist->addSystem($system); 62 if ($_GET['scl_id']) 63 $klist->addVictimShipClass(new ShipClass($_GET['scl_id'])); 64 else 65 $klist->setPodsNoobShips(false); 66 67 if ($_GET['view'] == 'recent' || !isset($_GET['view'])) 68 { 69 $html .= "<div class=kb-kills-header>20 most recent kills</div>"; 70 $klist->setLimit(20); 71 } 72 else 73 { 74 if ($_GET['view'] == 'losses') 75 { 76 $html .= "<div class=kb-kills-header>All losses</div>"; 77 } 78 else 79 { 80 $html .= "<div class=kb-kills-header>All kills</div>"; 81 } 82 $pagesplitter = new PageSplitter($klist->getCount(), 20); 83 $klist->setPageSplitter($pagesplitter); 84 } 85 86 $table = new KillListTable($klist); 87 $html .= $table->generate(); 88 if (is_object($pagesplitter)) 89 { 90 $html .= $pagesplitter->generate(); 91 } 92 93 $page->setContent($html); 94 $menubox = new box("Menu"); 95 $menubox->setIcon("menu-item.gif"); 96 $menubox->addOption("caption","Navigation"); 97 $menubox->addOption("link","All kills", "?a=system_detail&sys_id=".$sys_id."&view=kills"); 98 $menubox->addOption("link","All losses", "?a=system_detail&sys_id=".$sys_id."&view=losses"); 99 $menubox->addOption("link","Recent Activity", "?a=system_detail&sys_id=".$sys_id."&view=recent"); 100 $page->addContext($menubox->generate()); 101 102 $page->generate(); 21 103 ?> -
dev/templates/kill_detail.tpl
r149 r155 50 50 <tr class={cycle name=ccl}> 51 51 <td class=kb-table-cell><b>Location:</b></td> 52 <td class=kb-table-cell><b><a href=" javascript:openWindow( '{$SystemURL}', '', 620, 260, '' );">{$System}</a></b> ({$SystemSecurity})</td>52 <td class=kb-table-cell><b><a href="{$SystemURL}">{$System}</a></b> ({$SystemSecurity})</td> 53 53 </tr> 54 54 <tr class={cycle name=ccl}>