- Timestamp:
- 01/09/07 21:22:39 (14 years ago)
- Location:
- dev
- Files:
-
- 4 modified
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
dev/common/class.item.php
r154 r174 70 70 } 71 71 $this->sql_ = "select * 72 from kb3_items , kb3_item_types73 where itm_id = '".$this->id_."'74 and itm_type = itt_id";72 from kb3_items 73 left join kb3_item_types on itm_type = itt_id 74 where itm_id = '".$this->id_."'"; 75 75 $this->qry_->execute($this->sql_); 76 76 $this->row_ = $this->qry_->getRow(); -
dev/common/class.kill.php
r165 r174 686 686 $item = $dest->getItem(); 687 687 $loc_id = $dest->getLocationID(); 688 if (!$item->getID() || !$dest->getQuantity() || !is_numeric($loc_id)) 689 { 688 if (!is_numeric($item->getID()) || !is_numeric($item->getID()) || !is_numeric($dest->getQuantity()) || !is_numeric($loc_id)) 689 { 690 trigger_error('error with destroyed item.', E_USER_WARNING); 691 var_dump($dest);exit; 690 692 continue; 691 693 } … … 730 732 class InvolvedParty 731 733 { 732 function InvolvedParty($pilotid, $corpid, $allianceid, 733 $secstatus, $ship, $weapon) 734 function InvolvedParty($pilotid, $corpid, $allianceid, $secstatus, $ship, $weapon) 734 735 { 735 736 $this->pilotid_ = $pilotid; -
dev/common/class.parser.php
r159 r174 16 16 { 17 17 $this->preparse('german'); 18 } 19 elseif (strpos($this->killmail_, 'System Security Level:')) 20 { 21 // this converts the killmail internally from pre-rmr to kali format 22 $this->preparse('prermr'); 18 23 } 19 24 … … 202 207 $isname = "Unknown"; 203 208 $iwname = $pmatches[1]; 209 204 210 if (!strlen($icname) && !strlen($iwname)) 205 211 { … … 262 268 { 263 269 $this->error('Ship not found.', $isname); 270 } 271 272 if (!trim($iwname)) 273 { 274 // set weapon to unknown in case we didn't found one 275 $iwname = 'Unknown'; 264 276 } 265 277 $iweapon = new Item(); … … 353 365 354 366 $i = 0; 355 while ($i < count($destroyed)) 356 { 367 $num = count($destroyed); 368 while ($i < $num) 369 { 370 $destroyed[$i] = trim($destroyed[$i]); 357 371 if ($destroyed[$i] == "") 358 372 { … … 474 488 return; 475 489 } 490 if ($set == 'prermr') 491 { 492 $search = array('Corporation:','Destroyed Type:','Solar System:', 'System Security Level:', 'Security Status:', 'Ship Type:', 'Weapon Type:', '(Fitted - Medium slot)', '(Fitted - Low slot)', '(Fitted - High slot)'); 493 $replace = array('Corp:','Destroyed:', 'System:', 'Security:', 'Security:', 'Ship:', 'Weapon:', '', '', ''); 494 $this->killmail_ = str_replace($search, $replace, $this->killmail_); 495 $position = strpos($this->killmail_, 'Destroyed items:'); 496 if ($position !== false) 497 { 498 $destroyed = explode("\n", strstr($this->killmail_, 'Destroyed items:')); 499 $i = 0; 500 $num = count($destroyed); 501 while ($i < $num) 502 { 503 $destroyed[$i] = trim($destroyed[$i]); 504 505 $itempos = strpos($destroyed[$i], 'Type: '); 506 if ($itempos !== false) 507 { 508 $destroyed[$i] = substr($destroyed[$i], $itempos+6); 509 if (isset($destroyed[$i+1])) 510 { 511 $quantitypos = strstr($destroyed[$i+1], 'Quantity: '); 512 if ($quantitypos !== false) 513 { 514 $qty = ', Qty: '.substr($destroyed[$i+1], $quantitypos+10); 515 $pos = strpos($destroyed[$i], '('); 516 if ($pos !== false) 517 { 518 $destroyed[$i] = trim(substr($destroyed[$i], 0, $pos)).$qty.' '.substr($destroyed[$i], $pos); 519 } 520 else 521 { 522 $destroyed[$i] .= $qty; 523 } 524 unset($destroyed[$i+1]); 525 $i++; 526 } 527 } 528 } 529 else 530 { 531 unset($destroyed[$i]); 532 } 533 $i++; 534 } 535 $this->killmail_ = substr($this->killmail_, 0, $position).'Destroyed items: '."\n\n\n".join("\n", $destroyed)."\n"; 536 } 537 } 476 538 } 477 539 } -
dev/templates/kill_detail.tpl
r155 r174 64 64 {if $slot.items} 65 65 <tr class="kb-table-row-even"> 66 <td class="item-icon" width="32"><img src=" img/{$slot.img}" alt="{$slot.text}" border="0"></td>66 <td class="item-icon" width="32"><img src="{$img_url}/{$slot.img}" alt="{$slot.text}" border="0"></td> 67 67 <td colspan="2" class="kb-table-cell"><b>{$slot.text}</b> </td> 68 68 {if $config->getConfig('item_values')}