forked from AustinWise/fleet_links
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinks.php
More file actions
81 lines (65 loc) · 2.04 KB
/
Copy pathlinks.php
File metadata and controls
81 lines (65 loc) · 2.04 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
77
78
79
80
81
<?php
require_once('app_code/EveBrowserFactory.php');
require_once('app_code/Fleet.php');
require_once('app_code/Alliance.php');
$brow = EveBowserFactory::Get();
$ogb = !$brow->IsIGB();
$notTrusted = ($brow->IsIGB() && !$brow->IsTrusted());
$trusted = ($brow->IsIGB() && $brow->IsTrusted());
if ($notTrusted)
$brow->RequireTrust();
$otherAlliances;
if ($trusted) {
$otherAlliances = Alliance::GetAlliancesOtherThanMineWithFleets($brow->AllianceID());
}
else {
$otherAlliances = Alliance::GetAlliancesOtherThanMineWithFleets(-1);
}
$otherFleets = array();
foreach ($otherAlliances as $a) {
$otherFleets[$a->Id] = $a->ActiveFleets();
}
$myFleets;
if ($trusted) {
$myFleets = Fleet::GetFleetsForAlliance($brow->AllianceId());
}
DataManager::GetInstance()->CloseConnection();
function printAllianceFleets($name, $fleets, $myFleet = TRUE) {
echo '<h2>' . $name . '</h2>';
foreach ($fleets as $f) {
echo gmdate('H:i', $f->Added);
echo ' ';
if ($myFleet) {
echo '<a href="gang:' . $f->Id . '">' . htmlspecialchars($f->Name) . '</a>';
echo ' <a href="DeleteFleet.php?id=' . $f->Id . '">[Delete]</a>';
}
else
echo htmlspecialchars($f->Name);
echo '<br />';
}
}
?>
<html>
<head>
<title>Fleet Links</title>
</head>
<body>
<h1>Fleet Links</h1>
<?php if ($ogb) {
echo '<h2><font color="red">This page is designed to be viewed in the EVE in-game browser.</font></h2>';
}
elseif ($notTrusted) {
echo '<h2><font color="red">You must add this site to your trusted site list. <a href="MakeTrusted.html">Instructions here.</a></font></h2>';
}
elseif ($trusted) {
echo '<a href="AddFleet.php">Add a fleet</a><br>';
printAllianceFleets(htmlspecialchars($brow->AllianceName()), $myFleets);
}
foreach ($otherAlliances as $a) {
printAllianceFleets(htmlspecialchars($a->Name), $otherFleets[$a->Id], FALSE);
}
?>
<hr>
<small>Feel free contact <a href="showinfo:1376//1164427832">WoogyDude</a> in game or via <a href="http://www.goonfleet.com/member.php?u=22552">GoonFleet private message</a> if you have any questions or comments.</small>
</body>
</html>