本文整理汇总了PHP中GWF_HTML::messageA方法的典型用法代码示例。如果您正苦于以下问题:PHP GWF_HTML::messageA方法的具体用法?PHP GWF_HTML::messageA怎么用?PHP GWF_HTML::messageA使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GWF_HTML
的用法示例。
在下文中一共展示了GWF_HTML::messageA方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onEdit
private function onEdit()
{
$u = $this->user;
$form = $this->getForm();
if (false !== ($error = $form->validate($this->module))) {
return $error;
}
if ($form->getVar('email') !== $u->getVar('user_email')) {
GWF_Hook::call(GWF_Hook::CHANGE_MAIL, $u, array($u->getVar('user_email'), $form->getVar('email')));
}
if (false === $u->saveVars(array('user_countryid' => $form->getVar('country'), 'user_langid' => $form->getVar('lang1'), 'user_langid2' => $form->getVar('lang2'), 'user_gender' => $form->getVar('gender'), 'user_email' => $form->getVar('email'), 'user_level' => $form->getVar('level')))) {
return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
}
$msgs = array_merge($this->onEditFlags('bot', $u->isBot(), GWF_User::BOT), $this->onEditFlags('showemail', $u->isOptionEnabled(GWF_User::SHOW_EMAIL), GWF_User::SHOW_EMAIL), $this->onEditFlags('adult', $u->isOptionEnabled(GWF_User::WANTS_ADULT), GWF_User::WANTS_ADULT), $this->onEditFlags('online', $u->isOptionEnabled(GWF_User::HIDE_ONLINE), GWF_User::HIDE_ONLINE), $this->onEditFlags('approved', $u->hasValidMail(), GWF_User::MAIL_APPROVED), $this->onEditDeleteFlag($u->isDeleted(), Common::getPost('deleted') !== false), $this->onEditUsername($u->getVar('user_name'), $form->getVar('username')), $this->onEditPassword($form->getVar('password')));
$msgs[] = $this->module->lang('msg_user_edited');
return GWF_HTML::messageA('Account', $msgs);
}
示例2: onUpdate
private function onUpdate()
{
$form = $this->getForm();
if (false !== ($error = $form->validate($this->module))) {
return $error;
}
$moduleid = $this->mod->getID();
$errors = $messages = array();
$vars = GWF_ModuleLoader::getModuleVars($moduleid);
foreach ($vars as $row) {
$key = $row['mv_key'];
$mvkey = 'mv_' . $key;
if ($row['mv_type'] === 'bool') {
$newval = isset($_POST[$mvkey]) ? '1' : '0';
} elseif (isset($_POST[$mvkey])) {
$newval = $_POST[$mvkey];
} else {
$errors[] = GWF_HTML::err('ERR_MISSING_VAR', array(htmlspecialchars($mvkey)));
continue;
}
if (false !== ($error = $this->updateVar($key, $newval, $vars, $row))) {
if ($error !== '') {
$errors[] = $error;
}
} else {
$transkey = $this->mod->lang('cfg_' . $key);
$messages[] = $this->module->lang('msg_update_var', array($transkey, GWF_HTML::display($newval)));
}
}
$back = '';
$modname = $this->mod->display('module_name');
if (!empty($errors)) {
$back .= GWF_HTML::error($modname, $errors);
}
if (!empty($messages)) {
$back .= GWF_HTML::messageA($modname, $messages);
}
return $back;
}