function showSystemSettings($category = 'system') { $category = addslashes($category); $this->set('list', $this->__getAllSettings(true, 1, $category)); if ($category == 'system') { $langCtrler = new LanguageController(); $langList = $langCtrler->__getAllLanguages(" where translated=1"); $this->set('langList', $langList); } $this->set('category', $category); // if report settings page if ($category == 'report') { $spTextReport = $this->getLanguageTexts('report', $_SESSION['lang_code']); $this->set('spTextReport', $spTextReport); $scheduleList = array(1 => $_SESSION['text']['label']['Daily'], 2 => $spTextReport['2 Days'], 7 => $_SESSION['text']['label']['Weekly'], 30 => $_SESSION['text']['label']['Monthly']); $this->set('scheduleList', $scheduleList); $this->render('settings/showreportsettings'); } else { if ($category == 'proxy') { $spTextProxy = $this->getLanguageTexts('proxy', $_SESSION['lang_code']); $this->set('spTextProxy', $spTextProxy); $this->render('settings/showproxysettings'); } else { $this->render('settings/showsettings'); } } }
function render($viewFile, $layout = 'default', $printContent = true) { $spText = $_SESSION['text']; if (count($this->data) > 0) { foreach ($this->data as $varName => $varValue) { ${$varName} = $varValue; } } ob_start(); include_once SP_VIEWPATH . "/" . $viewFile . ".ctp.php"; $viewContent = ob_get_contents(); ob_end_clean(); ob_start(); if ($layout == 'ajax') { if ($printContent) { print $viewContent; } else { return $viewContent; } } else { $langCtrler = new LanguageController(); $langList = $langCtrler->__getAllLanguages(" where translated=1"); $userLang = empty($_SESSION['lang_code']) ? SP_DEFAULTLANG : $_SESSION['lang_code']; $redirectUrl = $langCtrler->getRedirectUrl(); include_once SP_VIEWPATH . "/layout/" . $layout . ".ctp.php"; } }
function showSystemSettings() { $this->set('list', $this->__getAllSettings()); $langCtrler = new LanguageController(); $langList = $langCtrler->__getAllLanguages(" where translated=1"); $this->set('langList', $langList); $this->render('settings/showsettings'); }
public function displayUploadInterface() { $categoryObj = new CategoryController(); $languageObj = new LanguageController(); $categoryList = $categoryObj->getCategoryList(); $languageList = $languageObj->getLanguageList(); $this->smarty->assign("CATEGORY_LIST", $categoryList); $this->smarty->assign("LANGUAGE_LIST", $languageList); $this->smarty->assign("FILE_UPLOAD_ACTION_VALUE", UploadController::FILE_UPLOAD_ACTION_VALUE); $this->render($this->currModule); }
function show($info, $error = false) { if (empty($info['website_id'])) { print "<script>" . pluginGETMethod() . "</script>"; return; } $langController = new LanguageController(); $this->set('langList', $langController->__getAllLanguages()); $this->set('langNull', true); if (empty($error)) { $websiteController = new WebsiteController(); $websiteInfo = $websiteController->__getWebsiteInfo($info['website_id']); $websiteInfo['website_id'] = $info['website_id']; } else { $websiteInfo = $info; } $this->set('websiteInfo', $websiteInfo); $this->pluginRender('showsiteinfo'); }
Route::get('/', function () { return View::make('public.pages.home'); }); // >>> Языки Route::any('/changelanguage/{lang}', function ($lang) { //для кнопочек переключения Session::put('lang', $lang); if (!empty(Session::get('id'))) { $userlang = LanguageController::changeProfileLang($lang); } $myurl = LanguageController::setBestLanguage($lang); return Redirect::to($myurl); }); Route::group(array('prefix' => '{lang}'), function ($lang) { //для безболезненной смены ru/en ручками $myurl = LanguageController::lightLang(); return Redirect::to($myurl); }); Route::group(array('prefix' => Session::get('lang')), function () { //просто префикс Route::get('/', function () { return View::make('public.pages.home'); }); Route::get('/sing-up', 'UsersController@newUserRegister'); Route::get('/login', function () { $role = Session::get('role'); if ($role != '') { return Redirect::to('/profile'); } return View::make('public.pages.login'); });
function editKeyword($keywordId, $listInfo = '') { $userId = isLoggedIn(); $websiteController = new WebsiteController(); $this->set('websiteList', $websiteController->__getAllWebsites($userId, true)); $langController = new LanguageController(); $this->set('langList', $langController->__getAllLanguages()); $this->set('langNull', true); $countryController = new CountryController(); $this->set('countryList', $countryController->__getAllCountries()); $this->set('countryNull', true); $seController = new SearchEngineController(); $this->set('seList', $seController->__getAllSearchEngines()); if (!empty($keywordId)) { if (empty($listInfo)) { $listInfo = $this->__getKeywordInfo($keywordId); $listInfo['oldName'] = $listInfo['name']; $listInfo['searchengines'] = explode(':', $listInfo['searchengines']); } $this->set('post', $listInfo); $this->render('keyword/edit'); exit; } $this->listKeywords(); }
function editProject($projectId, $listInfo = '') { $userId = isLoggedIn(); $projectId = intval($projectId); if (!empty($projectId)) { if (empty($listInfo)) { $listInfo = $this->__getProjectInfo($projectId); $listInfo['oldName'] = $listInfo['keyword']; } $this->set('post', $listInfo); $websiteController = new WebsiteController(); $websiteList = $websiteController->__getAllWebsites($userId, true); $this->set('websiteList', $websiteList); $websiteId = empty($listInfo['website_id']) ? $websiteList[0]['id'] : intval($listInfo['website_id']); $this->set('websiteId', $websiteId); $langController = new LanguageController(); $this->set('langList', $langController->__getAllLanguages()); $this->render('siteauditor/edit'); exit; } }
function quickRankChecker() { $seController = new SearchEngineController(); $seList = $seController->__getAllSearchEngines(); $this->set('seList', $seList); $this->set('seStyle', 230); $seId = empty($searchInfo['se_id']) ? '' : $searchInfo['se_id']; $this->set('seId', $seId); $langController = new LanguageController(); $this->set('langNull', true); $this->set('langStyle', 230); $this->set('langList', $langController->__getAllLanguages()); $countryController = new CountryController(); $this->set('countryList', $countryController->__getAllCountries()); $this->set('countryNull', true); $this->set('countryStyle', 230); $this->render('report/quickrankchecker'); }
function showDirectoryManager($info = '') { $info = sanitizeData($info); $info['stscheck'] = isset($info['stscheck']) ? intval($info['stscheck']) : 1; $capcheck = isset($info['capcheck']) ? $info['capcheck'] == 'yes' ? 1 : 0 : ""; $sql = "SELECT *,l.lang_name FROM directories d,languages l where d.lang_code=l.lang_code and working='{$info['stscheck']}'"; if (!empty($info['dir_name'])) { $sql .= " and domain like '%" . addslashes($info['dir_name']) . "%'"; } if ($info['capcheck'] != '') { $sql .= " and is_captcha='{$capcheck}'"; } if (isset($info['google_pagerank']) && $info['google_pagerank'] != '') { $sql .= " and google_pagerank='" . intval($info['google_pagerank']) . "'"; } if (!empty($info['langcode'])) { $info['lang_code'] = $info['langcode']; } if (!empty($info['lang_code'])) { $sql .= " and d.lang_code='" . addslashes($info['lang_code']) . "'"; } $sql .= " order by id"; # pagination setup $this->db->query($sql, true); $this->paging->setDivClass('pagingdiv'); $this->paging->loadPaging($this->db->noRows, SP_PAGINGNO); $pageScriptPath = 'directories.php?sec=directorymgr&dir_name=' . urlencode($info['dir_name']) . "&stscheck={$info['stscheck']}&capcheck=" . $info['capcheck']; $pageScriptPath .= "&google_pagerank=" . $info['google_pagerank'] . "&langcode=" . $info['lang_code']; $pagingDiv = $this->paging->printPages($pageScriptPath); $this->set('pagingDiv', $pagingDiv); $sql .= " limit " . $this->paging->start . "," . $this->paging->per_page; $statusList = array($_SESSION['text']['common']['Active'] => 1, $_SESSION['text']['common']['Inactive'] => 0); $captchaList = array($_SESSION['text']['common']['Yes'] => 'yes', $_SESSION['text']['common']['No'] => 'no'); $langCtrler = new LanguageController(); $langList = $langCtrler->__getAllLanguages(); $this->set('langList', $langList); $this->set('statusList', $statusList); $this->set('captchaList', $captchaList); $dirList = $this->db->select($sql); $this->set('list', $dirList); $this->set('info', $info); $this->set('ctrler', $this); $this->render('directory/list'); }
/** * Display the widget * * @return string The generated HTML */ public function display() { $form = LanguageController::getInstance()->keyForm(); return View::make(Theme::getSelected()->getView("box.tpl"), array('title' => Lang::get('language.key-form-add-title'), 'icon' => 'font', 'content' => $form)); }
<?php /** * Created by PhpStorm. * User: Haziq * Date: 12/6/2015 * Time: 11:08 AM */ require_once $_SERVER['DOCUMENT_ROOT'] . '/matrimonialweb/Controller/LanguageController.php'; $Object = new LanguageController(); $result = $Object->getLanguages(); echo json_encode($result);
<?php /** * Created by PhpStorm. * User: Haziq * Date: 1/5/2016 * Time: 4:34 PM */ require_once $_SERVER['DOCUMENT_ROOT'] . '/matrimonialweb/Controller/LanguageController.php'; $data = array(); if (isset($_POST['language'])) { $language = $_POST['language']; if (intval($language) > 0) { $Object = new LanguageController(); $data = $Object->updateUserLanguage($language); } else { array_push($data, ["Status" => "error", "Message" => "incorrect fields detected"]); } } else { array_push($data, ["Status" => "error", "Message" => "something went wrong"]); } echo json_encode($data);
<?php //Autore: Alex Vezzelli - Alex Soluzioni Web //url: http://www.alexsoluzioniweb.it/ //istanzio l'oggetto che stampa $printer = new WriterCV(); $locatorController = new LocatorController(); $cvController = new CvController(); $languageController = new LanguageController(); //ottengo due info fondamentali per avere il comportamento corretto //1. ID UTENTE //2. CATEGORIA COMMERCIALE //2. PROVINCIA $user_ID = get_current_user_id(); //0 in caso di utente non registrato //LISTENER per aggiornare la provincia if (isset($_POST['aggiorna-provincia'])) { //aggiorno i campi di provincia //ottengo il nome della pronvincia $provincia = $locatorController->getProvinciaById($_POST['provincia']); //aggiorno if (updateBuddypressProvincia($_POST['id-utente'], $provincia->sigla) == true) { echo '<div class="ok">Provincia aggiornata con successo!</div>'; } else { echo '<div class="ko">Sono stati riscontrati dei problemi nell\'aggiornare la provincia.</div>'; } } if ($user_ID != 0) { //utente registrato $categoria = getIdCategoriaByUser($user_ID); $provincia = getValueProvinciaByUser($user_ID);