public function userToggleSmsNotifyAction() { $model = new CompanyModel(); $data = $model->userToggleSmsNotify()->getData(); Application::setContentType('json'); echo json_encode($data); }
public function checkDomain($spec_params) { $domain = $spec_params['company_domain']; $mCompaniesManager = new CompaniesManager($this->db); $this->company = $mCompaniesManager->getCompanyByDomain($domain); if ($this->company->isEmpty()) { $controller404 = new Controller(); $controller404->indexAction(); Application::stop(); } }
public function userToggleSmsNotify() { $check_auth = new CheckAuthorization($this->getQemyDb()); $check_auth->check(true); $user = new User($this->getQemyDb(), $check_auth->getUserRow()); $user->setAuthChecker($check_auth); if (!$user->isAuth()) { Application::denied(); $this->setData(array('result' => false)); return $this; } $this->setData(array('result' => $user->toggleSmsEnabled())); return $this; }
<?php error_reporting(E_ALL); ini_set("display_errors", 1); define('Q_PATH', dirname(__FILE__)); require_once Q_PATH . '/application/config/autoload/global.php'; \Autoloader\Autoload::init(); \Qemy\Core\Application::init(require Q_PATH . '/application/config/application.config.php')->run();