@@ -8,12 +8,12 @@ |
||
8 | 8 | use ChatApp\Chat; |
9 | 9 | |
10 | 10 | $server =IoServer::factory( |
11 | - new HttpServer( |
|
12 | - new WsServer( |
|
13 | - new Chat() |
|
14 | - ) |
|
15 | - ) |
|
16 | - , |
|
17 | - 8080 |
|
18 | - ); |
|
11 | + new HttpServer( |
|
12 | + new WsServer( |
|
13 | + new Chat() |
|
14 | + ) |
|
15 | + ) |
|
16 | + , |
|
17 | + 8080 |
|
18 | + ); |
|
19 | 19 | $server->run(); |
@@ -11,26 +11,26 @@ discard block |
||
11 | 11 | $userId = Session::get('start'); |
12 | 12 | if($userId != null && $user == "account.php") |
13 | 13 | { |
14 | - $obUser = new User(); |
|
15 | - $row = $obUser->UserDetails($userId, True); |
|
14 | + $obUser = new User(); |
|
15 | + $row = $obUser->UserDetails($userId, True); |
|
16 | 16 | |
17 | - if($row != NULL) |
|
18 | - { |
|
19 | - $location = URL . "/account.php/". $row['username']; |
|
20 | - header("Location:".$location); |
|
21 | - } |
|
17 | + if($row != NULL) |
|
18 | + { |
|
19 | + $location = URL . "/account.php/". $row['username']; |
|
20 | + header("Location:".$location); |
|
21 | + } |
|
22 | 22 | } |
23 | 23 | elseif ($user != "account.php") |
24 | 24 | { |
25 | - $obUser = new User(); |
|
26 | - $row = $obUser->UserDetails($user, False); |
|
27 | - if($row != NULL): |
|
28 | - $userId = $row['login_id']; |
|
29 | - $details = Profile::getProfile($userId); |
|
30 | - if($details != NULL) |
|
31 | - $row = array_merge($row, $details); |
|
32 | - else |
|
33 | - header("Location:".URL."/error.php"); |
|
25 | + $obUser = new User(); |
|
26 | + $row = $obUser->UserDetails($user, False); |
|
27 | + if($row != NULL): |
|
28 | + $userId = $row['login_id']; |
|
29 | + $details = Profile::getProfile($userId); |
|
30 | + if($details != NULL) |
|
31 | + $row = array_merge($row, $details); |
|
32 | + else |
|
33 | + header("Location:".URL."/error.php"); |
|
34 | 34 | ?> |
35 | 35 | |
36 | 36 | <!Doctype html> |
@@ -65,18 +65,18 @@ discard block |
||
65 | 65 | <div class="brief"> |
66 | 66 | <h1 id="name">Name: <?php echo $row['name']; ?></h1><br> |
67 | 67 | <?php foreach ($row as $key => $value) { |
68 | - if($key =='username' && $value != null) |
|
69 | - echo '<p>Username: '.$row["username"] .'</p><br>'; |
|
70 | - if($key == 'email' && $value != null) |
|
71 | - echo '<p>Email Id: '.$row["email"] .'</p><br>'; |
|
72 | - if($key == 'status' && $value != null) |
|
73 | - echo '<p>Status: '.$row["status"] .'</p><br>'; |
|
74 | - if($key == 'education' && $value != null) |
|
75 | - echo '<p>Education: '.$row["education"] .'</p><br>'; |
|
76 | - if($key == 'gender' && $value != null) |
|
77 | - echo '<p>Gender: '.$row["gender"] .'</p><br>'; |
|
78 | - } |
|
79 | - ?> |
|
68 | + if($key =='username' && $value != null) |
|
69 | + echo '<p>Username: '.$row["username"] .'</p><br>'; |
|
70 | + if($key == 'email' && $value != null) |
|
71 | + echo '<p>Email Id: '.$row["email"] .'</p><br>'; |
|
72 | + if($key == 'status' && $value != null) |
|
73 | + echo '<p>Status: '.$row["status"] .'</p><br>'; |
|
74 | + if($key == 'education' && $value != null) |
|
75 | + echo '<p>Education: '.$row["education"] .'</p><br>'; |
|
76 | + if($key == 'gender' && $value != null) |
|
77 | + echo '<p>Gender: '.$row["gender"] .'</p><br>'; |
|
78 | + } |
|
79 | + ?> |
|
80 | 80 | </div> |
81 | 81 | <?php if(Session::get('start') == $row['login_id']): ?> |
82 | 82 | <div class="edit"> |
@@ -86,8 +86,8 @@ discard block |
||
86 | 86 | </div> |
87 | 87 | |
88 | 88 | <?php |
89 | - if(Session::get('start') == $row['login_id']): |
|
90 | - ?> |
|
89 | + if(Session::get('start') == $row['login_id']): |
|
90 | + ?> |
|
91 | 91 | |
92 | 92 | <div class="boxx" id="profile"> |
93 | 93 | <form method="post" action="../profile_generate.php"> |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | </form> |
103 | 103 | </div> |
104 | 104 | <?php |
105 | - endif; |
|
106 | - ?> |
|
105 | + endif; |
|
106 | + ?> |
|
107 | 107 | </div> |
108 | 108 | |
109 | 109 | <div class="footer"> |
@@ -116,13 +116,13 @@ discard block |
||
116 | 116 | </body> |
117 | 117 | </html> |
118 | 118 | <?php |
119 | - else: |
|
120 | - header("Location:".URL."/error.php"); |
|
121 | - endif; |
|
119 | + else: |
|
120 | + header("Location:".URL."/error.php"); |
|
121 | + endif; |
|
122 | 122 | } |
123 | 123 | else |
124 | 124 | { |
125 | - header("Location: ".URL); |
|
125 | + header("Location: ".URL); |
|
126 | 126 | } |
127 | 127 | ?> |
128 | 128 |