Changeset 307
- Timestamp:
- 12/31/07 14:30:49 (15 years ago)
- Location:
- dev
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/includes/globals.php
r305 r307 1 1 <?php 2 2 // current subversion revision 3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 30 5$', $match);3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 307 $', $match); 4 4 define('SVN_REV', $match[1]); 5 5 -
dev/common/kill_detail.php
r300 r307 143 143 { 144 144 //Admin is able to see classified Systems 145 if ($page->isAdmin()){ 145 if ($page->isAdmin()) 146 { 146 147 $smarty->assign('System', $system->getName().' (Classified)'); 147 148 $smarty->assign('SystemURL', "?a=system_detail&sys_id=".$system->getID()); 148 149 $smarty->assign('SystemSecurity', $system->getSecurity(true)); 149 }else{ 150 } 151 else 152 { 150 153 $smarty->assign('System', 'Classified'); 151 154 $smarty->assign('SystemURL', ""); -
dev/mods/fitting/kill_detail.php
r302 r307 5 5 require_once('common/includes/class.alliance.php'); 6 6 7 $page = new Page('Kill details -MOD');7 $page = new Page('Kill details with Fitting MOD'); 8 8 9 9 if (config::get('item_values')) … … 13 13 { 14 14 $smarty->assign('admin', 'true'); 15 if (isset($_POST['submit']) )15 if (isset($_POST['submit']) && $_POST['submit'] == 'UpdateValue') 16 16 { 17 17 // Send new value for item to the database … … 19 19 $Val = $_POST[$IID]; 20 20 $qry = new DBQuery(); 21 $qry->execute(" UPDATE kb3_items SET itm_value ='".$Val."' WHERE itm_id='".$IID."'");21 $qry->execute("INSERT INTO kb3_item_price (typeID, price) VALUES ('".$IID."', '".$Val."') ON DUPLICATE KEY UPDATE price = '".$Val."'"); 22 22 } 23 } 24 } 25 26 if ($page->isAdmin()) 27 { 28 if (isset($_GET['view']) && $_GET['view']== 'FixSlot') 29 { 30 $smarty->assign('fixSlot', 'true'); 31 } 32 33 $smarty->assign('admin', 'true'); 34 if (isset($_POST['submit']) && $_POST['submit'] == 'UpdateSlot') 35 { 36 $IID = $_POST['IID']; 37 $KID = $_POST['KID']; 38 $Val = $_POST[$IID]; 39 $table = $_POST['TYPE']; 40 $old = $_POST['OLDSLOT']; 41 $qry = new DBQuery(); 42 $qry->execute("UPDATE kb3_items_".$table." SET itd_itl_id ='".$Val."' WHERE itd_itm_id=".$IID." AND itd_kll_id = ".$KID." AND itd_itl_id = ".$old); 23 43 } 24 44 } … … 42 62 43 63 // victim $smarty->assign('',); 64 $smarty->assign('KillId', $kill->getID()); 44 65 $smarty->assign('VictimPortrait', $kill->getVictimPortrait(64)); 45 66 $smarty->assign('VictimURL', "?a=pilot_detail&plt_id=".$kill->getVictimID()); … … 144 165 $smarty->assign('VictimShipImg', $ship->getImage(64)); 145 166 167 // preparing slot layout 168 169 $slot_array = array(); 170 $slot_array[1] = array('img' => 'icon08_11.png', 'text' => 'Fitted - High slot', 'items' => array()); 171 $slot_array[2] = array('img' => 'icon08_10.png', 'text' => 'Fitted - Mid slot', 'items' => array()); 172 $slot_array[3] = array('img' => 'icon08_09.png', 'text' => 'Fitted - Low slot', 'items' => array()); 173 $slot_array[5] = array('img' => 'icon68_01.png', 'text' => 'Fitted - Rig slot', 'items' => array()); 174 $slot_array[6] = array('img' => 'icon02_10.png', 'text' => 'Drone bay', 'items' => array()); 175 $slot_array[4] = array('img' => 'icon03_14.png', 'text' => 'Cargo Bay', 'items' => array()); 176 146 177 // ship fitting 147 178 if (count($kill->destroyeditems_) > 0) 148 179 { 149 180 $dest_array = array(); 150 $dest_array[1] = array('img' => 'icon08_11.png', 'text' => 'Fitted - High slot', 'items' => array());151 $dest_array[2] = array('img' => 'icon08_10.png', 'text' => 'Fitted - Mid slot', 'items' => array());152 $dest_array[3] = array('img' => 'icon08_09.png', 'text' => 'Fitted - Low slot', 'items' => array());153 $dest_array[5] = array('img' => 'icon68_01.png', 'text' => 'Fitted - Rig slot', 'items' => array());154 $dest_array[6] = array('img' => 'icon02_10.png', 'text' => 'Drone bay', 'items' => array());155 $dest_array[4] = array('img' => 'icon03_14.png', 'text' => 'Cargo Bay', 'items' => array());156 157 181 foreach($kill->destroyeditems_ as $destroyed) 158 182 { … … 164 188 $formatted = $destroyed->getFormatttedValue(); 165 189 } 166 $dest_array[$destroyed->getLocationID()][ 'items'][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $destroyed->getQuantity(), 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $item->getID());190 $dest_array[$destroyed->getLocationID()][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $destroyed->getQuantity(), 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $item->getID(),'slotID' => $destroyed->getLocationID()); 167 191 168 192 //Fitting, KE - add destroyed items to an array of all fitted items. … … 181 205 { 182 206 $drop_array = array(); 183 $drop_array[1] = array('img' => 'icon08_11.png', 'text' => 'Fitted - High slot', 'items' => array());184 $drop_array[2] = array('img' => 'icon08_10.png', 'text' => 'Fitted - Mid slot', 'items' => array());185 $drop_array[3] = array('img' => 'icon08_09.png', 'text' => 'Fitted - Low slot', 'items' => array());186 $drop_array[5] = array('img' => 'icon68_01.png', 'text' => 'Fitted - Rig slot', 'items' => array());187 $drop_array[6] = array('img' => 'icon02_10.png', 'text' => 'Drone bay', 'items' => array());188 $drop_array[4] = array('img' => 'icon03_14.png', 'text' => 'Cargo Bay', 'items' => array());189 190 207 foreach($kill->droppeditems_ as $dropped) 191 208 { … … 197 214 $formatted = $dropped->getFormatttedValue(); 198 215 } 199 $drop_array[$dropped->getLocationID()][ 'items'][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $dropped->getQuantity(), 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $item->getID());216 $drop_array[$dropped->getLocationID()][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $dropped->getQuantity(), 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $item->getID(),'slotID' => $dropped->getLocationID()); 200 217 201 218 //Fitting -KE, add dropped items to the list … … 269 286 $dropvalue = number_format($dropvalue, 2); 270 287 271 272 288 $smarty->assign_by_ref('destroyed', $dest_array); 273 289 $smarty->assign_by_ref('dropped', $drop_array); 290 $smarty->assign_by_ref('slots', $slot_array); 274 291 $smarty->assign_by_ref('fitting_high', $fitting_array[1]); 275 292 $smarty->assign_by_ref('fitting_med', $fitting_array[2]); … … 293 310 $menubox->addOption("caption", "Admin"); 294 311 $menubox->addOption("link", "Delete", "javascript:openWindow('?a=admin_kill_delete&kll_id=".$kill->getID()."', null, 420, 300, '' );"); 312 $menubox->addOption("link", "Fix Slots", "?a=kill_detail&kll_id=".$kill->getID()."&view=FixSlot"); 313 295 314 } 296 315 $page->addContext($menubox->generate()); -
dev/mods/fitting/kill_detail.tpl
r303 r307 61 61 </table> 62 62 63 64 63 <br /> 65 64 <div id="fitting" style="position:relative; height:380px; width:360px; background-image:url(mods/fitting/fitting.gif)" name="fitting"> 66 <div id="high1" style="position:absolute; left:40px; top:255px; width:32px; height:32px; z-index:1;">{$fitting_high.0.Icon}</div> 67 <div id="high2" style="position:absolute; left:8px; top:162px; width:32px; height:32px; z-index:1;">{$fitting_high.1.Icon}</div> 68 <div id="high3" style="position:absolute; left:41px; top:71px; width:32px; height:32px; z-index:1;">{$fitting_high.2.Icon}</div> 69 <div id="high4" style="position:absolute; left:117px; top:15px; width:32px; height:32px; z-index:1;">{$fitting_high.3.Icon}</div> 70 <div id="high5" style="position:absolute; left:212px; top:13px; width:32px; height:32px; z-index:1;">{$fitting_high.4.Icon}</div> 71 <div id="high6" style="position:absolute; left:295px; top:72px; width:32px; height:32px; z-index:1;">{$fitting_high.5.Icon}</div> 72 <div id="high7" style="position:absolute; left:323px; top:165px; width:32px; height:32px; z-index:1;">{$fitting_high.6.Icon}</div> 73 <div id="high8" style="position:absolute; left:295px; top:253px; width:32px; height:32px; z-index:1;">{$fitting_high.7.Icon}</div> 74 75 <div id="mid1" style="position:absolute; left:73px; top:229px; width:32px; height:32px; z-index:1;">{$fitting_med.0.Icon}</div> 76 <div id="mid2" style="position:absolute; left:51px; top:165px; width:32px; height:32px; z-index:1;">{$fitting_med.1.Icon}</div> 77 <div id="mid3" style="position:absolute; left:72px; top:93px; width:32px; height:32px; z-index:1;">{$fitting_med.2.Icon}</div> 78 <div id="mid4" style="position:absolute; left:132px; top:57px; width:32px; height:32px; z-index:1;">{$fitting_med.3.Icon}</div> 79 <div id="mid5" style="position:absolute; left:198px; top:52px; width:32px; height:32px; z-index:1;">{$fitting_med.4.Icon}</div> 80 <div id="mid6" style="position:absolute; left:256px; top:101px; width:32px; height:32px; z-index:1;">{$fitting_med.5.Icon}</div> 81 <div id="mid7" style="position:absolute; left:275px; top:166px; width:32px; height:32px; z-index:1;">{$fitting_med.6.Icon}</div> 82 <div id="mid8" style="position:absolute; left:261px; top:228px; width:32px; height:32px; z-index:1;">{$fitting_med.7.Icon}</div> 83 84 <div id="low1" style="position:absolute; left:107px; top:205px; width:32px; height:32px; z-index:1;">{$fitting_low.0.Icon}</div> 85 <div id="low2" style="position:absolute; left:94px; top:163px; width:32px; height:32px; z-index:1;">{$fitting_low.1.Icon}</div> 86 <div id="low3" style="position:absolute; left:111px; top:123px; width:32px; height:32px; z-index:1;">{$fitting_low.2.Icon}</div> 87 <div id="low4" style="position:absolute; left:143px; top:93px; width:32px; height:32px; z-index:1;">{$fitting_low.3.Icon}</div> 88 <div id="low5" style="position:absolute; left:186px; top:94px; width:32px; height:32px; z-index:1;">{$fitting_low.4.Icon}</div> 89 <div id="low6" style="position:absolute; left:228px; top:123px; width:32px; height:32px; z-index:1;">{$fitting_low.5.Icon}</div> 90 <div id="low7" style="position:absolute; left:237px; top:164px; width:32px; height:32px; z-index:1;">{$fitting_low.6.Icon}</div> 91 <div id="low8" style="position:absolute; left:225px; top:203px; width:32px; height:32px; z-index:1;">{$fitting_low.7.Icon}</div> 92 93 <div id="rig1" style="position:absolute; left:54px; top:345px; width:32px; height:32px; z-index:1;">{$fitting_rig.0.Icon}</div> 94 <div id="rig2" style="position:absolute; left:86px; top:345px; width:32px; height:32px; z-index:1;">{$fitting_rig.1.Icon}</div> 95 <div id="rig3" style="position:absolute; left:118px; top:345px; width:32px; height:32px; z-index:1;">{$fitting_rig.2.Icon}</div> 96 97 </div> 65 <div id="high1" style="position:absolute; left:40px; top:255px; width:32px; height:32px; z-index:1;">{$fitting_high.0.Icon}</div> 66 <div id="high2" style="position:absolute; left:8px; top:162px; width:32px; height:32px; z-index:1;">{$fitting_high.1.Icon}</div> 67 <div id="high3" style="position:absolute; left:41px; top:71px; width:32px; height:32px; z-index:1;">{$fitting_high.2.Icon}</div> 68 <div id="high4" style="position:absolute; left:117px; top:15px; width:32px; height:32px; z-index:1;">{$fitting_high.3.Icon}</div> 69 <div id="high5" style="position:absolute; left:212px; top:13px; width:32px; height:32px; z-index:1;">{$fitting_high.4.Icon}</div> 70 <div id="high6" style="position:absolute; left:295px; top:72px; width:32px; height:32px; z-index:1;">{$fitting_high.5.Icon}</div> 71 <div id="high7" style="position:absolute; left:323px; top:165px; width:32px; height:32px; z-index:1;">{$fitting_high.6.Icon}</div> 72 <div id="high8" style="position:absolute; left:295px; top:253px; width:32px; height:32px; z-index:1;">{$fitting_high.7.Icon}</div> 73 74 <div id="mid1" style="position:absolute; left:73px; top:229px; width:32px; height:32px; z-index:1;">{$fitting_med.0.Icon}</div> 75 <div id="mid2" style="position:absolute; left:51px; top:165px; width:32px; height:32px; z-index:1;">{$fitting_med.1.Icon}</div> 76 <div id="mid3" style="position:absolute; left:72px; top:93px; width:32px; height:32px; z-index:1;">{$fitting_med.2.Icon}</div> 77 <div id="mid4" style="position:absolute; left:132px; top:57px; width:32px; height:32px; z-index:1;">{$fitting_med.3.Icon}</div> 78 <div id="mid5" style="position:absolute; left:198px; top:52px; width:32px; height:32px; z-index:1;">{$fitting_med.4.Icon}</div> 79 <div id="mid6" style="position:absolute; left:256px; top:101px; width:32px; height:32px; z-index:1;">{$fitting_med.5.Icon}</div> 80 <div id="mid7" style="position:absolute; left:275px; top:166px; width:32px; height:32px; z-index:1;">{$fitting_med.6.Icon}</div> 81 <div id="mid8" style="position:absolute; left:261px; top:228px; width:32px; height:32px; z-index:1;">{$fitting_med.7.Icon}</div> 82 83 <div id="low1" style="position:absolute; left:107px; top:205px; width:32px; height:32px; z-index:1;">{$fitting_low.0.Icon}</div> 84 <div id="low2" style="position:absolute; left:94px; top:163px; width:32px; height:32px; z-index:1;">{$fitting_low.1.Icon}</div> 85 <div id="low3" style="position:absolute; left:111px; top:123px; width:32px; height:32px; z-index:1;">{$fitting_low.2.Icon}</div> 86 <div id="low4" style="position:absolute; left:143px; top:93px; width:32px; height:32px; z-index:1;">{$fitting_low.3.Icon}</div> 87 <div id="low5" style="position:absolute; left:186px; top:94px; width:32px; height:32px; z-index:1;">{$fitting_low.4.Icon}</div> 88 <div id="low6" style="position:absolute; left:228px; top:123px; width:32px; height:32px; z-index:1;">{$fitting_low.5.Icon}</div> 89 <div id="low7" style="position:absolute; left:237px; top:164px; width:32px; height:32px; z-index:1;">{$fitting_low.6.Icon}</div> 90 <div id="low8" style="position:absolute; left:225px; top:203px; width:32px; height:32px; z-index:1;">{$fitting_low.7.Icon}</div> 91 92 <div id="rig1" style="position:absolute; left:54px; top:345px; width:32px; height:32px; z-index:1;">{$fitting_rig.0.Icon}</div> 93 <div id="rig2" style="position:absolute; left:86px; top:345px; width:32px; height:32px; z-index:1;">{$fitting_rig.1.Icon}</div> 94 <div id="rig3" style="position:absolute; left:118px; top:345px; width:32px; height:32px; z-index:1;">{$fitting_rig.2.Icon}</div> 95 </div> 98 96 99 100 101 102 <div class="block-header">Ship details</div> 97 <div class="block-header">Ship details</div> 103 98 <table class="kb-table" width="360" border="0" cellspacing="1"> 104 {foreach from=$ destroyeditem=slot key=slotindex}99 {foreach from=$slots item=slot key=slotindex} 105 100 {* set to true to show empty slots *} 106 {if $ slot.items or $dropped.$slotindex.items}101 {if $destroyed.$slotindex or $dropped.$slotindex} 107 102 <tr class="kb-table-row-even"> 108 103 <td class="item-icon" width="32"><img width="32" height="32" src="{$img_url}/{$slot.img}" alt="{$slot.text}" border="0"></td> … … 112 107 {/if} 113 108 </tr> 114 {foreach from=$ slot.itemsitem=i}109 {foreach from=$destroyed.$slotindex item=i} 115 110 <tr class="kb-table-row-odd"> 116 111 <td class="item-icon" width="32" height="34" valign="top"><a href="?a=invtype&id={$i.itemID}">{$i.Icon}</a></td> … … 121 116 {/if} 122 117 </tr> 123 {if $admin and $config->get('item_values') }118 {if $admin and $config->get('item_values') and !$fixSlot} 124 119 <tr class="kb-table-row-even"> 125 120 <form method="post" action=""> … … 130 125 <input name="{$i.itemID}" type="text" class="comment-button" value="{$i.single_unit}" size="6"> 131 126 </div> 132 <td height="34" valign="top"><input type="submit" name="submit" value="Update" class="comment-button"></td> 133 </form> 134 </tr> 135 {/if} 136 {foreachelse} 137 <tr class="kb-table-row-odd"> 138 <td colspan="4" valign="top">No Items lost</td> 139 </tr> 127 <td height="34" valign="top"><input type="submit" name="submit" value="UpdateValue" class="comment-button"></td> 128 </form> 129 </tr> 130 {/if} 131 {if $admin and $i.slotID < 4 and $fixSlot} 132 <tr class="kb-table-row-even"> 133 <form method="post" action=""> 134 <td height="34" colspan="3" valign="top"> 135 <div align="right"> 136 Fix slot: 137 <input name="IID" value="{$i.itemID}" type="hidden"> 138 <input name="KID" value="{$KillId}" type="hidden"> 139 <input name="TYPE" value="destroyed" type="hidden"> 140 <input name="OLDSLOT" value="{$i.slotID}" type="hidden"> 141 <input name="{$i.itemID}" type="text" class="comment-button" value="{$i.slotID}" size="6"> 142 </div> 143 <td height="34" valign="top"><input type="submit" name="submit" value="UpdateSlot" class="comment-button"></td> 144 </form> 145 </tr> 146 {/if} 140 147 {/foreach} 141 {foreach from=$dropped.$slotindex .itemsitem=i}148 {foreach from=$dropped.$slotindex item=i} 142 149 <tr class="kb-table-row-odd" style="background-color: green;"> 143 150 <td style="border: 1px solid green;" width="32" height="34" valign="top"><a href="?a=invtype&id={$i.itemID}">{$i.Icon}</a></td> … … 148 155 {/if} 149 156 </tr> 150 {if $admin and $config->get('item_values') }157 {if $admin and $config->get('item_values') and !$fixSlot} 151 158 <tr class="kb-table-row-even"> 152 159 <form method="post" action=""> … … 158 165 </div> 159 166 <td height="34" valign="top"><input type="submit" name="submit" value="Update" class="comment-button"></td> 167 </form> 168 </tr> 169 {/if} 170 {if $admin and $i.slotID < 4 and $fixSlot} 171 <tr class="kb-table-row-even"> 172 <form method="post" action=""> 173 <td height="34" colspan="3" valign="top"> 174 <div align="right"> 175 Fix slot: 176 <input name="IID" value="{$i.itemID}" type="hidden"> 177 <input name="KID" value="{$KillId}" type="hidden"> 178 <input name="TYPE" value="dropped" type="hidden"> 179 <input name="OLDSLOT" value="{$i.slotID}" type="hidden"> 180 <input name="{$i.itemID}" type="text" class="comment-button" value="{$i.slotID}" size="6"> 181 </div> 182 <td height="34" valign="top"><input type="submit" name="submit" value="UpdateSlot" class="comment-button"></td> 160 183 </form> 161 184 </tr> -
dev/templates/kill_detail.tpl
r293 r307 103 103 <input name="IID" value="{$i.itemID}" type="hidden"> 104 104 <input name="KID" value="{$KillId}" type="hidden"> 105 <input name="TYPE" value="destroyed" type="hidden">106 <input name="OLDSLOT" value="{$i.slotID}" type="hidden">105 <input name="TYPE" value="destroyed" type="hidden"> 106 <input name="OLDSLOT" value="{$i.slotID}" type="hidden"> 107 107 <input name="{$i.itemID}" type="text" class="comment-button" value="{$i.slotID}" size="6"> 108 108 </div> … … 142 142 <input name="IID" value="{$i.itemID}" type="hidden"> 143 143 <input name="KID" value="{$KillId}" type="hidden"> 144 <input name="TYPE" value="dropped" type="hidden">145 <input name="OLDSLOT" value="{$i.slotID}" type="hidden">144 <input name="TYPE" value="dropped" type="hidden"> 145 <input name="OLDSLOT" value="{$i.slotID}" type="hidden"> 146 146 <input name="{$i.itemID}" type="text" class="comment-button" value="{$i.slotID}" size="6"> 147 147 </div>