@@ -8,15 +8,15 @@ |
||
8 | 8 | |
9 | 9 | function URL() |
10 | 10 | { |
11 | - $http = "http://"; |
|
12 | - @$host = $_SERVER['SERVER_NAME']; |
|
13 | - @$port = $_SERVER['SERVER_PORT']; |
|
14 | - $fol = ""; |
|
15 | - if(@$_SERVER['SERVER_ADDR']!=NULL) |
|
16 | - { |
|
17 | - $fol = "/".explode('/', $_SERVER['PHP_SELF'])[1]; |
|
18 | - } |
|
19 | - $url = $http.$host.":".$port.$fol; |
|
20 | - return $url; |
|
11 | + $http = "http://"; |
|
12 | + @$host = $_SERVER['SERVER_NAME']; |
|
13 | + @$port = $_SERVER['SERVER_PORT']; |
|
14 | + $fol = ""; |
|
15 | + if(@$_SERVER['SERVER_ADDR']!=NULL) |
|
16 | + { |
|
17 | + $fol = "/".explode('/', $_SERVER['PHP_SELF'])[1]; |
|
18 | + } |
|
19 | + $url = $http.$host.":".$port.$fol; |
|
20 | + return $url; |
|
21 | 21 | } |
22 | 22 | ?> |
@@ -2,7 +2,7 @@ |
||
2 | 2 | session_start(); |
3 | 3 | if(isset($_SESSION['start'])) |
4 | 4 | { |
5 | - header("Location: account.php"); |
|
5 | + header("Location: account.php"); |
|
6 | 6 | } |
7 | 7 | ?> |
8 | 8 | <!Doctype html> |
@@ -5,15 +5,15 @@ |
||
5 | 5 | |
6 | 6 | class Session{ |
7 | 7 | |
8 | - public static function put($key, $value){ |
|
9 | - $_SESSION[$key] = $value; |
|
10 | - } |
|
8 | + public static function put($key, $value){ |
|
9 | + $_SESSION[$key] = $value; |
|
10 | + } |
|
11 | 11 | |
12 | - public static function get($key){ |
|
13 | - return (isset($_SESSION[$key]) ? $_SESSION[$key] : null); |
|
14 | - } |
|
12 | + public static function get($key){ |
|
13 | + return (isset($_SESSION[$key]) ? $_SESSION[$key] : null); |
|
14 | + } |
|
15 | 15 | |
16 | - public static function forget($key){ |
|
17 | - unset($_SESSION[$key]); |
|
18 | - } |
|
16 | + public static function forget($key){ |
|
17 | + unset($_SESSION[$key]); |
|
18 | + } |
|
19 | 19 | } |
@@ -10,10 +10,10 @@ |
||
10 | 10 | $login = $loginField->login; |
11 | 11 | $password = $loginField->password; |
12 | 12 | $obLogin = new Login(); |
13 | - $data = array( |
|
14 | - 'login' => $login, |
|
15 | - 'passLogin' => $password |
|
16 | - ); |
|
13 | + $data = array( |
|
14 | + 'login' => $login, |
|
15 | + 'passLogin' => $password |
|
16 | + ); |
|
17 | 17 | $result = $obLogin->authLogin($data); |
18 | 18 | if(isset($result)) |
19 | 19 | echo $result; |