本文整理汇总了PHP中language::getLanguages方法的典型用法代码示例。如果您正苦于以下问题:PHP language::getLanguages方法的具体用法?PHP language::getLanguages怎么用?PHP language::getLanguages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类language
的用法示例。
在下文中一共展示了language::getLanguages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
public function process()
{
if (!parent::process()) {
$this->redirectNoSession();
}
if (!is_null($this->getRequestVar('options'))) {
$data = $this->getRequestVar('options');
$sysConfigObj = $this->getSysconfig();
if (!empty($data['loginPasswort']) && !$sysConfigObj->isPasswordSecure($data['loginPasswort'])) {
\messages::registerError(\language::returnLanguageConstant('SAVE_FAILED_PASSWORD'));
unset($data['loginPasswort']);
}
foreach ($data as $key => $value) {
if ($value == '') {
continue;
}
$fn = 'set' . $key;
$sysConfigObj->{$fn}($this->filterRequest($value, array(1, 4, 7)));
}
$sysConfigObj->update();
\messages::registerMessage(\language::returnLanguageConstant('SAVE_SUCCESS_OPTIONS'));
}
$fields = array('adminMail' => $this->getSysconfig()->getAdminMail(), 'iframecss' => $this->getSysconfig()->getIframecss(), 'sessionLength' => $this->getSysconfig()->getSessionLength(), 'timeZone' => $this->getSysconfig()->getTimeZone(), 'dateTimeMask' => $this->getSysconfig()->getDateTimeMask(), 'antispamQuestion' => $this->getSysconfig()->getAntispamQuestion(), 'antispamAnswer' => $this->getSysconfig()->getAntispamAnswer());
$dtMasksArray = array('d.m.Y', 'd. M Y', 'd.n.Y', 'j.m.Y', 'j. M Y', 'j.n.Y', 'M dS Y', 'm/d/Y', 'n/d/Y');
$dtMasks = array();
foreach ($dtMasksArray as $dtMask) {
$dtMasks[] = array('label' => $dtMask . ' (' . date($dtMask) . ')', 'value' => $dtMask);
}
$timeZones = timezone_identifiers_list();
$timeZones = array_combine(array_values($timeZones), array_values($timeZones));
unset($timeZones['UTC']);
$view = new \model\view_acp('options');
$view->assign('languages', \language::getLanguages());
$view->assign('modes', array('iframe' => 1, 'phpcinlude' => 2));
$view->assign('timeZones', array_unique($timeZones));
$view->assign('syslang', $this->getSysconfig()->getSysLanguage());
$view->assign('sysmode', $this->getSysconfig()->getSystemMode());
$view->assign('dtMasks', json_encode($dtMasks));
$view->assign('fields', $fields);
$view->render();
}
示例2: runInstall
private function runInstall()
{
$this->checkRequirements();
$step = $this->getRequestVar('step');
define('INSTALL_MODE', 0);
if (is_null($step)) {
\language::init('de');
$view = new \model\view_installer('start');
$view->assign('languages', \language::getLanguages());
$view->assign('lang', '');
$view->render();
} else {
$setupLang = $this->getRequestVar('lang');
if (empty($setupLang)) {
header('Location: index.php');
}
\language::init($setupLang);
$install = new \installclass();
if (!is_null($this->getRequestVar('pins'))) {
\messages::registerError(\language::returnLanguageConstant('SAVE_FAILED_PASSWORD'), true);
}
if (!is_null($this->getRequestVar('dbconfig'))) {
$install->createConfigFile($this->getRequestVar('dbconfig'));
}
if ($step > 1) {
$this->dbconnection = new \database();
$install->setDbconnection($this->dbconnection);
}
if (!is_null($this->getRequestVar('submsave'))) {
if (!$install->createConfigKey($this->getRequestVar('options'))) {
header('Location: index.php?step=2&lang=' . $setupLang . '&pins=yes');
}
}
if ($step == 1) {
if (!isset($_GET['lang'])) {
header('Location: index.php?step=1&lang=' . $setupLang);
}
$view = new \model\view_installer('dbconfig');
$view->assign('fields', array('DBHOST' => 'localhost', 'DBNAME' => '', 'DBUSER' => '', 'DBPASS' => '', 'DBPREF' => 'afltr'));
$view->assign('lang', $setupLang);
$view->assign('dbtypes', array('MySQL' => 'mysql'));
$view->render();
}
if ($step == 2) {
$tables = array('affiliates', 'categories', 'config', 'logins');
foreach ($tables as $table) {
$install->createTable($table);
}
$install->createStdCategory();
$fields = array('adminMail' => 'example@your.domain', 'iframecss' => '', 'sessionLength' => '3600', 'timeZone' => 'Europe/London', 'dateTimeMask' => 'd.m.Y H:i', 'antispamQuestion' => '', 'antispamAnswer' => '');
$timeZones = timezone_identifiers_list();
$timeZones = array_combine(array_values($timeZones), array_values($timeZones));
$view = new \model\view_installer('config');
$view->assign('fields', $fields);
$view->assign('modes', array('iframe' => 1, 'phpcinlude' => 2));
$view->assign('timeZones', $timeZones);
$view->assign('sysmode', 1);
$view->assign('languages', \language::getLanguages());
$view->assign('lang', $setupLang);
$view->render();
}
if ($step == 3) {
$view = new \model\view_installer('end');
$view->render();
$file = new \model\file();
$file->deleteRecursive(\base_config::$baseDir . '/install/');
}
}
}