• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP uni_setting函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __construct

 function __construct()
 {
     global $_W, $_GPC;
     $this->_weid = $_W['uniacid'];
     $this->_fromuser = $_W['fans']['from_user'];
     //debug
     if ($_SERVER['HTTP_HOST'] == '127.0.0.1' || $_SERVER['HTTP_HOST'] == 'localhost:8888' || $_SERVER['HTTP_HOST'] == '192.168.1.102:8888') {
         $this->_fromuser = 'debug';
     }
     $this->_auth2_openid = 'auth2_openid_' . $_W['uniacid'];
     $this->_auth2_nickname = 'auth2_nickname_' . $_W['uniacid'];
     $this->_auth2_headimgurl = 'auth2_headimgurl_' . $_W['uniacid'];
     $this->_appid = '';
     $this->_appsecret = '';
     $this->_accountlevel = $_W['account']['level'];
     //是否为高级号
     if (!empty($_SESSION['oauth_openid'])) {
         $this->_fromuser = $_SESSION['oauth_openid'];
     }
     if ($this->_accountlevel < 4) {
         $setting = uni_setting($this->_weid);
         $oauth = $setting['oauth'];
         if (!empty($oauth) && !empty($oauth['account'])) {
             $this->_account = account_fetch($oauth['account']);
             $this->_appid = $this->_account['key'];
             $this->_appsecret = $this->_account['secret'];
         }
     } else {
         $this->_appid = $_W['account']['key'];
         $this->_appsecret = $_W['account']['secret'];
     }
 }
开发者ID:eduNeusoft,项目名称:weixin,代码行数:32,代码来源:site.php


示例2: payResult

 public function payResult($params)
 {
     load()->model('mc');
     $status = pdo_fetchcolumn("SELECT status FROM " . tablename('mc_credits_recharge') . " WHERE tid = :tid", array(':tid' => $params['tid']));
     if (empty($status)) {
         $credit1_lv = $this->module['config']['credit1_lv'] ? $this->module['config']['credit1_lv'] : 1;
         $fee = $params['fee'] / $credit1_lv;
         $data = array('status' => $params['result'] == 'success' ? 1 : -1);
         if ($params['type'] == 'wechat') {
             $data['transid'] = $params['tag']['transaction_id'];
             $params['user'] = mc_openid2uid($params['user']);
         }
         pdo_update('mc_credits_recharge', $data, array('tid' => $params['tid']));
         if ($params['result'] == 'success' && $params['from'] == 'notify') {
             $setting = uni_setting($_W['uniacid'], array('creditbehaviors'));
             //a:2:{s:8:"activity";s:7:"credit1";s:8:"currency";s:7:"credit2";}
             $credit = $setting['creditbehaviors']['activity'];
             if (empty($credit)) {
                 message('站点积分行为参数配置错误,请联系服务商', '', 'error');
             } else {
                 $paydata = array('wechat' => '微信', 'alipay' => '支付宝');
                 $record[] = $params['user'];
                 $record[] = '用户通过' . $paydata[$params['type']] . '充值' . $fee . '积分';
                 mc_credit_update($params['user'], $credit, $fee, $record);
             }
         }
     }
     if ($params['from'] == 'return') {
         if ($params['result'] == 'success') {
             message('支付成功!', '../../app/' . url('mc/home'), 'success');
         } else {
             message('支付失败!', '../../app/' . url('mc/home'), 'error');
         }
     }
 }
开发者ID:aspnmy,项目名称:weizan,代码行数:35,代码来源:site.php


