root/dev/common/about.php @ 206

Revision 206, 7.2 KB (checked in by ralle030583, 15 years ago)

-bugfix in Known Member mod corp detail
-deleted includes(db.php/class.page.php/class.killboard.php) which arent needed anymore everywhere cause of the include in the common/index.php

Line 
1<?php
2require_once('common/includes/class.ship.php');
3require_once('common/includes/globals.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 ".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 <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/>"
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/e107_images/evedev_button.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
55$html .= "<div class=block-header2>Portraits</div>";
56$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>";
57$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>";
58
59$html .= "<div class=block-header2>Kills & Real kills</div>";
60$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>";
61
62$html .= "<div class=block-header2>Kill points</div>";
63$html .= "Administrator option.<br><br>";
64$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>";
65
66$html .= "<div class=block-header2>Efficiency</div>";
67$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. ";
68$html .= "Any modules that may have been fitted, contained within the destroyed cargo or confiscated are not included within this value.<br><br>";
69$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>";
70
71$html .= "<div class=block-header2>Ship values</div>";
72$html .= "The shipclasses and average ISK value are as follows:<br><br>";
73$sql = "select scl_id
74            from kb3_ship_classes
75           where scl_class not in ( 'Drone', 'Unknown' )
76          order by scl_value";
77
78$qry = new DBQuery();
79$qry->execute($sql);
80$html .= "<table class=kb-table cellspacing=1>";
81$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>";
82while ($row = $qry->getRow())
83{
84    $shipclass = new ShipClass($row['scl_id']);
85    $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>";
86}
87$html .= "</table>";
88
89function getVictimShipValueIndicator($value)
90{
91    if ($value >= 0 && $value <= 1)
92        $color = "gray";
93    elseif ($value > 1 && $value <= 15)
94        $color = "blue";
95    elseif ($value > 15 && $value <= 25)
96        $color = "green";
97    elseif ($value > 25 && $value <= 40)
98        $color = "yellow";
99    elseif ($value > 40 && $value <= 80)
100        $color = "red";
101    elseif ($value > 80 && $value <= 250)
102        $color = "orange";
103    elseif ($value > 250 && $value <= 7000)
104        $color = "purple";
105
106    return IMG_URL . "/ships/ship-" . $color . ".gif";
107}
108
109if (config::get('ship_values'))
110{
111    $sql = 'select kbs.shp_id as id, shp.shp_name, kbs.shp_value,
112                 shp.shp_techlevel, scl.scl_class, scl.scl_points
113                 from kb3_ships_values kbs
114                 inner join kb3_ships shp on (kbs.shp_id = shp.shp_id)
115                 inner join kb3_ship_classes scl on (shp.shp_class = scl.scl_id)
116                 order by shp.shp_name asc';
117    $html .= "<br/>Custom shipvalues which override the value from shipclasses:<br><br>";
118    $qry = new DBQuery();
119    $qry->execute($sql);
120    $html .= "<table class=kb-table cellspacing=1>";
121    $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>";
122    while ($row = $qry->getRow())
123    {
124        if ($row['shp_techlevel'] == 2)
125        {
126            $row['shp_name'] = '<img src="'.IMG_URL.'/ships/32_32/t2.gif">'.$row['shp_name'];
127        }
128        $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>";
129    }
130    $html .= "</table>";
131}
132
133$page->setContent($html);
134$page->generate();
135?>
Note: See TracBrowser for help on using the browser.