root/dev/mods/history/about.php @ 315

Revision 315, 8.2 KB (checked in by ralle030583, 13 years ago)

missing , in /mods/history/about.php

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                   'Ralle030583 (Developer)',
10                   'Andrew Gunn (Siteadmin)',
11                   'Ganja (Fluff girl)');
12
13$contributor = array('JaredC01',
14                     'liquidism',
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." ".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-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$filename  = "./mods/history/history.xml";
54$history_xml = simplexml_load_file($filename);
55
56if (!isset($_GET['showAll']))
57{
58    $html .= "<div class=block-header2>Revision History (last 5)</div>";
59}
60else
61{
62    $html .= "<div class=block-header2>Revision History (all)</div>";
63}
64$html .= "<table class=kb-table cellspacing=1 width=100%>";
65$count = 1;
66foreach ($history_xml as $set)
67{       
68if ($count > 5 && !isset($_GET['showAll']))
69    break;
70$html .= "<tr class=kb-table-row-odd><td width = 50><a href='http://trac.eve-dev.net/changeset/".$set->rev."' target='_blank'>REV".$set->rev."</a><td>".$set->author."</td><td width=100 align='right'>".$set->date."</tr>";
71foreach ($set->comment as $comment)
72{
73    $html .= "<tr class=kb-table-row-even><th>".$comment->type."</th><td colspan = 3>".nl2br($comment->text)."</td></tr>";
74}
75$count ++;
76}
77if (!isset($_GET['showAll'])) 
78{
79    $html .= "<tr><td colspan=3>(<a href = '?a=about&showAll=true'>show all</a>)</td></tr>";
80}
81else
82{
83    $html .= "<tr><td colspan=3>(<a href = '?a=about'>show last 5</a>)</td></tr>";
84}
85    $html .= "</table>";
86
87$html .= "<div class=block-header2>Portraits</div>";
88$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>";
89$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>";
90
91$html .= "<div class=block-header2>Kills & Real kills</div>";
92$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>";
93
94$html .= "<div class=block-header2>Kill points</div>";
95$html .= "Administrator option.<br><br>";
96$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>";
97
98$html .= "<div class=block-header2>Efficiency</div>";
99$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. ";
100$html .= "Any modules that may have been fitted, contained within the destroyed cargo or confiscated are not included within this value.<br><br>";
101$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>";
102
103$html .= "<div class=block-header2>Ship values</div>";
104$html .= "The shipclasses and average ISK value are as follows:<br><br>";
105$sql = "select scl_id
106            from kb3_ship_classes
107           where scl_class not in ( 'Drone', 'Unknown' )
108          order by scl_value";
109
110$qry = new DBQuery();
111$qry->execute($sql);
112$html .= "<table class=kb-table cellspacing=1>";
113$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>";
114while ($row = $qry->getRow())
115{
116    $shipclass = new ShipClass($row['scl_id']);
117    $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>";
118}
119$html .= "</table>";
120
121function getVictimShipValueIndicator($value)
122{
123    if ($value >= 0 && $value <= 1)
124        $color = "gray";
125    elseif ($value > 1 && $value <= 15)
126        $color = "blue";
127    elseif ($value > 15 && $value <= 25)
128        $color = "green";
129    elseif ($value > 25 && $value <= 40)
130        $color = "yellow";
131    elseif ($value > 40 && $value <= 80)
132        $color = "red";
133    elseif ($value > 80 && $value <= 250)
134        $color = "orange";
135    elseif ($value > 250 && $value <= 7000)
136        $color = "purple";
137
138    return IMG_URL . "/ships/ship-" . $color . ".gif";
139}
140
141if (config::get('ship_values'))
142{
143    $sql = 'select kbs.shp_id as id, shp.shp_name, kbs.shp_value,
144                 shp.shp_techlevel, scl.scl_class, scl.scl_points
145                 from kb3_ships_values kbs
146                 inner join kb3_ships shp on (kbs.shp_id = shp.shp_id)
147                 inner join kb3_ship_classes scl on (shp.shp_class = scl.scl_id)
148                 order by shp.shp_name asc';
149    $html .= "<br/>Custom shipvalues which override the value from shipclasses:<br><br>";
150    $qry = new DBQuery();
151    $qry->execute($sql);
152    $html .= "<table class=kb-table cellspacing=1>";
153    $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>";
154    while ($row = $qry->getRow())
155    {
156        if ($row['shp_techlevel'] == 2)
157        {
158            $row['shp_name'] = '<img src="'.IMG_URL.'/ships/32_32/t2.gif">'.$row['shp_name'];
159        }
160        $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>";
161    }
162    $html .= "</table>";
163}
164
165$page->setContent($html);
166$page->generate();
167?>
Note: See TracBrowser for help on using the browser.