本文整理汇总了PHP中_message函数的典型用法代码示例。如果您正苦于以下问题:PHP _message函数的具体用法?PHP _message怎么用?PHP _message使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_message函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: send_mobile_shop_code
/**
* 发送用户手机获奖短信
* mobile @用户手机号
* uid @用户的ID
* code @中奖码
*/
function send_mobile_shop_code($mobile = null, $uid = null, $code = null)
{
if (!$uid) {
_message("发送用户手机获奖短信,用户ID不能为空!");
}
if (!$mobile) {
_message("发送用户手机获奖短信,手机号码不能为空!");
}
if (!$code) {
_message("发送用户手机获奖短信,中奖码不能为空!");
}
$db = System::load_sys_class('model');
$template = $db->GetOne("select * from `@#_caches` where `key` = 'template_mobile_shop'");
if (!$template) {
$template = array();
$content = "你在" . _cfg("web_name") . "够买的商品已中奖,中奖码是:" . $code;
}
if (empty($template['value'])) {
$content = "你在" . _cfg("web_name") . "够买的商品已中奖,中奖码是:" . $code;
} else {
if (strpos($template['value'], "00000000") == true) {
$content = str_ireplace("00000000", $code, $template['value']);
} else {
$content = $template['value'] . $code;
}
}
return _sendmobile($mobile, $content);
}
示例2: tag
public function tag()
{
$search = $this->segment_array();
array_shift($search);
array_shift($search);
array_shift($search);
$search = implode('/', $search);
if (!$search) {
_message("输入搜索关键字");
}
$search = urldecode($search);
$search = safe_replace($search);
if (!_is_utf8($search)) {
$search = iconv("GBK", "UTF-8", $search);
}
$mysql_model = System::load_sys_class('model');
$search = str_ireplace("union", '', $search);
$search = str_ireplace("select", '', $search);
$search = str_ireplace("delete", '', $search);
$search = str_ireplace("update", '', $search);
$search = str_ireplace("/**/", '', $search);
$title = $search . ' - ' . _cfg('web_name');
$shoplist = $mysql_model->GetList("select title,thumb,id,sid,zongrenshu,canyurenshu,shenyurenshu,money from `@#_shoplist` WHERE shenyurenshu !=0 and `title` LIKE '%" . $search . "%' order by shenyurenshu desc");
$list = count($shoplist);
include templates("search", "search");
}
示例3: EditConfig
function EditConfig($file = '', $name = '', $value = '', $daxiao = 'xiao')
{
static $content = array();
if (!isset($content[$file])) {
$content[$file] = file_get_contents(G_CONFIG . $file . '.inc.php');
if (!is_writable(G_CONFIG . $file . '.inc.php')) {
_message('Please chmod "' . $file . '" to 0777 !');
}
}
if (empty($name)) {
return false;
}
if ($daxiao == 'xiao') {
$value = strtolower(new_addslashes($value));
}
if ($daxiao == 'da') {
$value = strtoupper(new_addslashes($value));
}
if ($daxiao == 'no') {
$value = new_addslashes($value);
}
$pat = "/\\'{$name}\\'\\s*=>\\s*([']?)[^']*([']?)(\\s*),/is";
$content[$file] = preg_replace($pat, "'{$name}' => \${1}" . $value . "\${2}\${3},", $content[$file]);
file_put_contents(G_CONFIG . $file . '.inc.php', $content[$file]);
}
示例4: CheckAdminInfo
protected final function CheckAdminInfo($uid = null, $ashell = null)
{
$this->db = System::load_app_model('admin_model', G_ADMIN_DIR);
if ($uid && $ashell) {
$CheckId = _encrypt($uid, 'DECODE');
$CheckAshell = _encrypt($ashell, 'DECODE');
} else {
$CheckId = _encrypt(_getcookie("AID"), 'DECODE');
$CheckAshell = _encrypt(_getcookie("ASHELL"), 'DECODE');
}
if (!$CheckId || !$CheckAshell) {
return false;
}
$info = $this->db->GetOne("SELECT * FROM `@#_admin` WHERE `uid` = '{$CheckId}'");
if (isset($_POST['dosubmit']) || isset($_POST['submit-1'])) {
if ($info[mid] == '1') {
_message("测试帐号无修改权限!");
}
}
if (!$info) {
return false;
}
$infoshell = md5($info['username'] . $info['userpass']) . md5($_SERVER['HTTP_USER_AGENT']);
if ($infoshell != $CheckAshell) {
return false;
}
$this->AdminInfo = $info;
return true;
}
示例5: buyrecord
public function buyrecord()
{
$this_time_h = date("H");
$this_time_i = date("i");
$this->db = System::load_sys_class("model");
if (isset($_POST['dosubmit'])) {
$start_time = $_POST['start_time_data'] . ' ' . $_POST['start_time_h'] . ':' . $_POST['start_time_i'] . ':00';
$end_time = $_POST['end_time_data'] . ' ' . $_POST['end_time_h'] . ':' . $_POST['end_time_i'] . ':00';
$start_time = strtotime($start_time);
$end_time = strtotime($end_time);
if (strlen($start_time) != 10 && strlen($end_time) != 10) {
_message("参数不正确!");
}
if ($end_time < $start_time) {
_message("对不起!查询开始时间不得大于结束时间");
}
if ($end_time - 7200 > $start_time) {
_message("对不起!查询时间跨度不得超过2小时");
}
$start_time .= '.000';
$end_time .= '.000';
$RecordList = $this->db->GetList("select username,uid,shopid,shopname,shopqishu,gonumber,time from `@#_member_go_record` where `time` > '{$start_time}' and `time` < '{$end_time}' limit 0,20");
} else {
$time = time();
$start_time = $time - 7200 . '.000';
$end_time = $time . '.000';
$RecordList = $this->db->GetList("select username,uid,shopid,shopname,shopqishu,gonumber,time from `@#_member_go_record` where `time` > '{$start_time}' and `time` < '{$end_time}' limit 0,20");
}
include templates("index", "buyrecord");
}
示例6: pay_set
public function pay_set()
{
$payid = intval($this->segment(4));
$pay = $this->db->GetOne("SELECT * FROM `@#_pay` where `pay_id` = '{$payid}'");
if (!$pay) {
_message("参数错误");
}
if ($pay['pay_class'] == 'yeepay') {
if (!file_exists(G_SYSTEM . 'modules/' . ROUTE_M . '/lib/yeepay.class.php')) {
_message("开通易宝支付请联系官网!<a href='http://www.yungoucms.com/'>http://www.yungoucms.com/</a>", 'http://www.yungoucms.com/', 10);
}
}
$pay['pay_key'] = @unserialize($pay['pay_key']);
if (!is_array($pay['pay_key'])) {
$pay['pay_key'] = array("id" => array("name" => "商户号", "val" => ""), "key" => array("name" => "密匙", "val" => ""));
}
if (isset($_POST['dosubmit'])) {
$name = htmlspecialchars($_POST['pay_name']);
$thumb = htmlspecialchars($_POST['pay_thumb']);
$type = intval($_POST['pay_type']);
$des = htmlspecialchars($_POST['pay_des']);
$start = intval($_POST['pay_start']);
$pay_key = $_POST['pay_key'];
foreach ($pay_key as $key => $val) {
$pay_key[$key] = array("name" => $pay['pay_key'][$key]['name'], "val" => $pay_key[$key]);
}
$pay_key = serialize($pay_key);
$this->db->Query("UPDATE `@#_pay` SET `pay_name` = '{$name}',`pay_thumb` = '{$thumb}',`pay_type` = '{$type}',`pay_des` = '{$des}',`pay_start` = '{$start}',`pay_key` = '{$pay_key}' where `pay_id` = '{$payid}'");
_message("操作成功", WEB_PATH . '/pay/pay/pay_list');
}
$arr = array("id" => array("name" => "支付宝商户号:", "val" => "12322313"), "key" => array("name" => "支付宝密钥:", "val" => "8934e7d15453e97507ef794cf7b0519d1"), "user" => array("name" => "支付宝账号:", "val" => "xx@qq.ccc"));
include $this->tpl(ROUTE_M, 'payset');
}
示例7: init
public function init()
{
$mobile = System::load_sys_config("mobile");
if (!isset($mobile['cfg_mobile_2']) || !isset($mobile['cfg_mobile_on'])) {
$mobiles = array();
$mobiles['cfg_mobile_1'] = $mobiles['cfg_mobile_2'] = array();
$mobiles['cfg_mobile_2']['mid'] = $mobile['mid'];
$mobiles['cfg_mobile_2']['mpass'] = $mobile['mpass'];
$mobiles['cfg_mobile_2']['mqianming'] = $mobile['mqianming'];
$mobiles['cfg_mobile_1']['mid'] = '';
$mobiles['cfg_mobile_1']['mpass'] = '';
$mobiles['cfg_mobile_on'] = 2;
if (!is_writable(G_CONFIG . 'mobile.inc.php')) {
_message('Please chmod mobile.ini.php to 0777 !');
}
$html = var_export($mobiles, true);
$html = "<?php \n return " . $html . "; \n?>";
$ok = file_put_contents(G_CONFIG . 'mobile.inc.php', $html);
if ($ok) {
_message("升级成功!");
}
} else {
@unlink(__FILE__);
_message("无需升级!");
}
}
示例8: mobilecheck
public function mobilecheck()
{
$webname = $this->_cfg['web_name'];
$title = "验证手机";
$time = 3000;
$name = $this->segment(4);
$member = $this->db->GetOne("SELECT * FROM `@#_member` WHERE `mobile` = '{$name}' LIMIT 1");
//var_dump($member);exit;
if (!$member) {
_message("参数不正确!");
}
if ($member['mobilecode'] == 1) {
_message("该账号验证成功", WEB_PATH . "/mobile/mobile");
}
if ($member['mobilecode'] == -1) {
$sendok = send_mobile_reg_code($name, $member['uid']);
if ($sendok[0] != 1) {
_message($sendok[1]);
}
header("location:" . WEB_PATH . "/mobile/user/mobilecheck/" . $member['mobile']);
exit;
}
$enname = substr($name, 0, 3) . '****' . substr($name, 7, 10);
$time = 120;
include templates("mobile/user", "mobilecheck");
}
示例9: qiantai
public function qiantai()
{
sleep(2);
$out_trade_no = $_GET['out_trade_no'];
//商户订单号
$dingdaninfo = $this->db->GetOne("select * from `@#_member_addmoney_record` where `code` = '{$out_trade_no}'");
if (!$dingdaninfo || $dingdaninfo['status'] == '未付款') {
$agent = $_SERVER['HTTP_USER_AGENT'];
if (strpos($agent, "comFront") || strpos($agent, "iPhone") || strpos($agent, "MIDP-2.0") || strpos($agent, "Opera Mini") || strpos($agent, "UCWEB") || strpos($agent, "Android") || strpos($agent, "Windows CE") || strpos($agent, "SymbianOS")) {
_messagemobile("支付失败!", WEB_PATH . "/member/mobile");
} else {
_message("支付失败!", WEB_PATH . "/member/cart/paysuccess");
}
} else {
if (empty($dingdaninfo['scookies'])) {
_message("充值成功!", WEB_PATH . "/member/home/userbalance");
} else {
if ($dingdaninfo['scookies'] == '1') {
$agent = $_SERVER['HTTP_USER_AGENT'];
if (strpos($agent, "comFront") || strpos($agent, "iPhone") || strpos($agent, "MIDP-2.0") || strpos($agent, "Opera Mini") || strpos($agent, "UCWEB") || strpos($agent, "Android") || strpos($agent, "Windows CE") || strpos($agent, "SymbianOS")) {
_messagemobile("支付成功!", WEB_PATH . "/member/mobile");
} else {
_message("支付成功!", WEB_PATH . "/member/cart/paysuccess");
}
} else {
$agent = $_SERVER['HTTP_USER_AGENT'];
if (strpos($agent, "comFront") || strpos($agent, "iPhone") || strpos($agent, "MIDP-2.0") || strpos($agent, "Opera Mini") || strpos($agent, "UCWEB") || strpos($agent, "Android") || strpos($agent, "Windows CE") || strpos($agent, "SymbianOS")) {
_messagemobile("商品还未购买,请重新购买商品!", WEB_PATH . "/member/mobile");
} else {
_message("商品还未购买,请重新购买商品!", WEB_PATH . "/member/cart/paysuccess");
}
}
}
}
}
示例10: home
public function home()
{
global $core, $bio;
$v = $this->__(array_merge(w('a r'), _array_keys(w('s'), 0)));
if (!empty($v->a)) {
}
if (!empty($v->r)) {
$sql = 'SELECT *
FROM _objects o, _objects_type t, _bio b, _objects_rel_assoc ra, _objects_rel_type rt
WHERE t.type_alias = ?
AND rt.type_alias = ?
AND o.object_bio = b.bio_id
AND ra.assoc_object = o.object_id
AND ra.assoc_rel_type = rt.type_id
ORDER BY o.object_time
LIMIT ??, ??';
$news = sql_rowset(sql_filter($sql, 'news', $v->r, $v->s, $core->v('objects_per_page')));
$sql = 'SELECT COUNT(object_id) AS total
FROM _objects o, _objects_type t, _objects_rel_assoc ra, _objects_rel_type rt
WHERE t.type_alias = ?
AND rt.type_alias = ?
AND ra.assoc_object = o.object_id
AND ra.assoc_rel_type = rt.type_id';
$news_total = sql_field(sql_filter($sql, 'news', $v->r), 'total', 0);
} else {
$sql = 'SELECT *
FROM _objects o, _objects_type t, _bio b
WHERE t.type_alias = ?
AND o.object_type = t.type_id
AND o.object_bio = b.bio_id
ORDER BY o.object_time
LIMIT ??, ??';
$news = sql_rowset(sql_filter($sql, 'news', $v->s, $core->v('objects_per_page')));
$sql = 'SELECT COUNT(object_id) AS total
FROM _objects o, _objects_type t
WHERE t.type_alias = ?
AND o.object_type = t.type_id';
$news_total = sql_field(sql_filter($sql, 'news'), 'total', 0);
}
foreach ($news as $i => $row) {
if (!$i) {
_style('news', _pagination(_link('news'), 's:%d', $news_total + 1, $core->v('objects_per_page'), $v->s));
}
$_row = array('ID' => $row->object_id, 'BIO' => $row->object_bio, 'SUBJECT' => $row->object_subject, 'CONTENT' => _message($row->object_content), 'TIME' => $bio->format_date($row->object_time));
_style('news.row', array_merge($_row, $this->_profile($row)));
}
$sql = 'SELECT *
FROM _objects_rel_type
ORDER BY type_alias';
$rel_type = sql_rowset($sql);
foreach ($rel_type as $i => $row) {
if (!$i) {
_style('rel_type', array('NEWS_URL' => _link('news')));
}
$row->type_alias = _link('news', array('r' => $row->type_alias));
_style('rel_type.row', $row);
}
return;
}
示例11: return_meg
private function return_meg($content = '', $title = '', $type = "")
{
if (_is_mobile()) {
_messagemobile($content, $title, $type);
} else {
_message($content);
}
}
示例12: __construct
public function __construct()
{
parent::__construct();
$this->db = System::load_sys_class("model");
$member = $this->userinfo;
if (empty($member['uid'])) {
_message('请先登录', WEB_PATH . '/member/user/login');
}
}
示例13: init
public function init()
{
$db = System::load_sys_class("model");
$q = $db->Query("\t\t\n\t\t\tCREATE TABLE `@#_qqset` (\n\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t `qq` varchar(11) DEFAULT NULL,\n\t\t\t `name` varchar(50) DEFAULT NULL,\n\t\t\t `type` varchar(20) DEFAULT NULL,\n\t\t\t `province` varchar(50) DEFAULT NULL,\n\t\t\t `city` varchar(50) DEFAULT NULL,\n\t\t\t `county` varchar(50) DEFAULT NULL,\n\t\t\t `qqurl` varchar(250) DEFAULT NULL,\n\t\t\t `full` varchar(6) DEFAULT NULL COMMENT '是否已满',\n\t\t\t `subtime` int(11) DEFAULT NULL,\n\t\t\t PRIMARY KEY (`id`)\n\t\t\t) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;\n\t\t");
if ($q) {
unlink(__FILE__);
_message("升级成功");
}
}
示例14: init
public function init()
{
$member = $this->userinfo;
/*if($member['mobilecode']==-1 || empty($member['mobile'])){
_message("对不起充值只针对绑定手机的<br/>客户使用,赶紧去绑定吧!");
exit;
}*/
if (isset($_POST['recharge'])) {
$code = htmlspecialchars($_POST['code']);
$codepwd = htmlspecialchars($_POST['codepwd']);
$codenumber = strlen($code);
if (empty($code) || strlen($code) != 21) {
_message("卡密号码输入有误!");
exit;
}
$upcode = array();
$res = $this->db->GetOne("select * from `@#_card_recharge` where `code`='{$code}'");
if (!$res) {
_message("卡密号码输入有误!");
exit;
}
if ($res['codepwd'] != $codepwd) {
_message("卡密密码输入有误!");
exit;
}
if ($res['isrepeat'] == 'Y' && $res['rechargecount'] > 0) {
_message("您的充值卡已使用完!请换用别的密卡!");
exit;
} elseif ($res['isrepeat'] == 'Y' && $res['rechargecount'] == 0) {
$time = time();
$upcode = $this->db->query("update `@#_card_recharge` set `uid`='{$member['uid']}',`time`='{$time}',`rechargecount`=`rechargecount`+1 where `id`='{$res['id']}'");
}
if ($res['isrepeat'] == 'N' && $res['rechargecount'] >= $res['maxrechargecout']) {
_message("您的充值卡已使用完!请换用别的密卡!");
exit;
}
if ($res['isrepeat'] == 'N' && $res['rechargecount'] < $res['maxrechargecout']) {
$time = time();
$upcode = $this->db->query("update `@#_card_recharge` set `uid`='{$member['uid']}',`time`='{$time}',`rechargecount`=`rechargecount`+1 where `id`='{$res['id']}'");
}
if ($upcode) {
$time = time();
$member_money = $this->db->query("update `@#_member` set money=money+'{$res['money']}' where `uid`='{$member['uid']}'");
$member_money1 = $this->db->query("insert into `@#_member_account` (`uid`,`type`,`pay`,`content`,`money`,`time`) values ('{$member['uid']}','1','账户','卡密充值','{$res['money']}','{$time}')");
if ($member_money) {
_message("卡密充值成功,请查看您的账户!");
exit;
} else {
_message("充值失败!");
exit;
}
} else {
_message("充值失败!");
}
}
}
示例15: lists
public function lists()
{
$uid = intval($this->segment(4));
$list_where = '';
if (!$uid) {
$list_where = "1";
} else {
$uid = "`uid` = '{$uid}'";
}
if (isset($_POST['sososubmit'])) {
$posttime1 = !empty($_POST['posttime1']) ? strtotime($_POST['posttime1']) : NULL;
$posttime2 = !empty($_POST['posttime2']) ? strtotime($_POST['posttime2']) : NULL;
$sotype = $_POST['sotype'];
$sosotext = $_POST['sosotext'];
if ($posttime1 && $posttime2) {
if ($posttime2 < $posttime1) {
_message("结束时间不能小于开始时间");
}
$list_where = "`addtime` > '{$posttime1}' AND `addtime` < '{$posttime2}'";
}
if ($posttime1 && empty($posttime2)) {
$list_where = "`addtime` > '{$posttime1}'";
}
if ($posttime2 && empty($posttime1)) {
$list_where = "`addtime` < '{$posttime2}'";
}
if (empty($posttime1) && empty($posttime2)) {
$list_where = false;
}
if (!empty($sosotext)) {
if ($sotype == 'uid') {
$sosotext = intval($sosotext);
if ($list_where) {
$list_where .= " AND a.uid = '{$sosotext}'";
} else {
$list_where = "a.uid = '{$sosotext}'";
}
}
} else {
if (!$list_where) {
$list_where = '1';
}
}
}
$num = 20;
$total = $this->db->GetCount("SELECT COUNT(*) FROM `@#_qzone` a LEFT JOIN `@#_member` b ON a.uid=b.uid WHERE {$list_where}");
$page = System::load_sys_class('page');
if (isset($_GET['p'])) {
$pagenum = $_GET['p'];
} else {
$pagenum = 1;
}
$page->config($total, $num, $pagenum, "0");
$arr = $this->db->GetPage("SELECT a.*,b.username,b.email,b.mobile FROM `@#_qzone` a LEFT JOIN `@#_member` b ON a.uid=b.uid WHERE {$list_where} ORDER BY id DESC", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0));
include $this->tpl(ROUTE_M, 'qzonemanage');
}