@@ -65,20 +65,20 @@ |
||
| 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>'; |
|
| 68 | + if ($key == 'username' && $value != null) { |
|
| 69 | + echo '<p>Username: '.$row["username"].'</p><br>'; |
|
| 70 | 70 | } |
| 71 | 71 | if ($key == 'email' && $value != null) { |
| 72 | - echo '<p>Email Id: '.$row["email"] .'</p><br>'; |
|
| 72 | + echo '<p>Email Id: '.$row["email"].'</p><br>'; |
|
| 73 | 73 | } |
| 74 | 74 | if ($key == 'status' && $value != null) { |
| 75 | - echo '<p>Status: '.$row["status"] .'</p><br>'; |
|
| 75 | + echo '<p>Status: '.$row["status"].'</p><br>'; |
|
| 76 | 76 | } |
| 77 | 77 | if ($key == 'education' && $value != null) { |
| 78 | - echo '<p>Education: '.$row["education"] .'</p><br>'; |
|
| 78 | + echo '<p>Education: '.$row["education"].'</p><br>'; |
|
| 79 | 79 | } |
| 80 | 80 | if ($key == 'gender' && $value != null) { |
| 81 | - echo '<p>Gender: '.$row["gender"] .'</p><br>'; |
|
| 81 | + echo '<p>Gender: '.$row["gender"].'</p><br>'; |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | ?> |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | if ($result->num_rows > 0) { |
| 77 | 77 | while ($row = $result->fetch_assoc()) { |
| 78 | 78 | $row['time'] = $this->obTime->timeConversion($row['time']); |
| 79 | - $row = array_merge($row,['start' => $userId]); |
|
| 79 | + $row = array_merge($row, ['start' => $userId]); |
|
| 80 | 80 | $this->array = array_merge($this->array, [$row]); |
| 81 | 81 | } |
| 82 | 82 | |
@@ -58,12 +58,12 @@ |
||
| 58 | 58 | $this->onError("passLogin", " *Invalid password"); |
| 59 | 59 | return json_encode($this->error); |
| 60 | 60 | } |
| 61 | - return json_encode(["Error" => "You are not registered, ".$this->connect->error ]); |
|
| 61 | + return json_encode(["Error" => "You are not registered, ".$this->connect->error]); |
|
| 62 | 62 | } |
| 63 | 63 | $this->onError("login", " *Invalid username or email"); |
| 64 | 64 | return json_encode($this->error); |
| 65 | 65 | } |
| 66 | - return json_encode(["Error" => "You are not registered, ".$this->connect->error ]); |
|
| 66 | + return json_encode(["Error" => "You are not registered, ".$this->connect->error]); |
|
| 67 | 67 | } else { |
| 68 | 68 | return json_encode($this->error); |
| 69 | 69 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $msg = json_encode($msg); |
| 37 | 37 | $this->messages = json_decode($this->conversation->conversationLoad($msg, $para)); |
| 38 | 38 | // $id1 = json_decode($msg)->details; |
| 39 | - for ($i=1 ; $i < count($this->messages); $i++) { |
|
| 39 | + for ($i = 1; $i < count($this->messages); $i++) { |
|
| 40 | 40 | $this->messages[$i]->start = $id1; |
| 41 | 41 | } |
| 42 | 42 | $id2 = bin2hex(convert_uuencode($id2)); |
@@ -16,14 +16,14 @@ |
||
| 16 | 16 | public function timeConversion($time) |
| 17 | 17 | { |
| 18 | 18 | |
| 19 | - if (substr($time,4,11) == date("d M Y", time() + 16200)) { |
|
| 20 | - $time = substr($time,16,5); |
|
| 21 | - } else if (substr($time,7,8) == date("M Y", time() + 16200) && substr($time, 4,2) - date("d") < 7) { |
|
| 22 | - $time = substr($time,0,3); |
|
| 23 | - } else if (substr($time,11,4) == date("Y", time() + 16200)) { |
|
| 24 | - $time = substr($time,4,6); |
|
| 19 | + if (substr($time, 4, 11) == date("d M Y", time() + 16200)) { |
|
| 20 | + $time = substr($time, 16, 5); |
|
| 21 | + } else if (substr($time, 7, 8) == date("M Y", time() + 16200) && substr($time, 4, 2) - date("d") < 7) { |
|
| 22 | + $time = substr($time, 0, 3); |
|
| 23 | + } else if (substr($time, 11, 4) == date("Y", time() + 16200)) { |
|
| 24 | + $time = substr($time, 4, 6); |
|
| 25 | 25 | } else { |
| 26 | - $time = substr($time,4,11); |
|
| 26 | + $time = substr($time, 4, 11); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | return $time; |
@@ -9,11 +9,11 @@ |
||
| 9 | 9 | |
| 10 | 10 | $server = IoServer::factory( |
| 11 | 11 | new HttpServer( |
| 12 | - new WsServer( |
|
| 13 | - new Chat() |
|
| 14 | - ) |
|
| 15 | - ) |
|
| 16 | - , |
|
| 17 | - 8080 |
|
| 18 | - ); |
|
| 12 | + new WsServer( |
|
| 13 | + new Chat() |
|
| 14 | + ) |
|
| 15 | + ) |
|
| 16 | + , |
|
| 17 | + 8080 |
|
| 18 | + ); |
|
| 19 | 19 | $server->run(); |