Changeset 292
- Timestamp:
- 12/17/07 13:31:57 (14 years ago)
- Location:
- dev
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/includes/globals.php
r288 r292 1 1 <?php 2 2 // current subversion revision 3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 2 88$', $match);3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 292 $', $match); 4 4 define('SVN_REV', $match[1]); 5 5 -
dev/common/kill_detail.php
r282 r292 13 13 { 14 14 $smarty->assign('admin', 'true'); 15 if (isset($_POST['submit']) )15 if (isset($_POST['submit']) == 'UpdateValue') 16 16 { 17 17 // Send new value for item to the database … … 24 24 } 25 25 26 if (isset($_GET['view']) == 'FixSlot'){ 27 $smarty->assign('fixSlot', 'true'); 28 } 29 30 if ($page->isAdmin()) 31 { 32 if (isset($_GET['view']) == 'FixSlot'){ 33 $smarty->assign('fixSlot', 'true'); 34 } 35 36 37 $smarty->assign('admin', 'true'); 38 if (isset($_POST['submit']) == 'UpdateSlot') 39 { 40 $IID = $_POST['IID']; 41 $KID = $_POST['KID']; 42 $Val = $_POST[$IID]; 43 $table = $_POST['TYPE']; 44 $old = $_POST['OLDSLOT']; 45 $qry = new DBQuery(); 46 $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); 47 //echo "UPDATE kb3_items_".$table." itd_itl_id ='".$Val."' WHERE itd_itm_id=".$IID." AND itd_kll_id = ".$KID." AND itd_itl_id = ".$old; 48 } 49 } 50 26 51 if (!$kll_id = intval($_GET['kll_id'])) 27 52 { … … 42 67 43 68 // victim $smarty->assign('',); 69 $smarty->assign('KillId', $kill->getID()); 44 70 $smarty->assign('VictimPortrait', $kill->getVictimPortrait(64)); 45 71 $smarty->assign('VictimURL', "?a=pilot_detail&plt_id=".$kill->getVictimID()); … … 161 187 $formatted = $destroyed->getFormatttedValue(); 162 188 } 163 $dest_array[$destroyed->getLocationID()]['items'][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $destroyed->getQuantity(), 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $item->getID() );189 $dest_array[$destroyed->getLocationID()]['items'][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $destroyed->getQuantity(), 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $item->getID(),'slotID' => $destroyed->getLocationID()); 164 190 } 165 191 } … … 184 210 $formatted = $dropped->getFormatttedValue(); 185 211 } 186 $drop_array[$dropped->getLocationID()]['items'][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $dropped->getQuantity(), 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $item->getID() );212 $drop_array[$dropped->getLocationID()]['items'][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $dropped->getQuantity(), 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $item->getID(),'slotID' => $dropped->getLocationID()); 187 213 } 188 214 } … … 223 249 $menubox->addOption("caption", "Admin"); 224 250 $menubox->addOption("link", "Delete", "javascript:openWindow('?a=admin_kill_delete&kll_id=".$kill->getID()."', null, 420, 300, '' );"); 251 $menubox->addOption("link", "Fix Slots", "?a=kill_detail&kll_id=".$kill->getID()."&view=FixSlot"); 252 225 253 } 226 254 $page->addContext($menubox->generate()); -
dev/templates/kill_detail.tpl
r280 r292 82 82 {/if} 83 83 </tr> 84 {if $admin and $config->get('item_values') }84 {if $admin and $config->get('item_values') and !$fixSlot} 85 85 <tr class="kb-table-row-even"> 86 86 <form method="post" action=""> … … 91 91 <input name="{$i.itemID}" type="text" class="comment-button" value="{$i.single_unit}" size="6"> 92 92 </div> 93 <td height="34" valign="top"><input type="submit" name="submit" value="Update" class="comment-button"></td> 93 <td height="34" valign="top"><input type="submit" name="submit" value="UpdateValue" class="comment-button"></td> 94 </form> 95 </tr> 96 {/if} 97 {if $admin and $i.slotID < 4 and $fixSlot} 98 <tr class="kb-table-row-even"> 99 <form method="post" action=""> 100 <td height="34" colspan="3" valign="top"> 101 <div align="right"> 102 Fix slot: 103 <input name="IID" value="{$i.itemID}" type="hidden"> 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"> 107 <input name="{$i.itemID}" type="text" class="comment-button" value="{$i.slotID}" size="6"> 108 </div> 109 <td height="34" valign="top"><input type="submit" name="submit" value="UpdateSlot" class="comment-button"></td> 94 110 </form> 95 111 </tr> … … 109 125 {/if} 110 126 </tr> 111 {if $admin and $config->get('item_values') }127 {if $admin and $config->get('item_values') and !$fixSlot} 112 128 <tr class="kb-table-row-even"> 113 129 <form method="post" action=""> … … 119 135 </div> 120 136 <td height="34" valign="top"><input type="submit" name="submit" value="Update" class="comment-button"></td> 137 </form> 138 </tr> 139 {/if} 140 {if $admin and $i.slotID < 4 and $fixSlot} 141 <tr class="kb-table-row-even"> 142 <form method="post" action=""> 143 <td height="34" colspan="3" valign="top"> 144 <div align="right"> 145 Fix slot: 146 <input name="IID" value="{$i.itemID}" type="hidden"> 147 <input name="KID" value="{$KillId}" type="hidden"> 148 <input name="TYPE" value="dropped" type="hidden"> 149 <input name="OLDSLOT" value="{$i.slotID}" type="hidden"> 150 <input name="{$i.itemID}" type="text" class="comment-button" value="{$i.slotID}" size="6"> 151 </div> 152 <td height="34" valign="top"><input type="submit" name="submit" value="UpdateSlot" class="comment-button"></td> 121 153 </form> 122 154 </tr>