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

Revision 357, 8.1 KB (checked in by ralle, 12 years ago)

-fix of swf banner parth <br/>-upd of history mod and fix of trac linking -del of old DB_USE_CCP stuff -CHG of inserts to name adressed ones

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
11$contributor = array('JaredC01',
12                     'liquidism',
13                     'Mitchman',
14                     'Coni',
15                     'FriedRoadKill',
16                     'bunjiboys',
17                     'Karbowiak',
18                     'EDG');
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 ".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/>"
26        ."All EVE graphics and data used are property of <a href=\"http://www.ccpgames.com/\">CCP</a>.<br/><br/>";
27$html .= '<a href="http://www.eve-dev.net/" target="_blank"><img src="http://www.eve-dev.net/logo.png" border="0"/></a><br/><br/>';
28
29$html .= '<b>Staff:</b><br/>';
30$html .= join(', ', $developer);
31$html .= '<br/><br/><b>Contributors:</b><br/>';
32$html .= join(', ', $contributor);
33$html .= '<br/><br/>';
34
35$qry = new DBQuery();
36$qry->execute("select count(*) as cnt from kb3_kills");
37$row = $qry->getRow();
38$kills = $row['cnt'];
39$qry->execute("select sum(itd_quantity) as cnt from kb3_items_destroyed");
40$row = $qry->getRow();
41$items = $row['cnt'];
42$qry->execute("select count(*) as cnt from kb3_pilots");
43$row = $qry->getRow();
44$pilots = $row['cnt'];
45$qry->execute("select count(*) as cnt from kb3_corps");
46$row = $qry->getRow();
47$corps = $row['cnt'];
48$qry->execute("select count(*) as cnt from kb3_alliances");
49$row = $qry->getRow();
50$alliances = $row['cnt'];
51
52// $html .= "<div class=block-header2>Killboard stats</div>";
53$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>";
54$filename  = "./mods/history/history.xml";
55$history_xml = simplexml_load_file($filename);
56
57if (!isset($_GET['showAll']))
58{
59    $html .= "<div class=block-header2>Revision History (last 5)</div>";
60}
61else
62{
63    $html .= "<div class=block-header2>Revision History (all)</div>";
64}
65$html .= "<table class=kb-table cellspacing=1 width=100%>";
66$count = 1;
67foreach ($history_xml as $set)
68{       
69if ($count > 5 && !isset($_GET['showAll']))
70    break;
71$html .= "<tr class=kb-table-row-odd><td width = 50><a href='https://svn.nsbit.dk/trac/edk/changeset/".$set->rev."' target='_blank'>REV".$set->rev."</a><td>".$set->author."</td><td width=100 align='right'>".$set->date."</tr>";
72foreach ($set->comment as $comment)
73{
74    $html .= "<tr class=kb-table-row-even><th>".$comment->type."</th><td colspan = 3>".nl2br($comment->text)."</td></tr>";
75}
76$count ++;
77}
78if (!isset($_GET['showAll'])) 
79{
80    $html .= "<tr><td colspan=3>(<a href = '?a=about&showAll=true'>show all</a>)</td></tr>";
81}
82else
83{
84    $html .= "<tr><td colspan=3>(<a href = '?a=about'>show last 5</a>)</td></tr>";
85}
86    $html .= "</table>";
87
88$html .= "<div class=block-header2>Portraits</div>";
89$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>";
90$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>";
91
92$html .= "<div class=block-header2>Kills & Real kills</div>";
93$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>";
94
95$html .= "<div class=block-header2>Kill points</div>";
96$html .= "Administrator option.<br><br>";
97$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>";
98
99$html .= "<div class=block-header2>Efficiency</div>";
100$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. ";
101$html .= "Any modules that may have been fitted, contained within the destroyed cargo or confiscated are not included within this value.<br><br>";
102$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>";
103
104$html .= "<div class=block-header2>Ship values</div>";
105$html .= "The shipclasses and average ISK value are as follows:<br><br>";
106$sql = "select scl_id
107            from kb3_ship_classes
108           where scl_class not in ( 'Drone', 'Unknown' )
109          order by scl_value";
110
111$qry = new DBQuery();
112$qry->execute($sql);
113$html .= "<table class=kb-table cellspacing=1>";
114$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>";
115while ($row = $qry->getRow())
116{
117    $shipclass = new ShipClass($row['scl_id']);
118    $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>";
119}
120$html .= "</table>";
121
122function getVictimShipValueIndicator($value)
123{
124    if ($value >= 0 && $value <= 1)
125        $color = "gray";
126    elseif ($value > 1 && $value <= 15)
127        $color = "blue";
128    elseif ($value > 15 && $value <= 25)
129        $color = "green";
130    elseif ($value > 25 && $value <= 40)
131        $color = "yellow";
132    elseif ($value > 40 && $value <= 80)
133        $color = "red";
134    elseif ($value > 80 && $value <= 250)
135        $color = "orange";
136    elseif ($value > 250)
137        $color = "purple";
138
139    return IMG_URL . "/ships/ship-" . $color . ".gif";
140}
141
142if (config::get('ship_values'))
143{
144    $sql = 'select kbs.shp_id as id, shp.shp_name, kbs.shp_value,
145                 shp.shp_techlevel, scl.scl_class, scl.scl_points
146                 from kb3_ships_values kbs
147                 inner join kb3_ships shp on (kbs.shp_id = shp.shp_id)
148                 inner join kb3_ship_classes scl on (shp.shp_class = scl.scl_id)
149                 order by shp.shp_name asc';
150    $html .= "<br/>Custom shipvalues which override the value from shipclasses:<br><br>";
151    $qry = new DBQuery();
152    $qry->execute($sql);
153    $html .= "<table class=kb-table cellspacing=1>";
154    $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>";
155    while ($row = $qry->getRow())
156    {
157        if ($row['shp_techlevel'] == 2)
158        {
159            $row['shp_name'] = '<img src="'.IMG_URL.'/items/32_32/t2.gif">'.$row['shp_name'];
160        }
161        $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>";
162    }
163    $html .= "</table>";
164}
165
166$page->setContent($html);
167$page->generate();
168?>
Note: See TracBrowser for help on using the browser.