示例3: fieldsFormDisplay

 public function fieldsFormDisplay($rid = 0)
 {
     load()->model('mc');
     global $_W, $_GPC;
     //要嵌入规则编辑页的自定义内容,这里 $rid 为对应的规则编号,新增时为 0
     $creditnames = uni_setting($_W['uniacid'], array('creditnames'));
     if ($creditnames) {
         foreach ($creditnames['creditnames'] as $index => $creditname) {
             if ($creditname['enabled'] == 0) {
                 unset($creditnames['creditnames'][$index]);
             }
         }
         $scredit = implode(', ', array_keys($creditnames['creditnames']));
     } else {
         $scredit = '';
     }
     $groups = mc_groups($_W['uniacid']);
     $couponlists = pdo_fetchall('SELECT couponid,title,type,credittype,credit,endtime,amount,dosage FROM ' . tablename('activity_coupon') . ' WHERE uniacid = :uniacid AND type = :type AND endtime > :endtime ORDER BY endtime ASC ', array(':uniacid' => $_W['uniacid'], ':type' => 1, ':endtime' => TIMESTAMP));
     $tokenlists = pdo_fetchall('SELECT couponid,title,type,credittype,credit,endtime,amount,dosage FROM ' . tablename('activity_coupon') . ' WHERE uniacid = :uniacid AND type = :type AND endtime > :endtime ORDER BY endtime ASC ', array(':uniacid' => $_W['uniacid'], ':type' => 2, ':endtime' => TIMESTAMP));
     $goodslists = pdo_fetchall('SELECT id,title,type,credittype,endtime,total,num,credit FROM ' . tablename('activity_exchange') . ' WHERE uniacid = :uniacid AND type = :type AND endtime > :endtime ORDER BY endtime ASC', array(':uniacid' => $_W['uniacid'], ':type' => 3, ':endtime' => TIMESTAMP));
     //print_r($couponlists);
     load()->func('tpl');
     if ($rid == 0) {
         $reply = array('title' => '幸运大抽奖活动开始了!', 'description' => '幸运大抽奖活动开始啦!', 'tips' => '每次抽奖需要花费50积分,一等奖为39元的现金抵扣券,二等奖为100积分,三等奖为50积分,四等奖为30积分。每人每天限抽2次。', 'remark' => '中奖积分请到会员主页查看', 'starttime' => time(), 'endtime' => time() + 10 * 84400, 'reg' => '0', 'status' => '1', 'awardnum' => '1', 'playnum' => '5', 'dayplaynum' => '1', 'zfcs' => '1', 'zjcs' => '1', 'rate' => '10', 'need_type' => 'credit1', 'need_num' => '0', 'give_type' => 'credit1', 'give_num' => '0', 'onlynone' => '1', 'share_title' => '欢迎参加幸运大抽奖活动', 'share_content' => '亲,欢迎参加幸运大抽奖活动,祝您好运哦!! 亲,需要绑定账号才可以参加哦');
         $prizes = array('p1_type' => 'credit1');
     } else {
         $reply = pdo_fetch("SELECT * FROM " . tablename($this->table_reply) . " WHERE rid = :rid ORDER BY `id` DESC", array(':rid' => $rid));
         $prizes = iunserializer($reply['prizes']);
     }
     include $this->template('form');
 }
开发者ID:eduNeusoft,项目名称:weixin,代码行数:31,代码来源:module.php


