forked from AustinWise/fleet_links
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddFleet.php
More file actions
60 lines (51 loc) · 1.89 KB
/
Copy pathAddFleet.php
File metadata and controls
60 lines (51 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
<?php
require_once('app_code/EveBrowserFactory.php');
require_once('app_code/Utilities.php');
require_once('app_code/Fleet.php');
require_once('app_code/Alliance.php');
require_once('app_code/DataManager.php');
$brow = EveBowserFactory::Get();
if (!($brow->IsIGB() && $brow->IsTrusted()))
RedirectResponse('links.php');
if (isset($_POST['fleetLink']) && isset($_POST['name'])){
$matches;
if (preg_match('/gang:(?<id>\d+)/', GetPost('fleetLink'), $matches)) {
$a = Alliance::EnsureAlliance($brow->AllianceId(), $brow->AllianceName());
$f = new Fleet();
$f->Id = $matches['id'];
$f->AllianceId = $a->Id;
$f->Name = GetPost('name');
$f->Added = time();
if ($f->Validate()) {
$f->Save();
// this seems like a good place to delete old fleets
Fleet::DeleteOldFleets();
DataManager::GetInstance()->CloseConnection();
RedirectResponse('links.php');
}
}
}
?>
<html>
<head>
<title>Fleet Links - Add Fleet</title>
</head>
<body>
<h1><a href="index.php">Fleet Links</a></h1>
<h2>Add Fleet</h2>
<form action="AddFleet.php" method="post">
Fleet alliance: <?php echo htmlspecialchars($brow->AllianceName()); ?><br>
After setting your fleet to be self-invite for alliance, post the fleet invite to
a channel. (<a href="PostInvite.jpg">screen shot</a>)<br>
Right click the "Fleet Invitation (Alliance)" link and select copy.
(<a href="CopyInvite.jpg">screen shot</a>)<br>
Right click on this text box and select Paste:
<input type="text" name="fleetLink" id="fleetLink"><br>
The name of your fleet:
<input type="text" maxlength="50" id="name" name="name"><br>
<input type="submit" name="btnAdd" value="Add">
</form>
<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>