root/dev/common/about.php @ 296

Revision 254, 7.1 KB (checked in by exi, 14 years ago)

Merging 242:253 branch into dev

Line 
1<?php
2require_once('common/includes/class.ship.php');
3
4$page = new Page('About');
5
6// i store the names here for an easy edit
7$developer = array('exi (Lead Developer)',
8                   'knifee (Developer)',
9                   'Andrew Gunn (Siteadmin)',
10                   'Ganja (Fluff girl)');
11
12$contributor = array('JaredC01',
13                     'liquidism',
14                     'ralle030583',
15                     'Mitchman',
16                     'Coni',
17                     'beansman');
18sort($contributor);
19
20$html .= '<div class=block-header2>The Killboard</div>';
21
22// Please leave the information on the next line as is so that other people can easily find the EVE-Dev website.
23// Remember to share any modifications to the EVE-Dev Killboard.
24$html .= "This is the EVE Development Network Killboard running version ".KB_VERSION." rev ".SVN_REV.", created for <a href=\"http://www.eve-online.com/\">EVE Online</a> corporations and alliances. Based on the EVE-Killboard created by rig0r, it is now developed and maintained by the <a href=\"http://www.eve-dev.net/\">EVE-Dev</a> group.<br/>"
25        ."All EVE graphics and data used are property of <a href=\"http://www.ccpgames.com/\">CCP</a>.<br/><br/>";
26$html .= '<a href="http://www.eve-dev.net/" target="_blank"><img src="http://www.eve-dev.net/e107_images/evedev_button.png" border="0"/></a><br/><br/>';
27
28$html .= '<b>Staff:</b><br/>';
29$html .= join(', ', $developer);
30$html .= '<br/><br/><b>Contributors:</b><br/>';
31$html .= join(', ', $contributor);
32$html .= '<br/><br/>';
33
34$qry = new DBQuery();
35$qry->execute("select count(*) as cnt from kb3_kills");
36$row = $qry->getRow();
37$kills = $row['cnt'];
38$qry->execute("select sum(itd_quantity) as cnt from kb3_items_destroyed");
39$row = $qry->getRow();
40$items = $row['cnt'];
41$qry->execute("select count(*) as cnt from kb3_pilots");
42$row = $qry->getRow();
43$pilots = $row['cnt'];
44$qry->execute("select count(*) as cnt from kb3_corps");
45$row = $qry->getRow();
46$corps = $row['cnt'];
47$qry->execute("select count(*) as cnt from kb3_alliances");
48$row = $qry->getRow();
49$alliances = $row['cnt'];
50
51// $html .= "<div class=block-header2>Killboard stats</div>";
52$html .= "This killboard currently contains: <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>";
53
54$html .= "<div class=block-header2>Portraits</div>";
55$html .= "In order to make your charater portrait visable on the killboard, please take the time to visit the killboard using the ingame browser and choose the option: 'Update portrait'.<br><br>";
56$html .= "When prompted to trust the site choose YES, at this point the killboard will obtain your character ID and record it within the database.<br><br>";
57
58$html .= "<div class=block-header2>Kills & Real kills</div>";
59$html .= "'Kills' -    The count of all kills by an entity. <br>'Real kills' - This is the count of recorded kills minus any pod, shuttle and noobship kills. <br><p> The 'Real kills' value is used throughout all award and statistic pages.<br><br>";
60
61$html .= "<div class=block-header2>Kill points</div>";
62$html .= "Administrator option.<br><br>";
63$html .= "If enabled, every kill is assigned a point value. Based on the shiptype destroyed, and the number and types of ships involved in the kill, the number of points indicates the difficulty of the kill... As a result, a gank will get a lot less points awarded than a kill in a small engagement.<br><br>";
64
65$html .= "<div class=block-header2>Efficiency</div>";
66$html .= "Each shipclass has an ISK value assigned. These are 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. ";
67$html .= "Any modules that may have been fitted, contained within the destroyed cargo or confiscated are not included within this value.<br><br>";
68$html .= "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>";
69
70$html .= "<div class=block-header2>Ship values</div>";
71$html .= "The shipclasses and average ISK value are as follows:<br><br>";
72$sql = "select scl_id
73            from kb3_ship_classes
74           where scl_class not in ( 'Drone', 'Unknown' )
75          order by scl_value";
76
77$qry = new DBQuery();
78$qry->execute($sql);
79$html .= "<table class=kb-table cellspacing=1>";
80$html .= "<tr class=kb-table-header><td width=160>Ship class</td><td>Value in ISK</td><td>Points</td><td align=center>Indicator</td></tr>";
81while ($row = $qry->getRow())
82{
83    $shipclass = new ShipClass($row['scl_id']);
84    $html .= "<tr class=kb-table-row-odd><td>".$shipclass->getName()."</td><td align=\"right\">".number_format($shipclass->getValue()*1000000,0,',','.')."</td><td align=\"right\">".number_format($shipclass->getPoints(),0,',','.')."</td><td align=center><img class=ship src=\"" . $shipclass->getValueIndicator() . "\" border=\"0\"></td></tr>";
85}
86$html .= "</table>";
87
88function getVictimShipValueIndicator($value)
89{
90    if ($value >= 0 && $value <= 1)
91        $color = "gray";
92    elseif ($value > 1 && $value <= 15)
93        $color = "blue";
94    elseif ($value > 15 && $value <= 25)
95        $color = "green";
96    elseif ($value > 25 && $value <= 40)
97        $color = "yellow";
98    elseif ($value > 40 && $value <= 80)
99        $color = "red";
100    elseif ($value > 80 && $value <= 250)
101        $color = "orange";
102    elseif ($value > 250 && $value <= 7000)
103        $color = "purple";
104
105    return IMG_URL . "/ships/ship-" . $color . ".gif";
106}
107
108if (config::get('ship_values'))
109{
110    $sql = 'select kbs.shp_id as id, shp.shp_name, kbs.shp_value,
111                 shp.shp_techlevel, scl.scl_class, scl.scl_points
112                 from kb3_ships_values kbs
113                 inner join kb3_ships shp on (kbs.shp_id = shp.shp_id)
114                 inner join kb3_ship_classes scl on (shp.shp_class = scl.scl_id)
115                 order by shp.shp_name asc';
116    $html .= "<br/>Custom shipvalues which override the value from shipclasses:<br><br>";
117    $qry = new DBQuery();
118    $qry->execute($sql);
119    $html .= "<table class=kb-table cellspacing=1>";
120    $html .= "<tr class=kb-table-header><td width=160>Ship Name</td><td>Ship Class</td><td>Points</td><td align=\"right\">Value in ISK</td></tr>";
121    while ($row = $qry->getRow())
122    {
123        if ($row['shp_techlevel'] == 2)
124        {
125            $row['shp_name'] = '<img src="'.IMG_URL.'/ships/32_32/t2.gif">'.$row['shp_name'];
126        }
127        $html .= "<tr class=kb-table-row-odd><td>".$row['shp_name']."&nbsp;</td><td>".$row['scl_class']."&nbsp;</td><td align=\"right\">".number_format($row['scl_points'],0,',','.')."</td><td align=\"right\">&nbsp;".number_format($row['shp_value'],0,',','.')."&nbsp;<img src=\"".getVictimShipValueIndicator($row['shp_value']/1000000)."\"></td></tr>";
128    }
129    $html .= "</table>";
130}
131
132$page->setContent($html);
133$page->generate();
134?>
Note: See TracBrowser for help on using the browser.