public function __construct() { parent::__construct(CLIENT, OWNER, BROKER, ADMIN); $this->load->helper('general'); $this->load->helper('url'); checkAdminAuth(); $this->load->library('pagination'); $this->load->helper('security'); $this->load->model('UserModel'); }
public function __construct() { parent::__construct(); $this->load->helper('general'); checkAdminAuth(); $this->load->library('form_validation'); $this->load->library('pagination'); $this->form_validation->set_error_delimiters('<div class="red">', '</div>'); $this->load->helper(array('form', 'url')); $this->load->helper('path'); }
public function __construct() { parent::__construct(); checkAdminAuth(); // Your own constructor code $this->load->library('form_validation'); $this->load->library('pagination'); $this->form_validation->set_error_delimiters('<div class="red">', '</div>'); $this->load->helper(array('form', 'url')); $this->load->helper('path'); $this->allowed = $this->Auth_master_model->getAuth(); }
public function __construct() { parent::__construct(ADMIN, BROKER); $this->load->helper('general'); $this->load->helper('url'); checkAdminAuth(); $this->load->library('pagination'); $this->load->model('AuthModel'); $this->load->helper('security'); $this->load->model('ProspectModel'); $this->load->helper(array('form', 'url', 'captcha')); }
public function __construct() { parent::__construct(CLIENT, BROKER); $this->load->library('form_validation'); $this->load->library('pagination'); $this->load->helper(array('form', 'url')); $this->load->helper('path'); $this->load->helper('general'); $this->load->model('CartModel'); checkAdminAuth(); $this->load->helper('security'); $this->load->library('cart'); }
public function __construct() { parent::__construct(); $this->load->helper('general'); checkAdminAuth(); $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<div class="red">', '</div>'); $this->load->helper(array('form', 'url')); $this->load->helper('path'); $this->load->model('AuthModel'); $this->load->model('EmailerModel'); $this->load->model('EmailModel'); $this->load->model('AffiliateModel'); $this->allowed = $this->AuthModel->getRoleAuth(); $this->load->model('RecurringModel'); }
public function __construct() { parent::__construct(CLIENT, BROKER); $this->load->helper('general'); checkAdminAuth(); $this->load->library('form_validation'); $this->load->library('pagination'); $this->load->library('cart'); $this->form_validation->set_error_delimiters('<div class="red">', '</div>'); $this->load->helper(array('form', 'url')); $this->load->helper('path'); $this->load->model('PaymentModel'); $this->load->model('MembershipModel'); $this->load->model('SettingsModel'); $this->load->model('CampaignModel'); }
public function __construct() { parent::__construct(CLIENT, BROKER, OWNER, ADMIN); $this->load->helper('general'); $this->load->helper('url'); $this->load->library('parser'); checkAdminAuth(); $this->load->library('form_validation'); $this->load->library('pagination'); $this->form_validation->set_error_delimiters('<div class="red">', '</div>'); $this->load->model('AuthModel'); $this->load->helper('security'); $this->load->model('RoleModel'); $this->load->model('EmailModel'); $this->load->helper(array('form', 'url', 'captcha', 'text')); }
public function __construct() { parent::__construct(CLIENT, OWNER, BROKER, ADMIN, SUPER_ADMIN); $this->load->helper('general'); checkAdminAuth(); $this->load->library('form_validation'); $this->load->library('pagination'); $this->load->helper(array('form', 'url')); $this->load->helper('path'); $this->load->model('AuthModel'); $this->load->model('AffiliateModel'); $this->load->model('LineOwnerModel'); $this->load->model('LineModel'); $this->load->model('RoleModel'); $this->load->model('EmailModel'); $this->load->model('TaskModel'); }
public function __construct() { parent::__construct(); // Your own constructor code $this->load->library('form_validation'); $this->load->library('pagination'); $this->form_validation->set_error_delimiters('<div class="red">', '</div>'); $this->load->helper(array('form', 'url')); $this->load->helper('path'); $this->load->helper('general'); $this->load->helper('security'); checkAdminAuth(); $this->load->model('AuthModel'); $this->load->model('CreditCardModel'); $this->load->model('LineModel'); //$this->load->model('user_auth_model'); $this->allowed = $this->AuthModel->getAuth(); }
public function __construct() { parent::__construct(CLIENT, OWNER, BROKER, ADMIN); $this->load->helper('general'); $this->load->helper('url'); checkAdminAuth(); $this->load->library('pagination'); $this->load->model('AuthModel'); $this->load->helper('security'); $this->load->model('RoleModel'); $this->load->model('MembershipModel'); $this->load->model('CampaignModel'); $this->load->model('CardTypeModel'); $this->load->model('EmailModel'); $this->load->model('ProspectModel'); $this->load->model('UserModel'); $this->load->model('LineModel'); $this->load->model('CreditStatusModel'); $this->load->helper(array('form', 'url', 'captcha')); }
function profileProcess($userId, $type = '') { $this->load->helper('general'); $this->load->helper('url'); checkAdminAuth(); $this->load->library('pagination'); $this->load->model('AuthModel'); $this->load->helper('security'); $this->load->model('RoleModel'); $this->load->model('MembershipModel'); $this->load->model('CampaignModel'); $this->load->model('CardTypeModel'); $this->load->model('EmailerModel'); $this->load->model('EmailModel'); $this->load->model('ProspectModel'); $this->load->model('UserModel'); $this->load->model('LineModel'); $this->load->helper(array('form', 'url', 'captcha')); $this->allow(true, BROKER, ADMIN, OWNER); if ($type) { $data['protype'] = $type; } $this->session->set_flashdata('redirectToCurrent', current_url()); $data['user'] = $this->UserModel->getUser($userId); $data['employ'] = $this->UserModel->getEmployement($userId); $data['application'] = $this->UserModel->getCreditApplication($userId); $data['roles'] = $this->getRoles(); $data['clientMembership'] = $this->MembershipModel->getMembership($userId, CLIENT, SELECTXKEYS); $data['userMembership'] = $this->MembershipModel->getMembershipLevelById($userId); $data['ownerMembership'] = $this->MembershipModel->getMembership($userId, OWNER, SELECTXKEYS); $data['brokerMembership'] = $this->MembershipModel->getMembership($userId, BROKER, SELECTXKEYS); $data['clientMemberships'] = $this->MembershipModel->getMembershipTypes(CLIENT, SELECTX); $data['ownerMemberships'] = $this->MembershipModel->getMembershipTypes(OWNER, SELECTX); $data['brokerMemberships'] = $this->MembershipModel->getMembershipTypes(BROKER, SELECTX); $data['userCoupons'] = $this->CampaignModel->getUserCampaigns($userId, SELECTXKEYS); $data['coupons'] = $this->CampaignModel->getCampaigns(SELECTX); // $coupons = $data['coupons']; $data['coupons_details'] = $this->CampaignModel->getCouponsDetails($userId); $data['brokers'] = $this->UserModel->getBrokersEditable(); $data['questions'] = $this->UserModel->getQuestionsEditable(); $data['state'] = $this->UserModel->getStatesEditable(); $data['business'] = $this->UserModel->getBusiness($userId); $data['title'] = "Update User"; $data['offset'] = $userId; $data['role'] = $this->roleName; $data['notes'] = $this->UserModel->getUserNotes($userId); $data['verified'] = $this->LineModel->getLineBalance($userId, true); $data['unverified'] = $this->LineModel->getLineBalance($userId, false); $data['userRoles'] = $this->RoleModel->getUserRolesByUserId($userId); $data = $this->addRolesToUser($userId, $data); $data['other_roles'] = $this->RoleModel->getRolesWithMembership($this->uri->segment(4)); $data['admin_roles'] = $this->RoleModel->getAdminRoles($this->uri->segment(4)); $data['roles'] = array_merge($data['other_roles'], $data['admin_roles']); $data['member_since'] = $this->UserModel->getUserCreatedDate($this->uri->segment(4)); $brokerId = null; if ($this->roleName = "broker") { $brokerId = $this->uri->segment(4); } $data['total_clients'] = count($this->UserModel->getBrokerUsersWithRoles($brokerId, $role_name = 'client')); $data['total_owners'] = count($this->UserModel->getBrokerUsersWithRoles($brokerId, $role_name = 'owner')); $data['total_brokers'] = count($this->UserModel->getBrokerUsersWithRoles($brokerId, $role_name = 'broker')); $data['my_lines'] = count($this->LineModel->getSelfLines($this->uri->segment(4))); $data['to_lines'] = count($this->LineModel->getAllBrokerLines($this->uri->segment(4))); $data['active_lines'] = count($this->LineModel->getAllBrokerLines($this->uri->segment(4))); $data['credit'] = $this->UserModel->getCreditApplication($this->uri->segment(4)); $data['about_employ'] = $this->UserModel->getSingleEmployement($userId); // $data['employments'] = $this->load->view(ADMIN_PATH . 'employments', NULL, TRUE); $data['main_content'] = ADMIN_PATH . "profile_process"; $this->load->view(ADMIN_PATH . 'inc/template', $data); }
$app->delete('/result', function () use($session) { if (!checkAuth()) { return; } $status = $session->getUser()->resetTestResult(); Helpers::sendJson(array('status' => $status)); }); $app->get('/groups', function () use($app) { if (!checkAdminAuth()) { return; } $app->etag('groups'); $app->expires('+15 minutes'); Helpers::sendJson(AdminHelpers::getGroups()); }); $app->get('/admin/results', function () use($app) { if (!checkAdminAuth()) { return; } $filters = $app->request()->get(); $response = AdminHelpers::getResults($filters); Helpers::sendJson($response); }); $app->get('/admin/result/:studentId', function ($studentId) { if (!checkAdminAuth()) { return; } $response = User::findByStudentId($studentId)->getTestResult(); Helpers::sendJson($response); }); $app->run();
public function index() { checkAdminAuth(); $this->getLineOwners($page = ''); }