root/dev/common/about.php @ 92

Revision 92, 6.4 KB (checked in by exi, 16 years ago)

Updated about page for 1.2.
Made table bgcolor black for alliance images.
Made table bgcolor black for corp images.
The parser now reparsers dupes and deletes comments on killmail deletion.
Changed parser to output some error messages if he doesn't like the mail.
Added conversion code for those funny german mailheader.
Fixed bugs #3 and #4.
Included a fix from Coni to class.ship.php.
Removed the error for unknown solar systems, this is now covered by the parser itself.
Now ordering comments by date.
Fixed db.php:getRow to return false in case of a non valid mysql resource id.
Added the sql killmail limit for home.php.
Added default width/heigth for pictures in kill details.
The searchpage will now redirect you to your hit if it only gets one serach result.

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