ClientDashboard.class.php 712 B

12345678910111213141516171819202122
  1. <?php
  2. class ClientDashboard implements IDashboard {
  3. public function display($uriTree) {
  4. return $this->home();
  5. }
  6. public function home() {
  7. $database = SqliteDatabase::getSingleton();
  8. $clientId = $_SESSION['client_id'];
  9. $accounts = $database->queryArray("SELECT rowid as client_id, * FROM accounts WHERE client_id = " . $clientId . " LIMIT 1;");
  10. $currentClient = $accounts[0];
  11. $data = array();
  12. $data['currentClient'] = $currentClient;
  13. $data['currentClient']['logo'] = "ccldlogo.png";
  14. $data['defaultStylesheet'] = DOMAIN . ".css";
  15. $data['displayName'] = $_SESSION['display_name'];
  16. $data['sessionToken'] = session_id();
  17. return (new View())->render("clientdashboard.php", $data);
  18. }
  19. }