示例4: fieldsFormDisplay

 public function fieldsFormDisplay($rid = 0)
 {
     global $_W;
     $uniacid = $_W['uniacid'];
     load()->func('tpl');
     $creditnames = array();
     $unisettings = uni_setting($uniacid, array('creditnames'));
     foreach ($unisettings['creditnames'] as $key => $credit) {
         if (!empty($credit['enabled'])) {
             $creditnames[$key] = $credit['title'];
         }
     }
     if (!empty($rid)) {
         $reply = pdo_fetch("SELECT * FROM " . tablename('stonefish_planting_reply') . " WHERE rid = :rid ORDER BY `id` DESC", array(':rid' => $rid));
         $share = pdo_fetchall("SELECT * FROM " . tablename('stonefish_planting_share') . " WHERE rid = :rid ORDER BY `id` DESC", array(':rid' => $rid));
         $prize = pdo_fetchall("SELECT * FROM " . tablename('stonefish_planting_prize') . " WHERE rid = :rid ORDER BY `id` asc", array(':rid' => $rid));
         //查询奖品是否可以删除
         foreach ($prize as $mid => $prizes) {
             $prize[$mid]['fans'] = pdo_fetchcolumn("SELECT COUNT(*) FROM " . tablename('stonefish_planting_award') . " WHERE prizetype = :prizeid", array(':prizeid' => $prizes['id']));
             $prize[$mid]['delete_url'] = $this->createWebUrl('deleteprize', array('rid' => $rid, 'id' => $prizes['id']));
         }
         //查询奖品是否可以删除
     }
     $seed = pdo_fetchall("SELECT * FROM " . tablename('stonefish_planting_seed') . " WHERE uniacid = :uniacid Or uniacid = 0 ORDER BY `id` asc", array(':uniacid' => $uniacid));
     if (!$reply) {
         $now = time();
         $reply = array("title" => "种值活动开始了!", "start_picurl" => "../addons/stonefish_planting/template/images/start.jpg", "description" => "欢迎参加种值活动", "repeat_lottery_reply" => "亲,继续努力哦~~", "ticket_information" => "请用力摇晃你的手机抽奖", "starttime" => $now, "endtime" => strtotime(date("Y-m-d H:i", $now + 7 * 24 * 3600)), "end_theme" => "种值活动已经结束了", "end_instruction" => "亲,活动已经结束,请继续关注我们的后续活动哦~", "end_picurl" => "../addons/stonefish_planting/template/images/end.jpg", "homepic" => "../addons/stonefish_planting/template/images/home.jpg", "adpic" => "../addons/stonefish_planting/template/images/banner.png", "award_times" => 1, "credit_times" => 5, "show_num" => 2, "awardnum" => 50, "xuninum" => 500, "xuninumtime" => 86400, "xuninuminitial" => 10, "xuninumending" => 100, "ticketinfo" => "请输入详细资料,兑换奖品", "isrealname" => 1, "ismobile" => 1, "isfans" => 1, "isfansname" => "真实姓名,手机号码,QQ号,邮箱,地址,性别,固定电话,证件号码,公司名称,职业,职位", "homepictime" => 0);
     } else {
         $reply['notawardtext'] = implode("\n", (array) iunserializer($reply['notawardtext']));
     }
     //print_r(uni_modules($enabledOnly = true));
     //exit;
     //查询是否有商户网点权限
     $modules = uni_modules($enabledOnly = true);
     $modules_arr = array();
     $modules_arr = array_reduce($modules, create_function('$v,$w', '$v[$w["mid"]]=$w["name"];return $v;'));
     if (in_array('stonefish_branch', $modules_arr)) {
         $stonefish_branch = true;
     }
     //查询是否有商户网点权限
     //查询子公众号信息
     $acid_arr = uni_accounts();
     $ids = array();
     $ids = array_map('array_shift', $acid_arr);
     //子公众账号Arr数组
     $ids_num = count($ids);
     //多少个子公众账号
     $one = current($ids);
     //查询子公众号信息
     if (!$share) {
         $share = array();
         foreach ($ids as $acid => $idlists) {
             $share[$acid] = array("acid" => $acid, "share_url" => $acid_arr[$acid]['subscribeurl'], "share_title" => "已有#参与人数#人参与本活动了,你的朋友#参与人# 还中了大奖:#奖品#,请您也来试试吧!", "share_desc" => "亲,欢迎参加种值活动,祝您好运哦!! 亲,需要绑定账号才可以参加哦", "share_picurl" => "../addons/stonefish_planting/template/images/share.png", "share_pic" => "../addons/stonefish_planting/template/images/img_share.png", "sharenumtype" => 0, "sharenum" => 0, "sharetype" => 1);
         }
     }
     include $this->template('form');
 }
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:57,代码来源:module.php


示例5: getSysInfo

 private function getSysInfo()
 {
     global $_W;
     load()->model('activity');
     $sysInfo = array();
     $setting = uni_setting($_W['uniacid'], array('creditnames', 'creditbehaviors', 'uc'));
     $sysInfo['behavior'] = $setting['creditbehaviors'];
     $sysInfo['creditnames'] = $setting['creditnames'];
     return $sysInfo;
 }
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:10,代码来源:site.php


示例6: uni_group_check

