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


PHP msg类代码示例

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


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

示例1: try_login

 function try_login()
 {
     $this->user = $this->facebook->getUser();
     //defaultni vypis problemu s prihlasenim
     $l = new lang("layout");
     $msg = new msg();
     if ($this->user == null) {
         $msg->set_text($l->t("bad_fb_login"), "error");
         redirect($l->l("prihlaseni"));
     }
     //nyni mame udaje o uzivateli
     //pokusime se zjistit, zda-li jiz v databazi nekdo takovy je (fb_id)
     $sql = sql_query("select id, nick from users\n\t\t\t\t\t\t\t\t\t\t\t\t\twhere (fb_id = '" . $this->user . "')");
     $data = sql_fetch_object($sql);
     //jiz v databzi existuje
     if ($data->id) {
         $_SESSION['uid'] = $data->id;
         $_SESSION['me'] = new me($data->id);
         $_SESSION['me']->homepage_redirect();
     } else {
         $new_login = $this->create_login();
         if ($new_login) {
             $_SESSION['uid'] = $new_login[0];
             $_SESSION['me'] = new me($new_login[0]);
             //prvotni presun po registraci na nastaveni a doplneni udaju
             header("location: " . $l->l("osobni-udaje") . "?first=true");
             return true;
         }
     }
     $msg->set_text($l->t("bad_fb_login"), "error");
     redirect($l->l("prihlaseni"));
 }
开发者ID:janda2,项目名称:Fitness-shop,代码行数:32,代码来源:my_facebook.php

示例2: module_register

 protected function module_register()
 {
     if ($this->module_is_logedin()) {
         header("Location:" . cls_general::create_url(array('plugin', 'users', 'action', 'profile')));
     } elseif ($this->settings['register'] == '0') {
         //new register was closed
         $msg = new msg();
         return $msg->msg('Warrning!', 'Register new user was closed by Administrator.', 'danger');
     }
     return $this->view_register();
 }
开发者ID:MrMiM,项目名称:sarkesh,代码行数:11,代码来源:module.php

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

示例4: actionIndex

 public function actionIndex()
 {
     $db = zotop::db();
     if ($db->connect()) {
         zotop::redirect(zotop::url('database/table'));
     }
     msg::error('连接数据库失败,请检查数据库配置是否正确');
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:8,代码来源:index.php

示例5: alert

 public static function alert($title, $content = '', $life = 0)
 {
     $msg = array();
     $msg['type'] = 'alert';
     $msg['title'] = empty($content) ? 'alert' : $title;
     $msg['content'] = empty($content) ? $title : $content;
     $msg['content'] = empty($content) ? $title : $content;
     $msg['life'] = $life;
     msg::show($msg);
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:10,代码来源:msg.php

示例6: try_login

 function try_login()
 {
     //defaultni vypis problemu s prihlasenim
     $l = new lang("layout");
     $msg = new msg();
     //pokud nam google vrati code, muzeme se autentifikovat a ziksat token
     $code = clear("code");
     if ($code) {
         $this->client->authenticate();
         $this->token = $this->client->getAccessToken();
     }
     /*
     				//kdybychom chteli na nejake jine strance zase s uctem u googlu pracovat
     				// musimve vytvorit to spojeni a pomoci se token ze session se autorizovat u googlu
     				//ale mi tady session token nulujeme, takze uz se dal pouzit neda
     						if ($_SESSION['token']) {
     						  $this->client->setAccessToken($_SESSION['token']);
     						}
     				//kdyz ho chceme ziskat
     							  $_SESSION['token'] = $this->client->getAccessToken();
     */
     if ($this->token) {
         $my_data = $this->plus->people->get('me');
         $gp_id = $my_data['id'];
         //nyni mame udaje o uzivateli
         //pokusime se zjistit, zda-li jiz v databazi nekdo takovy je (gp_id)
         $sql = sql_query("select id, nick from users\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhere (gp_id = '" . $gp_id . "')");
         $data = sql_fetch_object($sql);
         //jiz v databazi existuje
         if ($data->id) {
             $_SESSION['uid'] = $data->id;
             $_SESSION['me'] = new me($data->id);
             $_SESSION['me']->homepage_redirect();
         } else {
             $new_login = $this->create_login($my_data);
             if ($new_login) {
                 $_SESSION['uid'] = $new_login[0];
                 $_SESSION['me'] = new me($new_login[0]);
                 //prvotni presun po registraci na nastaveni a doplneni udaju
                 header("location: " . $l->l("osobni-udaje") . "?first=true");
                 return true;
             }
         }
     }
     $msg->set_text($l->t("bad_gplus_login"), "error");
     redirect($l->l("prihlaseni"));
 }
开发者ID:janda2,项目名称:Fitness-shop,代码行数:47,代码来源:my_gplus.php

示例7: onDefault

 public function onDefault()
 {
     $db = zotop::db();
     if ($db->connect()) {
         zotop::redirect('database/table');
     }
     msg::error('连接数据库失败', '请检查数据库配置是否正确');
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:8,代码来源:index.php

示例8: 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

示例9: sqlAction

 public function sqlAction()
 {
     if (form::isPostBack()) {
         msg::error('该功能已经被禁用,请进入设置开启');
     }
     $page = new dialog();
     $page->title = '数据库管理:' . $database['database'] . ' @ ' . $database['hostname'] . '<i>></i> 执行sql语句';
     $page->display();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:9,代码来源:table.php

示例10: 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

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

示例12: success

 /**
  * 显示成功消息
  *
  */
 public static function success($content = '', $url = '', $life = 2)
 {
     $msg = array('type' => 'success', 'title' => zotop::t('success'), 'content' => '', 'detail' => '', 'url' => $url, 'life' => $life, 'action' => '');
     if (is_array($content)) {
         $msg = array_merge($msg, $content, array('type' => 'success'));
     } else {
         $msg['content'] = $content;
     }
     msg::show($msg);
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:14,代码来源:msg.php

示例13: get_msg

 function get_msg()
 {
     $out = '';
     if (!empty($_SESSION['msg'])) {
         $out = $_SESSION['msg'];
     }
     $_SESSION['msg'] = '';
     msg::reset();
     return $out;
 }
开发者ID:salomay,项目名称:refreshin,代码行数:10,代码来源:msg.php

示例14: update

 function update()
 {
     $manager = new manager();
     $manager->db->where('id=' . (int) $_GET['id']);
     $res = $manager->db->update($_POST);
     if ($res === false) {
         msg::info('back', $manager->db->msg, 'error');
     } else {
         msg::info('?c=manager');
     }
 }
开发者ID:robinhunan,项目名称:coolphp,代码行数:11,代码来源:manager.php

示例15: update

 function update()
 {
     $__table__ = new __table__();
     $__table__->db->where('id=' . (int) $_GET['id']);
     $arr = $__table__->checkData($_POST);
     $res = $__table__->db->update($arr);
     if ($res === false) {
         msg::info('back', $__table__->db->msg, 'error');
     } else {
         msg::info('?c=__table__');
     }
 }
开发者ID:robinhunan,项目名称:coolphp,代码行数:12,代码来源:modules.php


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