/** * 设置菜单 */ public function menu_setting() { $weixin_config = get_config('weixin_config'); define(AppId, $weixin_config['appid']); //定义AppId,需要在微信公众平台申请自定义菜单后会得到 define(AppSecret, $weixin_config['secret']); //定义AppSecret,需要在微信公众平台申请自定义菜单后会得到 load_function('curl'); if (isset($GLOBALS['submit'])) { $menu_setting = trim($GLOBALS['form']['menu_setting']); $menu = load_class('menu', 'weixin'); //引入微信类 $creatMenu = $menu->creatMenu($menu_setting); //创建菜单 $creatMenu_arr = json_decode($creatMenu, true); if ($creatMenu_arr['errcode'] != 0) { MSG($creatMenu); } else { $this->db->update('setting', array('data' => $menu_setting), array('m' => 'weixin', 'keyid' => 'configs')); MSG('创建成功,菜单将在24小时后生效,您可以取消关注,再关注看到最新菜单'); } } else { $r = $this->db->get_one('setting', array('m' => 'weixin', 'keyid' => 'configs')); $menu_setting = $r['data']; include $this->template('menu_setting'); } }
/** * 修改公告 */ public function edit() { $id = intval($GLOBALS['id']); if (isset($GLOBALS['submit'])) { $formdata = $GLOBALS['form']; $formdata['title'] = remove_xss($formdata['title']); $formdata['note'] = remove_xss($formdata['note']); $formdata['addtime'] = SYS_TIME; $formdata['endtime'] = strtotime($GLOBALS['endtime']); $formdata['publisher'] = get_cookie('username'); $formdata['css'] = 'color:#' . remove_xss(ltrim($GLOBALS['title_css'], '#') . ';' . $GLOBALS['font_weight']); $linkageid = $this->db->update('affiche', $formdata, array('id' => $id)); MSG(L('operation success'), '?m=affiche&f=index&v=listing' . $this->su()); } else { $show_formjs = 1; $form = load_class('form'); load_function('admin'); $endtime = SYS_TIME + 86400 * 30; $endtime = date('Y-m-d'); $r = $this->db->get_one('affiche', array('id' => $id)); $styles = style($r['css']); //color:#ff0000;font-weight:bold $font_weight = $styles['font-weight']; $color = $styles['color']; include $this->template('edit'); } }
function __construct() { $this->member = load_class('member', 'member'); load_function('common', 'member'); $this->member_setting = get_cache('setting', 'member'); parent::__construct(); }
public function __construct() { load_function('preg_check'); load_function('common', 'member'); $this->db = load_class('db'); $this->setting = get_cache('setting', 'member'); }
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'); }
/** * 获取可预约的时间 */ public function setmonth() { load_function('global', 'order'); $d = $GLOBALS['d']; $dar = explode('-', $d); $month = $dar[1]; $year = $dar[0]; echo build_calendar($month, $year, ''); }
private function create_cookie($info, $cookietime = 0) { set_cookie('auth', encode($info['uid'] . "\t" . $info['password'] . "\t" . $cookietime, substr(md5(_KEY), 8, 8)), $cookietime); set_cookie('_uid', $info['uid'], $cookietime); set_cookie('_username', $info['username'], $cookietime); set_cookie('_groupid', $info['groupid'], $cookietime); load_function('string'); setcookie(COOKIE_PRE . 'truename', escape($info['username']), $cookietime, COOKIE_PATH, COOKIE_DOMAIN, 0); setcookie(COOKIE_PRE . 'modelid', $info['modelid'], $cookietime, COOKIE_PATH, COOKIE_DOMAIN, 0); }
public function updatepw($get, $post) { // 如果没有传递新的密码直接返回成功 if (empty($get['password'])) { return API_RETURN_SUCCEED; } load_function('preg_check'); $factor = random_string('diy', 6); if ($this->member->db->update('member', array('factor' => $factor, 'password' => md5(md5($get['password']) . $factor)), 'username="******"')) { return API_RETURN_SUCCEED; } else { return API_RETURN_FAILED; } }
/** * 后台充值 */ public function add() { $config = $this->db->get_one('payment', array('id' => 2)); if ($config['status'] != 1) { MSG('不支持后台充值,开启方式:充值配置中开启后台充值功能'); } if (isset($GLOBALS['submit'])) { load_function('common', 'pay'); $formdata = array(); $formdata['username'] = remove_xss($GLOBALS['username']); $mr = $this->db->get_one('member', array('username' => $formdata['username'])); if (!$mr) { MSG('用户不存在'); } $formdata['uid'] = $mr['uid']; $plus_minus = intval($GLOBALS['plus_minus']); $money = $formdata['money'] = sprintf("%.2f", substr(sprintf("%.3f", $GLOBALS['money']), 0, -2)); $formdata['order_no'] = create_order_no(); $formdata['note'] = remove_xss($GLOBALS['note']); $formdata['plus_minus'] = $plus_minus; $formdata['adminuid'] = $_SESSION['uid']; $formdata['addtime'] = SYS_TIME; $formdata['paytime'] = SYS_TIME; $formdata['endtime'] = SYS_TIME; $formdata['quantity'] = 1; $formdata['status'] = 1; $formdata['payment'] = 1; $username = get_cookie('username'); if ($plus_minus == 1) { $plus_minus_type = '充值'; $formdata['payname'] = $username . '为用户' . $plus_minus_type; $linkageid = $this->db->insert('pay', $formdata); $this->db->update('member', "`money`=(`money`+{$money})", array('uid' => $mr['uid'])); } else { $plus_minus_type = '扣款'; $formdata['payname'] = $username . '为用户' . $plus_minus_type; $linkageid = $this->db->insert('pay', $formdata); $this->db->update('member', "`money`=(`money`-{$money})", array('uid' => $mr['uid'])); } MSG(L('operation success')); } else { $show_formjs = 1; $form = load_class('form'); $options = $this->db->get_list('kind', array('keyid' => 'link')); $options = key_value($options, 'kid', 'name'); include $this->template('add'); } }
public function show() { $keyid = $GLOBALS['keyid']; if (!preg_match('/^([a-z]{1,}[a-z0-9]+)/', $keyid)) { MSG('keyid参数错误'); } load_function('common', 'member'); //$dianping_array = array(1=>'很差',2=>'差',3=>'一般',4=>'好',5=>'很好'); $page = isset($GLOBALS['page']) ? intval($GLOBALS['page']) : 1; $page = max($page, 1); if (!preg_match('/([a-z0-9_\\-])/', $GLOBALS['template'])) { exit('模板错误'); } $template = $GLOBALS['template']; include T('dianping', $template); }
public function __construct($info = array()) { if (!is_array($info) || empty($info)) { $info = get_cache('setting', 'member'); } $this->secret = $info['sina_secret']; $this->appkey = $info['sina_key']; $this->token = $info['token']; $this->code = $info['code']; $this->error = 0; $this->extend = array(); load_function('common', 'member'); if (empty($this->token)) { $this->get_token($this->code); } }
function package_jeu($titre) { global $phpbb_root_path, $phpEx, $areabb; // On est développeur et on veut le package de son mod load_function('lib.files'); $package = new files(); $name = 'AreaBB-jeux_' . $titre . '.pkg.gz'; // on crée le package serialize $res = $package->makePackage($name, CHEMIN_JEU . $titre, CHEMIN_JEU, 1); // on l'enregistre dans un fichier if (($fp = fopen($phpbb_root_path . $areabb['chemin_pkg_jeux'] . $name, 'w')) !== false) { fwrite($fp, $res, strlen($res)); fclose($fp); } return true; }
/** * 用户登录 * @param string $username * @param string $password * @param array $user * @return string $synlogin */ public function login($username, $password, &$user = array()) { list($ucuid, $uc_username, $uc_password, $email) = $this->uc_call("uc_user_login", array($username, $password)); // 导入用户到UC数据库 if ($ucuid == '-1' && is_array($user) && $user) { // 生成临时密码用于比对密码是否正确 $password_t = md5(md5($password) . $user['factor']); if ($user['password'] == $password_t) { $ucuid = $this->uc_call("uc_user_register", array($user['username'], $password, $user['email'])); if ($ucuid <= 0) { MSG(L('user_not_exist')); } } // 再一次调取UC的信息 list($ucuid, $uc_username, $uc_password, $email) = $this->uc_call("uc_user_login", array($username, $password)); } if ($ucuid == '-1') { MSG(L('user_not_exist')); } if ($ucuid == '-2') { MSG(L('password_error'), HTTP_REFERER); } $synlogin = $this->uc_call('uc_user_synlogin', array($ucuid)); // 同步数据到WZ if (!is_array($user) || empty($user)) { $user = $this->db->get_one('member', '`username` = "' . $username . '"', '*'); if (empty($user)) { load_function('preg_check'); if (strtolower(UC_DBCHARSET) != strtolower(CHARSET)) { $username = iconv(UC_DBCHARSET, CHARSET . '//IGNORE', $username); } $user['username'] = $username; $user['email'] = $email; $user['factor'] = random_string('diy', 6); $user['password'] = md5(md5($password) . $user['factor']); $user['ucuid'] = $ucuid; $user['modelid'] = ''; $user['uid'] = $this->db->insert('member', $user, true); } } if ($user['ucuid'] != $ucuid) { $this->db->update('member', 'ucuid=' . $ucuid, 'uid=' . $user['uid']); } return $synlogin; }
/** * 生成邀请码 */ public function create() { if (empty($this->setting['invite'])) { exit($GLOBALS['callback'] . '({error:1, msg:"系统关闭了邀请注册"})'); } $count = $this->db->fetch_array($this->db->query('SELECT COUNT(`isbuy` = 1 or null) as buy, COUNT(`isbuy` = 0 or null) as free FROM `wz_member_invite` WHERE uid=' . $this->memberinfo['uid'] . ' AND createtime >' . strtotime(date('Y-m-d')))); $isbuy = 0; if ($count['free'] >= $this->setting['invitenum'][$this->memberinfo['groupid']]['free']) { if ($count['buy'] >= $this->setting['invitenum'][$this->memberinfo['groupid']]['buy']) { exit($GLOBALS['callback'] . '({error:1, msg:"您今日的名额已用完"})'); } // 这里得调用支付接口 暂时空着 $isbuy = 1; } load_function('preg_check'); $invite = random_string('diy', 8, '23456789abcdefghjkmnpqrstuvwxyz'); $this->db->insert('member_invite', array('uid' => $this->memberinfo['uid'], 'isbuy' => $isbuy, 'invite' => $invite, 'createtime' => SYS_TIME)); exit($GLOBALS['callback'] . '({error:0, msg:"' . $invite . '"})'); }
/** * 回复 */ public function reply() { $id = $GLOBALS['id']; $reply_user = get_cookie('wz_name'); if (isset($GLOBALS['submit'])) { $status = 9; if (!empty($GLOBALS['reply_user'])) { $reply_user = remove_xss($GLOBALS['reply_user']); } $this->db->update('guestbook', array('status' => $status, 'reply' => $GLOBALS['reply'], 'replytime' => SYS_TIME, 'reply_user' => $reply_user), array('id' => $id)); $r = $this->db->get_one('guestbook', array('id' => $id)); $mr = $this->db->get_one('member', array('username' => $r['publisher'])); //邮箱有验证状态时发送邮件通知 if ($mr['ischeck_email']) { load_function('preg_check'); $config = get_cache('sendmail'); $password = decode($config['password']); //load_function('sendmail'); $subject = '有人回复了您的提问,请登录查询'; $message = "提问内容:" . $r['title'] . "<br>详细回复请登录:<br><a href='" . WEBURL . "index.php?m=guestbook&f=myissue&v=listing' target='_blank'>" . WEBURL . 'index.php?m=guestbook&f=myissue&v=listing</a> 查看'; $mail = load_class('sendmail'); $mail->setServer($config['smtp_server'], $config['smtp_user'], $password); //设置smtp服务器,普通连接方式 $mail->setFrom($config['send_email']); //设置发件人 $mail->setReceiver($mr['email']); //设置收件人,多个收件人,调用多次 $mail->setMail($subject, $message); //设置邮件主题、内容 $mail->sendMail(); //发送 } MSG(L('operation success'), $GLOBALS['forward']); } else { load_class('form'); $r = $this->db->get_one('guestbook', array('id' => $id)); $model_r = $this->db->get_one('model', array('m' => 'guestbook')); require get_cache_path('guestbook_form', 'model'); $form_build = new form_build($model_r['modelid']); $formdata = $form_build->execute($r); include $this->template('reply'); } }
/** * 积分入帐 */ public function add() { $config = get_cache('point_config'); if ($config['status'] != 1) { MSG('未开启后台积分入帐,如需开启请在积分配置中开启'); } if (isset($GLOBALS['submit'])) { load_function('common', 'pay'); $formdata = array(); $formdata['username'] = remove_xss($GLOBALS['username']); $mr = $this->db->get_one('member', array('username' => $formdata['username'])); if (!$mr) { MSG('用户不存在'); } $formdata['uid'] = $mr['uid']; $plus_minus = intval($GLOBALS['plus_minus']); $username = get_cookie('username'); $point = intval($GLOBALS['point']); if ($plus_minus == 1) { $plus_minus_type = '增加'; $plus_minus = '+'; $left_point = $mr['points'] + $point; } else { $plus_minus_type = '减少'; $plus_minus = '-'; $left_point = $mr['points'] - $point; if ($left_point <= 0) { MSG('用户积分为:' . $mr['points'] . ',不足扣除' . $point); } } $payname = $username . '后台管理:' . $plus_minus_type . '积分,用户剩余积分:' . $left_point . '<br>' . $GLOBALS['note']; $credit_api = load_class('credit_api', 'credit'); $credit_api->handle($mr['uid'], $plus_minus, $point, $payname); MSG(L('operation success'), HTTP_REFERER); } else { $show_formjs = 1; $form = load_class('form'); $options = $this->db->get_list('kind', array('keyid' => 'link')); $options = key_value($options, 'kid', 'name'); include $this->template('add'); } }
/** * 修改公告 */ public function edit() { $id = intval($GLOBALS['id']); if (isset($GLOBALS['submit'])) { $formdata = $GLOBALS['form']; $formdata['title'] = remove_xss($formdata['title']); $formdata['thumb'] = remove_xss($formdata['thumb']); $linkageid = $this->db->update('express', $formdata, array('eid' => $id)); MSG(L('operation success'), '?m=order&f=express&v=listing' . $this->su()); } else { $show_formjs = 1; $form = load_class('form'); load_function('admin'); $endtime = SYS_TIME + 86400 * 30; $endtime = date('Y-m-d'); $r = $this->db->get_one('express', array('eid' => $id)); $styles = style($r['css']); //color:#ff0000;font-weight:bold $font_weight = $styles['font-weight']; $color = $styles['color']; include $this->template('express_edit'); } }
/** * 手机触屏配置 */ public function setting() { if (isset($GLOBALS['submit'])) { $setting = array_map('remove_xss', $GLOBALS['form']); $setting = serialize($setting); $this->db->update('setting', array('data' => $setting), array('m' => 'mobile', 'keyid' => 'configs')); load_function('admin'); set_web_config('SUPPORT_MOBILE', intval($GLOBALS['support_mobile'])); MSG(L('operation success'), HTTP_REFERER); } else { $show_formjs = 1; load_class('qrcode'); if (is_writable(ATTACHMENT_ROOT . "qr_image/mobile.png")) { $iswrite = 1; WUZHI_qrcode::png(WEBURL . 'index.php', ATTACHMENT_ROOT . "qr_image/mobile.png", 'L', 4, 0); } else { $iswrite = 0; } $r = $this->db->get_one('setting', array('m' => 'mobile', 'keyid' => 'configs')); $setting = unserialize($r['data']); include $this->template('setting'); } }
/** * 筛选功能测试 */ function shaixuan() { load_function('content', 'content'); //type = 套餐类别,area = 区域,city=城市,st=排序类型,asc=降序,升序 0升序,1降序 //$linkurl = "index.php?m=demo&f=test&v=shaixuan&page=1&pinpai=1&renqun=1&type=2&price=100_200&area=2&tese=1_2_3&st=0&asc=1"; $urlrule = 'index.php?m=demo&f=test&v=shaixuan&pinpai={$pinpai}&renqun={$renqun}&type={$type}&price={$price}&area={$area}&tese={$tese}&st={$st}&asc={$asc}&page={$page}'; $_POST['page_urlrule'] = 'tuan-{$pinpai}-{$renqun}-{$type}-{$price}-{$area}-{$tese}-{$st}-{$asc}-{$page}.html'; $page_fields = array(); $page_fields['pinpai'] = 2; $page_fields['renqun'] = 3; $page_fields['type'] = 4; $page_fields['price'] = '100_200'; $page_fields['area'] = 5; $page_fields['tese'] = '1_2_3'; $page_fields['st'] = '6'; $page_fields['asc'] = 0; echo _pageurl($_POST['page_urlrule'], 2, $page_fields); echo "<br>"; $_POST['page_fields'] = $page_fields; echo filter('pinpai', '88'); echo "<br>"; echo filter('renqun', '55'); }
<?php // +---------------------------------------------------------------------- // | wuzhicms [ 五指互联网站内容管理系统 ] // | Copyright (c) 2014-2015 http://www.wuzhicms.com All rights reserved. // | Licensed ( http://www.wuzhicms.com/licenses/ ) // | Author: wangcanjia <*****@*****.**> // +---------------------------------------------------------------------- defined('IN_WZ') or exit('No direct script access allowed'); load_function('content', 'content'); /** * 地图 */ class map { private $siteconfigs; public function __construct() { $this->siteconfigs = get_cache('siteconfigs'); $this->db = load_class('db'); } /** * 地图 */ public function init() { $siteconfigs = $this->siteconfigs; $seo_title = $siteconfigs['sitename']; $seo_keywords = $siteconfigs['seo_keywords']; $seo_description = $siteconfigs['seo_description']; $categorys = get_cache('category', 'content');
define('MAGIC_QUOTES_GPC', 0); } define('IS_WIN', strstr(PHP_OS, 'WIN') ? 1 : 0); define('IS_CLI', PHP_SAPI == 'cli' ? 1 : 0); define('SYS_TIME', time()); define('HTTP_REFERER', isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''); //设置本地时差 date_default_timezone_set(TIME_ZONE); //输出页面字符集 header('Content-type: text/html; charset=' . CHARSET); if (extension_loaded("zlib") && !ob_start("ob_gzhandler")) { ob_start(); } //将GET,POST 参数全部转给 GLOBALS ,然后注销 get/post set_globals(); load_function('common'); autoload(); /** * 加载类函数 * @param string $class 类名称 * @param string $m 模块英文名 * @param string $param 初始化参数 * @return class */ function load_class($class, $m = 'core', $param = NULL) { static $static_class = array(); //判断是否存在类,存在则直接返回 if (isset($static_class[$class])) { return $static_class[$class]; }
/*************************************************************************** * areabb_games.php * * Par Saint-Pere le 10 Juillet 2006 * ***************************************************************************/ // // Start session management // define('IN_PHPBB', true); $phpbb_root_path = './'; include_once $phpbb_root_path . 'extension.inc'; include_once $phpbb_root_path . 'common.' . $phpEx; include_once $phpbb_root_path . 'areabb/fonctions/preload.' . $phpEx; load_function('functions_arcade'); load_lang('arcade'); $userdata = session_pagestart($user_ip, PAGE_GAME); init_userprefs($userdata); if (!$userdata['session_logged_in']) { message_die(GENERAL_ERROR, $lang['arcade_session_expiree']); header($header_location . append_sid('login.' . $phpEx . '?redirect=' . NOM_ARCADE . '.' . $phpEx, true)); exit; } // // End session management if (!isset($HTTP_GET_VARS['action']) || $HTTP_GET_VARS['action'] != 'submit_score') { message_die(GENERAL_MESSAGE, 'Votre jeu n\'est pas compatible avec AreaBB'); exit; } // Si la personne a déjà soumis un score on le renvoit où il était
$message = $lang['mod_non_installe'] . '<br /><br />'; $message .= sprintf($lang['Click_return_areabb_mods'], '<a href="' . append_sid('admin_areabb_mods.' . $phpEx) . '">', '</a>'); message_die(GENERAL_MESSAGE, $message); exit; } break; case 'supprime': // on veut supprimer son mod if (!$plugins->supprime($titre, $id_mod)) { $message = $lang['mod_non_supprime'] . '<br /><br />'; $message .= sprintf($lang['Click_return_areabb_mods'], '<a href="' . append_sid('admin_areabb_mods.' . $phpEx) . '">', '</a>'); message_die(GENERAL_MESSAGE, $message); exit; } // On vire le dossier du site load_function('lib.files'); $mod = new files(); $mod->deltree(CHEMIN_MODS . $titre); break; } // -------------------------------------------------------------------------------------------- // RECUPERATION des mods déjà installés et NON installés // $sql = 'SELECT id_mod, nom FROM ' . AREABB_MODS . ' ORDER BY nom ASC'; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, "Impossible d'afficher la liste des blocs", '', __LINE__, __FILE__, $sql); } $listes_mods = array(); $liste_id = array();
/** * 我的点评 */ public function mydianping() { $page = isset($GLOBALS['page']) ? intval($GLOBALS['page']) : 1; $page = max($page, 1); $memberinfo = $this->memberinfo; $uid = $this->memberinfo['uid']; $result = $this->db->get_list('dianping', "`uid`='{$uid}' AND `keyid` LIKE 'mec%'", '*', 0, 20, $page, 'id DESC'); $pages = $this->db->pages; $total = $this->db->number; load_function('global', 'dianping'); include T('dianping', 'mydianping'); }
/** * 生成静态 */ public function html($return = true) { load_function('content', 'content'); define('HTML', TRUE); if (is_array($GLOBALS['blockids'])) { $template = load_class('template'); $webroot = WWW_ROOT . ltrim(WWW_PATH, '/') . 'webs/'; if (!is_dir($webroot)) { @mkdir($webroot, 0777, true); } foreach ($GLOBALS['blockids'] as $blockid) { $r = $this->db->get_one('block', array('blockid' => $blockid)); $code = $template->template_parse($r['code']); $cache_path = CACHE_ROOT . 'templates/default/block/'; if (!is_dir($cache_path)) { @mkdir($cache_path, 0777, true); } file_put_contents($cache_path . $blockid . '.php', $code); ob_start(); include $cache_path = CACHE_ROOT . 'templates/default/block/' . $blockid . '.php'; $contents = ob_get_contents(); ob_end_clean(); file_put_contents($webroot . $blockid . '.html', $contents); } } if ($return) { MSG(L('create success')); } }
} $liste_mods = array(); while ($row = $db->sql_fetchrow($result)) { $liste_mods[] = $row['nom']; } // rcs activé ? if ($areabb['mod_rcs'] == 1) { load_function('fonctions_rcs'); } // Gender activé ? if ($areabb['mod_gender'] == 1) { load_function('fonctions_gender'); } // On a choisit d'Utiliser les popup pour le profile ? if ($areabb['mod_profile'] == 1) { load_function('fonctions_profile'); } // // Chargement du formatage des pseudos if ($areabb['mod_gender'] == 1 || $areabb['mod_rcs'] == 1) { unset($sql); $sql = 'SELECT u.user_id FROM ' . USERS_TABLE . ' as u WHERE user_active=1 ORDER BY user_id ASC'; $sql = $areabb['mod_gender'] == 1 ? parse_gender($sql) : $sql; $sql = $areabb['mod_rcs'] == 1 ? parse_rcs($sql) : $sql; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, "Impossible d\\'accéder à la tables des users", '', __LINE__, __FILE__, $sql); } $info_user = array();
<?php // +---------------------------------------------------------------------- // | wuzhicms [ 五指互联网站内容管理系统 ] // | Copyright (c) 2014-2015 http://www.wuzhicms.com All rights reserved. // | Licensed ( http://www.wuzhicms.com/licenses/ ) // | Author: tuzwu <*****@*****.**> // +---------------------------------------------------------------------- defined('IN_WZ') or exit('No direct script access allowed'); load_class('admin'); load_function('common', M); class index extends WUZHI_admin { private $db; function __construct() { $this->db = load_class('db'); $GLOBALS['_menuid'] = isset($GLOBALS['_menuid']) ? intval($GLOBALS['_menuid']) : ''; $this->_cache = get_cache(M); } public function listing() { $where = ' 1 '; $this->order_by = 'id DESC'; load_class('form'); $where .= $this->search_where(); $pagesize = isset($GLOBALS['pagesize']) ? intval($GLOBALS['pagesize']) : 20; $page = $GLOBALS['page'] ? intval($GLOBALS['page']) : 1; $lists = $this->db->get_list('attachment', $where, '*', 0, $pagesize, $page, $this->order_by); $pages = $this->db->pages; include $this->template('listing', M);
public function send() { $cardid = intval($GLOBALS['cardid']); if (isset($GLOBALS['submit'])) { $mobile = $GLOBALS['mobile']; $email = $GLOBALS['email']; if (empty($mobile) && empty($email)) { MSG('手机,邮箱必须填写一项'); } $formdata2 = array(); $formdata2['cardid'] = $cardid; $formdata2['type'] = 0; $formdata2['senduser'] = get_cookie('username'); $formdata2['mobile'] = $mobile; $formdata2['email'] = $email; $formdata2['note'] = $GLOBALS['note']; $formdata2['sendtime'] = SYS_TIME; $formdata2['ip'] = get_ip(); $this->db->insert('order_card_send', $formdata2); $r = $this->db->get_one('order_card', array('cardid' => $cardid)); $card_password = decode($r['password'], 'Hx0si1'); if ($mobile) { $sendsms = load_class('sms', 'sms'); $sendsms->send_sms($mobile, $r['card_no'] . '||' . $card_password, 222); //发送短信 } if ($email) { load_function('preg_check'); if (empty($email) || !is_email($email)) { MSG('邮箱地址错误'); } $config = get_cache('sendmail'); $password = decode($config['password']); //load_function('sendmail'); $subject = '合一健康网-预约卡'; $message = "您的预约卡信息如下:<br>卡号:{$r['card_no']} <br> 密码:{$card_password}<br>"; $mail = load_class('sendmail'); $mail->setServer($config['smtp_server'], $config['smtp_user'], $password); $mail->setFrom($config['send_email']); //设置发件人 $mail->setReceiver($email); //设置收件人,多个收件人,调用多次 //$mail->setCc("XXXX"); //设置抄送,多个抄送,调用多次 //$mail->setBcc("XXXXX"); //设置秘密抄送,多个秘密抄送,调用多次 //$mail->addAttachment("XXXX"); //添加附件,多个附件,调用多次 $mail->setMail($subject, $message); //设置邮件主题、内容 $mail->sendMail(); //发送 } $this->db->update('order_card', array('status' => 1), array('cardid' => $cardid)); MSG('发送成功', $GLOBALS['forward']); } else { $show_formjs = ''; $r = $this->db->get_one('order_card', array('cardid' => $cardid)); include $this->template('card_send'); } }
<?php /*************************************************************************** * mod_aleatoire.php * * Adapté par Polo - www.supernova.2010.info * * Ce bloc permet de se faire un jeu aléatoire en un seul click * ***************************************************************************/ define('IN_PHPBB', true); global $squelette, $lang, $db, $phpEx; $template->set_filenames(array('aleatoire' => 'areabb/mods/aleatoire/tpl/mod_aleatoire.tpl')); load_function('class_liste_jeux'); load_function('class_jeux'); load_lang('arcade'); $jeu_aleatoire = new liste_jeux(); $jeu_aleatoire->order_by('Random'); $jeu_aleatoire->cat_id = ''; $jeu_aleatoire->start = '3'; $jeu_aleatoire->recup_infos_jeux($squelette->id_squelette); $liste_jeux = $jeu_aleatoire->liste; $nbjeux = sizeof($liste_jeux); if ($nbjeux == 0) { $sql = 'SELECT game_id FROM ' . AREABB_GAMES_TABLE . ' ORDER BY rand() LIMIT 0,1'; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, "Impossible d'accéder à la tables arreabb_games", '', __LINE__, __FILE__, $sql); } else { $row = $db->sql_fetchrow($result); $game_id = $row['game_id'];
<?php // +---------------------------------------------------------------------- // | wuzhicms [ 五指互联网站内容管理系统 ] // | Copyright (c) 2014-2015 http://www.wuzhicms.com All rights reserved. // | Licensed ( http://www.wuzhicms.com/licenses/ ) // | Author: wangcanjia <*****@*****.**> // +---------------------------------------------------------------------- defined('IN_WZ') or exit('No direct script access allowed'); load_function('alipay_core', 'pay'); class WUZHI_alipay_callback { /** * HTTPS形式消息验证地址 */ var $https_verify_url = 'https://mapi.alipay.com/gateway.do?service=notify_verify&'; /** * HTTP形式消息验证地址 */ var $http_verify_url = 'http://notify.alipay.com/trade/notify_query.do?'; var $alipay_config; //根据返回状态返回系统存储的值 var $status; //从支付平台返回的商户订单号,做记录 var $response_order_no; function __construct($alipay_config) { //签名方式 不需修改 $alipay_config['sign_type'] = strtoupper('MD5'); //字符编码格式 目前支持 gbk 或 utf-8 $alipay_config['input_charset'] = strtolower(CHARSET);