forked from mdziekon/UniEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfleetretreat.php
More file actions
49 lines (41 loc) · 1.02 KB
/
Copy pathfleetretreat.php
File metadata and controls
49 lines (41 loc) · 1.02 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
<?php
define('INSIDE', true);
$_EnginePath = './';
include($_EnginePath.'common.php');
loggedCheck();
includeLang('fleet');
$SetColor = 1;
$SetMsg = 1;
$FleetID = (isset($_POST['fleetid']) ? floor(floatval($_POST['fleetid'])) : 0);
if($FleetID > 0)
{
include($_EnginePath.'includes/functions/FleetControl_Retreat.php');
$Result = FleetControl_Retreat("`fleet_id` = {$FleetID} AND `fleet_owner` = {$_User['id']}");
if($Result['Rows'] != 0)
{
if($Result['Errors'][$FleetID] == 1)
{
$SetMsg = 4;
}
else if($Result['Errors'][$FleetID] == 2)
{
$SetMsg = 1;
}
else
{
if($Result['Types'][$FleetID] == 1)
{
$SetMsg = 2;
$SetColor = 2;
}
else if($Result['Types'][$FleetID] == 2)
{
$SetMsg = 3;
$SetColor = 2;
}
}
}
}
header("Location: fleet.php?ret=1&m={$SetMsg}&c={$SetColor}");
safeDie();
?>