protected function ShowForm() { $this->set('extrafields', RegistrationData::GetCustomFields()); $this->set('allairlines', OperationsData::GetAllAirlines(true)); $this->set('allhubs', OperationsData::GetAllHubs()); $this->set('countries', Countries::getAllCountries()); $this->render('registration_mainform.tpl'); }
protected function ShowForm() { $field_list = RegistrationData::GetCustomFields(); $this->set('extrafields', $field_list); $this->set('field_list', $field_list); $airline_list = OperationsData::getAllAirlines(true); $this->set('allairlines', $airline_list); $this->set('airline_list', $airline_list); $hub_list = OperationsData::getAllHubs(); $this->set('allhubs', $hub_list); $this->set('hub_list', $hub_list); $country_list = Countries::getAllCountries(); $this->set('countries', $country_list); $this->set('country_list', $country_list); $this->render('registration_mainform.tpl'); }
protected function ShowForm() { //Google reCaptcha //updated to Google noCaptcha 1/15 $this->set('sitekey', RECAPTCHA_PUBLIC_KEY); $this->set('lang', 'en'); $field_list = RegistrationData::GetCustomFields(); $this->set('extrafields', $field_list); $this->set('field_list', $field_list); $airline_list = OperationsData::getAllAirlines(true); $this->set('allairlines', $airline_list); $this->set('airline_list', $airline_list); $hub_list = OperationsData::getAllHubs(); $this->set('allhubs', $hub_list); $this->set('hub_list', $hub_list); $country_list = Countries::getAllCountries(); $this->set('countries', $country_list); $this->set('country_list', $country_list); $this->render('registration_mainform.tpl'); }
public function editprofile() { if (!Auth::LoggedIn()) { $this->set('message', 'You must be logged in to access this feature!'); $this->render('core_error.tpl'); return; } $this->set('userinfo', Auth::$userinfo); $this->set('customfields', PilotData::GetFieldData(Auth::$pilotid, true)); $this->set('bgimages', PilotData::GetBackgroundImages()); $this->set('countries', Countries::getAllCountries()); $this->set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid)); $this->render('profile_edit.tpl'); }
function settingsAction() { $this->view->loginStatus = $this->isLoggedIn(); $this->_helper->layout()->setLayout('layout_workouts'); $translate = Zend_Registry::get('Zend_Translate'); //if($this->view->loginStatus == 1) //$this->view->memberStatus = $this->checkUserMembership(); $userArray = array(); $usersettingsArray = array(); if ($this->isLoggedIn() == 0) { $this->_redirect('/index/login'); } $fitnessUser = new FitnessUserGeneral(); $fitnessTargets = new FitnessTargetsMultilang(); $fitnessInterests = new FitnessInterestsMultilang(); $fitnessUserSettings = new FitnessUserSettings(); $fitnessCountries = new Countries(); $fitnessDevices = new AppleDevices(); $fitnessKeys = new FitnessAndroidKey(); $fitnessFeatured = new FitnessFeaturedWorkout(); $defaultLanguage = $this->getDefaultLanguage(); $sess = new Zend_Session_Namespace('UserSession'); $this->view->countries = $fitnessCountries->getAllCountries(); $this->view->listTargets = $fitnessTargets->getAllTargets($defaultLanguage); $this->view->listInterests = $fitnessInterests->getAllInterests($defaultLanguage); $this->view->userDetails = $fitnessUser->getUserbyUsername($sess->username); if ($this->_request->getParam('details') != "") { $this->view->warning = $translate->translate("Please fill out the missing information on the settings page before continuing"); } if ($this->_request->isPost()) { $userId = $this->_request->getPost('user_id'); $userArray['user_first_name'] = $this->_request->getPost('user_fname'); $userArray['user_surname'] = $this->_request->getPost('user_surname'); $userArray['user_email'] = $this->_request->getPost('user_email'); if ($this->_request->getPost('user_password') != "") { $userArray['user_password'] = md5($this->_request->getPost('user_password')); } $levelChnage = 1; if ($this->view->userDetails['user_workout_level'] != $this->_request->getPost('user_level')) { $devicetokenDetail = $fitnessDevices->getDeviceByUser($userId); $androidKey = $fitnessKeys->getKeyByUser($userId); if ($devicetokenDetail['devicetoken'] != "") { $this->sendNotification('lekha', "User workout level has been changed in fitness4.me", $devicetokenDetail['devicetoken'], '', $this->_request->getPost('user_level'), $this->view->userDetails['plan']); } if ($androidKey['android_key'] != "") { $this->sentandroid($androidKey['android_key'], "User workout level has been changed in fitness4.me", $this->_request->getPost('user_level')); } $fitnessFeatured->deleteData(); } if ($levelChnage == 1) { $userArray['user_workout_level'] = $this->_request->getPost('user_level'); } $userArray['user_gender'] = $this->_request->getPost('user_gender'); $userArray['user_dob'] = $this->_request->getPost('user_dob'); $userArray['terms_conditions'] = $this->_request->getPost('terms'); $where = " user_id='" . $userId . "'"; $fitnessUser->update($userArray, $where); if ($this->_request->getPost('user_targets') != "") { $usersettingsArray['workout_targets'] = rtrim($this->_request->getPost('user_targets'), ","); } if ($this->_request->getPost('user_interests') != "") { $usersettingsArray['workout_interests'] = rtrim($this->_request->getPost('user_interests'), ","); } $usersettingsArray['member_fitnessclub'] = $this->_request->getPost('club_member'); $usersettingsArray['offers'] = $this->_request->getPost('offers'); $usersettingsArray['updates'] = $this->_request->getPost('updates'); $usersettingsArray['dnb'] = $this->_request->getPost('dnb'); $usersettingsArray['address1'] = $this->_request->getPost('address1'); $usersettingsArray['address2'] = $this->_request->getPost('address2'); $usersettingsArray['city'] = $this->_request->getPost('city'); $usersettingsArray['country'] = $this->_request->getPost('country'); $usersettingsArray['zipcode'] = $this->_request->getPost('zipcode'); $usersettingsArray['telephone'] = $this->_request->getPost('telephone'); if ($usersettingsArray['address1'] != "" && $usersettingsArray['country'] != "" && $usersettingsArray['zipcode'] != "" && $userArray['user_first_name'] != "" && $userArray['user_gender'] != "" && $userArray['terms_conditions'] != "") { $usersettingsArray['address_check'] = 1; } //check if record exists $checkRecords = $fitnessUserSettings->getCount($userId); if ($checkRecords['count'] < 1) { $usersettingsArray['user_id'] = $userId; $fitnessUserSettings->addData($usersettingsArray); } else { $where = " user_id='" . $userId . "'"; $fitnessUserSettings->update($usersettingsArray, $where); } $this->_redirect('/user/listworkouts'); } $this->view->userDetails = $fitnessUser->getUserbyUsername($sess->username); $this->view->userSettings = $fitnessUserSettings->getUserSettings($this->view->userDetails['user_id']); $this->view->defaultLang = $defaultLanguage; }
protected function ViewPilotDetails() { //This is for the main tab $this->set('pilotinfo', PilotData::GetPilotData($this->get->pilotid)); $this->set('customfields', PilotData::GetFieldData($this->get->pilotid, true)); $this->set('allawards', AwardsData::GetPilotAwards($this->get->pilotid)); $this->set('pireps', PIREPData::GetAllReportsForPilot($this->get->pilotid)); $this->set('countries', Countries::getAllCountries()); $this->SetGroupsData($this->get->pilotid); // For the PIREP list $this->set('pending', false); $this->set('load', 'pilotpireps'); $this->render('pilots_detailtabs.tpl'); }
/** * PilotAdmin::ViewPilotDetails() * * @return */ protected function ViewPilotDetails() { //This is for the main tab if (PilotGroups::group_has_perm(Auth::$usergroups, EDIT_PILOTS) || PilotGroups::group_has_perm(Auth::$usergroups, EDIT_GROUPS) || PilotGroups::group_has_perm(Auth::$usergroups, EDIT_AWARDS) || PilotGroups::group_has_perm(Auth::$usergroups, MODERATE_PIREPS)) { $this->set('pilotinfo', PilotData::GetPilotData($this->get->pilotid)); $this->set('customfields', PilotData::GetFieldData($this->get->pilotid, true)); $this->set('allawards', AwardsData::GetPilotAwards($this->get->pilotid)); $this->set('pireps', PIREPData::GetAllReportsForPilot($this->get->pilotid)); $this->set('countries', Countries::getAllCountries()); $this->SetGroupsData($this->get->pilotid); // For the PIREP list $this->set('pending', false); $this->set('load', 'pilotpireps'); $this->render('pilots_detailtabs.php'); } else { Debug::showCritical('Unauthorized access - Invalid Permissions.'); die; } }