Show
Ignore:
Timestamp:
12/23/07 18:10:16 (15 years ago)
Author:
exi
Message:

fix for ticket:59
fixed update of item values

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/kill_detail.php

    r294 r300  
    1919            $Val = $_POST[$IID]; 
    2020            $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."'"); 
    2222        } 
    2323    } 
     
    2626if ($page->isAdmin()) 
    2727{ 
    28     if (isset($_GET['view']) && $_GET['view']== 'FixSlot'){ 
    29         $smarty->assign('fixSlot', 'true'); 
    30     } 
    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); 
    43      } 
     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); 
     43    } 
    4444} 
    4545 
     
    241241    $menubox->addOption("link", "Delete", "javascript:openWindow('?a=admin_kill_delete&kll_id=".$kill->getID()."', null, 420, 300, '' );"); 
    242242    $menubox->addOption("link", "Fix Slots", "?a=kill_detail&kll_id=".$kill->getID()."&view=FixSlot"); 
    243      
     243 
    244244} 
    245245$page->addContext($menubox->generate());