function uni_group_check()
{
    global $_W;
    $uniacid = $_W['uniacid'];
    $settings = uni_setting($uniacid, array('groupdata'));
    $groupdata = $settings['groupdata'] ? $settings['groupdata'] : array();
    if ($_W['account']['groupid'] != 0 && $groupdata['isexpire'] == 1 && $groupdata['endtime'] < TIMESTAMP) {
        pdo_update('uni_account', array('groupid' => 0), array('uniacid' => $uniacid));
        pdo_update('uni_settings', array('groupdata' => iserializer(array('isexpire' => 1, 'endtime' => $groupdata['endtime'], 'oldgroupid' => $_W['account']['groupid']))), array('uniacid' => $uniacid));
        $_W['account']['groupid'] = 0;
        load()->model('module');
        module_build_privileges();
        return true;
    }
    return false;
}
开发者ID:ruige123456,项目名称:dataMining,代码行数:16,代码来源:account.mod.php


示例7: settingsDisplay

 public function settingsDisplay($settings)
 {
     global $_GPC, $_W;
     $credits = uni_setting($_W['uniacid'], 'creditnames');
     $cls = new Prize();
     list($code, $groups) = $cls->groups();
     if (checksubmit()) {
         $cfg = array('times' => $_GPC['times'], 'start_time' => $_GPC['start_time'], 'end_time' => $_GPC['end_time'], 'prize_group' => $_GPC['prize_group'], 'credit_type' => $_GPC['credit_type'], 'credit' => intval($_GPC['credit']), 'rank' => intval($_GPC['rank']));
         $start_time = $cfg['start_time'];
         $start_time = strtotime($start_time);
         $end_time = $cfg['end_time'];
         $end_time = strtotime($end_time);
         if ($start_time >= $end_time) {
             message('开始时间不得晚于结束时间', 'refresh', 'error');
         } elseif ($this->saveSettings($cfg)) {
             message('保存成功', 'refresh');
         }
     }
     if (!isset($settings) || empty($settings)) {
         $UnIaCid = $_W['uniacid'];
         $par = array(':module' => $this->modulename, ':uniacid' => $UnIaCid);
         $sql = "SELECT COUNT(*) FROM " . tablename("uni_account_modules") . " WHERE module=:module AND uniacid=:uniacid";
         $row = pdo_fetchcolumn($sql, $par);
         if (empty($row) || intval($row) <= 0) {
             $cfg = array('module' => $this->modulename, 'uniacid' => $UnIaCid, 'enabled' => 1);
             pdo_insert("uni_account_modules", $cfg);
         }
     }
     if (!isset($settings['times'])) {
         $settings['times'] = '1';
     }
     if (!isset($settings['start_time'])) {
         $settings['start_time'] = '08:30';
     }
     if (!isset($settings['end_time'])) {
         $settings['end_time'] = '22:00';
     }
     if (!isset($settings['credit'])) {
         $settings['credit'] = '1';
     }
     if (!isset($settings['rank'])) {
         $settings['rank'] = '10';
     }
     include $this->template('setting');
 }
开发者ID:eduNeusoft,项目名称:weixin,代码行数:45,代码来源:module.php


示例8: doWebFinancialCenter

 public function doWebFinancialCenter()
 {
     global $_W, $_GPC;
     //这个操作被定义用来呈现 管理中心导航菜单
     if ($_W['ispost'] && $_W['isajax']) {
         $setting = uni_setting($_W['uniacid'], array('groupdata'));
         $setting["groupdata"]["is_auto"] = $_GPC["is_auto"];
         pdo_update("uni_settings", array("groupdata" => iserializer($setting["groupdata"])), array("uniacid" => $_W['uniacid']));
         die(json_encode(array("code" => 1, "message" => "操作成功.")));
     }
     $settings = get_settings();
     $service = explode("|", $settings["service_qqs"]);
     $qqs = array();
     foreach ($service as $ser) {
         list($name, $qq) = explode("-", $ser);
         $qqs[] = array("name" => $name, "qq" => $qq);
     }
     include $this->template('financial_center');
 }
开发者ID:aspnmy,项目名称:weizan,代码行数:19,代码来源:site.php


示例9: respond

 public function respond()
 {
     global $_W, $engine;
     if ($this->message['type'] == 'trace') {
         return $this->respText('');
     }
     $setting = uni_setting($_W['uniacid'], array('default'));
     if (!empty($setting['default'])) {
         $flag = array('image' => 'url', 'link' => 'url', 'text' => 'content');
         $message = $this->message;
         $message['type'] = 'text';
         $message['content'] = $setting['default'];
         $message['redirection'] = true;
         $message['source'] = 'default';
         $message['original'] = $this->message[$flag[$this->message['type']]];
         $pars = $engine->analyzeText($message);
         if (is_array($pars)) {
             return array('params' => $pars);
         }
     }
 }
