root/dev/common/about.php @ 461

Revision 461, 6.4 KB (checked in by kovell, 11 years ago)

Fixes: eve-dev changed to eve-id, recursive clearup scripts recurse more than one level, defunct admin sync removed.

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        'Beansman (Developer)',
9        'Ralle030583 (Developer)',
10        'Hon Kovell (Developer)');
11
12$contributor = array('JaredC01',
13        'liquidism',
14        'Mitchman',
15        'Coni',
16        'FriedRoadKill',
17        'bunjiboys',
18        'Karbowiak',
19        'EDG',
20        'Duncan - Shailo Koljas',
21        'Captain Thunk');
22sort($contributor);
23
24$html .= '<div class=block-header2>The Killboard</div>';
25
26// Please leave the information on the next line as is so that other people can easily find the EVE-Dev website.
27// Remember to share any modifications to the EVE-Dev Killboard.
28$html .= "This is the EVE Development Network Killboard running version ".KB_VERSION." ".KB_RELEASE." 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-id.net/\">EVE-Dev</a> group.<br/>"
29        ."All EVE graphics and data used are property of <a href=\"http://www.ccpgames.com/\">CCP</a>.<br/><br/>";
30$html .= '<a href="http://www.eve-id.net/" target="_blank"><img src="http://www.eve-id.net/logo.png" border="0"/></a><br/><br/>';
31
32$html .= '<b>Staff:</b><br/>';
33$html .= join(', ', $developer);
34$html .= '<br/><br/><b>Contributors:</b><br/>';
35$html .= join(', ', $contributor);
36$html .= '<br/><br/>';
37
38$qry = new DBQuery();
39$qry->execute("select count(*) as cnt from kb3_kills");
40$row = $qry->getRow();
41$kills = $row['cnt'];
42$qry->execute("select sum(itd_quantity) as cnt from kb3_items_destroyed");
43$row = $qry->getRow();
44$items = $row['cnt'];
45$qry->execute("select count(*) as cnt from kb3_pilots");
46$row = $qry->getRow();
47$pilots = $row['cnt'];
48$qry->execute("select count(*) as cnt from kb3_corps");
49$row = $qry->getRow();
50$corps = $row['cnt'];
51$qry->execute("select count(*) as cnt from kb3_alliances");
52$row = $qry->getRow();
53$alliances = $row['cnt'];
54
55// $html .= "<div class=block-header2>Killboard stats</div>";
56$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>";
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)
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.'/items/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.