50 | | $smarty->assign('VictimPortrait',$kill->getVictimPortrait(64)); |
51 | | $smarty->assign('VictimURL',"?a=pilot_detail&plt_id=".$kill->getVictimID()); |
52 | | $smarty->assign('VictimName',$kill->getVictimName()); |
53 | | $smarty->assign('VictimCorpURL',"?a=corp_detail&crp_id=".$kill->getVictimCorpID()); |
54 | | $smarty->assign('VictimCorpName',$kill->getVictimCorpName()); |
55 | | $smarty->assign('VictimAllianceURL',"?a=alliance_detail&all_id=".$kill->getVictimAllianceID()); |
56 | | $smarty->assign('VictimAllianceName',$kill->getVictimAllianceName()); |
57 | | |
| 48 | $smarty->assign('VictimPortrait', $kill->getVictimPortrait(64)); |
| 49 | $smarty->assign('VictimURL', "?a=pilot_detail&plt_id=" . $kill->getVictimID()); |
| 50 | $smarty->assign('VictimName', $kill->getVictimName()); |
| 51 | $smarty->assign('VictimCorpURL', "?a=corp_detail&crp_id=" . $kill->getVictimCorpID()); |
| 52 | $smarty->assign('VictimCorpName', $kill->getVictimCorpName()); |
| 53 | $smarty->assign('VictimAllianceURL', "?a=alliance_detail&all_id=" . $kill->getVictimAllianceID()); |
| 54 | $smarty->assign('VictimAllianceName', $kill->getVictimAllianceName()); |
117 | | $smarty->assign('VictimShip',$kill->getVictimShip()); |
118 | | $smarty->assign('ShipClass',$ship->getClass()); |
119 | | $smarty->assign('ShipImage',$ship->getImage(64)); |
120 | | $smarty->assign('ShipName',$ship->getName()); |
121 | | $smarty->assign('ClassName',$shipclass->getName()); |
122 | | $smarty->assign('System',$system->getName()); |
123 | | $smarty->assign('SystemURL',"?a=system_detail&sys_id=".$system->getID()); |
124 | | $smarty->assign('SystemSecurity',$system->getSecurity(true)); |
125 | | $smarty->assign('TimeStamp',$kill->getTimeStamp()); |
126 | | $smarty->assign('VictimShipImg',$ship->getImage(64)); |
127 | | |
| 113 | $smarty->assign('VictimShip', $kill->getVictimShip()); |
| 114 | $smarty->assign('ShipClass', $ship->getClass()); |
| 115 | $smarty->assign('ShipImage', $ship->getImage(64)); |
| 116 | $smarty->assign('ShipName', $ship->getName()); |
| 117 | $smarty->assign('ClassName', $shipclass->getName()); |
| 118 | $smarty->assign('System', $system->getName()); |
| 119 | $smarty->assign('SystemURL', "?a=system_detail&sys_id=" . $system->getID()); |
| 120 | $smarty->assign('SystemSecurity', $system->getSecurity(true)); |
| 121 | $smarty->assign('TimeStamp', $kill->getTimeStamp()); |
| 122 | $smarty->assign('VictimShipImg', $ship->getImage(64)); |
141 | | if ($config->getConfig('item_values')) |
142 | | { |
143 | | |
144 | | $value = $destroyed->getValue(); |
145 | | $value_single = $value; |
146 | | if ($value > 0) |
147 | | { |
148 | | $value = $destroyed->getValue() * $destroyed->getQuantity(); |
149 | | $TotalValue = $TotalValue + $value; |
150 | | |
151 | | // Value Manipulation for prettyness. |
152 | | |
153 | | if (strlen($value) >1) { // 1000's ? |
154 | | $Formatted = number_format($value,2); |
155 | | $Formatted = $Formatted . " isk"; |
156 | | } |
157 | | |
158 | | if (strlen($value) >3) { // 1000's ? |
159 | | $Formatted = round($value / 1000,2); |
160 | | |
161 | | $Formatted = number_format($Formatted,2); |
162 | | $Formatted = $Formatted . " K"; |
163 | | } |
164 | | |
165 | | if (strlen($value) >6) { // Is this value in the millions? |
166 | | $Formatted = round($value / 1000000,2); |
167 | | $Formatted = number_format($Formatted,2); |
168 | | $Formatted = $Formatted . " M"; |
169 | | } |
170 | | } |
171 | | else |
172 | | { |
173 | | $value = 0; |
174 | | $Formatted = "0 isk"; |
175 | | } |
176 | | } |
177 | | $dest_array[$destroyed->getLocationID()][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $destroyed->getQuantity(), 'Value'=>$Formatted,'single_unit'=>$value_single,'itemID'=>$item->getID() ); |
178 | | |
179 | | } |
180 | | |
181 | | } |
| 136 | if ($config->getConfig('item_values')) |
| 137 | { |
| 138 | $value = $destroyed->getValue(); |
| 139 | $value_single = $value; |
| 140 | if ($value > 0) |
| 141 | { |
| 142 | $value = $destroyed->getValue() * $destroyed->getQuantity(); |
| 143 | $TotalValue = $TotalValue + $value; |
| 144 | // Value Manipulation for prettyness. |
| 145 | if (strlen($value) > 1) // 1000's ? |
| 146 | { |
| 147 | $Formatted = number_format($value, 2); |
| 148 | $Formatted = $Formatted . " isk"; |
| 149 | } |
| 150 | |
| 151 | if (strlen($value) > 3) // 1000's ? |
| 152 | { |
| 153 | $Formatted = round($value / 1000, 2); |
| 154 | |
| 155 | $Formatted = number_format($Formatted, 2); |
| 156 | $Formatted = $Formatted . " K"; |
| 157 | } |
| 158 | |
| 159 | if (strlen($value) > 6) // Is this value in the millions? |
| 160 | { |
| 161 | $Formatted = round($value / 1000000, 2); |
| 162 | $Formatted = number_format($Formatted, 2); |
| 163 | $Formatted = $Formatted . " M"; |
| 164 | } |
| 165 | } |
| 166 | else |
| 167 | { |
| 168 | $value = 0; |
| 169 | $Formatted = "0 isk"; |
| 170 | } |
| 171 | } |
| 172 | $dest_array[$destroyed->getLocationID()][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $destroyed->getQuantity(), 'Value' => $Formatted, 'single_unit' => $value_single, 'itemID' => $item->getID()); |
| 173 | } |
| 174 | } |
188 | | |
189 | | if ($TotalValue > 0) |
190 | | { |
191 | | $Formatted = number_format($TotalValue,2); |
192 | | } |
193 | | //Get Ship Value |
194 | | $ShipValue = $ship->getPrice(); |
195 | | |
196 | | $TotalLoss = number_format($TotalValue + $ShipValue,2); |
197 | | $ShipValue = number_format($ShipValue,2); |
198 | | |
199 | | $smarty->assign('high_slot',$dest_array['1']); |
200 | | $smarty->assign('mid_slot',$dest_array['2']); |
201 | | $smarty->assign('low_slot',$dest_array['3']); |
202 | | $smarty->assign('cargo',$dest_array['4']); |
203 | | $smarty->assign('drone',$dest_array['6']); |
204 | | $smarty->assign('ItemValue',$Formatted); |
205 | | $smarty->assign('ShipValue',$ShipValue); |
206 | | $smarty->assign('TotalLoss',$TotalLoss); |
207 | | |
208 | | |
209 | | $menubox = new box("Menu"); |
210 | | $menubox->setIcon("menu-item.gif"); |
211 | | $menubox->addOption("caption","View"); |
212 | | $menubox->addOption("link","Killmail", "javascript:openWindow( '?a=kill_mail&kll_id=".$kill->getID()."', null, 355, 430, '' );"); |
213 | | if ($kill->relatedKillCount() > 1 || $kill->relatedLossCount() > 1) |
214 | | { |
215 | | $menubox->addOption("link","Related kills (".$kill->relatedKillCount()."/".$kill->relatedLossCount().")", "?a=kill_related&kll_id=".$kill->getID()); |
216 | | } |
217 | | if ($page->isAdmin()) |
218 | | { |
219 | | $menubox->addOption("caption","Admin"); |
220 | | $menubox->addOption("link","Delete", "javascript:openWindow('?a=kill_delete&kll_id=".$kill->getID()."', null, 420, 300, '' );"); |
221 | | } |
222 | | $page->addContext($menubox->generate()); |
223 | | |
224 | | |
225 | | if ($config->getKillPoints()) |
226 | | { |
227 | | $scorebox = new Box("Points"); |
228 | | $scorebox->addOption("points",$kill->getKillPoints()); |
229 | | $page->addContext($scorebox->generate()); |
230 | | } |
231 | | |
232 | | |
233 | | $mapbox = new Box("Map"); |
234 | | $mapbox->addOption("img","?a=mapview&sys_id=".$system->getID()."&mode=map&size=145"); |
235 | | $mapbox->addOption("img","?a=mapview&sys_id=".$system->getID()."&mode=region&size=145"); |
236 | | $mapbox->addOption("img","?a=mapview&sys_id=".$system->getID()."&mode=cons&size=145"); |
237 | | $page->addContext($mapbox->generate()); |
238 | | |
| 181 | if ($TotalValue > 0) |
| 182 | { |
| 183 | $Formatted = number_format($TotalValue, 2); |
| 184 | } |
| 185 | // Get Ship Value |
| 186 | $ShipValue = $ship->getPrice(); |
| 187 | |
| 188 | $TotalLoss = number_format($TotalValue + $ShipValue, 2); |
| 189 | $ShipValue = number_format($ShipValue, 2); |
| 190 | |
| 191 | $smarty->assign_by_ref('high_slot', $dest_array['1']); |
| 192 | $smarty->assign_by_ref('mid_slot', $dest_array['2']); |
| 193 | $smarty->assign_by_ref('low_slot', $dest_array['3']); |
| 194 | $smarty->assign_by_ref('cargo', $dest_array['4']); |
| 195 | $smarty->assign_by_ref('drone', $dest_array['6']); |
| 196 | $smarty->assign('ItemValue', $Formatted); |
| 197 | $smarty->assign('ShipValue', $ShipValue); |
| 198 | $smarty->assign('TotalLoss', $TotalLoss); |
| 199 | |
| 200 | $menubox = new box("Menu"); |
| 201 | $menubox->setIcon("menu-item.gif"); |
| 202 | $menubox->addOption("caption", "View"); |
| 203 | $menubox->addOption("link", "Killmail", "javascript:openWindow( '?a=kill_mail&kll_id=" . $kill->getID() . "', null, 355, 430, '' );"); |
| 204 | if ($kill->relatedKillCount() > 1 || $kill->relatedLossCount() > 1) |
| 205 | { |
| 206 | $menubox->addOption("link", "Related kills (" . $kill->relatedKillCount() . "/" . $kill->relatedLossCount() . ")", "?a=kill_related&kll_id=" . $kill->getID()); |
| 207 | } |
| 208 | if ($page->isAdmin()) |
| 209 | { |
| 210 | $menubox->addOption("caption", "Admin"); |
| 211 | $menubox->addOption("link", "Delete", "javascript:openWindow('?a=kill_delete&kll_id=" . $kill->getID() . "', null, 420, 300, '' );"); |
| 212 | } |
| 213 | $page->addContext($menubox->generate()); |
| 214 | |
| 215 | if ($config->getKillPoints()) |
| 216 | { |
| 217 | $scorebox = new Box("Points"); |
| 218 | $scorebox->addOption("points", $kill->getKillPoints()); |
| 219 | $page->addContext($scorebox->generate()); |
| 220 | } |
| 221 | |
| 222 | $mapbox = new Box("Map"); |
| 223 | $mapbox->addOption("img", "?a=mapview&sys_id=" . $system->getID() . "&mode=map&size=145"); |
| 224 | $mapbox->addOption("img", "?a=mapview&sys_id=" . $system->getID() . "&mode=region&size=145"); |
| 225 | $mapbox->addOption("img", "?a=mapview&sys_id=" . $system->getID() . "&mode=cons&size=145"); |
| 226 | $page->addContext($mapbox->generate()); |