开发者ID:6662680,项目名称:qday_wx,代码行数:21,代码来源:processor.php


示例10: pay

 protected function pay($params = array())
 {
     global $_W;
     $params['module'] = $this->module['name'];
     $sql = 'SELECT * FROM ' . tablename('core_paylog') . ' WHERE `uniacid`=:uniacid AND `module`=:module AND `tid`=:tid';
     $pars = array();
     $pars[':uniacid'] = $_W['uniacid'];
     $pars[':module'] = $params['module'];
     $pars[':tid'] = $params['tid'];
     $log = pdo_fetch($sql, $pars);
     if (!empty($log) && $log['status'] == '1') {
         message('这个订单已经支付成功, 不需要重复支付.');
     }
     $setting = uni_setting($_W['uniacid'], array('payment', 'creditbehaviors'));
     if (!is_array($setting['payment'])) {
         message('没有有效的支付方式, 请联系网站管理员.');
     }
     $pay = $setting['payment'];
     $pay['credit']['switch'] = false;
     $pay['delivery']['switch'] = false;
     include $this->template('common/paycenter');
 }
开发者ID:6662680,项目名称:qday_wx,代码行数:22,代码来源:site.php


示例11: receive

 public function receive()
 {
     global $_W;
     //这里定义此模块进行消息订阅时的, 消息到达以后的具体处理过程, 请查看微赞文档来编写你的代码
     $stat_setting = uni_setting($_W['uniacid'], 'stat');
     $stat_setting = $stat_setting['stat'];
     if (!is_array($stat_setting) || empty($stat_setting)) {
         $stat_setting = array();
         $stat_setting['msg_maxday'] = 0;
         $stat_setting['msg_history'] = 1;
         $stat_setting['use_ratio'] = 1;
     }
     if (!empty($stat_setting['msg_maxday']) && $stat_setting['msg_maxday'] > 0) {
         pdo_delete('stat_msg_history', " createtime < " . TIMESTAMP . ' - ' . $stat_setting['msg_maxday'] * 86400);
     }
     if ($stat_setting['msg_history']) {
         switch ($this->message['type']) {
             case 'text':
                 $content = iserializer(array('content' => $this->message['content'], 'redirection' => $this->message['redirection'], 'source' => $this->message['source']));
                 break;
             default:
                 $content = $this->message['content'];
         }
         pdo_insert('stat_msg_history', array('uniacid' => $_W['uniacid'], 'module' => $this->params['module'], 'from_user' => $this->message['from'], 'rid' => intval($this->params['rule']), 'kid' => $this->keyword['id'], 'message' => $content, 'type' => $this->message['type'], 'createtime' => $this->message['time']));
     }
     if (!empty($stat_setting['use_ratio'])) {
         $updateid = pdo_query("UPDATE " . tablename('stat_rule') . " SET hit = hit + 1, lastupdate = '" . TIMESTAMP . "' WHERE rid = :rid AND createtime = :createtime", array(':rid' => $this->params['rule'], ':createtime' => strtotime(date('Y-m-d'))));
         if (empty($updateid)) {
             pdo_insert('stat_rule', array('uniacid' => $_W['uniacid'], 'rid' => $this->params['rule'], 'createtime' => strtotime(date('Y-m-d')), 'hit' => 1, 'lastupdate' => $this->message['time']));
         }
         if (!empty($this->keyword['id'])) {
             $updateid = pdo_query("UPDATE " . tablename('stat_keyword') . " SET hit = hit + 1, lastupdate = '" . TIMESTAMP . "' WHERE kid = :kid AND createtime = :createtime", array(':kid' => $this->keyword['id'], ':createtime' => strtotime(date('Y-m-d'))));
             if (empty($updateid)) {
                 pdo_insert('stat_keyword', array('uniacid' => $_W['uniacid'], 'rid' => $this->params['rule'], 'kid' => $this->keyword['id'], 'createtime' => strtotime(date('Y-m-d')), 'hit' => 1, 'lastupdate' => $this->message['time']));
             }
         }
     }
 }
