/** * Return the contents of the session in array form. */ public function contents() { return Session::getAll(); }
print ' </ul>' . PHP_EOL; } else { print ' <a href="/user/login" class="btn btn-default">Log In <span class="pull-right ' . B_ICON . ' ' . B_ICON . '-log-in"></span></a>' . PHP_EOL; if (!$page->parent->config->config['core']['maintenance']) { print ' <a href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown">' . PHP_EOL; print ' <span class="caret"></span>' . PHP_EOL; print ' <span class="sr-only">Toggle Dropdown</span>' . PHP_EOL; print ' </a>' . PHP_EOL; print ' <ul class="dropdown-menu" role="menu">' . PHP_EOL; print ' <li><a href="/user/recover" class="btn btn-default">Forgot Details?</a></li>' . PHP_EOL; print ' <li><a href="/user/register">Registration</a></li>' . PHP_EOL; print ' </ul>' . PHP_EOL; } } } ?> </div> </div> </div> <div id="alert_working" class="hidden"> <?php $working = $page->getPlugin('alert'); $working->setAlert('Processing...', B_T_INFO, 'working', false); print $working->getAlert(); ?> </div> <?php foreach (Session::getAll('status_msg') as $id => $message) { print $message . PHP_EOL; Session::del('status_msg', $id); }
} else { ?> <input type="hidden" name="action" value="close_all_sessions"> <br> <button type="submit">Close other sessions</button> <?php } ?> </form> <table class="table"> <tr> <th>SessionID</th> <th>UserName</th> <th>Created</th> <th>IP</th> </tr> <?php foreach (Session::getAll() as $session) { echo "<tr>"; echo "<td>{$session->getSessionId()}</td>"; echo "<td>{$session->getUser()->getName()}</td>"; echo "<td>" . date('r', $session->getCreated()) . "</td>"; echo "<td>{$session->getIp()}</td>"; echo "</tr>"; } ?> </table> </div>