forked from AustinWise/fleet_links
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeleteFleet.php
More file actions
57 lines (45 loc) · 1.56 KB
/
Copy pathDeleteFleet.php
File metadata and controls
57 lines (45 loc) · 1.56 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
<?php
require_once('app_code/EveBrowserFactory.php');
require_once('app_code/Utilities.php');
require_once('app_code/Fleet.php');
require_once('app_code/DataManager.php');
$brow = EveBowserFactory::Get();
if (!($brow->IsIGB() && $brow->IsTrusted()))
RedirectResponse('links.php');
if (!isset($_GET['id']))
RedirectResponse('links.php');
$id = (GetGet('id'));
$f;
try {
$f = Fleet::Get($id);
}
catch (Exception $ex) {
RedirectResponse('links.php');
}
// you are only allowed to delete your own alliances fleet.
if ($f->AllianceId != $brow->AllianceId())
RedirectResponse('links.php');
// delete the fleet if the button was pressed.
if (isset($_POST['btnDelete'])) {
$f->Delete();
RedirectResponse('links.php');
}
DataManager::GetInstance()->CloseConnection();
?>
<html>
<head>
<title>Fleet Links - Delete Fleet</title>
</head>
<body>
<h1><a href="index.php">Fleet Links</a></h1>
<h2>Delete Fleet</h2>
<form action="DeleteFleet.php?id=<?php echo $id; ?>" method="post">
Name: <?php echo htmlspecialchars($f->Name); ?><br>
Alliance: <?php echo htmlspecialchars($brow->AllianceName()); ?><br>
<font color="red">WARNING: Don't be a dick and delete someone's fleet without confirming that it's dead.</font><br>
<input type="submit" id="btnDelete" name="btnDelete" value="Delete">
</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>