forked from AustinWise/fleet_links
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtilities.php
More file actions
35 lines (30 loc) · 906 Bytes
/
Copy pathUtilities.php
File metadata and controls
35 lines (30 loc) · 906 Bytes
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
<?php
date_default_timezone_set('UTC');
// returns a point in the middle of the last downtime.
// since the sever now starts up faster, it's not too far into downtime.
function LastDowntimeMidpoint() {
$now = time();
$midDowntime = gmmktime(11, 5, 0);
if (($midDowntime - $now) > 0) {
$datePieces = getdate($now);
return gmmktime(11, 5, 0, gmdate("n"), gmdate("j") - 1, gmdate("Y"));
}
else {
return $midDowntime;
}
}
function RedirectResponse($path) {
// header('Location:http://' . GetServer('HTTP_HOST') . '/' . $path);
header('Location:' . $path);
die(302);
}
function GetGet($name) {
return get_magic_quotes_gpc() ? stripslashes($_GET[$name]) : $_GET[$name];
}
function GetPost($name) {
return get_magic_quotes_gpc() ? stripslashes($_POST[$name]) : $_POST[$name];
}
function GetServer($name) {
return get_magic_quotes_gpc() ? stripslashes($_SERVER[$name]) : $_SERVER[$name];
}
?>