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


PHP pdo_get函数代码示例

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


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

示例1: cron_run

function cron_run($id)
{
    global $_W;
    $cron = pdo_get('core_cron', array('uniacid' => $_W['uniacid'], 'id' => $id));
    if (empty($cron)) {
        return false;
    }
    $extra = array();
    $extra['Host'] = $_SERVER['HTTP_HOST'];
    load()->func('communication');
    $urlset = parse_url($_W['siteurl']);
    $urlset = pathinfo($urlset['path']);
    $response = ihttp_request('http://127.0.0.1/' . $urlset['dirname'] . '/' . url('cron/entry', array('id' => $cron['cloudid'])), array(), $extra);
    $response = json_decode($response['content'], true);
    if (is_error($response['message'])) {
        return $response['message'];
    } else {
        cron_setnexttime($cron);
        $cron_new = pdo_get('core_cron', array('uniacid' => $_W['uniacid'], 'id' => $id));
        if (empty($cron_new)) {
            return true;
        }
        if ($cron_new['status'] != $cron['status'] || $cron_new['lastruntime'] != $cron['lastruntime'] || $cron_new['nextruntime'] != $cron['nextruntime']) {
            load()->model('cloud');
            $cron_new['id'] = $cron_new['cloudid'];
            $status = cloud_cron_update($cron_new);
            if (is_error($status)) {
                return $status;
            }
        }
    }
    return true;
}
开发者ID:aspnmy,项目名称:weizan,代码行数:33,代码来源:cron.func.php

示例2: card_credit_set

function card_credit_set()
{
    global $_W;
    $set = array();
    $set = pdo_get('mc_card_credit_set', array('uniacid' => $_W['uniacid']));
    if (!empty($set)) {
        $set['sign'] = iunserializer($set['sign']);
        $set['share'] = iunserializer($set['share']);
    }
    return $set;
}
开发者ID:aspnmy,项目名称:weizan,代码行数:11,代码来源:card.mod.php

示例3: clerk_check

function clerk_check()
{
    global $_W;
    if (empty($_W['openid'])) {
        return error(-1, '获取粉丝openid失败');
    }
    $data = pdo_get('activity_coupon_password', array('uniacid' => $_W['uniacid'], 'openid' => $_W['fans']['from_user']));
    if (empty($data)) {
        return error(-1, '不是操作店员');
    }
    return $data;
}
开发者ID:aspnmy,项目名称:weizan,代码行数:12,代码来源:clerk.mod.php

示例4: card_member

function card_member($uid = 0)
{
    global $_W;
    $uid = intval($uid);
    if ($uid <= 0) {
        $uid = $_W['member']['uid'];
    }
    $data = pdo_get('mc_card_members', array('uniacid' => $_W['uniacid'], 'uid' => $uid));
    if (empty($data)) {
        return error(-1, '会员还没有领取会员卡');
    }
    return $data;
}
开发者ID:eduNeusoft,项目名称:weixin,代码行数:13,代码来源:card.mod.php

示例5: defined

<?php

/**
 * [WeEngine System] Copyright (c) 2014 WE7.CC
 * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
 */
