-
Notifications
You must be signed in to change notification settings - Fork 0
/
redirect.php
37 lines (32 loc) · 1.43 KB
/
redirect.php
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
<?php
require_once 'config.php';
if ($_POST['redirect'] == 'k-space' || $_POST['redirect'] == 'wormhole') {
/*
Input var (0 indexed):
0 - GH skill level
1 - Links (bool)
2 - link type
3 - director skill
4 - warfare skill
5 - Mindlink (bool)
6 - Capital ship (0 for none)
8 - ship skill level
9 - implant (0 for none)
10 - frigate skill level
*/
$inputs = array (
filter_input(INPUT_POST, 'ghSkill', FILTER_VALIDATE_INT),
($_POST['boolLinks'] == true ? 1 : 0),
filter_input(INPUT_POST, 'linkTech', FILTER_VALIDATE_INT),
filter_input(INPUT_POST, 'director', FILTER_VALIDATE_INT),
filter_input(INPUT_POST, 'warfare', FILTER_VALIDATE_INT),
($_POST['boolMindlink'] == true ? 1 : 0),
($_POST['capital'] == true ? filter_input(INPUT_POST, 'capShip', FILTER_VALIDATE_INT) : 0),
filter_input(INPUT_POST, 'capSkill', FILTER_VALIDATE_INT),
($_POST['implants'] == true ? filter_input(INPUT_POST, 'ghImplant', FILTER_VALIDATE_INT) : 0),
($_POST['boolVenture'] == true ? filter_input(INPUT_POST, 'ventureSkill', FILTER_VALIDATE_INT) : 0)
);
header("Location: ".BASE_PATH.$_POST['redirect']."/".implode($inputs,'')."/".(isset($_POST['debug'])?"debug":null));
exit;
}
header("Location: ".BASE_PATH); // default: send to index