Completed
Push — master ( c2832c...67415f )
by Ankit
02:22
created
logout.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
 {
9 9
 	Session::forget('start');
10 10
 	header('Location: index.php');
11
-}
12
-else
11
+} else
13 12
 {
14 13
 	echo "Please Login";
15 14
 }
Please login to merge, or discard this patch.
index.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
source/Validate.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 		{
19 19
 			if ($result->num_rows > 0) {
20 20
 				return 1;
21
+			} else {
22
+							return 0;
21 23
 			}
22
-			else
23
-				return 0;
24 24
 		}
25 25
 	}
26 26
 
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 		if ($result = $this->connect->query($query)) {
31 31
 			if ($result->num_rows > 0) {
32 32
 				return 1;
33
+			} else {
34
+							return 0;
33 35
 			}
34
-			else
35
-				return 0;
36 36
 		}
37 37
 	}
38 38
 }
Please login to merge, or discard this patch.
source/Session.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,15 +5,15 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
ajax/validate_login.php 2 patches
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,8 +11,9 @@
 block discarded – undo
11 11
 	$password = $loginField->password;
12 12
 	$obLogin = new Login();
13 13
 	$result = $obLogin->authLogin($login, $password);
14
-	if(isset($result))
15
-		echo $result;
16
-	else
17
-		echo json_encode([]);
18
-}
19 14
\ No newline at end of file
15
+	if(isset($result)) {
16
+			echo $result;
17
+	} else {
18
+			echo json_encode([]);
19
+	}
20
+	}
20 21
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
ajax/validate_register.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,9 +12,10 @@
 block discarded – undo
12 12
 	$password = $loginField->password;
13 13
 	$obLogin = new Login();
14 14
 	$result = $obLogin->authLogin($login, $password);
15
-	if(isset($result))
16
-		echo $result;
17
-	else
18
-		echo json_encode([]);
19
-}
15
+	if(isset($result)) {
16
+			echo $result;
17
+	} else {
18
+			echo json_encode([]);
19
+	}
20
+	}
20 21
 ?>
Please login to merge, or discard this patch.
source/Login.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@
 block discarded – undo
63 63
 				return json_encode($this->error);
64 64
 			}
65 65
 			return json_encode(["Error" => "You are not registered, ".$this->connect->error ]);
66
-		}
67
-		else
66
+		} else
68 67
 		{
69 68
 			return json_encode($this->error);
70 69
 		}
Please login to merge, or discard this patch.
source/Register.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,7 @@
 block discarded – undo
33 33
 		if(filter_var($email, FILTER_VALIDATE_EMAIL) == false)
34 34
 		{
35 35
 			$this->onError("email", " *Enter correct Email address");
36
-		}
37
-		else if($this->obValidate->validateEmailInDb($email) === 1)
36
+		} else if($this->obValidate->validateEmailInDb($email) === 1)
38 37
 		{
39 38
 			$this->onError("email", " *Email is already registered");
40 39
 		}
Please login to merge, or discard this patch.