index.php 728 B

12345678910111213141516171819202122
  1. <?php
  2. require_once("../../config.php");
  3. $database = SqliteDatabase::getSingleton();
  4. $validAccounts = $database->queryArray("SELECT rowid AS client_id, subdomain FROM accounts;");
  5. $clientId = 0;
  6. foreach($validAccounts as $account) {
  7. if($account['subdomain'] == DOMAIN) {
  8. $clientId = $account['client_id'];
  9. break;
  10. }
  11. }
  12. if($clientId == 0) {
  13. header("Location: http://ccldtech.com");
  14. }
  15. $currentAccount = $database->queryArray("SELECT rowid AS client_id, * FROM accounts WHERE client_id = ".$clientId." LIMIT 1;")[0];
  16. $data = array();
  17. $data['currentClient'] = $currentAccount;
  18. $data['defaultStylesheet'] = DOMAIN . ".css";
  19. $data['currentClient']['logo'] = "ccldlogo.png";
  20. echo (new View())->render("forgot.php", $data);