当前位置: 首页>>代码示例>>PHP>>正文


PHP msg::success方法代码示例

本文整理汇总了PHP中msg::success方法的典型用法代码示例。如果您正苦于以下问题:PHP msg::success方法的具体用法?PHP msg::success怎么用?PHP msg::success使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在msg的用法示例。


在下文中一共展示了msg::success方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionEdit

 public function actionEdit($tablename)
 {
     if (form::isPostBack()) {
         $tablename = request::post('tablename');
         $name = request::post('name');
         $comment = request::post('comment');
         $primary = request::post('primary');
         if (strtolower($tablename) !== strtolower($name)) {
             $rename = zotop::db()->table($tablename)->rename($name);
         }
         if ($comment !== NULL) {
             $comment = zotop::db()->table($name)->comment($comment);
         }
         if ($primary) {
             $primary = zotop::db()->table($name)->primary($primary);
         }
         msg::success('数据表设置成功,正在刷新页面,请稍后……', zotop::url('database/table'));
     }
     $db = zotop::db();
     $database = $db->config();
     $tables = $db->tables(true);
     $table = $tables[$tablename];
     if (!isset($table)) {
         msg::error(zotop::t('数据表{$tablename}不存在', array('tablename' => $tablename)));
     }
     $page = new dialog();
     $page->title = '数据库管理:' . $database['database'] . ' @ ' . $database['hostname'] . '<i>></i> 编辑:' . $tablename;
     $page->set('database', $database);
     $page->set('table', $table);
     $page->display();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:31,代码来源:table.php

示例2: actionDelete

 public function actionDelete($tablename)
 {
     $delete = zotop::db()->table($tablename)->drop();
     if (!$delete) {
         msg::error(zotop::t('删除数据表{$tablename}失败', array('tablename' => $tablename)));
     }
     msg::success('删除成功', zotop::url('database/table'));
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:8,代码来源:table.php

示例3: actionDelete

 public function actionDelete($id)
 {
     $file = zotop::model('zotop.file');
     $delete = $file->delete($id);
     if ($delete) {
         msg::success('删除成功', request::referer());
     }
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:8,代码来源:file.php

示例4: 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());
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:10,代码来源:category.php

示例5: 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();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:18,代码来源:setting.php

示例6: 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();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:18,代码来源:setting.php

示例7: 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();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:19,代码来源:mine.php

示例8: onEdit

 public function onEdit($file)
 {
     if (form::isPostBack()) {
         $content = request::post('source');
         msg::success('保存测试', '测试,继续编辑或者返回' . zotop::dump($content, true), 'reload');
     }
     $source = file::read(ROOT . $file);
     $page['title'] = '文件编辑器';
     page::header($page);
     page::top();
     page::navbar($this->navbar());
     form::header(array('class' => 'sourceEditor'));
     form::field(array('type' => 'label', 'label' => zotop::t('文件名称'), 'name' => 'filename', 'value' => $file, 'valid' => '', 'description' => zotop::t('')));
     form::field(array('type' => 'source', 'label' => zotop::t('文件内容'), 'name' => 'source', 'value' => $source, 'valid' => 'required:true', 'description' => zotop::t('')));
     form::buttons(array('type' => 'submit', 'value' => '保存文件'), array('type' => 'back'));
     form::footer();
     page::bottom();
     page::footer();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:19,代码来源:file.php

示例9: actionInfo

 public function actionInfo()
 {
     $user = zotop::model('system.user');
     $user->id = (int) zotop::user('id');
     if (form::isPostBack()) {
         $post = form::post();
         $update = $user->update($post, $user->id);
         if ($update) {
             msg::success('资料设置成功,正在刷新页面,请稍后……', url::location());
         }
         msg::error();
     }
     $data = $user->read();
     $page = new page();
     $page->title = zotop::t('个人中心');
     $page->set('navbar', $this->navbar());
     $page->set('globalid', $user->globalid());
     $page->set('data', $data);
     $page->display();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:20,代码来源:mine.php

示例10: actionEdit

 public function actionEdit($file = '')
 {
     $file = empty($file) ? zotop::get('file') : $file;
     $file = trim(url::decode($file), '/');
     $filepath = ZOTOP_PATH_ROOT . DS . str_replace('/', DS, $file);
     if (form::isPostBack()) {
         $content = request::post('source');
         $content = trim($content);
         if (empty($content)) {
             msg::error('内容为空,无法保存!');
         }
         file::write($filepath, trim($content));
         msg::success('内容保存成功!');
     }
     $filecontent = file::read($filepath);
     $page = new dialog();
     $page->title = '文件编辑器';
     $page->set('file', $file);
     $page->set('filepath', $filepath);
     $page->set('filecontent', $filecontent);
     $page->display();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:22,代码来源:file.php

示例11: actionImageFromLocal

 public function actionImageFromLocal($globalid, $field, $image)
 {
     $upload = zotop::model('zotop.upload');
     $upload->alowexts = array('jpg', 'jpeg', 'gif', 'png', 'bmp');
     if (form::isPostBack()) {
         $upload->bind('globalid', request::post('globalid'));
         $upload->bind('field', request::post('field'));
         $upload->bind('description', request::post('description'));
         $files = $upload->save();
         $image = $files[0];
         if ($upload->error() == 0 && $image) {
             msg::success($upload->msg(), zotop::url('zotop/upload/imagePreview', array('globalid' => $globalid, 'field' => $field, 'image' => url::encode($image['path']))));
         }
         msg::error($upload->msg());
     }
     $page = new dialog();
     $page->set('title', '本地上传');
     $page->set('navbar', $this->navbar($globalid, $field, $image));
     $page->set('alowexts', $upload->alowexts);
     $page->set('maxsize', $upload->maxsize);
     $page->display();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:22,代码来源:upload.php

示例12: actionEdit

 public function actionEdit($file)
 {
     $filepath = realpath(ZOTOP_PATH_ROOT . DS . trim($file, '/'));
     if (empty($file)) {
         return false;
     }
     if (form::isPostBack()) {
         $content = request::post('source');
         $content = trim($content);
         if (empty($content)) {
             msg::error('内容为空,无法保存!');
         }
         file::write($filepath, trim($content));
         msg::success('内容保存成功!');
     }
     $content = file::read($filepath);
     $page = new dialog();
     $page->title = '文件编辑器';
     $page->set('file', $file);
     $page->set('filepath', $filepath);
     $page->set('content', $content);
     $page->display();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:23,代码来源:file.php

示例13: actionStatus

 public function actionStatus($id, $status = -1)
 {
     $usergroup = zotop::model('system.usergroup');
     $post = array('status' => $status);
     $update = $usergroup->update($post, $id);
     if ($update) {
         $usergroup->cache(true);
         msg::success('操作成功,正在刷新页面,请稍后……', zotop::url('system/usergroup'));
     }
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:10,代码来源:usergroup.php

示例14: deleteAction

 public function deleteAction($id)
 {
     $user = zotop::model('zotop.user');
     $user->id = $id;
     $user->read();
     if ($user->id == 1 || $user->groupid === 0) {
         msg::error('系统管理员无法被删除');
     }
     zotop::run('zotop.user.delete', $user);
     if ($user->delete()) {
         msg::success('删除成功,正在重载数据,请稍后……', zotop::url('zotop/user'));
     }
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:13,代码来源:user.php

示例15: actionFulltext

 public function actionFulltext($tablename, $fieldname)
 {
     $indexes = zotop::db()->table($tablename)->index();
     if (isset($indexes[$fieldname])) {
         zotop::db()->table($tablename)->index($fieldname, 'DROP');
     }
     $result = zotop::db()->table($tablename)->index($fieldname, 'FULLTEXT');
     if ($result) {
         msg::success('操作成功,已经成功的将该字段设置为全文索引', zotop::url('database/field/index', array('tablename' => $tablename)));
     }
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:11,代码来源:field.php


注:本文中的msg::success方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。