forked from AustinWise/fleet_links
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEveBrowser.php
More file actions
76 lines (57 loc) · 1.89 KB
/
Copy pathEveBrowser.php
File metadata and controls
76 lines (57 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
require_once('IEveBrowser.php');
class EveBrowser implements IEveBrowser {
public function IsIGB() {
return (strpos($_SERVER['HTTP_USER_AGENT'], 'EVE-minibrowser/') === 0);
}
public function IsTrusted() {
return ($_SERVER['HTTP_EVE_TRUSTED'] == 'yes');
}
public function RequireTrust() {
header('eve.trustMe:http://' . $_SERVER['HTTP_HOST'] . '/::This site needs trust to function.');
}
public function RegionName() {
return EveBrowser::getHeader('HTTP_EVE_REGIONNAME');
}
public function ConstellationName() {
return EveBrowser::getHeader('HTTP_EVE_CONSTELLATIONNAME');
}
public function SolarSystemName() {
return EveBrowser::getHeader('HTTP_EVE_SOLARSYSTEMNAME');
}
public function AllianceID() {
return (int)EveBrowser::getHeader('HTTP_EVE_ALLIANCEID');
}
public function AllianceName() {
return EveBrowser::getHeader('HTTP_EVE_ALLIANCENAME');
}
public function CharacterID() {
return (int)EveBrowser::getHeader('HTTP_EVE_CHARID');
}
public function CharacterName() {
return EveBrowser::getHeader('HTTP_EVE_CHARNAME');
}
public function CorporationID() {
return (int)EveBrowser::getHeader('HTTP_EVE_CORPID');
}
public function CorporationName() {
return EveBrowser::getHeader('HTTP_EVE_CORPNAME');
}
public function StationName() {
return EveBrowser::getHeader('HTTP_EVE_STATIONNAME');
}
public function Server() {
return EveBrowser::getHeader('HTTP_EVE_SERVERIP');
}
public function CorporationRole() {
return (int)EveBrowser::getHeader('HTTP_EVE_CORPROLE');
}
public function NearestLocation() {
return EveBrowser::getHeader('HTTP_EVE_NEARESTLOCATION');
}
private function getHeader($name) {
$value = $_SERVER[$name];
return get_magic_quotes_gpc() ? stripslashes($value) : $value;
}
}
?>