root/dev/common/about.php @ 195

Revision 190, 7.3 KB (checked in by exi, 15 years ago)

This is a big update...
Moved all admin scripts to common/admin.
Moved all includes and classes to common/includes.
Edited all include-paths to reflect the movement.
Fixed a bug with the session system allowing every registered user to access admin pages.
Replaced calls to date() to use a wrapper so gmdate can be used.
Replaced some calls to $config with calls to the static object.
Fixed a big which caused the portrait_grab to not download a new picute.
Added a classified-state to kills.
Removed the sync_server server script in this tree.
Added code to help modules find the includes to index.php.

Line 
1<?php
2require_once('common/includes/class.page.php');
3require_once('common/includes/class.ship.php');
4
5$page = new Page('About');
6
7// i store the names here for an easy edit
8$developer = array('exi (Lead Developer)',
9                   'knifee (Developer)',
10                   'Andrew Gunn (Siteadmin)',
11                   'Ganja (Fluff girl)');
12
13$contributor = array('JaredC01',
14                     'liquidism',
15                     'ralle030583',
16                     'Mitchman',
17                     'Coni',
18                     'beansman');
19sort($contributor);
20
21$html .= '<div class=block-header2>The Killboard</div>';
22
23// Please leave the information on the next line as is so that other people can easily find the EVE-Dev website.
24// Remember to share any modifications to the EVE-Dev Killboard.
25$html .= "This is the EVE Development Network Killboard running version 1.3 (Tigerduck Memorial Edition), created for <a href=\"http://www.eve-online.com/\">EVE Online</a> corporations and alliances.<br/>"
26        ."Based on the EVE-Killboard created by <a href=\"mailto:rig0r@eve-killboard.net\">rig0r</a> it is now developed and maintained by the <a href=\"http://www.eve-dev.net/\">EVE-Dev</a> group.<br/>"
27        ."All EVE graphics and data used are property of <a href=\"http://www.ccpgames.com/\">CCP</a>.<br/><br/>";
28$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/>';
29
30$html .= '<b>Staff:</b><br/>';
31$html .= join(', ', $developer);
32$html .= '<br/><br/><b>Contributors:</b><br/>';
33$html .= join(', ', $contributor);
34$html .= '<br/><br/>';
35
36$qry = new DBQuery();
37$qry->execute("select count(*) as cnt from kb3_kills");
38$row = $qry->getRow();
39$kills = $row['cnt'];
40$qry->execute("select sum(itd_quantity) as cnt from kb3_items_destroyed");
41$row = $qry->getRow();
42$items = $row['cnt'];
43$qry->execute("select count(*) as cnt from kb3_pilots");
44$row = $qry->getRow();
45$pilots = $row['cnt'];
46$qry->execute("select count(*) as cnt from kb3_corps");
47$row = $qry->getRow();
48$corps = $row['cnt'];
49$qry->execute("select count(*) as cnt from kb3_alliances");
50$row = $qry->getRow();
51$alliances = $row['cnt'];
52
53// $html .= "<div class=block-header2>Killboard stats</div>";
54$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>";
55
56$html .= "<div class=block-header2>Portraits</div>";
57$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>";
58$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>";
59
60$html .= "<div class=block-header2>Kills & Real kills</div>";
61$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>";
62
63$html .= "<div class=block-header2>Kill points</div>";
64$html .= "Administrator option.<br><br>";
65$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>";
66
67$html .= "<div class=block-header2>Efficiency</div>";
68$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. ";
69$html .= "Any modules that may have been fitted, contained within the destroyed cargo or confiscated are not included within this value.<br><br>";
70$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>";
71
72$html .= "<div class=block-header2>Ship values</div>";
73$html .= "The shipclasses and average ISK value are as follows:<br><br>";
74$sql = "select scl_id
75            from kb3_ship_classes
76           where scl_class not in ( 'Drone', 'Unknown' )
77          order by scl_value";
78
79$qry = new DBQuery();
80$qry->execute($sql);
81$html .= "<table class=kb-table cellspacing=1>";
82$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>";
83while ($row = $qry->getRow())
84{
85    $shipclass = new ShipClass($row['scl_id']);
86    $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>";
87}
88$html .= "</table>";
89
90function getVictimShipValueIndicator($value)
91{
92    if ($value >= 0 && $value <= 1)
93        $color = "gray";
94    elseif ($value > 1 && $value <= 15)
95        $color = "blue";
96    elseif ($value > 15 && $value <= 25)
97        $color = "green";
98    elseif ($value > 25 && $value <= 40)
99        $color = "yellow";
100    elseif ($value > 40 && $value <= 80)
101        $color = "red";
102    elseif ($value > 80 && $value <= 250)
103        $color = "orange";
104    elseif ($value > 250 && $value <= 7000)
105        $color = "purple";
106
107    return IMG_URL . "/ships/ship-" . $color . ".gif";
108}
109
110if (config::get('ship_values'))
111{
112    $sql = 'select kbs.shp_id as id, shp.shp_name, kbs.shp_value,
113                 shp.shp_techlevel, scl.scl_class, scl.scl_points
114                 from kb3_ships_values kbs
115                 inner join kb3_ships shp on (kbs.shp_id = shp.shp_id)
116                 inner join kb3_ship_classes scl on (shp.shp_class = scl.scl_id)
117                 order by shp.shp_name asc';
118    $html .= "<br/>Custom shipvalues which override the value from shipclasses:<br><br>";
119    $qry = new DBQuery();
120    $qry->execute($sql);
121    $html .= "<table class=kb-table cellspacing=1>";
122    $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>";
123    while ($row = $qry->getRow())
124    {
125        if ($row['shp_techlevel'] == 2)
126        {
127            $row['shp_name'] = '<img src="'.IMG_URL.'/ships/32_32/t2.gif">'.$row['shp_name'];
128        }
129        $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>";
130    }
131    $html .= "</table>";
132}
133
134$page->setContent($html);
135$page->generate();
136?>
Note: See TracBrowser for help on using the browser.