defined('IN_IA') or exit('Access Denied');
uni_user_permission_check('mc_group');
$dos = array('display', 'post', 'delete', 'set');
$do = in_array($do, $dos) ? $do : 'display';
cache_delete("uniaccount:{$_W['uniacid']}");
if ($do == 'display') {
    $_W['page']['title'] = '会员组列表 - 会员组 - 会员中心';
    $setting = pdo_get('uni_settings', array('uniacid' => $_W['uniacid']), array('grouplevel'));
    if (checksubmit('submit')) {
        $grouplevel = intval($_GPC['grouplevel']);
        pdo_update('uni_settings', array('grouplevel' => $grouplevel), array('uniacid' => $_W['uniacid']));
        cache_delete("unisetting:{$_W['uniacid']}");
        foreach ($_GPC['credit'] as $key => $value) {
            $key = intval($key);
            $data['title'] = trim($_GPC['title'][$key]);
            $data['credit'] = intval($_GPC['credit'][$key]);
            pdo_update('mc_groups', $data, array('groupid' => $key, 'uniacid' => $_W['uniacid']));
            unset($data);
        }
        message('用户组更新成功!', referer(), 'success');
    }
    $list = pdo_fetchall("SELECT * FROM " . tablename('mc_groups') . " WHERE uniacid = :uniacid ORDER BY isdefault DESC,credit ASC", array(':uniacid' => $_W['uniacid']));
    $count = pdo_fetchall('SELECT groupid,COUNT(*) AS num FROM ' . tablename('mc_members') . ' WHERE uniacid = :uniacid GROUP BY groupid', array(':uniacid' => $_W['uniacid']), 'groupid');
}
if ($do == 'post') {
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:group.ctrl.php

示例6: defined

<?php

/**
 * [WeEngine System] Copyright (c) 2014 WE7.CC
 * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
 */
defined('IN_IA') or exit('Access Denied');
$dos = array('display', 'detail');
$do = in_array($do, $dos) ? $do : 'display';
if ($do == 'display') {
    $profile = mc_fetch($_W['member']['uid'], array('nickname', 'avatar', 'mobile', 'groupid'));
    $mcgroups = mc_groups();
    $profile['group'] = $mcgroups[$profile['groupid']];
    $stores = pdo_fetchall('SELECT * FROM ' . tablename('activity_stores') . ' WHERE uniacid = :uniacid', array(':uniacid' => $_W['uniacid']));
}
if ($do == 'detail') {
    $id = intval($_GPC['id']);
    $store = pdo_get('activity_stores', array('uniacid' => $_W['uniacid'], 'id' => $id));
    if (empty($store)) {
        message('门店不存在或已删除', referer(), 'error');
    }
    $store['photo_list'] = iunserializer($store['photo_list']);
    $store['category'] = iunserializer($store['category']);
}
template('mc/store');
开发者ID:zhang19960118,项目名称:html11,代码行数:25,代码来源:store.ctrl.php

示例7: exit

        if (empty($user)) {
            exit(json_encode(array('valid' => true)));
        } else {
            exit(json_encode(array('valid' => false)));
        }
    }
    if (checksubmit('form')) {
        $realname = trim($_GPC['realname']) ? trim($_GPC['realname']) : message('姓名不能为空');
        $mobile = trim($_GPC['mobile']) ? trim($_GPC['mobile']) : message('手机不能为空');
        $user = pdo_get('mc_members', array('uniacid' => $_W['uniacid'], 'mobile' => $mobile));
        if (!empty($user)) {
            message('手机号被占用');
        }
        $email = trim($_GPC['email']);
        if (!empty($email)) {
            $user = pdo_get('mc_members', array('uniacid' => $_W['uniacid'], 'email' => $email));
            if (!empty($user)) {
                message('邮箱被占用');
            }
        }
        $salt = random(8);
        $data = array('uniacid' => $_W['uniacid'], 'realname' => $realname, 'mobile' => $mobile, 'email' => $email, 'salt' => $salt, 'password' => md5(trim($_GPC['password']) . $salt . $_W['config']['setting']['authkey']), 'credit1' => intval($_GPC['credit1']), 'credit2' => intval($_GPC['credit2']), 'groupid' => intval($_GPC['groupid']), 'createtime' => TIMESTAMP);
        pdo_insert('mc_members', $data);
        $uid = pdo_insertid();
        message('添加会员成功,将进入编辑页面', url('mc/member/post', array('uid' => $uid)), 'success');
    }
}
if ($do == 'group') {
    if ($_W['isajax']) {
        $id = intval($_GPC['id']);
        $group = $_W['account']['groups'][$id];
开发者ID:wisemyth,项目名称:weizan,代码行数:31,代码来源:member.ctrl.php

示例8: receive

 public function receive()
 {
     global $_W;
     if ($this->message['event'] == 'subscribe' && !empty($this->message['ticket'])) {
         $sceneid = $this->message['scene'];
         $acid = $this->acid;
         $uniacid = $this->uniacid;
         $row = pdo_fetch("SELECT id, name, acid FROM " . tablename('qrcode') . " WHERE uniacid = :aid AND acid = :acid AND qrcid = :qrcid", array(':aid' => $uniacid, ':acid' => $acid, ':qrcid' => $sceneid));
         if (empty($row)) {
             $row = pdo_fetch("SELECT id, name, acid FROM " . tablename('qrcode') . " WHERE uniacid = :aid AND acid = :acid AND scene_str = :scene_str", array(':aid' => $uniacid, ':acid' => $acid, ':scene_str' => $sceneid));
         }
         $insert = array('uniacid' => $_W['uniacid'], 'acid' => $row['acid'], 'qid' => $row['id'], 'openid' => $this->message['from'], 'type' => 1, 'qrcid' => intval($sceneid), 'scene_str' => $sceneid, 'name' => $row['name'], 'createtime' => TIMESTAMP);
         pdo_insert('qrcode_stat', $insert);
     } elseif ($this->message['event'] == 'SCAN') {
         $sceneid = $this->message['scene'];
         $acid = $this->acid;
         $uniacid = $this->uniacid;
         $row = pdo_fetch("SELECT id, name, acid FROM " . tablename('qrcode') . " WHERE uniacid = :aid AND acid = :acid AND qrcid = :qrcid", array(':aid' => $uniacid, ':acid' => $acid, ':qrcid' => $sceneid));
         if (empty($row)) {
             $row = pdo_fetch("SELECT id, name, acid FROM " . tablename('qrcode') . " WHERE uniacid = :aid AND acid = :acid AND scene_str = :scene_str", array(':aid' => $uniacid, ':acid' => $acid, ':scene_str' => $sceneid));
         }
         $insert = array('uniacid' => $_W['uniacid'], 'acid' => $row['acid'], 'qid' => $row['id'], 'openid' => $this->message['from'], 'type' => 2, 'qrcid' => intval($sceneid), 'scene_str' => $sceneid, 'name' => $row['name'], 'createtime' => TIMESTAMP);
         pdo_insert('qrcode_stat', $insert);
     }
     $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'], 'original' => $this->message['original'], 'redirection' => $this->message['redirection'], 'source' => $this->message['source']));
                 break;
             case 'image':
                 $content = $this->message['url'];
                 break;
             case 'voice':
                 $content = iserializer(array('media' => $this->message['media'], 'format' => $this->message['format']));
                 break;
             case 'video':
                 $content = iserializer(array('media' => $this->message['media'], 'thumb' => $this->message['thumb']));
                 break;
             case 'location':
                 $content = iserializer(array('x' => $this->message['location_x'], 'y' => $this->message['location_y']));
                 break;
             case 'link':
                 $content = iserializer(array('title' => $this->message['title'], 'description' => $this->message['description'], 'url' => $this->message['url']));
                 break;
             case 'subscribe':
                 $content = iserializer(array('scene' => $this->message['scene'], 'ticket' => $this->message['ticket']));
                 break;
             case 'qr':
                 $content = iserializer(array('scene' => $this->message['scene'], 'ticket' => $this->message['ticket']));
                 break;
             case 'click':
                 $content = $this->message['content'];
                 break;
             case 'view':
                 $content = $this->message['url'];
                 break;
             case 'trace':
                 $content = iserializer(array('location_x' => $this->message['location_x'], 'location_y' => $this->message['location_y'], 'precision' => $this->message['precision']));
                 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'])) {
         if (!empty($this->params['rule'])) {
             $rule_stat_found = pdo_get('stat_rule', array('rid' => $this->params['rule'], 'createtime' => strtotime(date('Y-m-d'))));
             if (empty($rule_stat_found)) {
                 pdo_insert('stat_rule', array('uniacid' => $_W['uniacid'], 'rid' => $this->params['rule'], 'createtime' => strtotime(date('Y-m-d')), 'hit' => 1, 'lastupdate' => $this->message['time']));
             } else {
                 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($this->keyword['id'])) {
             $keyword_stat_found = pdo_get('stat_keyword', array('rid' => $this->params['rule'], 'createtime' => strtotime(date('Y-m-d'))));
             if (empty($keyword_stat_found)) {
                 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']));
             } else {
                 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'))));
             }
         }
     }
 }
开发者ID:aspnmy,项目名称:weizan,代码行数:94,代码来源:receiver.php

示例9: exit

    $acc = WeAccount::create();
    $data = $acc->fansSendAll($group, $type, $media['media_id']);
    if (is_error($data)) {
        exit($data['message']);
    }
    $groups = pdo_fetch('SELECT * FROM ' . tablename('mc_fans_groups') . ' WHERE uniacid = :uniacid AND acid = :acid', array(':uniacid' => $_W['uniacid'], ':acid' => $_W['acid']));
    if (!empty($groups)) {
        $groups = iunserializer($groups['groups']);
    }
    $record = array('uniacid' => $_W['uniacid'], 'acid' => $_W['acid'], 'groupname' => $groups[$group]['name'], 'fansnum' => $groups[$group]['count'], 'msgtype' => $type, 'group' => $group, 'attach_id' => $id, 'status' => 0, 'type' => 0, 'sendtime' => TIMESTAMP, 'createtime' => TIMESTAMP);
    pdo_insert('mc_mass_record', $record);
    exit('success');
}
if ($do == 'del') {
    $id = intval($_GPC['id']);
    $media = pdo_get('wechat_attachment', array('uniacid' => $_W['uniacid'], 'id' => $id));
    if (empty($media)) {
        exit('素材不存在或已经删除');
    }
    $media_id = trim($media['media_id']);
    $acc = WeAccount::create();
    $data = $acc->delMaterial($media_id);
    if (is_error($data)) {
        exit($data['message']);
    } else {
        pdo_delete('wechat_attachment', array('uniacid' => $_W['uniacid'], 'id' => $id));
        if ($type == 'image' || $type == 'voice') {
            $path = ATTACHMENT_ROOT . "/{$media['type']}s/{$_W['uniacid']}/material/{$media['$media_id']}";
            @unlink($path);
        } elseif ($type == 'news') {
            pdo_delete('wechat_news', array('uniacid' => $_W['uniacid'], 'attach_id' => $id));
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:display.ctrl.php

示例10: defined

 * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
 */
defined('IN_IA') or exit('Access Denied');
$dos = array('use');
$do = in_array($do, $dos) ? $do : 'use';
if ($do == 'use') {
    $id = intval($_GPC['id']);
    $code = trim($_GPC['code']);
    if ($id == 0 || empty($code)) {
        message('参数错误');
    }
    $record = pdo_get('coupon_record', array('acid' => $_W['acid'], 'id' => $id, 'code' => $code));
    if (empty($record)) {
        message('卡券领取记录不存在');
    }
    $card = pdo_get('coupon', array('acid' => $_W['acid'], 'card_id' => $record['card_id']));
    if (empty($card)) {
        message('卡券不存在或已删除');
    }
    $card['date_info'] = iunserializer($card['date_info']);
    if (checksubmit()) {
        load()->classs('coupon');
        $coupon = new coupon($_W['acid']);
        if (is_null($coupon)) {
            message('系统错误');
        }
        $status = $coupon->ConsumeCode(array('code' => $record['code']));
        if (is_error($status)) {
            message($status['message']);
        }
        pdo_update('coupon_record', array('status' => 3, 'clerk_id' => $clerk['id'], 'clerk_name' => $clerk['name']), array('acid' => $_W['acid'], 'code' => $record['code']));
开发者ID:noikiy,项目名称:mygit,代码行数:31,代码来源:wechat.ctrl.php

示例11: exit

if (empty($uniacid_arr)) {
    exit('非法访问');
}
$receiver = trim($_GPC['receiver']);
if ($receiver == '') {
    exit('请输入邮箱或手机号');
} elseif (preg_match(REGULAR_MOBILE, $receiver)) {
    $receiver_type = 'mobile';
} elseif (preg_match("/^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$/", $receiver)) {
    $receiver_type = 'email';
} else {
    exit('您输入的邮箱或手机号格式错误');
}
$table = trim($_GPC['table']);
if (!empty($table)) {
    $isexist = pdo_get($table, array($receiver_type => $receiver, 'uniacid' => $_W['uniacid']));
    if (!empty($isexist)) {
        exit('手机或邮箱已被注册');
    }
}
$sql = 'DELETE FROM ' . tablename('uni_verifycode') . ' WHERE `createtime`<' . (TIMESTAMP - 1800);
pdo_query($sql);
$sql = 'SELECT * FROM ' . tablename('uni_verifycode') . ' WHERE `receiver`=:receiver AND `uniacid`=:uniacid';
$pars = array();
$pars[':receiver'] = $receiver;
$pars[':uniacid'] = $_W['uniacid'];
$row = pdo_fetch($sql, $pars);
$record = array();
if (!empty($row)) {
    if ($row['total'] >= 5) {
        exit('您的操作过于频繁,请稍后再试');
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:verifycode.ctrl.php

示例12: header

        $drawing->draw();
    }
    header('Content-Type: image/png');
    header('Content-Disposition: inline; filename="barcode.png"');
    $drawing->finish(BCGDrawing::IMG_FORMAT_PNG);
}
if ($do == 'qrcode') {
    require_once '../framework/library/qrcode/phpqrcode.php';
    $errorCorrectionLevel = "L";
    $matrixPointSize = "8";
    $cardsn = $_W['member']['uid'];
    QRcode::png($cardsn, false, $errorCorrectionLevel, $matrixPointSize);
}
if ($do == 'record') {
    $setting = pdo_get('mc_card', array('uniacid' => $_W['uniacid']), array('nums_text', 'times_text'));
    $card = pdo_get('mc_card_members', array('uniacid' => $_W['uniacid'], 'uid' => $_W['member']['uid']));
    $type = trim($_GPC['type']);
    $where = ' WHERE uniacid = :uniacid AND uid = :uid AND type = :type';
    $params = array(':uniacid' => $_W['uniacid'], ':uid' => $_W['member']['uid'], ':type' => $type);
    $pindex = max(1, intval($_GPC['page']));
    $psize = 20;
    $total = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename('mc_card_record') . $where, $params);
    $limit = ' ORDER BY id DESC LIMIT ' . ($pindex - 1) * $psize . ', ' . $psize;
    $data = pdo_fetchall('SELECT * FROM ' . tablename('mc_card_record') . $where . $limit, $params);
    $pager = pagination($total, $pindex, $psize, '', array('before' => 0, 'after' => 0, 'ajaxcallback' => ''));
}
if ($do == 'mobile') {
    $profile = mc_fetch($_W['member']['uid'], array('mobile'));
    $mobile_exist = empty($profile['mobile']) ? 0 : 1;
    if (checksubmit('submit')) {
        if ($mobile_exist == 1) {
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:bond.ctrl.php

示例13: cron_add

        $status = cron_add($cron);
        if (is_error($status)) {
            $message .= "{$row['time']}的群发任务同步到云服务失败,请手动同步<br>";
            $cron_status = 1;
        } else {
            pdo_update('mc_mass_record', array('cron_id' => $status), array('id' => $insert_id));
        }
    }
    if ($cron_status) {
        message(error(-1000, $message), '', 'ajax');
    }
    message(error(0, 'success'), '', 'ajax');
}
if ($do == 'cron') {
    $id = intval($_GPC['id']);
    $record = pdo_get('mc_mass_record', array('uniacid' => $_W['uniacid'], 'id' => $id));
    if (empty($record)) {
        message('群发任务不存在或已删除', referer(), 'error');
    }
    load()->func('cron');
    $cron = array('uniacid' => $_W['uniacid'], 'name' => date('Y-m-d', $record['sendtime']) . "微信群发任务", 'filename' => 'mass', 'type' => 1, 'lastruntime' => $record['sendtime'], 'extra' => $record['id'], 'module' => 'task', 'status' => 1);
    $status = cron_add($cron);
    if (is_error($status)) {
        message($status['message'], referer(), 'error');
    }
    pdo_update('mc_mass_record', array('cron_id' => $status), array('uniacid' => $_W['uniacid'], 'id' => $id));
    message('同步到云服务成功', referer(), 'success');
}
if ($do == 'send') {
    $_W['page']['title'] = '群发记录-微信群发';
    $pindex = max(1, intval($_GPC['page']));
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:mass.ctrl.php

示例14: defined

<?php

/**
 * [Weizan System] Copyright (c) 2014 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('sign_display', 'sign', 'sign_record', 'recommend', 'notice', 'sign_strategy', 'share');
$do = in_array($do, $dos) ? $do : 'sign_display';
load()->model('user');
load()->model('card');
$notice_count = card_notice_stat();
$setting = pdo_get('mc_card', array('uniacid' => $_W['uniacid']));
if ($do == 'sign_display') {
    $title = '签到-会员卡';
    $credits = mc_credit_fetch($_W['member']['uid']);
    $time = intval($_GPC['e']) ? intval($_GPC['e']) : TIMESTAMP;
    $pretime = strtotime('-1 month', $time);
    $nexttime = strtotime('+1 month', $time);
    $year = date('Y', $time);
    $month = date('m', $time);
    $day = date('d', $time);
    $record = pdo_fetch('SELECT id FROM ' . tablename('mc_card_sign_record') . ' WHERE uniacid = :uniacid AND uid = :uid AND addtime >= :addtime', array(':uniacid' => $_W['uniacid'], ':uid' => $_W['member']['uid'], ':addtime' => strtotime(date('Y-m-d'))));
    $total = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename('mc_card_sign_record') . ' WHERE uniacid = :uniacid AND uid = :uid', array(':uniacid' => $_W['uniacid'], ':uid' => $_W['member']['uid']));
    $month_record = pdo_fetchall('SELECT id,addtime FROM ' . tablename('mc_card_sign_record') . ' WHERE uniacid = :uniacid AND uid = :uid AND addtime >= :starttime AND addtime <= :endtime', array(':uniacid' => $_W['uniacid'], ':uid' => $_W['member']['uid'], ':starttime' => strtotime(date('Y-m', $time)), ':endtime' => strtotime('+1 month', strtotime(date('Y-m', $time)))));
    $flags = array();
    if (!empty($month_record)) {
        foreach ($month_record as $li) {
            $flags[] = date('j', $li['addtime']);
        }
    }
开发者ID:wisemyth,项目名称:weizan,代码行数:31,代码来源:card.ctrl.php

示例15: elseif

     exit;
 }
 if ($account_info['authorizer_info']['service_type_info'] = '0' || $account_info['authorizer_info']['service_type_info'] == '1') {
     if ($account_info['authorizer_info']['verify_type_info'] > -1) {
         $level = '3';
     } else {
         $level = '1';
     }
 } elseif ($account_info['authorizer_info']['service_type_info'] = '2') {
     if ($account_info['authorizer_info']['verify_type_info'] > -1) {
         $level = '4';
     } else {
         $level = '2';
     }
 }
 $account_found = pdo_get('account_wechats', array('account' => $account_info['authorizer_info']['alias']));
 if (!empty($account_found)) {
     message('公众号已经在系统中接入,是否要更改为授权接入方式? <div><a class="btn btn-primary" href="' . url('account/auth/confirm', array('level' => $level, 'auth_refresh_token' => $auth_refresh_token, 'auth_appid' => $auth_appid, 'acid' => $account_found['acid'], 'uniacid' => $account_found['uniacid'])) . '">是</a> &nbsp;&nbsp;<a class="btn btn-default" href="index.php">否</a></div>', '', 'tips');
 }
 $account_insert = array('name' => $account_info['authorizer_info']['nick_name'], 'description' => '', 'groupid' => 0);
 if (!pdo_insert('uni_account', $account_insert)) {
     message('授权登录新建公众号失败,请重试', url('account/display'), 'error');
 }
 $uniacid = pdo_insertid();
 $template = pdo_fetch('SELECT id,title FROM ' . tablename('site_templates') . " WHERE name = 'default'");
 $style_insert = array('uniacid' => $uniacid, 'templateid' => $template['id'], 'name' => $template['title'] . '_' . random(4));
 pdo_insert('site_styles', $style_insert);
 $styleid = pdo_insertid();
 $multi_insert = array('uniacid' => $uniacid, 'title' => $account_insert['name'], 'styleid' => $styleid);
 pdo_insert('site_multi', $multi_insert);
 $multi_id = pdo_insertid();
开发者ID:aspnmy,项目名称:weizan,代码行数:31,代码来源:auth.ctrl.php


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