Changeset 94
- Timestamp:
- 11/25/06 17:01:24 (16 years ago)
- Location:
- dev
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/class.kill.php
r92 r94 780 780 $id = $this->item_->getID(); // get Item ID 781 781 $qry = new DBQuery(); 782 $qry->execute("select value from kb3_items where itm_id= '".$id."'");782 $qry->execute("select itm_value from kb3_items where itm_id= '".$id."'"); 783 783 $row = $qry->getRow(); 784 $value = $row[' value'];785 if ($value == "")784 $value = $row['itm_value']; 785 if ($value == '') 786 786 { 787 787 $value = 0; -
dev/mods/item_values/kill_detail.php
r83 r94 1 <?php 1 <?php 2 2 //Version 1.3 of the item_values mod 3 3 // ChangeLog … … 5 5 //Made change to class.ship.php to be pushed to core, rounding ship values is fucking retarded 6 6 //Using this change added ship value loss and total loss to the ItemValue. Probably need to change this to smarty now but beyond that it is done done done! 7 //Ship value is calculated using the base value in the kb3_ships, this is where the values need to be changed, the settings file will update the database to current 7 //Ship value is calculated using the base value in the kb3_ships, this is where the values need to be changed, the settings file will update the database to current 8 8 //values from eve-central, beware this will take a while and dont do it lots or they will ban your ass. 9 9 … … 20 20 21 21 if($page->isAdmin()) { 22 if (isset($_POST['submit'])) { 22 if (isset($_POST['submit'])) { 23 23 // Send new value for item to the database 24 24 $IID = $_POST['IID']; 25 25 $Val = $_POST[$IID]; 26 26 27 27 $qry = new DBQuery(); 28 $qry->execute("UPDATE kb3_items SET Value ='" . $Val . "' WHERE itm_id='" . $IID . "'") or die($qry->getErrorMsg());29 30 } 28 $qry->execute("UPDATE kb3_items SET itm_value ='" . $Val . "' WHERE itm_id='" . $IID . "'") or die($qry->getErrorMsg()); 29 30 } 31 31 } 32 32 … … 147 147 $html .= "<table class=kb-table width=360 border=\"0\" cellspacing=\"1\">"; 148 148 $imgid = 0; 149 149 150 150 if($page->isAdmin()) { 151 151 152 152 } 153 153 foreach($kill->destroyeditems_ as $destroyed) … … 201 201 $value = $destroyed->getValue() * $destroyed->getQuantity(); 202 202 $TotalValue = $TotalValue + $value; 203 203 204 204 // Value Manipulation for prettyness. 205 205 206 206 if (strlen($value) >1) { // 1000's ? 207 $Formatted = number_format($value,2); 207 $Formatted = number_format($value,2); 208 208 $Formatted = $Formatted . " isk"; 209 } 210 209 } 210 211 211 if (strlen($value) >3) { // 1000's ? 212 212 $Formatted = round($value / 1000,2); 213 214 $Formatted = number_format($Formatted,2); 213 214 $Formatted = number_format($Formatted,2); 215 215 $Formatted = $Formatted . " K"; 216 216 } 217 217 218 218 if (strlen($value) >6) { // Is this value in the millions? 219 219 $Formatted = round($value / 1000000,2); 220 $Formatted = number_format($Formatted,2); 220 $Formatted = number_format($Formatted,2); 221 221 $Formatted = $Formatted . " M"; 222 222 } 223 223 224 224 } 225 225 if($page->isAdmin()) { … … 227 227 $html .= "<td class=kb-table-cell colspan=1><b>$value</b>"; 228 228 $html .= "<input checked='checked' name='IID' value=" . $item->getID() . " type='hidden'></td>"; // Hidden Item Id Indicator 229 229 230 230 $html .= "<tr class=kb-table-row-even>"; 231 231 $html .= "<td class=kb-table-cell></td>"; … … 244 244 //$html .= "<td width=\"32\"></td>"; 245 245 $html .= "<td class=kb-table-cell colspan=2 align=right><b>" . "Total Module Loss:" . "</b></td>"; 246 246 247 247 if ($TotalValue > 0) { 248 248 249 249 $Formatted = number_format($TotalValue,2); 250 250 251 251 } 252 252 //Get Ship Value 253 $qry = new DBQuery(); 253 $qry = new DBQuery(); 254 254 $qry->execute("SELECT shp_baseprice FROM kb3_ships WHERE shp_id =" . $ship->getID()); 255 255 $row = $qry->getRow(); 256 256 $ShipValue = $row['shp_baseprice']; 257 258 257 258 259 259 $TotalLoss = number_format($TotalValue + $ShipValue,2); 260 260 261 261 $html .= "<td class=kb-table-cell colspan=2 align=right><b>" . $Formatted . "</b>"; 262 262 $html .="</td>"; … … 270 270 $html .= "<td class=kb-table-cell colspan=2 align=right><b>" . $TotalLoss . "</b></td>"; 271 271 $html .= "</tr>"; 272 272 273 273 $html .= "</table>"; 274 274 }