123456789101112131415161718192021222324 |
- <?php
- class ClientDashboard implements IDashboard {
- public function display($uriTree) {
- return $this->home();
- }
- public function home() {
- $database = SqliteDatabase::getSingleton();
- $accounts = $database->queryArray("SELECT * FROM accounts WHERE subdomain = '" . DOMAIN . "' LIMIT 1;");
- $currentAccount = $accounts[0];
-
- $data = array();
- $data['displayName'] = $_SESSION['display_name'];
- $data['clientDisplayName'] = $currentAccount['display_name'];
- $data['sessionToken'] = "uniquetoken";
- $stylesheet = "default.css";
- if(isset($currentAccount['stylesheet'])) {
- $stylesheet = $currentAccount['stylesheet'];
- }
- $data['stylesheet'] = $stylesheet;
-
- return (new View())->render("clientdashboard.php", $data);
- }
- }
|