12345678910111213141516171819202122 |
- <?php
- class ClientDashboard implements IDashboard {
- public function display($uriTree) {
- return $this->home();
- }
- public function home() {
- $database = SqliteDatabase::getSingleton();
- $clientId = $_SESSION['client_id'];
- $accounts = $database->queryArray("SELECT rowid as client_id, * FROM accounts WHERE client_id = " . $clientId . " LIMIT 1;");
- $currentClient = $accounts[0];
-
- $data = array();
- $data['currentClient'] = $currentClient;
- $data['currentClient']['logo'] = "ccldlogo.png";
- $data['defaultStylesheet'] = DOMAIN . ".css";
- $data['displayName'] = $_SESSION['display_name'];
- $data['sessionToken'] = session_id();
-
- return (new View())->render("clientdashboard.php", $data);
- }
- }
|