本文整理汇总了PHP中msg::error方法的典型用法代码示例。如果您正苦于以下问题:PHP msg::error方法的具体用法?PHP msg::error怎么用?PHP msg::error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类msg
的用法示例。
在下文中一共展示了msg::error方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onDefault
public function onDefault()
{
if (form::isPostBack()) {
msg::error('开发中', '数据保存开发中,请稍后……');
}
$header['title'] = '系统设置';
page::header($header);
page::top();
page::navbar($this->navbar(), 'main');
form::header();
block::header('网站基本信息');
form::field(array('type' => 'text', 'label' => zotop::t('网站名称'), 'name' => 'zotop.site.title', 'value' => zotop::config('zotop.site.title'), 'description' => zotop::t('网站名称,将显示在标题和导航中')));
form::field(array('type' => 'text', 'label' => zotop::t('网站域名'), 'name' => 'zotop.site.domain', 'value' => zotop::config('zotop.site.domain'), 'description' => zotop::t('网站域名地址,不包含http://,如:www.zotop.com')));
form::field(array('type' => 'text', 'label' => zotop::t('备案信息'), 'name' => 'zotop.site.icp', 'value' => zotop::config('zotop.site.icp'), 'description' => zotop::t('页面底部可以显示 ICP 备案信息,如果网站已备案,在此输入您的授权码,它将显示在页面底部,如果没有请留空')));
form::field(array('type' => 'select', 'options' => array('0' => '不显示', '1' => '显示'), 'label' => zotop::t('授权信息'), 'name' => 'zotop.site.license', 'value' => zotop::config('zotop.site.license'), 'description' => zotop::t('页脚部位显示程序官方网站链接')));
form::field(array('type' => 'textarea', 'label' => zotop::t('网站简介'), 'name' => 'zotop.site.about', 'value' => zotop::config('zotop.site.about')));
block::footer();
block::header('联系信息设置');
form::field(array('type' => 'text', 'label' => zotop::t('公司名称'), 'name' => 'zotop.site.title', 'value' => '', 'description' => zotop::t('网站隶属的公司或者组织名称')));
form::field(array('type' => 'textarea', 'label' => zotop::t('网站简介'), 'name' => 'zotop.site.about', 'value' => ''));
block::footer();
form::buttons(array('type' => 'submit'), array('type' => 'back'));
form::footer();
page::bottom();
page::footer();
}
示例2: onDefault
public function onDefault()
{
if (form::isPostBack()) {
$post = array();
$post['username'] = request::post('username');
$post['password'] = request::post('password');
$post['logintime'] = time();
$user = zotop::model('zotop.user');
$data = $user->read($post['username'], 'username');
//zotop::dump($data);
if ($data == false) {
msg::error('登陆失败', zotop::t('账户名称`{$username}`不存在,请检查!', array('username' => $post['username'])));
}
zotop::user($data);
msg::success('登陆成功', '登陆成功,系统正在加载中', 'reload', 2);
}
if (zotop::user() != null) {
zotop::redirect('zotop/index');
}
$header['title'] = '用户登录';
$header['js'] = url::module() . '/admin/js/login.js';
$header['body']['class'] = "login";
page::header($header);
block::header(array('id' => 'LoginWindow', 'title' => '用户登录'));
form::header(array('title' => '', 'description' => '请输入用户名和密码', 'class' => 'small'));
form::field(array('type' => 'text', 'label' => zotop::t('帐 户(U)'), 'name' => 'username', 'value' => zotop::user('username'), 'valid' => 'required:true'));
form::field(array('type' => 'password', 'label' => zotop::t('密 码(P)'), 'name' => 'password', 'value' => ''));
form::buttons(array('type' => 'submit', 'value' => '登 陆'), array('type' => 'button', 'name' => 'options', 'value' => '选 项'));
form::footer();
block::footer();
page::footer();
}
示例3: onChangePassword
public function onChangePassword()
{
$user = zotop::model('zotop.user');
$user->id = (int) zotop::user('id');
$user->username = (string) zotop::user('username');
if (form::isPostBack()) {
$user->read();
$password = request::post('password');
$newpassword = request::post('newpassword');
if ($user->password($password) != $user->password) {
msg::error('输入错误', zotop::t('您输入的原密码:<b>{$password}</b>错误,请确认', array('password' => $password)));
}
if ($newpassword != request::post('newpassword2')) {
msg::error('输入错误', zotop::t('两次输入的新密码不一致,请确认'));
}
if ($newpassword != $password) {
$update = $user->update(array('id' => $user->id, 'password' => $user->password($newpassword)));
}
msg::success('修改成功', zotop::t('密码修改成功,请记住您的新密码'), 'reload');
}
$page['title'] = '修改我的密码';
page::header($page);
page::top();
page::navbar($this->navbar());
form::header(array('title' => '修改密码', 'description' => '为确保账户安全,请不要使用过于简单的密码,并及时的更换密码', 'icon' => ''));
form::field(array('type' => 'label', 'label' => zotop::t('账户名称'), 'name' => 'username', 'value' => $user->username, 'valid' => '', 'description' => zotop::t('')));
form::field(array('type' => 'password', 'label' => zotop::t('原密码'), 'name' => 'password', 'value' => '', 'valid' => 'required:true', 'description' => zotop::t('为确保安全,请输入你的密码')));
form::field(array('type' => 'password', 'label' => zotop::t('新密码'), 'id' => 'newpassword', 'name' => 'newpassword', 'value' => '', 'valid' => 'required:true,minlength:6,maxlength:32', 'description' => zotop::t('请输入您的新密码,6~32位之间')));
form::field(array('type' => 'password', 'label' => zotop::t('确认新密码'), 'name' => 'newpassword2', 'value' => '', 'valid' => 'required:true,equalTo:"#newpassword"', 'description' => zotop::t('为确保安全,请再次输入您的新密码')));
form::buttons(array('type' => 'submit'), array('type' => 'back'));
form::footer();
page::bottom();
page::footer();
}
示例4: onDefault
public function onDefault()
{
$db = zotop::db();
if ($db->connect()) {
zotop::redirect('database/table');
}
msg::error('连接数据库失败', '请检查数据库配置是否正确');
}
示例5: actionIndex
public function actionIndex()
{
$db = zotop::db();
if ($db->connect()) {
zotop::redirect(zotop::url('database/table'));
}
msg::error('连接数据库失败,请检查数据库配置是否正确');
}
示例6: sqlAction
public function sqlAction()
{
if (form::isPostBack()) {
msg::error('该功能已经被禁用,请进入设置开启');
}
$page = new dialog();
$page->title = '数据库管理:' . $database['database'] . ' @ ' . $database['hostname'] . '<i>></i> 执行sql语句';
$page->display();
}
示例7: actionImageFromUrl
public function actionImageFromUrl($globalid, $field, $image)
{
if (form::isPostBack()) {
msg::error('远程获取中……');
}
$page = new dialog();
$page->set('title', '网络图片');
$page->set('navbar', $this->navbar($globalid, $field, $image));
$page->display();
}
示例8: actionDelete
public function actionDelete($id)
{
$category = zotop::model('blog.category');
$category->id = $id;
$category->delete();
if (!$category->error()) {
msg::success('删除成功', zotop::url('blog/category/index'));
}
msg::error($category->msg());
}
示例9: actionBakup
public function actionBakup()
{
$db = zotop::model('database.database');
if (form::isPostBack()) {
msg::error('功能开发中……');
}
$database = $db->db()->config();
$tables = $db->tables();
$page = new page();
$page->title = '数据库备份';
$page->set('position', $database['database'] . ' @ ' . $database['hostname']);
$page->set('navbar', $this->navbar());
$page->set('database', $database);
$page->set('tables', $tables);
$page->display();
}
示例10: indexAction
public function indexAction()
{
$user = zotop::model('zotop.user');
if (form::isPostBack()) {
$post = array();
$post['username'] = request::post('username');
$post['password'] = request::post('password');
$post['logintime'] = time();
zotop::cookie('admin.username', $post['username'], 3600);
if (empty($post['username'])) {
msg::error(zotop::t('登陆失败,请输入登陆账户名称'));
}
if (empty($post['password'])) {
msg::error(zotop::t('登陆失败,请输入登陆账户密码'));
}
if (!$user->isValidUserName($post['username'])) {
msg::error(zotop::t('登陆失败,请输入有效的账户名称'));
}
if (!$user->isValidPassword($post['password'])) {
msg::error(zotop::t('登陆失败,请输入有效的账户密码'));
}
//读取用户
$data = $user->read(array('username', '=', $post['username']));
//验证
if ($data == false) {
msg::error(zotop::t('账户名称`{$username}`不存在,请检查是否输入有误!', array('username' => $post['username'])));
}
if ($user->password($post['password']) != $data['password']) {
msg::error(zotop::t('账户密码`{$password}`错误,请检查是否输入有误!', array('password' => $post['password'])));
}
//用户登入
$user->login();
//跳转
msg::success('登陆成功,系统正在加载中', url::current(), 2);
}
if (!empty($this->user)) {
$this->redirect('zotop/index');
}
$data = $user->read(array('username', '=', 'admin'));
$page = new page();
$page->title = '系统登陆';
$page->body = array('class' => 'login');
$page->addScript('$this/js/login.js');
$page->display();
}
示例11: actionTheme
public function actionTheme()
{
$config = zotop::model('system.config');
if (form::isPostBack()) {
$post = form::post();
$config->save($post);
if ($config->error()) {
msg::error($config->msg());
}
msg::success('保存成功');
}
$theme = $config->fields('system.theme');
$page = new page();
$page->set('title', zotop::t('系统设置'));
$page->set('navbar', $this->navbar());
$page->set('theme', $theme);
$page->display();
}
示例12: deleteAction
public function deleteAction($id)
{
$user = zotop::model('zotop.user');
$usergroup = zotop::model('zotop.usergroup');
$usergroup->id = $id;
$usergroup->read();
if ($usergroup->id == 1) {
msg::error('超级管理员组无法被删除');
}
if ($user->countByGroupid($id) > 0) {
msg::error('该用户组下面尚有用户,无法被删除');
}
zotop::run('zotop.usergroup.delete', $usergroup);
if ($usergroup->delete()) {
$usergroup->cache();
msg::success('删除成功,正在重载数据,请稍后……', zotop::url('zotop/usergroup'));
}
}
示例13: actionUpload
public function actionUpload()
{
$config = zotop::model('zotop.config');
if (form::isPostBack()) {
$post = form::post();
$save = $config->save($post);
if ($save) {
msg::success('保存成功,重新加载中,请稍后……');
}
msg::error($save);
}
$fields = $config->fields('upload');
$page = new page();
$page->set('title', '上传设置');
$page->set('navbar', $this->navbar());
$page->set('fields', $fields);
$page->display();
}
示例14: onInstall
public function onInstall($id = '')
{
$module = zotop::model('zotop.module');
$modules = $module->notInstalled();
//模块安装
if (!empty($id)) {
$install = $module->install($id);
if ($install) {
msg::success('操作成功', '模块安装成功,请稍候', zotop::url('zotop/module/install'));
}
msg::error('操作失败', '模块安装失败,请检查模块是否已经存在!');
}
$page['title'] = '模块安装';
page::header($page);
page::top();
page::navbar($this->navbar());
//block::header('操作说明');
echo '<ul class="notice">';
echo ' <li>安装模块前,请确认将该模块文件夹上传至服务器上的模块目录下面目录下面(/zotop/modules)</li>';
echo ' <li>上传完成后,刷新页面,模块将会出现在下面的待安装模块列表中</li>';
echo '</ul>';
//block::footer();
block::header('待安装模块');
$column = array();
$column['logo w30'] = '';
$column['name'] = '名称';
$column['version w50'] = '版本';
$column['manage edit'] = '安装';
$column['manage delete'] = '删除';
table::header('list', $column);
foreach ($modules as $module) {
$column = array();
$column['logo w30'] = html::image($module['icon'], array('width' => '32px'));
$column['name'] = '<a><b>' . $module['name'] . '</b></a><h5>' . $module['description'] . '</h5>';
$column['version'] = $module['version'];
$column['manage edit'] = html::a(zotop::url('zotop/module/install', array('id' => $module['id'])), '安装', array('class' => 'confirm'));
$column['manage delete'] = '删除';
table::row($column);
}
table::footer();
block::footer();
page::bottom();
page::footer();
}
示例15: changeInfoAction
public function changeInfoAction()
{
$user = zotop::model('zotop.user');
$user->id = (int) zotop::user('id');
if (form::isPostBack()) {
$post = form::post();
$update = $user->update($post, $user->id);
if ($update) {
msg::success('资料设置成功,正在刷新页面,请稍后……', url::current());
}
msg::error();
}
$data = $user->read();
$page = new page();
$page->title = '修改我的基本信息';
$page->set('navbar', $this->navbar());
$page->set('data', $data);
$page->display();
}