Changeset 48 for dev/common/about.php

Show
Ignore:
Timestamp:
11/04/06 06:06:53 (14 years ago)
Author:
exi
Message:

Forgot some kind of nifty display on the about page for the Custom Shipvalue feature.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/about.php

    r10 r48  
    5353$qry->execute($sql); 
    5454$html .= "<table class=kb-table cellspacing=1>"; 
    55 $html .= "<tr class=kb-table-header><td width=110>Ship class</td><td>Value in ISK (M)</td><td align=center>Indicator</td></tr>"; 
     55$html .= "<tr class=kb-table-header><td width=110>Ship class</td><td>Value in ISK</td><td align=center>Indicator</td></tr>"; 
    5656while ($row = $qry->getRow()) 
    5757{ 
    5858    $shipclass = new ShipClass($row['scl_id']); 
    59     $html .= "<tr class=kb-table-row-odd><td>" . $shipclass->getName() . "</td><td>" . $shipclass->getValue() . "</td><td align=center><img class=ship src=\"" . $shipclass->getValueIndicator() . "\" border=\"0\"></td></tr>"; 
     59    $html .= "<tr class=kb-table-row-odd><td>" . $shipclass->getName() . "</td><td align=\"right\">".number_format($shipclass->getValue()*1000000,0,',','.')."</td><td align=center><img class=ship src=\"" . $shipclass->getValueIndicator() . "\" border=\"0\"></td></tr>"; 
    6060} 
    6161$html .= "</table>"; 
     62 
     63if ($config->getConfig('ship_values')) 
     64{ 
     65    $sql = 'select kbs.shp_id as id, shp.shp_name, kbs.shp_value, 
     66                 shp.shp_techlevel 
     67                 from kb3_ships_values kbs 
     68                 inner join kb3_ships shp on (kbs.shp_id = shp.shp_id) 
     69                 order by shp.shp_name asc'; 
     70    $html .= "<br/>Custom shipvalues which override the value from shipclasses:<br><br>"; 
     71    $qry = new DBQuery(); 
     72    $qry->execute($sql); 
     73    $html .= "<table class=kb-table cellspacing=1>"; 
     74    $html .= "<tr class=kb-table-header><td width=110>Ship Name</td><td>Value in ISK</td></tr>"; 
     75    while ($row = $qry->getRow()) 
     76    { 
     77        if ($row['shp_techlevel'] == 2) 
     78        { 
     79            $row['shp_name'] = '<img src="'.IMG_URL.'/ships/32_32/t2.gif">'.$row['shp_name']; 
     80        } 
     81        $html .= "<tr class=kb-table-row-odd><td>".$row['shp_name']."</td><td align=\"right\">".number_format($row['shp_value'],0,',','.')."</td></tr>"; 
     82    } 
     83    $html .= "</table>"; 
     84} 
    6285 
    6386$page->setContent($html);