本文整理汇总了PHP中plxUtils::getLangs方法的典型用法代码示例。如果您正苦于以下问题:PHP plxUtils::getLangs方法的具体用法?PHP plxUtils::getLangs怎么用?PHP plxUtils::getLangs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plxUtils
的用法示例。
在下文中一共展示了plxUtils::getLangs方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
?>
<form action="install.php" method="post">
<fieldset>
<div class="grid">
<div class="col sml-12 med-5 label-centered">
<label for="id_default_lang"><?php
echo L_SELECT_LANG;
?>
:</label>
</div>
<div class="col sml-12 med-7">
<?php
plxUtils::printSelect('default_lang', plxUtils::getLangs(), $lang);
?>
<input type="submit" name="select_lang" value="<?php
echo L_INPUT_CHANGE;
?>
" />
<?php
echo plxToken::getTokenPostMethod();
?>
</div>
</div>
<div class="grid">
<div class="col sml-12 med-5 label-centered">
<label for="id_name"><?php
echo L_USERNAME;
示例2: editUser
/**
* Méthode qui sauvegarde le contenu des options d'un utilisateur
*
* @param content données à sauvegarder
* @return string
* @author Stephane F.
**/
public function editUser($content)
{
# control de l'adresse email
if (trim($content['email']) != '' and !plxUtils::checkMail(trim($content['email']))) {
return plxMsg::Error(L_ERR_INVALID_EMAIL);
}
# control de la langue sélectionnée
if (!in_array($content['lang'], plxUtils::getLangs())) {
return plxMsg::Error(L_UNKNOWN_ERROR);
}
$this->aUsers[$content['id']]['email'] = $content['email'];
$this->aUsers[$content['id']]['infos'] = trim($content['content']);
$this->aUsers[$content['id']]['lang'] = $content['lang'];
# Hook plugins
eval($this->plxPlugins->callHook('plxAdminEditUser'));
return $this->editUsers(null, true);
}
示例3:
<div class="col sml-12 med-7">
<?php
plxUtils::printInput('meta_keywords', plxUtils::strCheck($plxAdmin->aConf['meta_keywords']));
?>
</div>
</div>
<div class="grid">
<div class="col sml-12 med-5 label-centered">
<label for="id_default_lang"><?php
echo L_CONFIG_BASE_DEFAULT_LANG;
?>
:</label>
</div>
<div class="col sml-12 med-7">
<?php
plxUtils::printSelect('default_lang', plxUtils::getLangs(), $plxAdmin->aConf['default_lang']);
?>
</div>
</div>
<div class="grid">
<div class="col sml-12 med-5 label-centered">
<label for="id_timezone"><?php
echo L_CONFIG_BASE_TIMEZONE;
?>
:</label>
</div>
<div class="col sml-12 med-7">
<?php
plxUtils::printSelect('timezone', plxTimezones::timezones(), $plxAdmin->aConf['timezone']);
?>
</div>
示例4:
?>
<fieldset>
<div class="grid">
<div class="col sml-12 med-5 label-centered">
<?php
plxUtils::printInput('id', $id, 'hidden');
?>
<label for="id_lang"><?php
echo L_USER_LANG;
?>
:</label>
</div>
<div class="col sml-12 med-7">
<?php
plxUtils::printSelect('lang', plxUtils::getLangs(), $plxAdmin->aUsers[$id]['lang']);
?>
</div>
</div>
<div class="grid">
<div class="col sml-12 med-5 label-centered">
<label for="id_email"><?php
echo L_USER_MAIL;
?>
:</label>
</div>
<div class="col sml-12 med-7">
<?php
plxUtils::printInput('email', plxUtils::strCheck($plxAdmin->aUsers[$id]['email']), 'text', '30-255');
?>
</div>
示例5:
echo L_PROFIL_MAIL;
?>
:</label>
<?php
plxUtils::printInput('email', plxUtils::strCheck($_profil['email']), 'text', '30-255');
?>
</div>
</div>
<div class="grid">
<div class="col sml-12">
<label for="id_lang"><?php
echo L_PROFIL_ADMIN_LANG;
?>
:</label>
<?php
plxUtils::printSelect('lang', plxUtils::getLangs(), $_profil['lang']);
?>
</div>
</div>
<div class="grid">
<div class="col sml-12">
<label for="id_content"><?php
echo L_PROFIL_INFOS;
?>
:</label>
<?php
plxUtils::printArea('content', plxUtils::strCheck($_profil['infos']), 140, 5, false, 'full-width');
?>
</div>
</div>
</fieldset>