@@ -5,6 +5,9 @@ |
||
5 | 5 | |
6 | 6 | class Session{ |
7 | 7 | |
8 | + /** |
|
9 | + * @param string $key |
|
10 | + */ |
|
8 | 11 | public static function put($key, $value){ |
9 | 12 | $_SESSION[$key] = $value; |
10 | 13 | } |
@@ -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 | } |
@@ -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> |
@@ -71,6 +71,9 @@ |
||
71 | 71 | $this->connect->close(); |
72 | 72 | } |
73 | 73 | |
74 | + /** |
|
75 | + * @param string $value |
|
76 | + */ |
|
74 | 77 | public function onError($key, $value) |
75 | 78 | { |
76 | 79 | $this->flag = 1; |
@@ -79,6 +79,9 @@ |
||
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
82 | + /** |
|
83 | + * @param string $value |
|
84 | + */ |
|
82 | 85 | public function onError($key, $value) |
83 | 86 | { |
84 | 87 | $this->flag = 1; |
@@ -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; |