开发者ID:eduNeusoft,项目名称:weixin,代码行数:38,代码来源:receiver.php


示例12: app_navs

function app_navs($type = 'home', $multiid = 0, $section = 0)
{
    global $_W;
    $pos = array();
    $pos['home'] = 1;
    $pos['profile'] = 2;
    $pos['shortcut'] = 3;
    if (empty($multiid) && $type != 'profile') {
        load()->model('account');
        $setting = uni_setting($_W['uniacid'], array('default_site'));
        $multiid = $setting['default_site'];
    }
    $sql = "SELECT id,name, description, url, icon, css, position, module FROM " . tablename('site_nav') . " WHERE position = '{$pos[$type]}' AND status = 1 AND uniacid = '{$_W['uniacid']}' AND multiid = '{$multiid}' ORDER BY displayorder DESC, id DESC";
    $navs = pdo_fetchall($sql);
    if (!empty($navs)) {
        foreach ($navs as &$row) {
            if (!strexists($row['url'], 'tel:') && !strexists($row['url'], '://') && !strexists($row['url'], 'www') && !strexists($row['url'], 'i=')) {
                $row['url'] .= strexists($row['url'], '?') ? "&i={$_W['uniacid']}" : "?i={$_W['uniacid']}";
            }
            if (is_serialized($row['css'])) {
                $row['css'] = unserialize($row['css']);
            }
            if (empty($row['css']['icon']['icon'])) {
                $row['css']['icon']['icon'] = 'fa fa-external-link';
            }
            if ($row['position'] == '3') {
                if (!empty($row['css'])) {
                    unset($row['css']['icon']['font-size']);
                }
            }
            $row['css']['icon']['style'] = "color:{$row['css']['icon']['color']};font-size:{$row['css']['icon']['font-size']}px;";
            $row['css']['name'] = "color:{$row['css']['name']['color']};";
        }
        unset($row);
    }
    return $navs;
}
开发者ID:ChainBoy,项目名称:wxfx,代码行数:37,代码来源:app.mod.php


示例13: doMobilePay

 public function doMobilePay()
 {
     global $_W, $_GPC;
     //验证用户登录状态,此处测试不做验证
     checkauth();
     $params['tid'] = date('YmdH');
     $params['user'] = $_W['member']['uid'];
     $params['fee'] = floatval($_GPC['price']);
     $params['title'] = '测试支付公众号名称';
     $params['ordersn'] = random(5, 1);
     $params['virtual'] = false;
     if (checksubmit('submit')) {
         if ($_GPC['type'] == 'credit') {
             $setting = uni_setting($_W['uniacid'], array('creditbehaviors'));
             $credtis = mc_credit_fetch($_W['member']['uid']);
             //此处需要验证积分数量
             if ($credtis[$setting['creditbehaviors']['currency']] < $params['fee']) {
                 message('抱歉,您帐户的余额不够支付该订单,请充值!', '', 'error');
             }
         }
     } else {
         $this->pay($params);
     }
 }
开发者ID:randyli,项目名称:redstar,代码行数:24,代码来源:site.php


示例14: defined

<?php

/**
 * [WEIZAN System] Copyright (c) 2015 012WZ.COM
 * WeiZan is NOT a free software, it under the license terms, visited http://www.012wz.com/ for more details.
 */
defined('IN_IA') or exit('Access Denied');
$dos = array('display');
$do = in_array($do, $dos) ? $do : 'display';
if ($do == 'display') {
    $data = uni_setting($_W['uniacid'], array('site_info', 'styleid'));
    $styleid = $data['styleid'];
    $site_info = empty($data['site_info']) ? array('site_info' => array()) : $data['site_info'];
    $styles = pdo_fetchall('SELECT * FROM ' . tablename('site_styles') . ' WHERE uniacid = :uniacid', array(':uniacid' => $_W['uniacid']));
    if (checksubmit('submit')) {
        $pdata['site_info'] = iserializer(array('sitename' => $_GPC['sitename'], 'keywords' => $_GPC['keywords'], 'description' => $_GPC['description'], 'footer' => htmlspecialchars_decode($_GPC['footer'])));
        $pdata['styleid'] = intval($_GPC['styleid']);
        pdo_update('uni_settings', $pdata, array('uniacid' => $_W['uniacid']));
        cache_delete("unisetting:{$_W['uniacid']}");
        message('信息设置成功!', url('site/info/display'), 'success');
    }
}
template('site/info');
开发者ID:aspnmy,项目名称:weizan,代码行数:23,代码来源:info.ctrl.php


