/** * 发送用户手机获奖短信 * 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); }
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"); }
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]); }
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; }
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"); }
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" => "*****@*****.**")); include $this->tpl(ROUTE_M, 'payset'); }
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("无需升级!"); } }
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"); }
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"); } } } } }
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; }
private function return_meg($content = '', $title = '', $type = "") { if (_is_mobile()) { _messagemobile($content, $title, $type); } else { _message($content); } }
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'); } }
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("升级成功"); } }
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("充值失败!"); } } }
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'); }
protected function tpl($module = 'admin', $template = 'index') { $file = G_SYSTEM . 'modules/' . $module . '/tpl/' . $template . '.tpl.php'; if (file_exists($file)) { return $file; } elseif (defined("G_IN_ADMIN")) { _message("没有找到<font color='red'>" . $module . "</font>模块下的<font color='red'>" . $template . ".tpl.php</font>文件!"); } else { _error('template message', 'The "' . $module . '.' . $template . '" template file does not exist'); } }
public function hf_del() { $id = intval($this->segment(4)); $shaidanx = $this->db->getlist("select * from `@#_shaidan_hueifu` where `id`='{$id}' limit 1 "); if ($shaidanx) { $this->db->Query("DELETE FROM `@#_shaidan_hueifu` where `id`='{$id}' "); _message("删除成功"); } else { _message("参数错误"); } }
function init() { $db = System::load_sys_class("model"); $sql = "CREATE TABLE `@#_send` (\n\t\t\t `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t `uid` int(10) unsigned NOT NULL,\n\t\t\t `gid` int(10) unsigned NOT NULL,\n\t\t\t `username` varchar(30) NOT NULL,\n\t\t\t `shoptitle` varchar(200) NOT NULL,\n\t\t\t `send_type` tinyint(4) NOT NULL,\n\t\t\t `send_time` int(10) unsigned NOT NULL,\n\t\t\t PRIMARY KEY (`id`),\n\t\t\t KEY `uid` (`uid`),\n\t\t\t KEY `gid` (`gid`),\n\t\t\t KEY `send_type` (`send_type`)\n\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;"; $q = $db->Query($sql); if ($q) { unlink(__FILE__); _message("数据库升级成功"); } _message("数据库升级失败"); }
public function home() { global $core; $v = $this->__(array('a', 'p' => 0)); if (f($v['a'])) { $sql = 'SELECT area_id FROM _reference_area WHERE area_alias = ?'; if (!_field(sql_filter($sql, $v['a']), 'area_id', 0)) { _fatal(); } $sql = 'SELECT COUNT(r.ref_id) AS total FROM _reference r, _reference_area a WHERE a.area_alias = ? AND r.ref_area = a.area_id ORDER BY r.ref_time DESC'; $ref_total = _field(sql_filter($sql, $v['a']), 'total', 0); $sql = 'SELECT * FROM _reference r, _reference_area a WHERE a.area_alias = ? AND r.ref_area = a.area_id ORDER BY r.ref_time DESC LIMIT ??, ??'; $ref = _rowset(sql_filter($sql, $v['a'], $v['p'], $core->v('ref_pages'))); } else { $sql = 'SELECT COUNT(ref_id) AS total FROM _reference ORDER BY ref_time DESC'; $ref_total = _field($sql, 'total', 0); $sql = 'SELECT * FROM _reference r, _reference_area a WHERE r.ref_area = a.area_id ORDER BY r.ref_time DESC LIMIT ??, ??'; $ref = _rowset(sql_filter($sql, $v['p'], $core->v('ref_pages'))); } if ($v['p'] && $ref_total) { redirect(_link()); } else { _style('noref'); } foreach ($ref as $i => $row) { if (!$i) { _style('ref'); } if ($this->has_plugin($row['ref_content'])) { $this->parse_plugin($row); continue; } _style('ref.row', _vs(array('id' => $row['ref_id'], 'link' => _link($row['ref_alias']), 'subject' => $row['ref_subject'], 'content' => _message($row['ref_content']), 'time' => _format_date($row['ref_time'])), 'ref')); } return; }
public function __construct() { if (isset($_POST['check'])) { $checks = explode("&", $_POST['check']); $check = $this->CheckAdminInfo($checks[0], $checks[1]); if (!$check) { _message("请登录后在查看页面", WEB_PATH . '/' . G_ADMIN_DIR . '/user/login'); } } else { parent::__construct(); } }
public function awarddel() { $dellink = intval($this->segment(6)); if ($dellink) { $this->db->Query("DELETE FROM `@#_egglotter_award` WHERE `award_id`='{$dellink}'"); if ($this->db->affected_rows()) { _message("删除成功"); } else { _message("删除失败"); } } }
public function userpost() { $mysql_model = System::load_sys_class('model'); $title = "获得的商品"; $index = intval($this->segment(4)) - 1000000000; $tab = $this->segment(3); $member = $mysql_model->GetOne("select * from `@#_member` where uid='" . $index . "'"); if ($member) { include templates("us", "userpost"); } else { _message("页面错误", WEB_PATH, 3); } }
public function navdel() { $cid = $this->segment(4); if (intval($cid) <= 0) { _message("参数错误"); } $this->db->Query("DELETE FROM `@#_navigation` WHERE (`cid`='{$cid}')"); if ($this->db->affected_rows()) { _message("操作成功", WEB_PATH . '/' . ROUTE_M . '/ments/navigation'); } else { _message("删除失败"); } }
public function userraffle() { $mysql_model = System::load_sys_class('model'); $title = "获得的商品"; $index = $this->uid; $tab = $this->segment(3); $member = $mysql_model->GetOne("select * from `@#_member` where uid='{$index}'"); $memberhuode = $mysql_model->GetList("select * from `@#_member_go_record` where uid='{$index}' and `huode` > '10000000' order by `id` DESC limit 0,10"); if ($member) { include templates("us", "userraffle"); } else { _message("页面错误", WEB_PATH, 3); } }
public function init() { if (isset($_POST['dosubmit'])) { $c_ok = ''; if (isset($_POST['cache']['template'])) { $c_ok .= $this->tempcache(); } if (isset($_POST['cache']['file_cache'])) { $c_ok .= $this->upfulecache(); } _message($c_ok); } include $this->tpl(ROUTE_M, 'cache'); }
public function userpost() { $mysql_model = System::load_sys_class('model'); $title = "晒单"; $index = $this->uid; $tab = $this->segment(3); $member = $mysql_model->GetOne("select * from `@#_member` where uid='{$index}'"); $membershaidan = $mysql_model->GetList("select * from `@#_shaidan` where sd_userid='{$index}' order by `sd_id` DESC limit 0,10"); if ($member) { include templates("us", "userpost"); } else { _message("页面错误", WEB_PATH, 3); } }
public function index() { parent::__construct(); $this->db = System::load_sys_class('model'); $html_type = $this->db->GetList("select * from `@#_header`"); if (isset($_POST['dosubmit'])) { $m_reg_temp = $_POST['html']; $q_1 = $this->db->Query("UPDATE `@#_header` SET `html`='{$m_reg_temp}'"); if ($q_1) { _message("更新成功!"); } else { _message("更新失败!"); } } include $this->tpl($this->autodir, 'set'); }
function _help_home() { global $bio; $ha = $bio->v('auth_comments'); if ($ha) { $ha_add = $bio->v('auth_help_create'); $ha_edit = $bio->v('auth_help_modufy'); $ha_delete = $bio->v('auth_help_remove'); } $sql = 'SELECT c.*, m.* FROM _help_cat c, _help_modules m WHERE c.help_module = m.module_id ORDER BY c.help_order'; $cat = _rowset($sql, 'help_id'); $sql = 'SELECT * FROM _help_faq'; $faq = _rowset($sql, 'faq_id'); // // Loop // foreach ($cat as $help_id => $cdata) { _style('cat', array('HELP_ES' => $cdata['help_es'], 'HELP_EN' => $cdata['help_en'], 'HELP_EDIT' => _link_control('comments', array('mode' => $this->mode)), 'HELP_UP' => _link_control('comments', array('mode' => $this->mode)), 'HELP_DOWN' => _link_control('comments', array('mode' => $this->mode)))); if ($ha_edit) { _style('cat.edit', array('URL' => _link_control('comments', array('mode' => $this->mode, 'manage' => 'edit', 'sub' => 'cat', 'id' => $help_id)), 'UP' => _link_control('comments', array('mode' => $this->mode, 'manage' => 'edit', 'sub' => 'cat', 'id' => $help_id, 'order' => '_15')), 'DOWN' => _link_control('comments', array('mode' => $this->mode, 'manage' => 'edit', 'sub' => 'cat', 'id' => $help_id, 'order' => '15')))); } if ($ha_delete) { _style('cat.delete', array('URL' => _link_control('comments', array('mode' => $this->mode, 'manage' => 'delete', 'sub' => 'cat', 'id' => $help_id)))); } foreach ($faq as $faq_id => $fdata) { if ($help_id != $fdata['help_id']) { continue; } _style('cat.faq', array('QUESTION_ES' => $fdata['faq_question_es'], 'ANSWER_ES' => _message($fdata['faq_answer_es']))); if ($ha_edit) { _style('cat.faq.edit', array('URL' => _link_control('comments', array('mode' => $this->mode, 'manage' => 'edit', 'sub' => 'faq', 'id' => $fdata['faq_id'])))); } if ($ha_delete) { _style('cat.faq.delete', array('URL' => _link_control('comments', array('mode' => $this->mode, 'manage' => 'delete', 'sub' => 'faq', 'id' => $fdata['faq_id'])))); } } } if ($ha_add) { _style('add', array('URL' => _link_control('comments', array('mode' => $this->mode, 'manage' => 'add')))); } $this->nav(); return; }
public function init() { if (ROUTE_A != 'userphotoup' and ROUTE_A != 'singphotoup') { if (!$this->userinfo) { _message("请登录", WEB_PATH . "/mobile/user/login", 3); } } $member = $this->userinfo; $title = "我的云购中心"; $user['code'] = 1; $user['username'] = get_user_name($member['uid']); $user['uid'] = $member['uid']; if (!empty($member)) { $user['code'] = 0; } echo json_encode($user); }
public function qiantai() { //导入公钥文件 $flag = buildKey(PUB_KEY); if (!$flag) { echo "导入公钥文件失败!"; exit; } //获取交易应答的各项值 $merid = $_REQUEST["merid"]; $orderno = $_REQUEST["orderno"]; $transdate = $_REQUEST["transdate"]; $amount = $_REQUEST["amount"]; $currencycode = $_REQUEST["currencycode"]; $transtype = $_REQUEST["transtype"]; $status = $_REQUEST["status"]; $checkvalue = $_REQUEST["checkvalue"]; $gateId = $_REQUEST["GateId"]; $priv1 = $_REQUEST["Priv1"]; $flag = verifyTransResponse($merid, $orderno, $amount, $currencycode, $transdate, $transtype, $status, $checkvalue); //sleep(2); $out_trade_no = $orderno; //商户订单号 $dingdaninfo = $this->db->GetOne("select * from `@#_member_addmoney_record` where `code` = '{$out_trade_no}'"); // var_dump($_GET); // echo "<br>"; // var_dump($_POST); // echo "<br>"; //var_dump($dingdaninfo); if (!$dingdaninfo || $dingdaninfo['status'] == '未付款') { // echo "支付失败"; // die(); _message("支付失败"); } else { if (empty($dingdaninfo['scookies'])) { _message("充值成功!", WEB_PATH . "/member/home/userbalance"); } else { if ($dingdaninfo['scookies'] == '1') { _message("支付成功!", WEB_PATH . "/member/cart/paysuccess"); } else { _message("商品还未购买,请重新购买商品!", WEB_PATH . "/member/cart/cartlist"); } } } }