echo $accountInfo['id']; ?> &access_token=<?php echo admin::getAccessToken(); ?> &act=ghost_set">On Ghost Mode</a> <?php } ?> </td> </tr> <tr> <td class="text-left">User active chats (not removed):</td> <td> <?php $active_chats = $messages->myActiveChatsCount(); echo $active_chats; ?> </td> <td> <?php if ($active_chats > 0) { ?> <a href="/admin/profile_chats.php/?id=<?php echo $accountInfo['id']; ?> " >View</a></td> <?php } ?> </tr>
$accountInfo = array(); if (isset($_GET['id'])) { $accountId = isset($_GET['id']) ? $_GET['id'] : 0; $account = new account($dbo, $accountId); $accountInfo = $account->get(); $messages = new messages($dbo); $messages->setRequestFrom($accountId); } else { header("Location: /admin/main.php"); } if ($accountInfo['error'] === true) { header("Location: /admin/main.php"); } $stats = new stats($dbo); $page_id = "chats"; $inbox_all = $messages->myActiveChatsCount(); $inbox_loaded = 0; if (!empty($_POST)) { $itemId = isset($_POST['itemId']) ? $_POST['itemId'] : ''; $loaded = isset($_POST['loaded']) ? $_POST['loaded'] : ''; $itemId = helper::clearInt($itemId); $loaded = helper::clearInt($loaded); $result = $messages->getChats($itemId); $inbox_loaded = count($result['chats']); $result['inbox_loaded'] = $inbox_loaded + $loaded; $result['inbox_all'] = $inbox_all; if ($inbox_loaded != 0) { ob_start(); foreach ($result['chats'] as $key => $value) { draw($value, $helper); }