Show
Ignore:
Timestamp:
12/06/06 14:56:04 (14 years ago)
Author:
exi
Message:

Added an rss-icon to main page.
Cleaned up kill_detail template.
Added autoupgrade code for standings table.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/kill_detail.php

    r134 r135  
    1212if ($config->getConfig('item_values')) 
    1313{ 
    14     $smarty->assign('item_values', "true"); 
     14    $smarty->assign('item_values', 'true'); 
    1515    if ($page->isAdmin()) 
    1616    { 
    17         $smarty->assign('admin', "true"); 
     17        $smarty->assign('admin', 'true'); 
    1818        if (isset($_POST['submit'])) 
    1919        { 
     
    2121            $IID = $_POST['IID']; 
    2222            $Val = $_POST[$IID]; 
    23             // echo "UPDATE kb3_items SET itm_value ='" . $Val . "' WHERE itm_id='" . $IID . "'"; 
     23            //echo "UPDATE kb3_items SET itm_value ='" . $Val . "' WHERE itm_id='" . $IID . "'"; 
    2424            $qry = new DBQuery(); 
    2525            $qry->execute("UPDATE kb3_items SET itm_value ='".$Val."' WHERE itm_id='".$IID."'"); 
     
    9898    ++$i; 
    9999} 
    100  
    101100$smarty->assign_by_ref('involved', $involved); 
    102101 
     
    125124if (count($kill->destroyeditems_) > 0) 
    126125{ 
    127     $cargo = array(); 
    128     $drone = array(); 
    129     $high_slot = array(); 
    130     $mid_slot = array(); 
    131     $low_slot = array(); 
     126    $dest_array = array(); 
     127    $dest_array[1] = array('img' => 'fitted_-_high_slot.jpg', 'text' => 'Fitted - High slot', 'items' => array()); 
     128    $dest_array[2] = array('img' => 'fitted_-_medium_slot.jpg', 'text' => 'Fitted - Mid slot', 'items' => array()); 
     129    $dest_array[3] = array('img' => 'fitted_-_low_slot.jpg', 'text' => 'Fitted - Low slot', 'items' => array()); 
     130    $dest_array[6] = array('img' => 'drone_bay.jpg', 'text' => 'Drone bay', 'items' => array()); 
     131    $dest_array[4] = array('img' => 'cargo.jpg', 'text' => 'Cargo Bay', 'items' => array()); 
    132132 
    133133    foreach($kill->destroyeditems_ as $destroyed) 
     
    170170            } 
    171171        } 
    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 } 
    175  
    176 /* 
    177  echo count($mid_slot); 
    178 print_r($low_slot); 
    179 print_r($dest_array['1']);*/ 
     172        $dest_array[$destroyed->getLocationID()]['items'][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $destroyed->getQuantity(), 'Value' => $Formatted, 'single_unit' => $value_single, 'itemID' => $item->getID()); 
     173    } 
     174} 
    180175 
    181176if ($TotalValue > 0) 
     
    183178    $Formatted = number_format($TotalValue, 2); 
    184179} 
     180 
    185181// Get Ship Value 
    186182$ShipValue = $ship->getPrice(); 
    187  
    188183$TotalLoss = number_format($TotalValue + $ShipValue, 2); 
    189184$ShipValue = number_format($ShipValue, 2); 
    190185 
    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']); 
     186$smarty->assign_by_ref('destroyed', $dest_array); 
    196187$smarty->assign('ItemValue', $Formatted); 
    197188$smarty->assign('ShipValue', $ShipValue); 
    198189$smarty->assign('TotalLoss', $TotalLoss); 
    199190 
    200 $menubox = new box("Menu"); 
     191$menubox = new Box("Menu"); 
    201192$menubox->setIcon("menu-item.gif"); 
    202193$menubox->addOption("caption", "View"); 
    203         $menubox->addOption("link","Killmail", "javascript:sndReq('index.php?a=kill_mail&kll_id=".$kill->getID()."');ReverseContentDisplay('popup')"); 
     194$menubox->addOption("link", "Killmail", "javascript:sndReq('index.php?a=kill_mail&kll_id=".$kill->getID()."');ReverseContentDisplay('popup')"); 
    204195if ($kill->relatedKillCount() > 1 || $kill->relatedLossCount() > 1) 
    205196{