示例15: defined

<?php

/**
 * @FreeGo Team 智慧游
 * @url http://www.cninone.com/
 */
defined('IN_IA') or exit('Access Denied');
if ($action != 'cash') {
    checkauth();
}
load()->model('activity');
$filter = array();
$coupons = activity_coupon_owned($_W['member']['uid'], $filter);
$tokens = activity_token_owned($_W['member']['uid'], $filter);
$setting = uni_setting($_W['uniacid'], array('creditnames', 'creditbehaviors', 'uc', 'payment', 'passport'));
$behavior = $setting['creditbehaviors'];
$creditnames = $setting['creditnames'];
$credits = mc_credit_fetch($_W['member']['uid'], '*');
$sql = 'SELECT `status` FROM ' . tablename('mc_card') . " WHERE `uniacid` = :uniacid";
$cardstatus = pdo_fetch($sql, array(':uniacid' => $_W['uniacid']));
开发者ID:ChainBoy,项目名称:wxfx,代码行数:20,代码来源:__init.php


示例16: m

 if ($useweixin) {
     $set = m('common')->getSysset();
     if (!is_weixin()) {
         show_json(0, '非微信环境!');
     }
     if (empty($set['pay']['weixin'])) {
         show_json(0, '未开启微信支付!');
     }
     $wechat = array('success' => false);
     $params = array();
     $params['tid'] = $log['logno'];
     $params['user'] = $openid;
     $params['fee'] = $goods['money'];
     $params['title'] = $set['shop']['name'] . (empty($goods['type']) ? "积分兑换" : '积分抽奖') . ' 单号:' . $log['logno'];
     load()->model('payment');
     $setting = uni_setting($_W['uniacid'], array('payment'));
     if (is_array($setting['payment'])) {
         $options = $setting['payment']['wechat'];
         $options['appid'] = $_W['account']['key'];
         $options['secret'] = $_W['account']['secret'];
         $wechat = m('common')->wechat_build($params, $options, 2);
         $wechat['success'] = false;
         if (!is_error($wechat)) {
             $wechat['success'] = true;
         } else {
             show_json(0, $wechat['message']);
         }
     }
     if (!$wechat['success']) {
         show_json(0, '微信支付参数错误!');
     }
开发者ID:ChainBoy,项目名称:wxfx,代码行数:31,代码来源:detail.php


示例17: intval

        }
        if ($_W['isfounder']) {
            $notify['sms']['balance'] = intval($_GPC['balance']);
            $notify['sms']['signature'] = trim($_GPC['signature']);
            $notify = iserializer($notify);
            $updatedata['notify'] = $notify;
        }
        pdo_update('uni_settings', $updatedata, array('uniacid' => $id));
        pdo_update('uni_account', $uniaccount, array('uniacid' => $id));
        module_build_privileges();
        message('更新公众号成功!', referer(), 'success');
    }
    $account = array();
    if (!empty($id)) {
        $account = pdo_fetch("SELECT * FROM " . tablename('uni_account') . " WHERE uniacid = :id", array(':id' => $id));
        $settings = uni_setting($id, array('notify', 'groupdata'));
        $groupdata = $settings['groupdata'] ? $settings['groupdata'] : array('isexpire' => 0, 'oldgroupid' => '', 'endtime' => TIMESTAMP);
        $notify = $settings['notify'] ? $settings['notify'] : array();
    } else {
        $groupdata = array('isexpire' => 0, 'oldgroupid' => '', 'endtime' => TIMESTAMP);
    }
    $group = array();
    if (empty($_W['isfounder'])) {
        $group = pdo_fetch("SELECT * FROM " . tablename('users_group') . " WHERE id = '{$_W['user']['groupid']}'");
        $group['package'] = uni_groups((array) iunserializer($group['package']));
    } else {
        $group['package'] = uni_groups();
    }
    template('account/post');
}
if ($do == 'list') {
开发者ID:randyli,项目名称:redstar,代码行数:31,代码来源:post.ctrl.php


示例18: defined

<?php

/**
 * [Weizan System] Copyright (c) 2014 wdlcms.com
 * Weizan is NOT a free software, it under the license terms, visited http://www.wdlcms.com/ for more details.
 */
defined('IN_IA') or exit('Access Denied');
$dos = array('display', 'post', 'del', 'default', 'copy', 'quickmenu');
$do = in_array($do, $dos) ? $do : 'display';
$setting = uni_setting($_W['uniacid'], 'default_site');
$default_site = intval($setting['default_site']);
if ($do == 'quickmenu') {
    $id = intval($_GPC['mtid']);
    $multi = pdo_fetch('SELECT id,quickmenu FROM ' . tablename('site_multi') . ' WHERE uniacid = :uniacid AND id = :id', array(':uniacid' => $_W['uniacid'], ':id' => $id));
    if (empty($multi)) {
        message('微站不存在或已删除', referer(), 'error');
    }
    $modules = uni_modules();
    $quickmenu = iunserializer($multi['quickmenu']);
    if (!is_array($quickmenu)) {
        $quickmenu = array();
    }
    if (checksubmit('submit')) {
        $module = array();
        if (!empty($_GPC['module'])) {
            foreach ($_GPC['module'] as $row) {
                if (isset($modules[$row])) {
                    $module[] = $row;
                }
            }
        }
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:31,代码来源:multi.ctrl.php


示例19: intval

        $acid = intval($qr['acid']);
        if (intval($accounts[$acid]['level']) < 4) {
            continue;
        }
        if (intval($qr['model']) == 1) {
            $accounts[$acid]['qr1num'] = $qr['num'];
            $tyqr['qr1num'] += $qr['num'];
        } else {
            $accounts[$acid]['qr2num'] = $qr['num'];
            $tyqr['qr2num'] += $qr['num'];
        }
    }
}
if ($do == 'site') {
    $title = '微站功能概况';
    $setting = uni_setting($_W['uniacid'], array('default_site'));
    $default_site = intval($setting['default_site']);
    $setting = pdo_fetch('SELECT styleid,id,quickmenu FROM ' . tablename('site_multi') . ' WHERE uniacid =:uniacid AND id = :id ', array(':uniacid' => $_W['uniacid'], ':id' => $setting['default_site']));
    $templates_id = pdo_fetchcolumn('SELECT templateid FROM ' . tablename('site_styles') . ' WHERE id = :id', array(':id' => $setting['styleid']));
    $template = pdo_fetch('SELECT * FROM ' . tablename('site_templates') . ' WHERE id = :id ', array(':id' => $templates_id));
    $sql = "SELECT rid FROM " . tablename('cover_reply') . ' WHERE `module` = :module AND uniacid = :uniacid AND multiid = :multiid';
    $pars = array();
    $pars[':module'] = 'site';
    $pars[':uniacid'] = $_W['uniacid'];
    $pars[':multiid'] = $setting['id'];
    $cover = pdo_fetch($sql, $pars);
    if (!empty($cover['rid'])) {
        $keywords = pdo_fetchall("SELECT content FROM " . tablename('rule_keyword') . " WHERE rid = :rid", array(':rid' => $cover['rid']));
    }
    load()->model('app');
    $home_navs = app_navs('home', $setting['id']);
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:31,代码来源:welcome.ctrl.php


示例20: getcreditname

 protected function getcreditname($key)
 {
     $creditnames = uni_setting($_W['uniacid'], array('creditnames'));
     if ($creditnames) {
         foreach ($creditnames['creditnames'] as $index => $creditname) {
             if ($creditname['enabled'] == 0) {
                 unset($creditnames['creditnames'][$index]);
             }
         }
         $select_credit = implode(', ', array_keys($creditnames['creditnames']));
     } else {
         $select_credit = '';
     }
     return $creditnames['creditnames'][$key]['title'];
 }
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:15,代码来源:site.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP uni_user_permission_check函数代码示例发布时间:2022-05-23
下一篇:
PHP uni_permission函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap