- Timestamp:
- 12/18/06 00:20:27 (16 years ago)
- Location:
- dev
- Files:
-
- 2 added
- 3 removed
- 12 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/admin.php
r157 r158 23 23 check_tblstrct5(); 24 24 chk_kb3_items(); 25 check_tblstrct6(); 25 26 26 27 if ($_POST['submit']) -
dev/common/autoupgrade.php
r156 r158 198 198 { 199 199 $qry = new DBQuery(); 200 $query = 'select count(*) from kb3_item_types where itt_id = 7 71';200 $query = 'select count(*) from kb3_item_types where itt_id = 787'; 201 201 $result = mysql_query($query); 202 202 $result = mysql_fetch_array($result); … … 205 205 return; 206 206 } 207 $qry->execute("INSERT IGNORE INTO kb3_item_types VALUES (737,'Gas Cloud Harvester',1)"); 208 $qry->execute("INSERT IGNORE INTO kb3_item_types VALUES (762,'Inertia Stabilizer',3)"); 209 $qry->execute("INSERT IGNORE INTO kb3_item_types VALUES (763,'Nanofiber Internal Structure',3)"); 210 $qry->execute("INSERT IGNORE INTO kb3_item_types VALUES (764,'Overdrive Injector System',3)"); 211 $qry->execute("INSERT IGNORE INTO kb3_item_types VALUES (765,'Expanded Cargohold',3)"); 212 $qry->execute("INSERT IGNORE INTO kb3_item_types VALUES (766,'Power Diagnostic System',3)"); 213 $qry->execute("INSERT IGNORE INTO kb3_item_types VALUES (767,'Capacitor Power Relay',3)"); 214 $qry->execute("INSERT IGNORE INTO kb3_item_types VALUES (768,'Capacitor Flux Coil',3)"); 215 $qry->execute("INSERT IGNORE INTO kb3_item_types VALUES (769,'Reactor Control Unit',3)"); 216 $qry->execute("INSERT IGNORE INTO kb3_item_types VALUES (770,'Shield Flux Coil',3)"); 217 $qry->execute("INSERT IGNORE INTO kb3_item_types VALUES (771,'Missile Launcher Heavy Assault',1)"); 207 $queries = " 208 INSERT IGNORE INTO `kb3_item_types` VALUES (737, 'Gas Cloud Harvester',1); 209 INSERT IGNORE INTO `kb3_item_types` VALUES (762, 'Inertia Stabilizer',3); 210 INSERT IGNORE INTO `kb3_item_types` VALUES (763, 'Nanofiber Internal Structure',3); 211 INSERT IGNORE INTO `kb3_item_types` VALUES (764, 'Overdrive Injector System',3); 212 INSERT IGNORE INTO `kb3_item_types` VALUES (765, 'Expanded Cargohold',3); 213 INSERT IGNORE INTO `kb3_item_types` VALUES (766, 'Power Diagnostic System',3); 214 INSERT IGNORE INTO `kb3_item_types` VALUES (767, 'Capacitor Power Relay',3); 215 INSERT IGNORE INTO `kb3_item_types` VALUES (768, 'Capacitor Flux Coil',3); 216 INSERT IGNORE INTO `kb3_item_types` VALUES (769, 'Reactor Control Unit',3); 217 INSERT IGNORE INTO `kb3_item_types` VALUES (770, 'Shield Flux Coil',3); 218 INSERT IGNORE INTO `kb3_item_types` VALUES (771, 'Missile Launcher Heavy Assault',1); 219 INSERT IGNORE INTO `kb3_item_types` VALUES (738, 'Cyber Armor', 0); 220 INSERT IGNORE INTO `kb3_item_types` VALUES (740, 'Cyber Electronics', 0); 221 INSERT IGNORE INTO `kb3_item_types` VALUES (741, 'Cyber Engineering', 0); 222 INSERT IGNORE INTO `kb3_item_types` VALUES (742, 'Cyber Gunnery', 0); 223 INSERT IGNORE INTO `kb3_item_types` VALUES (743, 'Cyber Industry', 0); 224 INSERT IGNORE INTO `kb3_item_types` VALUES (744, 'Cyber Leadership', 0); 225 INSERT IGNORE INTO `kb3_item_types` VALUES (745, 'Cyber Learning', 0); 226 INSERT IGNORE INTO `kb3_item_types` VALUES (746, 'Cyber Missile', 0); 227 INSERT IGNORE INTO `kb3_item_types` VALUES (747, 'Cyber Navigation', 0); 228 INSERT IGNORE INTO `kb3_item_types` VALUES (748, 'Cyber Science', 0); 229 INSERT IGNORE INTO `kb3_item_types` VALUES (749, 'Cyber Shields', 0); 230 INSERT IGNORE INTO `kb3_item_types` VALUES (772, 'Assault Missile', 0); 231 INSERT IGNORE INTO `kb3_item_types` VALUES (773, 'Rig Armor', 5); 232 INSERT IGNORE INTO `kb3_item_types` VALUES (774, 'Rig Shield', 5); 233 INSERT IGNORE INTO `kb3_item_types` VALUES (775, 'Rig Energy Weapon', 5); 234 INSERT IGNORE INTO `kb3_item_types` VALUES (776, 'Rig Hybrid Weapon', 5); 235 INSERT IGNORE INTO `kb3_item_types` VALUES (777, 'Rig Projectile Weapon', 5); 236 INSERT IGNORE INTO `kb3_item_types` VALUES (778, 'Rig Drones', 5); 237 INSERT IGNORE INTO `kb3_item_types` VALUES (779, 'Rig Launcher', 5); 238 INSERT IGNORE INTO `kb3_item_types` VALUES (780, 'Rig Electronics', 5); 239 INSERT IGNORE INTO `kb3_item_types` VALUES (781, 'Rig Energy Grid', 5); 240 INSERT IGNORE INTO `kb3_item_types` VALUES (782, 'Rig Astronautic', 5); 241 INSERT IGNORE INTO `kb3_item_types` VALUES (783, 'Cyber X Specials', 0); 242 INSERT IGNORE INTO `kb3_item_types` VALUES (785, 'Script', 0); 243 INSERT IGNORE INTO `kb3_item_types` VALUES (786, 'Rig Electronics Superiority', 5); 244 INSERT IGNORE INTO `kb3_item_types` VALUES (722, 'Advanced Hybrid Ammo Blueprint', 0); 245 INSERT IGNORE INTO `kb3_item_types` VALUES (723, 'Tractor Beam Blueprint', 0); 246 INSERT IGNORE INTO `kb3_item_types` VALUES (724, 'Implant Blueprints', 0); 247 INSERT IGNORE INTO `kb3_item_types` VALUES (725, 'Advanced Projectile Ammo Blueprint', 0); 248 INSERT IGNORE INTO `kb3_item_types` VALUES (726, 'Advanced Frequency Crystal Blueprint', 0); 249 INSERT IGNORE INTO `kb3_item_types` VALUES (727, 'Mining Crystal Blueprint', 0); 250 INSERT IGNORE INTO `kb3_item_types` VALUES (728, 'Decryptors - Amarr', 0); 251 INSERT IGNORE INTO `kb3_item_types` VALUES (729, 'Decryptors - Minmatar', 0); 252 INSERT IGNORE INTO `kb3_item_types` VALUES (730, 'Decryptors - Gallente', 0); 253 INSERT IGNORE INTO `kb3_item_types` VALUES (731, 'Decryptors - Caldari', 0); 254 INSERT IGNORE INTO `kb3_item_types` VALUES (732, 'Decryptors - Sleepers', 0); 255 INSERT IGNORE INTO `kb3_item_types` VALUES (733, 'Decryptors - Yan Jung', 0); 256 INSERT IGNORE INTO `kb3_item_types` VALUES (734, 'Decryptors - Takmahl', 0); 257 INSERT IGNORE INTO `kb3_item_types` VALUES (735, 'Decryptors - Talocan', 0); 258 INSERT IGNORE INTO `kb3_item_types` VALUES (754, 'Salvaged Materials', 0); 259 INSERT IGNORE INTO `kb3_item_types` VALUES (784, 'Large Collidable Ship', 0); 260 INSERT IGNORE INTO `kb3_item_types` VALUES (787, 'Rig Blueprint', 0); 261 "; 262 $query = explode("\n", $queries); 263 foreach ($query as $querystring) 264 { 265 if ($string = trim(str_replace(');', ')', $querystring))) 266 { 267 $qry->execute($string); 268 } 269 } 270 } 271 function check_tblstrct6() 272 { 273 $qry = new DBQuery(); 274 $query = 'select all_img from kb3_alliances limit 1'; 275 $result = mysql_query($query); 276 if (!$result) 277 { 278 return; 279 } 280 $query = 'ALTER TABLE `kb3_alliances` DROP `all_img`'; 281 $qry->execute($query); 218 282 } 219 283 ?> -
dev/common/class.alliance.php
r155 r158 44 44 if ($qry->recordCount() == 0) 45 45 { 46 $qry->execute("insert into kb3_alliances values (null,'".slashfix($name)."')");46 $qry->execute("insert into kb3_alliances (all_id,all_name) values (null,'".slashfix($name)."')"); 47 47 $this->id_ = $qry->getInsertID(); 48 48 } -
dev/common/class.contract.php
r95 r158 123 123 function getRunTime() 124 124 { 125 if ( $this->getEndDate() != "")126 $datet = getdate(strtotime($this->getEndDate()));127 else128 $datet = getdate(strtotime(date("Y-m-d")));129 130 $d atef = getdate(strtotime($this->getStartDate()));131 return $datet['yday'] - $datef['yday'];125 if (!$datet = $this->getEndDate()) 126 { 127 $datet = 'now'; 128 } 129 130 $diff = strtotime($datet) - strtotime($this->getStartDate()); 131 return floor($diff/86400); 132 132 } 133 133 … … 215 215 if ($type == "campaign") $campaign = 1; 216 216 else $campaign = 0; 217 if ($enddate != "") $enddate = "'".$enddate." '";217 if ($enddate != "") $enddate = "'".$enddate." 23:59:59'"; 218 218 else $enddate = "null"; 219 219 … … 222 222 $sql = "insert into kb3_contracts values ( null, '".$name."', 223 223 '".KB_SITE."', ".$campaign.", 224 '".$startdate." ',224 '".$startdate." 00:00:00', 225 225 ".$enddate." )"; 226 226 $qry->execute($sql) or die($qry->getErrorMsg()); … … 230 230 { 231 231 $sql = "update kb3_contracts set ctr_name = '".$name."', 232 ctr_started = '".$startdate." ',232 ctr_started = '".$startdate." 00:00:00', 233 233 ctr_ended = ".$enddate." 234 234 where ctr_id = ".$this->ctr_id_; -
dev/common/class.corp.php
r10 r158 22 22 function getPortraitURL($size = 64) 23 23 { 24 return "?a=corpportrait&id=".$this->id_."&size=".$size;24 return '?a=thumb&type=corp&id='.$this->id_.'&size='.$size; 25 25 } 26 26 … … 45 45 { 46 46 $qry = new DBQuery(); 47 $qry->execute("select * 48 from kb3_corps 49 where crp_name = '" . slashfix($name) . "'"); 50 47 $qry->execute("select * from kb3_corps 48 where crp_name = '".slashfix($name)."'"); 51 49 $row = $qry->getRow(); 52 50 if ($row['crp_id']) $this->id_ = $row['crp_id']; … … 57 55 if (!$this->qry_->executed_) 58 56 { 59 $this->sql_ = "select * 60 from kb3_corps 61 where crp_id = " . $this->id_; 57 $this->sql_ = "select * from kb3_corps 58 where crp_id = ".$this->id_; 62 59 $this->qry_->execute($this->sql_); 63 60 $this->row_ = $this->qry_->getRow(); … … 68 65 { 69 66 $qry = new DBQuery(); 70 $qry->execute("select * 71 from kb3_corps 72 where crp_name = '" . slashfix($name) . "'"); 67 $qry->execute("select * from kb3_corps 68 where crp_name = '".slashfix($name)."'"); 73 69 74 70 if ($qry->recordCount() == 0) 75 71 { 76 $qry->execute("insert into kb3_corps values ( null, 77 '" . slashfix($name) . "', 78 " . $alliance->getID() . ", 79 0, 80 date_format( '" 81 . $timestamp . "', 82 '%Y.%m.%d %H:%i:%s') 83 )"); 72 $qry->execute("insert into kb3_corps values ( null,'".slashfix($name)."'," 73 .$alliance->getID().",0,date_format('".$timestamp."','%Y.%m.%d %H:%i:%s'))"); 84 74 $this->id_ = $qry->getInsertID(); 85 75 } … … 90 80 if ($this->isUpdatable($timestamp) && $row['crp_all_id'] != $alliance->getID()) 91 81 { 92 $qry->execute("update kb3_corps 93 set crp_all_id = " . $alliance->getID() . ", 94 crp_updated = date_format( '" . $timestamp . "', 95 '%Y.%m.%d %H:%i:%s') 96 where crp_id = " . $this->id_); 82 $qry->execute('update kb3_corps 83 set crp_all_id = '.$alliance->getID().", 84 crp_updated = date_format( '".$timestamp."','%Y.%m.%d %H:%i:%s') 85 where crp_id = ".$this->id_); 97 86 } 98 87 } … … 104 93 { 105 94 $qry = new DBQuery(); 106 $qry->execute("select crp_id 107 from kb3_corps 108 where crp_id = " . $this->id_ . " 109 and ( crp_updated < date_format( '" . $timestamp . "', 110 '%Y.%m.%d %H:%i' ) 111 or crp_updated is null )"); 112 95 $qry->execute("select crp_id from kb3_corps 96 where crp_id = ".$this->id_." 97 and ( crp_updated < date_format( '".$timestamp."', '%Y.%m.%d %H:%i' ) 98 or crp_updated is null )"); 113 99 return $qry->recordCount() == 1; 114 100 } -
dev/common/class.http.php
r72 r158 51 51 } 52 52 53 $this->fp = fsockopen($this->url["host"], 80, $errno, $errstr, 10);53 $this->fp = @fsockopen($this->url["host"], 80, $errno, $errstr, 10); 54 54 if (!$this->fp) 55 55 { 56 echo "Error occured with fsockopen: $errstr ($errno)<br>\n";56 //echo "Error occured with fsockopen: $errstr ($errno)<br>\n"; 57 57 return false; 58 58 } -
dev/common/class.killlist.php
r154 r158 1 1 <?php 2 2 require_once('class.kill.php'); 3 require_once('class.profiler.php');4 3 require_once('class.pagesplitter.php'); 5 4 -
dev/common/class.killsummarytable.php
r106 r158 84 84 } 85 85 } 86 87 86 88 87 // do it faster, baby! -
dev/common/class.parser.php
r138 r158 304 304 if ($typ == 'a') 305 305 { 306 if ($ialliance->getID() == $id )306 if ($ialliance->getID() == $id || $kill->getVictimAllianceID() == $id) 307 307 { 308 308 $authorized = true; … … 312 312 elseif ($typ == 'c') 313 313 { 314 if ($icorp->getID() == $id )314 if ($icorp->getID() == $id || $kill->getVictimCorpID() == $id) 315 315 { 316 316 $authorized = true; … … 320 320 elseif ($typ == 'p') 321 321 { 322 if ($ipilot->getID() == $id )322 if ($ipilot->getID() == $id || $kill->getVictimID() == $id) 323 323 { 324 324 $authorized = true; -
dev/common/class.pilot.php
r92 r158 36 36 { 37 37 $this->execQuery(); 38 return "?a=portrait&id=" . $this->row_['plt_externalid'] . "&size=" .$size;38 return '?a=thumb&id='.$this->row_['plt_externalid'].'&size='.$size; 39 39 } 40 40 … … 43 43 if (!$this->qry_->executed_) 44 44 { 45 $this->sql_ = "select * 46 from kb3_pilots plt, kb3_corps crp, kb3_alliances ali 47 where crp.crp_id = plt.plt_crp_id 48 and ali.all_id = crp.crp_all_id 49 and plt.plt_id = " . $this->id_; 45 $this->sql_ = 'select * from kb3_pilots plt, kb3_corps crp, kb3_alliances ali 46 where crp.crp_id = plt.plt_crp_id 47 and ali.all_id = crp.crp_all_id 48 and plt.plt_id = '.$this->id_; 50 49 $this->qry_->execute($this->sql_) or die($this->qry_->getErrorMsg()); 51 50 $this->row_ = $this->qry_->getRow(); … … 74 73 $qry->execute("select * 75 74 from kb3_pilots 76 where plt_name = '" . slashfix($name) ."'");75 where plt_name = '".slashfix($name)."'"); 77 76 78 77 if ($qry->recordCount() == 0) 79 78 { 80 79 $qry->execute("insert into kb3_pilots values ( null, 81 '" . slashfix($name) ."',82 " . $corp->getID() .",80 '".slashfix($name)."', 81 ".$corp->getID().", 83 82 0, 0, 0, 84 date_format( '" . $timestamp ."', '%Y.%m.%d %H:%i:%s'))");83 date_format( '".$timestamp."', '%Y.%m.%d %H:%i:%s'))"); 85 84 $this->id_ = $qry->getInsertID(); 86 85 } … … 92 91 { 93 92 $qry->execute("update kb3_pilots 94 set plt_crp_id = " . $corp->getID() .",95 plt_updated = date_format( '" . $timestamp . "', '%Y.%m.%d %H:%i:%s') where plt_id = " .$this->id_);93 set plt_crp_id = ".$corp->getID().", 94 plt_updated = date_format( '".$timestamp."', '%Y.%m.%d %H:%i:%s') where plt_id = ".$this->id_); 96 95 } 97 96 } … … 105 104 $qry->execute("select plt_id 106 105 from kb3_pilots 107 where plt_id = " . $this->id_ ."108 and ( plt_updated < date_format( '" . $timestamp ."', '%Y.%m.%d %H:%i')106 where plt_id = ".$this->id_." 107 and ( plt_updated < date_format( '".$timestamp."', '%Y.%m.%d %H:%i') 109 108 or plt_updated is null )"); 110 109 … … 115 114 { 116 115 $qry = new DBQuery(); 117 $qry->execute("update kb3_pilots set plt_externalid = " . $id ."118 where plt_id = " .$this->id_) or die($qry->getErrorMsg());116 $qry->execute("update kb3_pilots set plt_externalid = ".$id." 117 where plt_id = ".$this->id_) or die($qry->getErrorMsg()); 119 118 } 120 119 } 121 122 120 ?> -
dev/common/index.php
r155 r158 3 3 require_once('class.killboard.php'); 4 4 require_once('smarty/Smarty.class.php'); 5 require_once('config.php');6 5 7 6 $page = str_replace('.', '', $_GET['a']); -
dev/templates/standings.tpl
r157 r158 6 6 <tr class="kb-table-row-even"> 7 7 {if $standings[opt].name=='Alliances'} 8 <td width="32" height="34" valign="top" align="right" style="background-image: url(?a= alliance_thumb&size=32&id={$standings[opt].list[idx].pid});"><img src="img/sta_{$standings[opt].list[idx].icon}.png"/></td>9 <td><b><a href="?a=alliance_detail&a ll_id={$standings[opt].list[idx].id}">{$standings[opt].list[idx].text}</a></b>{$standings[opt].list[idx].descr}</td>8 <td width="32" height="34" valign="top" align="right" style="background-image: url(?a=thumb&type=alliance&size=32&id={$standings[opt].list[idx].pid});"><img src="img/sta_{$standings[opt].list[idx].icon}.png"/></td> 9 <td><b><a href="?a=alliance_detail&all_id={$standings[opt].list[idx].id}">{$standings[opt].list[idx].text}</a></b>{$standings[opt].list[idx].descr}</td> 10 10 {else} 11 <td width="32" height="34" valign="top" align="right" style="background-image: url(?a= corpportrait&size=32&id={$standings[opt].list[idx].id});"><img src="img/sta_{$standings[opt].list[idx].icon}.png"/></td>12 <td><b><a href="?a=corp_detail& crp_id={$standings[opt].list[idx].id}">{$standings[opt].list[idx].text}</a></b>{$standings[opt].list[idx].descr}</td>11 <td width="32" height="34" valign="top" align="right" style="background-image: url(?a=thumb&type=corp&size=32&id={$standings[opt].list[idx].id});"><img src="img/sta_{$standings[opt].list[idx].icon}.png"/></td> 12 <td><b><a href="?a=corp_detail&crp_id={$standings[opt].list[idx].id}">{$standings[opt].list[idx].text}</a></b>{$standings[opt].list[idx].descr}</td> 13 13 {/if} 14 14 <td align="right">{$standings[opt].list[idx].value}</td>