root/dev/common/about.php @ 48

Revision 48, 4.9 KB (checked in by exi, 14 years ago)

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

Line 
1<?php
2require_once("db.php");
3require_once("class.page.php");
4require_once("class.ship.php");
5
6$page = new Page("About");
7
8$html .= "<div class=block-header2>Killboard</div>";
9$html .= KB_TITLE . ", a killboard for <a href=\"http://www.eve-online.com/\">EVE Online</a> corporations and alliances.<br><p>Based on EVE-Killboard created by <a href=\"mailto:rig0r@eve-killboard.net\">rig0r</a>. All EVE graphics used are &copy; <a href=\"http://www.ccpgames.com/\">CCP</a>.<br><br>";
10
11$qry = new DBQuery();
12$qry->execute("select count(*) as cnt from kb3_kills");
13$row = $qry->getRow();
14$kills = $row['cnt'];
15$qry->execute("select sum(itd_quantity) as cnt from kb3_items_destroyed");
16$row = $qry->getRow();
17$items = $row['cnt'];
18$qry->execute("select count(*) as cnt from kb3_pilots");
19$row = $qry->getRow();
20$pilots = $row['cnt'];
21$qry->execute("select count(*) as cnt from kb3_corps");
22$row = $qry->getRow();
23$corps = $row['cnt'];
24$qry->execute("select count(*) as cnt from kb3_alliances");
25$row = $qry->getRow();
26$alliances = $row['cnt'];
27// $html .= "<div class=block-header2>Killboard stats</div>";
28$html .= "The eve-killboard.net database currently stores <b>" . number_format($kills, 0, ',', '.') . "</b> killmails, <b>" . number_format($items, 0, ',', '.') . "</b> destroyed items, <b>" . number_format($pilots, 0, ',', '.') . "</b> pilots, <b>" . number_format($corps, 0, ',', '.') . "</b> corporations and <b>" . number_format($alliances, 0, ',', '.') . "</b> alliances.<br><br>";
29
30$html .= "<div class=block-header2>Portraits</div>";
31$html .= "If you would like your ingame character portrait to show up on the killboard, please visit the killboard using the ingame browser and select the 'Update portrait' option presented.<br>";
32$html .= "After trusting the site (press Yes when prompted), your character ID will be grabbed and recorded in the database.<br><br>";
33
34$html .= "<div class=block-header2>Kills & Real kills</div>";
35$html .= "Real kills are all recorded kills minus pod, shuttle and noobship kills. This value is used throughout all award and statistic pages you see on the killboard.<br><br>";
36
37$html .= "<div class=block-header2>Kill points</div>";
38$html .= "If enabled, every kill gets a certain amount of points assigned. The number of points says something about the difficulty of the kill. It is based on the shiptype destroyed, and the number and types of ships involved in the kill. As a result, a gank will get a lot less points awarded than a kill in a small engagement.<br><br>";
39
40$html .= "<div class=block-header2>Efficiency</div>";
41$html .= "Every shipclass has a value in ISK assigned. This is based on the average amount of ISK that would have been lost if  the ship was destroyed, taking current average market prices, insurance costs and insurance payouts into account. ";
42$html .= "Any modules that might have been fitted or cargo that might have been destroyed or confiscated is not included.<br><br>";
43$html .= "The efficiency is calculated as the ratio of damage done in ISK versus the damage received in ISK. This comes down to <i>damagedone / (damagedone + damagereceived ) * 100</i>.<br><br>";
44
45$html .= "<div class=block-header2>Ship values</div>";
46$html .= "The shipclasses and average ISK value are as follows:<br><br>";
47$sql = "select scl_id
48            from kb3_ship_classes
49           where scl_class not in ( 'Drone', 'Unknown' )
50          order by scl_value";
51
52$qry = new DBQuery();
53$qry->execute($sql);
54$html .= "<table class=kb-table cellspacing=1>";
55$html .= "<tr class=kb-table-header><td width=110>Ship class</td><td>Value in ISK</td><td align=center>Indicator</td></tr>";
56while ($row = $qry->getRow())
57{
58    $shipclass = new ShipClass($row['scl_id']);
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>";
60}
61$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}
85
86$page->setContent($html);
87$page->generate();
88?>
Note: See TracBrowser for help on using the browser.