當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。