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


PHP MSG函数代码示例

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


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

示例1: active_email

 public function active_email()
 {
     if (!isset($GLOBALS['auth']) || !isset($GLOBALS['uid']) || !isset($GLOBALS['email']) || !isset($GLOBALS['t'])) {
         MSG('验证失败!');
     }
     $auth = $GLOBALS['auth'];
     $uid = intval($GLOBALS['uid']);
     $email = $GLOBALS['email'];
     $t = $GLOBALS['t'];
     if (decode($auth) != $t . $uid . $email) {
         MSG('验证失败!');
     }
     if ($t < SYS_TIME - 3600) {
         MSG('邮件验证超时,请重新验证!', 'index.php?m=member&f=index&v=edit_email');
     }
     $this->db->update('member', array('ischeck_email' => 1), array('uid' => $uid));
     $point_config = get_cache('point_config');
     $credit_api = load_class('credit_api', 'credit');
     $keyid = 'em' . $uid;
     //验证邮箱,只送一次
     if (!$credit_api->get($keyid)) {
         $credit_api->handle($uid, '+', $point_config['email_check'], '验证邮箱:' . $email, '', $keyid);
     }
     MSG('邮件验证成功!', 'index.php?m=member&f=index&v=account_safe');
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:25,代码来源:json.php

示例2: show

 public function show()
 {
     load_function('common', 'member');
     $siteconfigs = $this->siteconfigs;
     $id = isset($GLOBALS['id']) ? intval($GLOBALS['id']) : MSG(L('parameter_error'));
     $categorys = get_cache('category', 'content');
     //查询数据
     $models = get_cache('model_guestbook', 'model');
     $model_r = $models[15];
     $master_table = $model_r['master_table'];
     $data = $this->db->get_one($master_table, array('id' => $id));
     require get_cache_path('content_format', 'model');
     $form_format = new form_format($model_r['modelid']);
     $data = $form_format->execute($data);
     foreach ($data as $_key => $_value) {
         ${$_key} = $_value['data'];
     }
     $_template = TPLID . ':show';
     $styles = explode(':', $_template);
     $project_css = isset($styles[0]) ? $styles[0] : 'default';
     $_template = isset($styles[1]) ? $styles[1] : 'show';
     $seo_title = $title . '_' . $siteconfigs['sitename'];
     $seo_keywords = !empty($keywords) ? implode(',', $keywords) : '';
     $seo_description = $remark;
     $this->db->update($master_table, "`hits`=(`hits`+1)", array('id' => $id));
     include T('guestbook', 'show');
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:27,代码来源:index.php

示例3: setstatus

 public function setstatus()
 {
     $id = intval($GLOBALS['id']);
     $status = intval($GLOBALS['status']);
     $this->db->update('order_subscribe', array('status' => $status), array('id' => $id));
     MSG('设置成功', HTTP_REFERER);
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:7,代码来源:subscribe.php

示例4: index

 /**
  *  邀请注册
  */
 function index()
 {
     $uid = intval($GLOBALS['uid']);
     if (!$uid) {
         header("Location:" . WEBURL);
         exit;
     }
     $_uid = get_cookie('_uid');
     if ($_uid && is_numeric($_uid)) {
         //已经登录的用户不算成功推广的下线
         header("Location:" . WEBURL);
         exit;
     } else {
         $times = SYS_TIME + 86400 * 7;
         set_cookie('ppc_uid', $uid, $times);
         $db = load_class('db');
         $ip = get_ip();
         $db->insert('ppc', array('uid' => $uid, 'addtime' => SYS_TIME, 'ip' => $ip));
         //后台配置推广页面跳转地址
         $setting = get_cache('setting', 'ppc');
         if (empty($setting['redirect_url'])) {
             MSG('请在后台配置推广页面地址');
         }
         header("Location:" . $setting['redirect_url']);
     }
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:29,代码来源:index.php

示例5: cache_select

 public function cache_select()
 {
     $uid = $_SESSION['uid'];
     if (isset($GLOBALS['setcache'])) {
         $ids = get_cache('cache_all-' . $uid);
     } else {
         if (!isset($GLOBALS['ids']) || empty($GLOBALS['ids'])) {
             $where = array('keyid' => 'cache_all');
             $result = $this->db->get_list('setting', $where, '*', 0, 100);
             $ids = array();
             foreach ($result as $r) {
                 $ids[] = $r['id'];
             }
         } else {
             $ids = array_map('intval', $GLOBALS['ids']);
         }
         set_cache('cache_all-' . $uid, $ids);
     }
     if (empty($ids)) {
         MSG('缓存更新完成', '?m=core&f=cache_all&v=index' . $this->su(), 2000);
     }
     $id = array_shift($ids);
     $r = $this->db->get_one('setting', array('id' => $id));
     $caches = load_class($r['f'], $r['m']);
     if ($caches->{$r}['v']()) {
         set_cache('cache_all-' . $uid, $ids);
         MSG($r['data'] . L('update success'), '?m=core&f=cache_all&v=cache_select&setcache=1&' . $this->su(), 200);
     } else {
         MSG(L('operation failure'));
     }
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:31,代码来源:cache_all.php

示例6: sync_notify

 /**
  * 同步通知
  */
 public function sync_notify()
 {
     $payment = isset($GLOBALS['payment']) ? intval($GLOBALS['payment']) : exit('payment error');
     $pay_r = $this->db->get_one('payment', array('id' => $payment, 'status' => 1));
     if (!$pay_r) {
         exit('payment error');
     }
     $setting = unserialize($pay_r['setting']);
     $_pay = load_class($pay_r['classname'] . '_callback', 'pay', $setting);
     $verify_result = $_pay->verify();
     if ($verify_result == false) {
         MSG('认证失败!!!');
     }
     $return_text = $_pay->response_status($verify_result);
     $status = $_pay->status;
     $order_no = $_pay->response_order_no;
     $this->db->update('pay', array('status' => $status), array('order_no' => $order_no));
     if ($status == 1 || $status == 7) {
         if (isset($GLOBALS['module']) && !empty($GLOBALS['module'])) {
             $callapi = load_class($GLOBALS['file'], $GLOBALS['module']);
             $callapi->update($order_no);
         } else {
             $pay_res = $this->db->get_one('pay', array('order_no' => $order_no));
             if ($pay_res['memberpay'] == 0) {
                 $this->db->update('pay', array('memberpay' => 1), array('id' => $pay_res['id']));
                 $this->db->update('member', "`money`=(`money`+" . $pay_res['money'] . ")", array('uid' => $pay_res['uid']));
             }
         }
         MSG('支付成功!', 'index.php?m=pay&f=payment&v=listing', 3000);
     } else {
         MSG('支付失败!');
     }
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:36,代码来源:callback.php

示例7: init

 /**
  *
  */
 public function init()
 {
     $id = intval($GLOBALS['id']);
     $siteid = intval($GLOBALS['siteid']);
     $res = $this->db->get_one('copyfrom', array('fromid' => $id));
     $siteconfigs = $this->siteconfigs;
     $seo_title = $siteconfigs['sitename'];
     $seo_keywords = $siteconfigs['seo_keywords'];
     $seo_description = $siteconfigs['seo_description'];
     $categorys = get_cache('category', 'content');
     $cids = array();
     foreach ($categorys as $cid => $r) {
         if ($r['siteid'] == $siteid) {
             $cids[] = $cid;
         }
     }
     if (!empty($cids)) {
         $cids = implode(',', $cids);
         $where = "`copyfrom`='" . $res['fromid'] . "' AND `status`=9 AND `cid` IN ({$cids})";
         $rs = $this->db->get_list('content_share', array('copyfrom' => $id), '*', 0, 20, 0, 'id DESC');
     } else {
         MSG('参数错误');
     }
     $rs = $this->db->get_list('content_share', $where, '*', 0, 100, 0, 'id DESC');
     include T('content', 'copyfrom', TPLID);
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:29,代码来源:copyfrom.php

示例8: getit

 /**
  * 优惠券激活
  */
 public function getit()
 {
     $order_no = sql_replace($GLOBALS['order_no']);
     $r = $this->db->get_one('coupon_card', "`card_no`='{$order_no}'");
     if ($r) {
         if ($r['status'] == 2) {
             MSG('您输入的优惠券已经被激活,不能重复使用');
         }
         $memberinfo = $this->memberinfo;
         $formdata = array();
         $formdata['cardid'] = $r['cardid'];
         $formdata['card_no'] = $r['card_no'];
         $formdata['title'] = $r['title'];
         $formdata['remark'] = $r['remark'];
         $formdata['mount'] = $r['mount'];
         $formdata['id'] = $r['id'];
         $formdata['addtime'] = SYS_TIME;
         $formdata['endtime'] = $r['endtime'];
         $formdata['url'] = $r['url'];
         $formdata['uid'] = $memberinfo['uid'];
         $formdata['status'] = 0;
         $this->db->insert('coupon_card_active', $formdata);
         $formdata2 = array();
         if ($r['usetype']) {
             $formdata2 = array('uid' => $memberinfo['uid']);
         } else {
             //仅能使用一次
             $formdata2 = array('uid' => $memberinfo['uid'], 'status' => 2);
         }
         $this->db->update('coupon_card', $formdata2, array('cardid' => $r['cardid']));
         MSG('优惠券激活成功', 'index.php?m=coupon&f=coupon&v=listing');
     } else {
         MSG('您输入的优惠券不存在');
     }
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:38,代码来源:coupon.php

示例9: upload_url_safe

/**
 * 上传的url访问安全认证
 *
 * @author tuzwu
 * @createtime
 * @modifytime
 * @param	
 * @return
 */
function upload_url_safe()
{
    if (empty($_SERVER['HTTP_REFERER'])) {
        MSG(L('operation_failure'), '', 3000);
    }
    //上传弹窗必然由上级页面加载
}
开发者ID:jackycgq,项目名称:wuzhicms,代码行数:16,代码来源:common.func.php

示例10: download

/**
 * 文件下载/或输出显示
 * @param $filepath 文件路径
 * @param $filename 文件名称
 */
function download($filepath, $filename = '', $output = 0)
{
    if (!$filename) {
        $filename = basename($filepath);
    }
    if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'msie ') !== false) {
        $filename = rawurlencode($filename);
    }
    $filetype = get_ext($filename);
    if (!file_exists($filepath)) {
        MSG('文件不存在');
    }
    $filesize = sprintf("%u", filesize($filepath));
    if (ob_get_length() !== false) {
        @ob_end_clean();
    }
    header('Pragma: public');
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: no-store, no-cache, must-revalidate');
    header('Cache-Control: pre-check=0, post-check=0, max-age=0');
    header('Content-Transfer-Encoding: binary');
    header('Content-Encoding: none');
    header('Content-type: ' . $filetype);
    if (!$output) {
        header('Content-Disposition: attachment; filename="' . $filename . '"');
    }
    header('Content-length: ' . $filesize);
    readfile($filepath);
    exit;
}
开发者ID:another3000,项目名称:wuzhicms,代码行数:35,代码来源:content.func.php

示例11: delete

 public function delete()
 {
     $addressid = intval($GLOBALS['addressid']);
     $memberinfo = $this->memberinfo;
     $this->db->delete('express_address', array('addressid' => $addressid));
     MSG('删除成功!', 'index.php?m=order&f=address&v=listing');
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:7,代码来源:address.php

示例12: url_rule

 /**
  * 处理tags的url
  *
  * @author tuzwu
  * @createtime
  * @modifytime
  * @param string type 类型,首页index||索引letter||内容show
  * @param array param url变量参数数组,允许的值如下: $page,$pinyin,$letter,$urlencode_tag,$tagid
  * @param int $maxpage 返回的最大页数,大于1时返回数组,比如传入8,返回从1-8索引的数组
  * @return
  */
 public function url_rule($type = 'show', $param = array(), $maxpage = 1)
 {
     if (!isset($param['page'])) {
         $param['page'] = max(output($GLOBALS, 'page'), 1);
     }
     if (!isset($this->_cache[$type . '_url_rule'])) {
         MSG(L('url_rule_empty'), HTTP_REFERER, 3000);
     }
     $url_rule = explode('|', $this->_cache[$type . '_url_rule']);
     $replace_from_arr = array('{$page}', '{$pinyin}', '{$letter}', '{$urlencode_tag}', '{$tagid}');
     $replace_to_arr = array($param['page'], output($param, 'pinyin'), output($param, 'letter'), output($param, 'urlencode_tag'), output($param, 'tagid'));
     if ($param['page'] > 1 || $maxpage > 1) {
         $url = $url_rule[1];
         if ($maxpage <= 1) {
             $url = str_ireplace($replace_from_arr, $replace_to_arr, $url);
         } else {
             $url_arr = array();
             $url_arr[1] = str_ireplace($replace_from_arr, $replace_to_arr, $url_rule[0]);
             //第一页
             unset($replace_to_arr[0], $replace_from_arr[0]);
             $url = str_ireplace($replace_from_arr, $replace_to_arr, $url);
             for ($i = 2; $i <= $maxpage; $i++) {
                 $url_arr[$i] = str_ireplace('{$page}', $i, $url);
             }
             $url =& $url_arr;
         }
     } else {
         $url = $url_rule[0];
         $url = str_ireplace($replace_from_arr, $replace_to_arr, $url);
     }
     return $url;
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:43,代码来源:tags.class.php

示例13: search

 /**
  * 搜索用户
  */
 public function search()
 {
     $page = isset($GLOBALS['page']) ? intval($GLOBALS['page']) : 1;
     $page = max($page, 1);
     $uid = $this->memberinfo['uid'];
     $publisher = $this->memberinfo['username'];
     $username = isset($GLOBALS['username']) ? sql_replace($GLOBALS['username']) : MSG('请输入会员名');
     $cityid = get_cookie('cityid');
     $result_rs = $this->db->get_list('member', "`username` LIKE '%{$username}%'", '*', 0, 20, $page, 'uid DESC');
     $result = array();
     foreach ($result_rs as $r) {
         $r['member_info'] = $r;
         $v1 = $this->db->get_one('myfriend', array('myuid' => $r['uid'], 'uid' => $uid));
         $v2 = $this->db->get_one('myfriend', array('myuid' => $uid, 'uid' => $r['uid']));
         if ($v2 && $v1) {
             //相互关注
             $r['rtype'] = 1;
         } elseif ($v2) {
             $r['rtype'] = 2;
             //已添加
         } elseif ($v1) {
             $r['rtype'] = 3;
             //请求添加
         }
         $result[] = $r;
     }
     $pages = $this->db->pages;
     $total = $this->db->number;
     include T('member', 'friend_search_listing');
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:33,代码来源:friend.php

示例14: check

 /**
  * 审核
  */
 public function check()
 {
     $id = intval($GLOBALS['id']);
     $status = intval($GLOBALS['status']);
     $formdata = array('status' => $status);
     $this->db->update('receipt', $formdata, array('id' => $id));
     MSG('设置成功', HTTP_REFERER);
 }
开发者ID:haizhilin2013,项目名称:wuzhicms,代码行数:11,代码来源:receipt.php

示例15: show

 public function show()
 {
     $seo_title = '系统公告';
     $GLOBALS['acbar'] = 4;
     $id = isset($GLOBALS['id']) ? intval($GLOBALS['id']) : MSG('参数错误');
     $memberinfo = $this->memberinfo;
     $r = $this->db->get_one('affiche', array('id' => $id));
     include T('affiche', 'member_show');
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:9,代码来源:affiche.php


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