Changeset 55
- Timestamp:
- 11/07/06 00:07:45 (16 years ago)
- Location:
- dev/common
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/class.kill.php
r54 r55 64 64 $this->execQuery(); 65 65 return $this->victimalliancename_; 66 }67 function getVictimAllianceID()68 {69 $this->execQuery();70 return $this->victimallianceid_;71 66 } 72 67 … … 285 280 $this->qry_ = new DBQuery(); 286 281 $this->sql_ = "select kll.kll_id, kll.kll_timestamp, plt.plt_name, 287 crp.crp_name, ali.all_name, ali.all_id,kll.kll_ship_id,282 crp.crp_name, ali.all_name, kll.kll_ship_id, 288 283 kll.kll_system_id, kll.kll_ship_id, 289 284 kll.kll_victim_id, plt.plt_externalid, … … 314 309 $this->setVictimCorpID($row['kll_crp_id']); 315 310 $this->setVictimCorpName($row['crp_name']); 316 $this->setVictimAllianceID($row['all_id']);317 311 $this->setVictimAllianceName($row['all_name']); 318 312 $this->setVictimShip(new Ship($row['kll_ship_id'])); … … 500 494 function setFBPilotName($fbpilotname) 501 495 { 502 $this->fbpilotname_ = $fbpilotname; 496 $npc = strpos($fbpilotname, "#"); 497 if($npc === false) { 498 $this->fbpilotname_ = $fbpilotname; 499 } 500 else { 501 $name = explode("#",$fbpilotname); 502 $plt = new Pilot(); 503 $name = $plt->get_item_name($name[2]); 504 $this->fbpilotname_ = $name; 505 } 503 506 } 504 507 -
dev/common/class.parser.php
r37 r55 106 106 preg_match("/Name: (.*)/", $involved[$i], $matches); 107 107 $ipname = $matches[1]; 108 108 109 preg_match("/(.*) \(laid the final blow\)/", $ipname, $matches); 109 110 if ($matches[1]) … … 129 130 $secstatus = "0.0"; 130 131 preg_match("/(.*) \/ (.*)/", $ipname, $pmatches); 131 $ ipname = $pmatches[1];132 $npc_pilot = new Pilot(); 132 133 $icname = $pmatches[2]; 133 134 $isname = "Unknown"; … … 135 136 $tmpcorp = new Corporation(); 136 137 $tmpcorp->lookup($icname); 138 $ipname = "#".$tmpcorp->id_."#".$npc_pilot->get_item_id($pmatches[1]); 137 139 $tmpall = $tmpcorp->getAlliance(); 138 140 if ($tmpcorp->getID()) -
dev/common/class.pilot.php
r10 r55 5 5 class Pilot 6 6 { 7 function get_item_id($name) 8 { 9 $qry = new DBQuery(); 10 $qry->execute("select * 11 from kb3_items 12 where itm_name = '" . slashfix($name) . "'"); 13 14 $row = $qry->getRow(); 15 if ($row['itm_id']) return $row['itm_id']; 16 } 17 18 function get_item_name($item_id) 19 { 20 $qry = new DBQuery(); 21 $qry->execute("select * 22 from kb3_items 23 where itm_id = '" . $item_id . "'"); 24 25 $row = $qry->getRow(); 26 if ($row['itm_name']) return $row['itm_name']; 27 } 28 7 29 function Pilot($id = 0) 8 30 { … … 19 41 { 20 42 $this->execQuery(); 21 return $this->row_['plt_name']; 43 $npc = strpos($this->row_['plt_name'], "#"); 44 if($npc === false) { 45 return $this->row_['plt_name']; 46 } 47 else { 48 $name = explode("#",$this->row_['plt_name']); 49 $name = $this->get_item_name($name[2]); 50 return $name; 51 } 52 22 53 } 23 54