Changeset 250
- Timestamp:
- 11/23/07 19:11:12 (15 years ago)
- Location:
- branch/rev3
- Files:
-
- 1 added
- 6 modified
Legend:
- Unmodified
- Added
- Removed
-
branch/rev3/common/includes/class.db.php
r248 r250 34 34 var $object; 35 35 36 // php5 style object overloading 37 // we internally load up the wanted object and reroute all 38 // object actions to it 36 39 function __construct() 37 40 { … … 72 75 } 73 76 77 // php4 style object overloading 78 // we just hijack $this but we need to use a helper 79 // function for this because php5 fatals if it sees 80 // $this = ... in the src 74 81 function DBQuery() 75 82 { -
branch/rev3/common/includes/class.db_cache.php
r245 r250 22 22 // only cache selects 23 23 // we don't use select ... into so there is no problem 24 $this->_sql = str_replace(array("\r\n", "\n"), ' ', $this->_sql); 24 25 if (strtolower(substr($this->_sql, 0, 6)) != 'select' && strtolower(substr($this->_sql, 0, 4)) != 'show') 25 26 { … … 61 62 $parse = str_replace(',', ' join ', $parse); 62 63 } 64 65 $parse = 'join '.$parse; 63 66 if (strpos($parse, 'join')) 64 67 { -
branch/rev3/common/includes/class.kill.php
r244 r250 208 208 $system = $this->getSystem(); 209 209 $mail .= "System: ".$system->getName()."\r\n"; 210 $mail .= "Security: ".$system->getSecurity(true)."\r\n\r\n"; 210 $mail .= "Security: ".$system->getSecurity(true)."\r\n"; 211 $mail .= "Damage Taken: ".$this->VictimDamageTaken."\r\n\r\n"; 211 212 $mail .= "Involved parties:\r\n\r\n"; 212 213 … … 242 243 $mail .= "Ship: ".$ship->getName()."\r\n"; 243 244 $mail .= "Weapon: ".$weapon->getName()."\r\n"; 245 $mail .= "Damage Done: ".$inv->dmgdone_."\r\n"; 246 } 247 else 248 { 249 $mail .= "Damage Done: ".$inv->dmgdone_."\r\n"; 244 250 } 245 251 $mail .= "\r\n"; … … 275 281 $mail .= " (Cargo)"; 276 282 if ($destroyed->getLocationID() == 6) // drone 283 $mail .= " (Drone Bay)"; 284 $mail .= "\r\n"; 285 } 286 } 287 288 if (count($this->droppeditems_) > 0) 289 { 290 $mail .= "\r\nDropped items:\r\n\r\n"; 291 292 foreach($this->droppeditems_ as $dropped) 293 { 294 $item = $dropped->getItem(); 295 $mail .= $item->getName(); 296 if ($dropped->getQuantity() > 1) 297 { 298 // if the option is enabled and the item is fitted then split it up 299 // this is aworkaround for the lazy parser of griefwatch 300 if (config::get('kill_splitfit') && $dropped->getQuantity() < 9 && ($dropped->getLocationID() == 1 301 || $dropped->getLocationID() == 2 || $dropped->getLocationID() == 3)) 302 { 303 for ($i = $dropped->getQuantity(); $i > 1; $i--) 304 { 305 $mail .= "\r\n".$item->getName(); 306 } 307 308 } 309 else 310 { 311 $mail .= ", Qty: ".$dropped->getQuantity(); 312 } 313 } 314 if ($dropped->getLocationID() == 4) // cargo 315 $mail .= " (Cargo)"; 316 if ($dropped->getLocationID() == 6) // drone 277 317 $mail .= " (Drone Bay)"; 278 318 $mail .= "\r\n"; … … 454 494 455 495 $offset = config::get('kill_classified')*3600; 456 if (strtotime($this->timestamp_) > time()-$offset) 496 if (config::get('date_gmtime')) 497 { 498 $time = time()-date('Z'); 499 } 500 else 501 { 502 $time = time(); 503 } 504 if (strtotime($this->timestamp_) > $time-$offset) 457 505 { 458 506 return true; … … 467 515 { 468 516 $offset = config::get('kill_classified')*3600; 469 if (strtotime($this->timestamp_) > time()-$offset) 470 { 471 return ($offset-time()+strtotime($this->timestamp_)); 517 if (config::get('date_gmtime')) 518 { 519 $time = time()-date('Z'); 520 } 521 else 522 { 523 $time = time(); 524 } 525 if (strtotime($this->timestamp_) > $time-$offset) 526 { 527 return ($offset-$time+strtotime($this->timestamp_)); 472 528 } 473 529 } -
branch/rev3/common/includes/class.page.php
r243 r250 13 13 $this->title_ = $title; 14 14 $this->admin_ = false; 15 $this->headlines = array(); 15 16 16 17 $this->igb_ = IS_IGB; … … 47 48 } 48 49 50 function addHeader($line) 51 { 52 $this->headlines[] = $line; 53 } 54 49 55 function generate() 50 56 { … … 61 67 $smarty->assign('on_load', ' onload="'.$this->onload_.'"'); 62 68 } 69 70 event::call('page_assembleheader', $this); 63 71 // header 72 $smarty->assign('page_headerlines', join("\n", $this->headlines)); 64 73 65 74 if (!$this->igb_) -
branch/rev3/templates/index.tpl
r245 r250 6 6 <link rel="stylesheet" type="text/css" href="{$style_url}/common.css"> 7 7 <link rel="stylesheet" type="text/css" href="{$style_url}/{$style}/style.css"> 8 {if $rss_feed} 9 <link rel="alternate" type="application/rss+xml" title="RSS feed for watched kills" href="?a=rss" /> 10 {/if} 8 {$page_headerlines} 11 9 <script language=javascript src="{$style_url}/generic.js"></script> 12 10 <!--[if lt IE 7]> -
branch/rev3/templates/kill_detail.tpl
r245 r250 4 4 <td width=360 align=left valign=top><table class=kb-table width=360 cellpadding=0 cellspacing=1 border=0> 5 5 <tr class= {cycle name=ccl}> 6 <td rowspan= 4width="64"><img src="{$VictimPortrait}" border="0" width="64" heigth="64"></td>6 <td rowspan=3 width="64"><img src="{$VictimPortrait}" border="0" width="64" heigth="64"></td> 7 7 <td class=kb-table-cell width=64><b>Victim:</b></td> 8 8 <td class=kb-table-cell><b><a href="{$VictimURL}">{$VictimName}</a></b></td> … … 15 15 <td class=kb-table-cell width=64><b>Alliance:</b></td> 16 16 <td class=kb-table-cell><b><a href="{$VictimAllianceURL}">{$VictimAllianceName}</a></b></td> 17 </tr>18 <tr class={cycle name=ccl}>19 <td class=kb-table-cell width=64><b>Damage taken:</b></td>20 <td class=kb-table-cell><b>{$VictimDamageTaken}</b></td>21 17 </tr> 22 18 </table> … … 42 38 </tr> 43 39 <tr class={cycle name=ccl}> 44 <td colspan=2 class=kb-table-cell style="padding-top: 1px; padding-bottom: 1px;">Damage done:</td><td class=kb-table-cell style="padding-top: 1px; padding-bottom: 1px;">{$i.damageDone }</td>40 <td colspan=2 class=kb-table-cell style="padding-top: 1px; padding-bottom: 1px;">Damage done:</td><td class=kb-table-cell style="padding-top: 1px; padding-bottom: 1px;">{$i.damageDone|number_format}</td> 45 41 </tr> 46 42 {/foreach} … … 131 127 {if $item_values} 132 128 <tr class={cycle name=ccl}> 129 <td align="right" colspan="3"><b>Damage taken:</b></td> 130 <td align="right">{$VictimDamageTaken|number_format}</td> 131 </tr> 132 <tr class={cycle name=ccl}> 133 133 <td colspan="3"><div align="right"><strong>Total Module Loss:</strong></div></td> 134 134 <td align="right">{$ItemValue}</td> 135 135 </tr> 136 <tr class={cycle name=ccl} >137 <td colspan="3"><div align="right"><strong>Total Module Drop:</strong></div></td>138 <td align="right">{$DropValue}</td>136 <tr class={cycle name=ccl} style="background-color: green;"> 137 <td style="border: 1px solid green;" colspan="3"><div align="right"><strong>Total Module Drop:</strong></div></td> 138 <td style="border: 1px solid green;" align="right">{$DropValue}</td> 139 139 </tr> 140 140 <tr class={cycle name=ccl}>