@@ -19,19 +19,19 @@ discard block |
||
| 19 | 19 | $location = URL . "/account.php/". $row['username']; |
| 20 | 20 | header("Location:".$location); |
| 21 | 21 | } |
| 22 | -} |
|
| 23 | -elseif ($user != "account.php") |
|
| 22 | +} elseif ($user != "account.php") |
|
| 24 | 23 | { |
| 25 | 24 | $obUser = new User(); |
| 26 | 25 | $row = $obUser->UserDetails($user, False); |
| 27 | 26 | if($row != NULL): |
| 28 | 27 | $userId = $row['login_id']; |
| 29 | 28 | $details = Profile::getProfile($userId); |
| 30 | - if($details != NULL) |
|
| 31 | - $row = array_merge($row, $details); |
|
| 32 | - else |
|
| 33 | - header("Location:".URL."/error.php"); |
|
| 34 | -?> |
|
| 29 | + if($details != NULL) { |
|
| 30 | + $row = array_merge($row, $details); |
|
| 31 | + } else { |
|
| 32 | + header("Location:".URL."/error.php"); |
|
| 33 | + } |
|
| 34 | + ?> |
|
| 35 | 35 | |
| 36 | 36 | <!Doctype html> |
| 37 | 37 | <html> |
@@ -48,10 +48,13 @@ discard block |
||
| 48 | 48 | <?php if(Session::get('start') != null): ?> |
| 49 | 49 | <li><a href="../message.php">Message</a></li> |
| 50 | 50 | <li><a href="../logout.php">Log out</a></li> |
| 51 | - <?php else: ?> |
|
| 51 | + <?php else { |
|
| 52 | + : ?> |
|
| 52 | 53 | <li><a href="../login.php">Login</a></li> |
| 53 | 54 | <li><a href="../register.php">Register</a></li> |
| 54 | - <?php endif; ?> |
|
| 55 | + <?php endif; |
|
| 56 | +} |
|
| 57 | +?> |
|
| 55 | 58 | </ul> |
| 56 | 59 | </div> |
| 57 | 60 | |
@@ -65,16 +68,21 @@ discard block |
||
| 65 | 68 | <div class="brief"> |
| 66 | 69 | <h1 id="name">Name: <?php echo $row['name']; ?></h1><br> |
| 67 | 70 | <?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>'; |
|
| 71 | + if($key =='username' && $value != null) { |
|
| 72 | + echo '<p>Username: '.$row["username"] .'</p><br>'; |
|
| 73 | + } |
|
| 74 | + if($key == 'email' && $value != null) { |
|
| 75 | + echo '<p>Email Id: '.$row["email"] .'</p><br>'; |
|
| 76 | + } |
|
| 77 | + if($key == 'status' && $value != null) { |
|
| 78 | + echo '<p>Status: '.$row["status"] .'</p><br>'; |
|
| 79 | + } |
|
| 80 | + if($key == 'education' && $value != null) { |
|
| 81 | + echo '<p>Education: '.$row["education"] .'</p><br>'; |
|
| 82 | + } |
|
| 83 | + if($key == 'gender' && $value != null) { |
|
| 84 | + echo '<p>Gender: '.$row["gender"] .'</p><br>'; |
|
| 85 | + } |
|
| 78 | 86 | } |
| 79 | 87 | ?> |
| 80 | 88 | </div> |
@@ -116,11 +124,12 @@ discard block |
||
| 116 | 124 | </body> |
| 117 | 125 | </html> |
| 118 | 126 | <?php |
| 119 | - else: |
|
| 127 | + else { |
|
| 128 | + : |
|
| 120 | 129 | header("Location:".URL."/error.php"); |
| 130 | + } |
|
| 121 | 131 | endif; |
| 122 | -} |
|
| 123 | -else |
|
| 132 | +} else |
|
| 124 | 133 | { |
| 125 | 134 | header("Location: ".URL); |
| 126 | 135 | } |