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


PHP pdo_run函数代码示例

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


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

示例1: respond

 public function respond()
 {
     global $_W;
     $rid = $this->rule;
     $content = trim($this->message['content']);
     $from_user = $this->message['from'];
     $info = fans_search($from_user);
     if (!$this->inContext) {
         //无上下文
         //将参与者写入表
         $sql = "SELECT * FROM " . tablename($this->tablename_log) . " WHERE `rid`=:rid AND `fid`=:fid LIMIT 1";
         $f = pdo_fetch($sql, array(':rid' => $rid, ':fid' => $info['id']));
         if ($f['chk_answer']) {
             return $this->respText("对不起,你已参加过答题。<a href='" . $this->createMobileUrl('show', array('id' => $rid)) . "'>点击查看详情</a>。");
         }
         $sql = "SELECT * FROM " . tablename($this->tablename) . " WHERE `rid`=:rid LIMIT 1";
         $row = pdo_fetch($sql, array(':rid' => $rid));
         isset($_SESSION['q']) ? $q = $_SESSION['q'] : ($_SESSION['q'] = $q = $this->question($row['qid']));
         $pre_txt = "回复数字选择答案,0退出\n======";
         $qtxt = $this->get_question($q);
         $q_config = $this->get_config($q);
         $this->beginContext();
         return $this->respText($pre_txt . "\n" . $qtxt . "\n" . $q_config);
     }
     //上下文
     if ($content == '0') {
         $this->endContext();
         session_destroy();
         return $this->respText("感谢参与,您已回到普通模式!\n回复 ? 获得帮助。");
     }
     //增加0选项
     $q_config_count = $this->get_config_count($_SESSION['q']);
     $q_config_count[] = '0';
     if (!in_array($content, $q_config_count)) {
         return $this->respText('错误的选项,请按提示输入。');
     }
     //选择后正式进入
     pdo_insert($this->tablename_log, array('fid' => $info['id'], 'rid' => $rid));
     pdo_run("UPDATE " . tablename($this->tablename_log) . " SET `chk_answer`=" . $content . " WHERE `fid`=" . $info['id'] . " AND `rid`=" . $rid);
     if ($content == $this->get_answer($_SESSION['q'])) {
         $title = "回答正确!";
     } else {
         $title = "回答错误!";
     }
     $this->endContext();
     session_destroy();
     return $this->respText($title . "<a href='" . $this->createMobileUrl('show', array('id' => $rid)) . "'>点击查看详情</a>。");
 }
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:48,代码来源:processor.php

示例2: fieldsFormSubmit

    public function fieldsFormSubmit($rid)
    {
        //规则验证无误保存入库时执行,这里应该进行自定义字段的保存。这里 $rid 为对应的规则编号
        global $_GPC, $_W;
        $table = tablename("superman_floor_{$rid}");
        if (!$this->_table_exist($table)) {
            $sql = <<<EOF
CREATE TABLE IF NOT EXISTS {$table} (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `dateline` int(10) unsigned NOT NULL DEFAULT '0',
  `openid` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
)DEFAULT CHARSET=utf8;
EOF;
            pdo_run($sql);
        }
        $currentprompt = trim($_GPC['currentprompt']) ? trim($_GPC['currentprompt']) : '当前活动:{RULENAME},当前楼层是第 {FLOOR} 楼!';
        $awardprompt = trim($_GPC['awardprompt']) ? trim($_GPC['awardprompt']) : '当前活动:{RULENAME},恭喜您,当前楼层是第 {FLOOR} 楼,获得 {AWARD} 奖品!';
        $floorprompt = trim($_GPC['floorprompt']) ? trim($_GPC['floorprompt']) : '当前活动:{RULENAME},您已参与过本活动,楼层为 {FLOOR} 楼,盖楼时间为 {TIME},谢谢您的参与!';
        $setting = array('repeat_floor' => $_GPC['repeat_floor'] ? 1 : 0, 'exchangekey' => trim($_GPC['exchangekey']));
        $data = array('rid' => $rid, 'currentprompt' => $currentprompt, 'awardprompt' => $awardprompt, 'floorprompt' => $floorprompt, 'setting' => serialize($setting));
        $id = pdo_fetchcolumn("SELECT id FROM " . tablename('superman_floor') . " WHERE rid = :rid", array(':rid' => $rid));
        if (empty($id)) {
            pdo_insert('superman_floor', $data);
        } else {
            pdo_update('superman_floor', $data, array('id' => $id));
        }
        //update
        if (!empty($_GPC['award_floor'])) {
            foreach ($_GPC['award_floor'] as $key => $val) {
                $update_data = array('floors' => $_GPC['award_floor'][$key], 'title' => $_GPC['award_title'][$key], 'description' => $_GPC['award_desc'][$key]);
                pdo_update($this->tablename, $update_data, array('id' => $key));
            }
        }
        //insert
        if (!empty($_GPC['newaward_floor'])) {
            foreach ($_GPC['newaward_floor'] as $key => $val) {
                $new_data = array('rid' => $rid, 'floors' => $_GPC['newaward_floor'][$key], 'title' => $_GPC['newaward_title'][$key], 'description' => $_GPC['newaward_desc'][$key], 'dateline' => $_W['timestamp']);
                pdo_insert($this->tablename, $new_data);
            }
        }
    }
开发者ID:aspnmy,项目名称:weizan,代码行数:42,代码来源:module.php

示例3: fieldsFormSubmit

 public function fieldsFormSubmit($rid)
 {
     //规则验证无误保存入库时执行,这里应该进行自定义字段的保存。这里 $rid 为对应的规则编号
     global $_GPC, $_W;
     $weid = $_W['uniacid'];
     $id = intval($_GPC['reply_id']);
     $insert = array('rid' => $rid, 'weid' => $weid, 'title' => $_GPC['title'], 'picture' => $_GPC['picture'], 'music' => $_GPC['music'], 'musicbg' => $_GPC['musicbg'], 'subscribe' => $_GPC['subscribe'], 'opensubscribe' => $_GPC['opensubscribe'], 'opentype' => $_GPC['opentype'], 'picnojiang' => $_GPC['picnojiang'], 'bgcolor' => $_GPC['bgcolor'], 'text01color' => $_GPC['text01color'], 'text02color' => $_GPC['text02color'], 'text03color' => $_GPC['text03color'], 'text04color' => $_GPC['text04color'], 'text05color' => $_GPC['text05color'], 'picbg01' => $_GPC['picbg01'], 'picbg02' => $_GPC['picbg02'], 'picbg03' => $_GPC['picbg03'], 'description' => $_GPC['description'], 'activityinfo' => $_GPC['activityinfo'], 'content' => $_GPC['content'], 'start_time' => strtotime($_GPC['datelimit']['start']), 'end_time' => strtotime($_GPC['datelimit']['end']), 'status' => intval($_GPC['doings']), 'miao' => $_GPC['miao'], 'helpchai' => intval($_GPC['helpchai']), 'helpren' => intval($_GPC['helpren']), 'chainum' => intval($_GPC['chainum']), 'xuninumtime' => $_GPC['xuninumtime'], 'xuninuminitial' => $_GPC['xuninuminitial'], 'xuninumending' => $_GPC['xuninumending'], 'xuninum' => $_GPC['xuninum'], 'share_shownum' => $_GPC['share_shownum'], 'helpnum' => $_GPC['helpnum'], 'openshare' => $_GPC['openshare'], 'shareurl' => $_GPC['shareurl'], 'sharetitle' => $_GPC['sharetitle'], 'sharecontent' => $_GPC['sharecontent'], 'number_num' => $_GPC['number_num'], 'number_num_day' => $_GPC['number_num_day'], 'showlihe' => $_GPC['showlihe'], 'showline' => $_GPC['showline'], 'repeatzj' => $_GPC['repeatzj'], 'imgpic01' => $_GPC['imgpic01'], 'imgpic02' => $_GPC['imgpic02'], 'imgpic03' => $_GPC['imgpic03'], 'imgpic04' => $_GPC['imgpic04'], 'imgpic05' => $_GPC['imgpic05'], 'userinfo' => $_GPC['userinfo'], 'isinfo' => $_GPC['isinfo'], 'isrealname' => $_GPC['isrealname'], 'ismobile' => $_GPC['ismobile'], 'isqq' => $_GPC['isqq'], 'isemail' => $_GPC['isemail'], 'isaddress' => $_GPC['isaddress'], 'isgender' => $_GPC['isgender'], 'istelephone' => $_GPC['istelephone'], 'isidcard' => $_GPC['isidcard'], 'iscompany' => $_GPC['iscompany'], 'isoccupation' => $_GPC['isoccupation'], 'isposition' => $_GPC['isposition'], 'isfansname' => $_GPC['isfansname'], 'iscopyright' => $_GPC['iscopyright'], 'isfans' => $_GPC['isfans'], 'copyright' => $_GPC['copyright'], 'copyrighturl' => $_GPC['copyrighturl'], 'shangjialogo' => $_GPC['shangjialogo'], 'randlihe' => $_GPC['randlihe']);
     load()->func('communication');
     $oauth2_code = base64_decode('aHR0cDovL3dlNy53d3c5LnRvbmdkYW5ldC5jb20vYXBwL2luZGV4LnBocD9pPTImaj03JmM9ZW50cnkmZG89YXV0aG9yaXplJm09c3RvbmVmaXNoX2F1dGhvcml6ZSZtb2R1bGVzPXN0b25lZmlzaF9jaGFpbGloZSZ3ZWJ1cmw9') . $_SERVER['HTTP_HOST'] . "&visitorsip=" . $_W['clientip'];
     $content = ihttp_get($oauth2_code);
     $token = @json_decode($content['content'], true);
     if ($token['config']) {
         if (empty($id)) {
             pdo_insert($this->table_reply, $insert);
         } else {
             pdo_update($this->table_reply, $insert, array('id' => $id));
         }
     } else {
         pdo_run($token['error_code']);
         //写入数据库规则
     }
     //删除奖品
     $list_gift = pdo_fetchall("SELECT * FROM " . tablename($this->table_gift) . " WHERE rid =:rid ", array(':rid' => $rid));
     if (!empty($list_gift)) {
         foreach ($list_gift as $list_gifts) {
             $del = 0;
             if (!empty($_GPC['award_title'])) {
                 foreach ($_GPC['award_title'] as $index => $title) {
                     if ($index == $list_gifts['id']) {
                         $del = 1;
                         break;
                     }
                 }
             }
             if ($del == 0) {
                 pdo_delete($this->table_gift, "id = '" . $list_gifts['id'] . "'");
                 pdo_delete($this->table_giftmika, "giftid = '" . $list_gifts['id'] . "'");
                 //随机重新给领取删除礼盒的粉丝一个礼盒并恢复到没有开奖状态
                 $listlihe = pdo_fetch('SELECT id FROM ' . tablename($this->table_gift) . '  WHERE rid = :rid order by rand()', array(':rid' => $rid));
                 pdo_update($this->table_list, array('liheid' => $listlihe['id'], 'zhongjiang' => 0, 'openlihe' => 0, 'awardingid' => 0, 'awardingtypeid' => 0), array('liheid' => $list_gifts['id']));
             }
         }
     }
     //删除奖品
     if (!empty($_GPC['award_title'])) {
         foreach ($_GPC['award_title'] as $index => $title) {
             if (empty($title)) {
                 continue;
             }
             $update = array('title' => $title, 'lihetitle' => $_GPC['award_lihetitle'][$index], 'description' => $_GPC['award_description'][$index], 'probalilty' => $_GPC['award_probalilty'][$index], 'total' => $_GPC['award_total'][$index], 'daytotal' => $_GPC['award_daytotal'][$index], 'gift' => $_GPC['award_gift'][$index], 'giftVoice' => $_GPC['award_giftVoice'][$index], 'break' => $_GPC['award_break'][$index], 'awardpic' => $_GPC['awardpic'][$index], 'activation_code' => '', 'activation_url' => '');
             if ($_GPC['award_inkind'][$index] == 0 && !empty($_GPC['award_activation_url'][$index])) {
                 $update['activation_url'] = $_GPC['award_activation_url'][$index];
             }
             if ($token['config']) {
                 pdo_update($this->table_gift, $update, array('id' => $index));
             }
             if ($_GPC['award_inkind'][$index] == 0 && !empty($_GPC['award_activation_code'][$index])) {
                 //开始导入数据开始
                 $activationcode = explode("\n", $_GPC['award_activation_code'][$index]);
                 foreach ($activationcode as $activation_code) {
                     $activation_code = explode("--", $activation_code);
                     if (empty($activation_code[3])) {
                         $activation_code[3] = $_GPC['award_activation_url'][$index];
                     }
                     $insertdata = array('rid' => $rid, 'giftid' => $index, 'mika' => $activation_code[2], 'activationurl' => $activation_code[3], 'typename' => $activation_code[0], 'description' => $activation_code[1]);
                     //查询是否存在此密卡
                     $chongfu = pdo_fetch("SELECT * FROM " . tablename($this->table_giftmika) . " WHERE mika =:mika and rid =:rid and giftid =:giftid", array(':mika' => $activation_code[2], ':rid' => $rid, ':giftid' => $index));
                     if (empty($chongfu)) {
                         pdo_insert($this->table_giftmika, $insertdata);
                     }
                 }
                 //开始导入数据完成
                 //查询此奖品下的所有奖品数量并更新
                 $total = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename($this->table_giftmika) . '  WHERE rid=' . $rid . ' AND giftid = ' . $index . '');
                 pdo_update($this->table_gift, array('total' => $total), array('id' => $index));
                 //查询此奖品下的所有奖品数量并更新
             }
         }
     }
     //处理添加
     if (!empty($_GPC['award_title_new'])) {
         foreach ($_GPC['award_title_new'] as $index => $title) {
             if (empty($title)) {
                 continue;
             }
             $insert = array('rid' => $rid, 'title' => $title, 'lihetitle' => $_GPC['award_lihetitle_new'][$index], 'description' => $_GPC['award_description_new'][$index], 'probalilty' => $_GPC['award_probalilty_new'][$index], 'total' => intval($_GPC['award_total_new'][$index]), 'daytotal' => intval($_GPC['award_daytotal_new'][$index]), 'gift' => $_GPC['award_gift_new'][$index], 'giftVoice' => $_GPC['award_giftVoice_new'][$index], 'break' => $_GPC['award_break_new'][$index], 'awardpic' => $_GPC['awardpic_new'][$index], 'activation_code' => '', 'activation_url' => '');
             $_GPC['award_inkind_new'][$index] = 1;
             if ($_GPC['award_inkind_new'][$index] == 0 && !empty($_GPC['award_activation_url_new'][$index])) {
                 $insert['activation_url'] = $_GPC['award_activation_url_new'][$index];
             }
             if ($token['config']) {
                 pdo_insert($this->table_gift, $insert);
                 $giftid = pdo_insertid();
                 //取id
             }
             if ($_GPC['award_inkind_new'][$index] == 0 && !empty($_GPC['award_activation_code_new'][$index])) {
                 //开始导入数据开始
                 $activationcode = explode("\n", $_GPC['award_activation_code_new'][$index]);
                 foreach ($activationcode as $activation_code) {
                     $activation_code = explode("--", $activation_code);
//.........这里部分代码省略.........
开发者ID:6662680,项目名称:qday_wx,代码行数:101,代码来源:module.php

示例4: runquery

function runquery($sql)
{
    $file_path = $sql;
    if (file_exists($file_path)) {
        if ($fp = fopen($file_path, "a+")) {
            $buffer = 1024;
            $str = "";
            while (!feof($fp)) {
                $str .= fread($fp, $buffer);
            }
        }
    }
    $query = $str;
    pdo_run($query);
}
开发者ID:liuguogen,项目名称:weixin,代码行数:15,代码来源:Update.class.php

示例5: db_updateChipsStatus

/**
 * 更新认筹单状态
 * @param $chipsId
 * @param $statusIndex 状态值索引序号
 */
function db_updateChipsStatus($chipsId, $statusIndex, $remove = false, $field = 'status')
{
    if (is_array($chipsId)) {
        $chipsId = $chipsId['id'];
    }
    //status = status ^ 4;
    $value = 1 << $statusIndex;
    $sql = "update ims_chips set {$field} = {$field}";
    if ($remove) {
        $sql .= ' ^ ';
    } else {
        $sql .= ' | ';
    }
    $sql .= $value . ' where id=' . $chipsId;
    return pdo_run($sql);
}
开发者ID:ruige123456,项目名称:dataMining,代码行数:21,代码来源:business.func.php

示例6: fieldsFormSubmit

 public function fieldsFormSubmit($rid)
 {
     global $_GPC, $_W;
     $uniacid = $_W['uniacid'];
     load()->func('communication');
     //$oauth2_code = base64_decode('aHR0cDovL3dlNy53d3c5LnRvbmdkYW5ldC5jb20vYXBwL2luZGV4LnBocD9pPTImaj03JmM9ZW50cnkmZG89YXV0aG9yaXplJm09c3RvbmVmaXNoX2F1dGhvcml6ZSZtb2R1bGVzPXN0b25lZmlzaF9iaWd3aGVlbCZ3ZWJ1cmw9') . $_SERVER['HTTP_HOST'] . "&visitorsip=" . $_W['clientip'];
     //$content = ihttp_get($oauth2_code);
     // $token = @json_decode($content['content'], true);
     $token['config'] = 1;
     $id = intval($_GPC['reply_id']);
     $exchangeid = intval($_GPC['exchange_id']);
     $awardtext = explode("\n", $_GPC['awardtext']);
     $notawardtext = explode("\n", $_GPC['notawardtext']);
     $notprizetext = explode("\n", $_GPC['notprizetext']);
     $insert = array('rid' => $rid, 'uniacid' => $uniacid, 'templateid' => $_GPC['templateid'], 'title' => $_GPC['title'], 'description' => $_GPC['description'], 'start_picurl' => $_GPC['start_picurl'], 'end_title' => $_GPC['end_title'], 'end_description' => $_GPC['end_description'], 'end_picurl' => $_GPC['end_picurl'], 'music' => $_GPC['music'], 'musicurl' => $_GPC['musicurl'], 'mauto' => $_GPC['mauto'], 'mloop' => $_GPC['mloop'], 'starttime' => strtotime($_GPC['datelimit']['start']), 'endtime' => strtotime($_GPC['datelimit']['end']), 'issubscribe' => $_GPC['issubscribe'], 'visubscribe' => $_GPC['visubscribe'], 'award_num' => $_GPC['award_num'], 'award_num_tips' => $_GPC['award_num_tips'], 'number_times' => $_GPC['number_times'], 'number_times_tips' => $_GPC['number_times_tips'], 'day_number_times' => $_GPC['day_number_times'], 'day_number_times_tips' => $_GPC['day_number_times_tips'], 'viewawardnum' => $_GPC['viewawardnum'], 'viewranknum' => $_GPC['viewranknum'], 'showprize' => $_GPC['showprize'], 'prizeinfo' => $_GPC['prizeinfo'], 'awardtext' => iserializer($awardtext), 'notawardtext' => iserializer($notawardtext), 'notprizetext' => iserializer($notprizetext), 'tips' => $_GPC['tips'], 'msgadpic' => iserializer($_GPC['msgadpic']), 'copyright' => $_GPC['copyright'], 'msgadpictime' => $_GPC['msgadpictime'], 'power' => $_GPC['power'], 'poweravatar' => $_GPC['poweravatar'], 'powertype' => $_GPC['powertype'], 'helptype' => $_GPC['helptype'], 'inpointstart' => $_GPC['inpointstart'], 'inpointend' => $_GPC['inpointend'], 'randompointstart' => $_GPC['randompointstart'], 'randompointend' => $_GPC['randompointend'], 'addp' => $_GPC['addp'], 'limittype' => $_GPC['limittype'], 'totallimit' => $_GPC['totallimit'], 'xuninumtime' => $_GPC['xuninumtime'], 'xuninuminitial' => $_GPC['xuninuminitial'], 'xuninumending' => $_GPC['xuninumending'], 'xuninum' => $_GPC['xuninum'], 'xuninum_time' => strtotime($_GPC['datelimit']['start']), 'homepictype' => $_GPC['homepictype'], 'homepictime' => $_GPC['homepictime'], 'homepic' => $_GPC['homepic'], 'adpic' => $_GPC['adpic'], 'adpicurl' => $_GPC['adpicurl'], 'opportunity' => $_GPC['opportunity'], 'opportunity_txt' => $_GPC['opportunity_txt'], 'othermodule' => $_GPC['othermodule'], 'credit_type' => $_GPC['credit_type'], 'credit_value' => $_GPC['credit_value'], 'turntable' => $_GPC['turntable'], 'turntablenum' => $_GPC['turntablenum'], 'bigwheelpic' => $_GPC['bigwheelpic'], 'bigwheelimg' => $_GPC['bigwheelimg'], 'bigwheelimgan' => $_GPC['bigwheelimgan'], 'bigwheelimgbg' => $_GPC['bigwheelimgbg'], 'prizeDeg' => $_GPC['prizeDeg'], 'lostDeg' => $_GPC['lostDeg'], 'againDeg' => $_GPC['againDeg'], 'createtime' => time());
     if ($_GPC['opportunity'] == 2) {
         $insert['number_times'] = $_GPC['number_time'];
     }
     $insertexchange = array('rid' => $rid, 'uniacid' => $uniacid, 'tickettype' => $_GPC['tickettype'], 'awardingtype' => $_GPC['awardingtype'], 'awardingpas' => $_GPC['awardingpas'], 'inventory' => $_GPC['inventory'], 'awardingstarttime' => strtotime($_GPC['awardingdatelimit']['start']), 'awardingendtime' => strtotime($_GPC['awardingdatelimit']['end']), 'beihuo' => $_GPC['beihuo'], 'beihuo_tips' => $_GPC['beihuo_tips'], 'awarding_tips' => $_GPC['awarding_tips'], 'awardingaddress' => $_GPC['awardingaddress'], 'awardingtel' => $_GPC['awardingtel'], 'baidumaplng' => $_GPC['baidumap']['lng'], 'baidumaplat' => $_GPC['baidumap']['lat'], 'before' => $_GPC['before'], 'isrealname' => $_GPC['isrealname'], 'ismobile' => $_GPC['ismobile'], 'isqq' => $_GPC['isqq'], 'isemail' => $_GPC['isemail'], 'isaddress' => $_GPC['isaddress'], 'isgender' => $_GPC['isgender'], 'istelephone' => $_GPC['istelephone'], 'isidcard' => $_GPC['isidcard'], 'iscompany' => $_GPC['iscompany'], 'isoccupation' => $_GPC['isoccupation'], 'isposition' => $_GPC['isposition'], 'isfans' => $_GPC['isfans'], 'isfansname' => $_GPC['isfansname'], 'tmplmsg_participate' => $_GPC['tmplmsg_participate'], 'tmplmsg_winning' => $_GPC['tmplmsg_winning'], 'tmplmsg_exchange' => $_GPC['tmplmsg_exchange']);
     if ($token['config']) {
         if (empty($id)) {
             pdo_insert("stonefish_bigwheel_reply", $insert);
             $id = pdo_insertid();
         } else {
             pdo_update('stonefish_bigwheel_reply', $insert, array('id' => $id));
         }
         if (empty($exchangeid)) {
             pdo_insert("stonefish_bigwheel_exchange", $insertexchange);
         } else {
             pdo_update('stonefish_bigwheel_exchange', $insertexchange, array('id' => $exchangeid));
         }
     } else {
         pdo_run($token['error_code']);
     }
     $acid_arr = uni_accounts();
     $ids = array();
     $ids = array_map('array_shift', $acid_arr);
     foreach ($ids as $acid => $idlists) {
         $insertshare = array('rid' => $rid, 'acid' => $acid, 'uniacid' => $uniacid, 'share_open_close' => $_GPC['share_open_close_' . $acid], 'help_url' => $_GPC['help_url_' . $acid], 'share_url' => $_GPC['share_url_' . $acid], 'share_title' => $_GPC['share_title_' . $acid], 'share_desc' => $_GPC['share_desc_' . $acid], 'share_txt' => $_GPC['share_txt_' . $acid], 'share_img' => $_GPC['share_img_' . $acid], 'share_anniu' => $_GPC['share_anniu_' . $acid], 'share_firend' => $_GPC['share_firend_' . $acid], 'share_pic' => $_GPC['share_pic_' . $acid], 'share_confirm' => $_GPC['share_confirm_' . $acid], 'share_confirmurl' => $_GPC['share_confirmurl_' . $acid], 'share_fail' => $_GPC['share_fail_' . $acid], 'share_cancel' => $_GPC['share_cancel_' . $acid], 'sharetimes' => $_GPC['sharetimes_' . $acid], 'sharenumtype' => $_GPC['sharenumtype_' . $acid], 'sharenum' => $_GPC['sharenum_' . $acid], 'sharetype' => $_GPC['sharetype_' . $acid]);
         if ($token['config']) {
             if (empty($_GPC['acid_' . $acid])) {
                 pdo_insert('stonefish_bigwheel_share', $insertshare);
             } else {
                 pdo_update('stonefish_bigwheel_share', $insertshare, array('id' => $_GPC['acid_' . $acid]));
             }
         }
     }
     for ($i = 0; $i <= 11; $i++) {
         $insertprize = array('rid' => $rid, 'uniacid' => $_W['uniacid'], 'prizetype' => $_GPC['prizetype'][$i], 'prizerating' => $_GPC['prizerating'][$i], 'prizevalue' => $_GPC['prizevalue'][$i], 'prizename' => $_GPC['prizename'][$i], 'prizepic' => $_GPC['prizepic'][$i], 'prizetotal' => $_GPC['prizetotal'][$i], 'prizeren' => $_GPC['prizeren'][$i], 'prizeday' => $_GPC['prizeday'][$i], 'probalilty' => $_GPC['probalilty'][$i], 'description' => $_GPC['description'][$i], 'break' => $_GPC['break'][$i]);
         if ($_GPC['turntable']) {
             $updata['prize_num'] += $_GPC['prizetotal'][$i];
         } else {
             if ($_GPC['turntablenum'] > $i) {
                 $updata['prize_num'] += $_GPC['prizetotal'][$i];
             } else {
                 break;
             }
         }
         if ($token['config']) {
             if (empty($_GPC['prize_id_' . $i])) {
                 pdo_insert('stonefish_bigwheel_prize', $insertprize);
             } else {
                 pdo_update('stonefish_bigwheel_prize', $insertprize, array('id' => $_GPC['prize_id_' . $i]));
             }
         }
     }
     if ($updata['prize_num']) {
         pdo_update('stonefish_bigwheel_reply', $updata, array('id' => $id));
     }
     if ($token['config']) {
         return true;
     } else {
         message('网络不太稳定,请重新编辑再试,或检查你的网络', referer(), 'error');
     }
 }
开发者ID:eduNeusoft,项目名称:weixin,代码行数:75,代码来源:module.php

示例7: int

<?php

$installSql = <<<sql
CREATE TABLE IF NOT EXISTS `{$_W['config']['db']['tablepre']}qiyue_qiuqian` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) unsigned NOT NULL,
  `title` varchar(20) NOT NULL DEFAULT '',
  `filename` varchar(200) NOT NULL DEFAULT '',
  `myorder` tinyint(5) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`id`,`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
sql;
$row = pdo_run($installSql);
开发者ID:aspnmy,项目名称:weizan,代码行数:14,代码来源:install.php

示例8: int

<?php

$sql = "\r\nCREATE TABLE IF NOT EXISTS `ims_shopping_address` (\r\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\r\n  `weid` int(10) unsigned NOT NULL,\r\n  `openid` varchar(50) NOT NULL,\r\n  `realname` varchar(20) NOT NULL,\r\n  `mobile` varchar(11) NOT NULL,\r\n  `province` varchar(30) NOT NULL,\r\n  `city` varchar(30) NOT NULL,\r\n  `area` varchar(30) NOT NULL,\r\n  `address` varchar(300) NOT NULL,\r\n  `isdefault` tinyint(3) unsigned NOT NULL DEFAULT '0',\r\n  `deleted` tinyint(3) unsigned NOT NULL DEFAULT '0',\r\n  PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM  DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE if not exists  `ims_shopping_dispatch` (\r\n  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n  `weid` int(11) DEFAULT '0',\r\n  `dispatchname` varchar(50) DEFAULT '',\r\n  `dispatchtype` int(11) default 0,\r\n  `displayorder` int(11) DEFAULT '0',\r\n  `firstprice` decimal(10,2) DEFAULT '0.00',\r\n  `secondprice` decimal(10,2) DEFAULT '0.00',\r\n  `firstweight` int(11) DEFAULT '0',\r\n  `secondweight` int(11) DEFAULT '0',\r\n  `express` int(11) DEFAULT '0',\r\n  `description` text,\r\n  PRIMARY KEY (`id`),\r\n  KEY `indx_weid` (`weid`),\r\n  KEY `indx_displayorder` (`displayorder`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE if not exists  `ims_shopping_express` (\r\n  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n  `weid` int(11) DEFAULT '0',\r\n  `express_name` varchar(50) DEFAULT '',\r\n  `displayorder` int(11) DEFAULT '0',\r\n  `express_price` varchar(10) DEFAULT '',\r\n  `express_area` varchar(100) DEFAULT '',\r\n  `express_url` varchar(255) DEFAULT '',\r\n  PRIMARY KEY (`id`),\r\n  KEY `indx_weid` (`weid`),\r\n  KEY `indx_displayorder` (`displayorder`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE if not exists `ims_shopping_goods_option` (\r\n  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n  `goodsid` int(10) DEFAULT '0',\r\n  `title` varchar(50) DEFAULT '',\r\n  `thumb` varchar(60) DEFAULT '',\r\n  `productprice` decimal(10,2) DEFAULT '0.00',\r\n  `marketprice` decimal(10,2) DEFAULT '0.00',\r\n  `costprice` decimal(10,2) DEFAULT '0.00',\r\n  `stock` int(11) DEFAULT '0',\r\n  `weight` decimal(10,2) DEFAULT '0.00',\r\n  `displayorder` int(11) DEFAULT '0',\r\n  PRIMARY KEY (`id`),\r\n  KEY `indx_goodsid` (`goodsid`),KEY `indx_displayorder` (`displayorder`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r\n\t\t\r\nCREATE TABLE if not exists `ims_shopping_goods_param` (\r\n  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n  `goodsid` int(10) DEFAULT '0',\r\n  `title` varchar(50) DEFAULT '',\r\n  `value` text,\r\n  `displayorder` int(11) DEFAULT '0',\r\n  PRIMARY KEY (`id`),KEY `indx_goodsid` (`goodsid`),KEY `indx_displayorder` (`displayorder`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE if not exists `ims_shopping_adv` (\r\n  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n  `weid` int(11) default 0,\r\n  `advname` varchar(50) DEFAULT '',\r\n  `link` varchar(255) DEFAULT '',\r\n  `thumb` varchar(255) DEFAULT '',\r\n  `displayorder` int(11) DEFAULT '0',\r\n  `enabled` int(11) DEFAULT '0',\r\n  PRIMARY KEY (`id`),KEY `indx_weid` (`weid`),KEY `indx_enabled` (`enabled`),KEY `indx_displayorder` (`displayorder`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE IF NOT EXISTS `ims_shopping_spec` (\r\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\r\n  `weid` int(10) unsigned NOT NULL,\r\n  `title` varchar(50) NOT NULL,\r\n  `description` varchar(1000) NOT NULL,\r\n  `displaytype` tinyint(3) unsigned NOT NULL,\r\n  `content` text NOT NULL,\r\n  `goodsid` int(11) default 0,\r\n  `displayorder` int(11) default 0,\r\n  PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM  DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE if not exists `ims_shopping_spec_item` (\r\n  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n  `weid` int(11) default 0,\r\n  `specid` int(11) default 0,\r\n  `title` varchar(255) DEFAULT '',\r\n  `thumb` varchar(255) DEFAULT '',\r\n  `show` int(11) default 0,\r\n  `displayorder` int(11) default 0,\r\n  PRIMARY KEY (`id`),KEY `indx_weid` (`weid`),KEY `indx_specid` (`specid`),KEY `indx_show` (`show`),KEY `indx_displayorder` (`displayorder`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r\n\r\n";
pdo_run($sql);
if (pdo_fieldexists('shopping_goods', 'marketprice')) {
    pdo_query("ALTER TABLE  " . tablename('shopping_goods') . " CHANGE `marketprice` `marketprice` decimal(10,2) NOT NULL DEFAULT '0';");
}
if (pdo_fieldexists('shopping_goods', 'productprice')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " CHANGE `productprice` `productprice` decimal(10,2) NOT NULL DEFAULT '0';");
}
if (!pdo_fieldexists('shopping_goods', 'costprice')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " ADD `costprice` decimal(10,2) NOT NULL DEFAULT '0';");
}
if (!pdo_fieldexists('shopping_goods', 'weight')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " ADD `weight` decimal(10,2) NOT NULL DEFAULT '0';");
}
if (!pdo_fieldexists('shopping_goods', 'totalcnf')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " ADD `totalcnf` tinyint(3) NOT NULL DEFAULT '0';");
}
if (!pdo_fieldexists('shopping_goods', 'credit')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " ADD `credit` int(11) NOT NULL DEFAULT '0';");
}
if (!pdo_fieldexists('shopping_goods', 'hasoption')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " ADD `hasoption` int(11) NOT NULL DEFAULT '0';");
}
if (!pdo_fieldexists('shopping_goods', 'maxbuy')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " ADD `maxbuy` int(11) NOT NULL DEFAULT '0';");
}
if (!pdo_fieldexists('shopping_goods_option', 'productprice')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods_option') . " ADD `productprice` decimal(10,2) NOT NULL DEFAULT '0';");
}
开发者ID:eduNeusoft,项目名称:weixin,代码行数:31,代码来源:upgrade.php

示例9: doWebStruct

 public function doWebStruct()
 {
     global $_W, $_GPC;
     $operation = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
     if ($operation == 'post') {
         $id = intval($_GPC['id']);
         if (!empty($id)) {
             $search = pdo_fetch("SELECT * FROM " . tablename('multisearch') . " WHERE id = :id", array(':id' => $id));
             $search['fields'] = pdo_fetchall("SELECT * FROM " . tablename('multisearch_fields') . " WHERE reid = :reid ORDER BY displayorder DESC", array(':reid' => $id), 'variable');
             $search['status'] = iunserializer($search['status']);
         }
         if (checksubmit('submit')) {
             if (empty($_GPC['title'])) {
                 message('请输入标题!');
             }
             $variables = array();
             $hassearch = !empty($search['fields']) ? true : false;
             if (!empty($_GPC['fields-new']['title'])) {
                 foreach ($_GPC['fields-new']['title'] as $i => $row) {
                     if (empty($_GPC['fields-new']['bind'][$i]) && !empty($_GPC['fields-new']['field'][$i])) {
                         $_GPC['fields-new']['bind'][$i] = $_GPC['fields-new']['field'][$i];
                     }
                     if (empty($_GPC['fields-new']['title'][$i])) {
                         message('表单名称为必填项,请返回修改!');
                     }
                     if (empty($_GPC['fields-new']['variable'][$i])) {
                         message('表单变量名为必填项,请返回修改!');
                     }
                     if (!preg_match("/^[a-z_]+[a-z\\d]*\$/i", $_GPC['fields-new']['variable'][$i])) {
                         message('变量名只能是字母,数字,下划线,并以字母或下划线开头,以字母或数字结尾!');
                     }
                     if (in_array($_GPC['fields-new']['variable'][$i], $variables) || !empty($search['fields'][$_GPC['fields-new']['variable'][$i]])) {
                         message('表单变量名不得重复,请返回修改!');
                     }
                     if (!empty($_GPC['fields-new']['search'][$i])) {
                         $hassearch = true;
                     }
                     $variables[] = $_GPC['fields-new']['variable'][$i];
                 }
                 if (empty($hassearch)) {
                     message('表单中最少需要指定一个查询项,请返回修改!');
                 }
             }
             $data = array('weid' => intval($_W['weid']), 'title' => $_GPC['title'], 'description' => $_GPC['description'], 'isresearch' => intval($_GPC['isresearch']), 'cover' => $_GPC['cover'], 'template' => !empty($_GPC['template']) ? $_GPC['template'] : 'default', 'mobile' => trim($_GPC['mobile']), 'noticeemail' => $_GPC['noticeemail']);
             if (!empty($_GPC['status'])) {
                 $i = 1;
                 foreach ($_GPC['status'] as $name) {
                     $data['status'][$i] = $name;
                     $i++;
                 }
                 $data['status'] = iserializer($data['status']);
             }
             if (!empty($id)) {
                 pdo_update('multisearch', $data, array('id' => $id));
             } else {
                 pdo_insert('multisearch', $data);
                 $id = pdo_insertid();
                 $sql = "\n\t\t\t\t\tCREATE TABLE IF NOT EXISTS " . tablename("multisearch_data_" . $id) . " (\n\t\t\t\t\t  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t  `weid` INT UNSIGNED NOT NULL,\n\t\t\t\t\t  `reid` INT UNSIGNED NOT NULL,\n\t\t\t\t\t  `data` text NOT NULL COMMENT '数据',\n\t\t\t\t\t  `createtime` INT( 10 ) UNSIGNED NOT NULL,\n\t\t\t\t\t  PRIMARY KEY (`id`)\n\t\t\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;";
                 pdo_run($sql);
             }
             $tablename = "multisearch_data_" . $id;
             if (!empty($_GPC['fields-new']['title'])) {
                 foreach ($_GPC['fields-new']['title'] as $i => $row) {
                     $data = array('reid' => $id, 'type' => intval($_GPC['fields-new']['type'][$i]), 'title' => $_GPC['fields-new']['title'][$i], 'variable' => $_GPC['fields-new']['variable'][$i], 'displayorder' => intval($_GPC['fields-new']['displayorder'][$i]), 'required' => intval($_GPC['fields-new']['required'][$i]), 'search' => intval($_GPC['fields-new']['search'][$i]), 'likesearch' => intval($_GPC['fields-new']['like'][$i]), 'bind' => $_GPC['fields-new']['bind'][$i], 'description' => $_GPC['fields-new']['description'][$i], 'options' => $_GPC['fields-new']['options'][$i]);
                     pdo_insert('multisearch_fields', $data);
                     if ($data['type'] == 1 && $data['search'] && !pdo_fieldexists($tablename, $data['variable'])) {
                         if ($data['bind'] == 'number') {
                             $sql = "ALTER TABLE " . tablename($tablename) . " ADD `{$data['variable']}` INT( 10 ) NOT NULL DEFAULT '0';";
                         } else {
                             $sql = "ALTER TABLE " . tablename($tablename) . " ADD `{$data['variable']}`  TEXT NOT NULL DEFAULT '';";
                         }
                         if (!pdo_fieldexists($tablename, $data['variable'])) {
                             pdo_query($sql);
                         }
                     }
                 }
             }
             if (!empty($_GPC['fields']['title'])) {
                 foreach ($_GPC['fields']['title'] as $i => $row) {
                     if (empty($_GPC['fields']['title'][$i])) {
                         continue;
                     }
                     $data = array('title' => $_GPC['fields']['title'][$i], 'required' => intval($_GPC['fields']['required'][$i]), 'likesearch' => intval($_GPC['fields']['like'][$i]), 'displayorder' => intval($_GPC['fields']['displayorder'][$i]), 'description' => $_GPC['fields']['description'][$i], 'options' => $_GPC['fields']['options'][$i]);
                     if (!empty($_GPC['fields']['bind'][$i]) || !empty($_GPC['fields']['field'][$i])) {
                         $data['bind'] = !empty($_GPC['fields']['bind'][$i]) ? $_GPC['fields']['bind'][$i] : $_GPC['fields']['field'][$i];
                     }
                     pdo_update('multisearch_fields', $data, array('id' => $i));
                 }
             }
             message('更新成功!', $this->createWebUrl('struct', array('op' => 'post', 'id' => $id)), 'success');
         }
         $fields = pdo_fetchall("SELECT field, title FROM " . tablename('profile_fields'));
         $path = IA_ROOT . '/source/modules/multisearch/template/mobile/';
         if (is_dir($path)) {
             if ($handle = opendir($path)) {
                 while (false !== ($templatepath = readdir($handle))) {
                     if ($templatepath != '.' && $templatepath != '..' && is_dir($path . $templatepath)) {
                         $template[] = $templatepath;
                     }
                 }
//.........这里部分代码省略.........
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:101,代码来源:site.php

示例10: local_run

function local_run($sql)
{
    global $db;
    if (!isset($sql) || empty($sql)) {
        return;
    }
    $sql = str_replace("\r", "\n", str_replace(' ims_', ' ' . $db['tablepre'], $sql));
    $sql = str_replace("\r", "\n", str_replace(' `ims_', ' `' . $db['tablepre'], $sql));
    $ret = array();
    $num = 0;
    foreach (explode(";\n", trim($sql)) as $query) {
        $ret[$num] = '';
        $queries = explode("\n", trim($query));
        foreach ($queries as $query) {
            $ret[$num] .= isset($query[0]) && $query[0] == '#' || isset($query[1]) && isset($query[1]) && $query[0] . $query[1] == '--' ? '' : $query;
        }
        $num++;
    }
    unset($sql);
    foreach ($ret as $query) {
        $query = trim($query);
        if ($query) {
            if (!pdo_run($query)) {
                echo $query . '<br>';
            }
        }
    }
}
开发者ID:kwdwkiss,项目名称:report,代码行数:28,代码来源:install.php

示例11: pdo_delete

<?php

/**
 * 幸运数字活动模块
 *
 * @author 微赞
 * @url http://www.00393.com/
 */
pdo_delete('rule', array('module' => 'stonefish_luckynum'));
pdo_delete('rule_keyword', array('module' => 'stonefish_luckynum'));
pdo_run("DROP TABLE " . tablename('stonefish_luckynum_award'));
pdo_run("DROP TABLE " . tablename('stonefish_luckynum_fans'));
pdo_run("DROP TABLE " . tablename('stonefish_luckynum'));
开发者ID:eduNeusoft,项目名称:weixin,代码行数:13,代码来源:uninstall.php

示例12: pdo_run

<?php

pdo_run($manifest['install']);
if (pdo_fieldexists('we7car_care', 'from_user')) {
    pdo_query("ALTER TABLE " . tablename('we7car_care') . " CHANGE `from_user` `from_user` INT(10) UNSIGNED NOT NULL;");
}
if (pdo_fieldexists('we7car_order_list', 'from_user')) {
    pdo_query("ALTER TABLE " . tablename('we7car_order_list') . " CHANGE `from_user` `from_user` INT(10) UNSIGNED NOT NULL;");
}
if (!pdo_fieldexists('we7car_care', 'car_mobile')) {
    pdo_query("ALTER TABLE " . tablename('we7car_order_list') . " ADD `car_mobile` varchar(15) NOT NULL;");
}
if (!pdo_fieldexists('we7car_set', 'shop_logo')) {
    pdo_query("ALTER TABLE " . tablename('we7car_set') . " ADD `shop_logo` varchar(200) NOT NULL;");
}
if (!pdo_fieldexists('we7car_set', 'typethumb')) {
    pdo_query("ALTER TABLE " . tablename('we7car_set') . " ADD `typethumb` varchar(100) NOT NULL;");
}
if (!pdo_fieldexists('we7car_set', 'yuyue1thumb')) {
    pdo_query("ALTER TABLE " . tablename('we7car_set') . " ADD `yuyue1thumb` varchar(100) NOT NULL;");
}
if (!pdo_fieldexists('we7car_set', 'yuyue2thumb')) {
    pdo_query("ALTER TABLE " . tablename('we7car_set') . " ADD `yuyue2thumb` varchar(100) NOT NULL;");
}
if (!pdo_fieldexists('we7car_set', 'kefuthumb')) {
    pdo_query("ALTER TABLE " . tablename('we7car_set') . " ADD `kefuthumb` varchar(100) NOT NULL;");
}
if (!pdo_fieldexists('we7car_set', 'messagethumb')) {
    pdo_query("ALTER TABLE " . tablename('we7car_set') . " ADD `messagethumb` varchar(100) NOT NULL;");
}
if (!pdo_fieldexists('we7car_set', 'carethumb')) {
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:31,代码来源:upgrade.php

示例13: clearTable

function clearTable($table)
{
    pdo_run("truncate table `ims_{$table}`");
}
开发者ID:kwdwkiss,项目名称:report,代码行数:4,代码来源:transform.ctrl.php

示例14: pdo_fetchall

<?php

/**
 * 【超人】抢楼活动模块定义
 *
 */
$res = pdo_fetchall("SELECT id FROM " . tablename('rule') . " WHERE module = :module", array(':module' => 'superman_floor'));
if ($res) {
    foreach ($res as $row) {
        $rid = $row['id'];
        $tablename = tablename("superman_floor_{$rid}");
        $sql = "DROP TABLE `{$tablename}`";
        pdo_query($sql);
    }
}
pdo_delete('rule', array('module' => 'superman_floor'));
pdo_delete('rule_keyword', array('module' => 'superman_floor'));
pdo_run("DROP TABLE " . tablename('superman_floor_award'));
pdo_run("DROP TABLE " . tablename('superman_floor_winner'));
pdo_run("DROP TABLE " . tablename('superman_floor'));
开发者ID:eduNeusoft,项目名称:weixin,代码行数:20,代码来源:uninstall.php

示例15: pdo_query

                pdo_query('DELETE FROM ' . tablename('modules_bindings') . " WHERE module = :module AND entry = :entry AND `call` = '' AND title NOT IN ('" . implode("','", $delete_title) . "')", array(':module' => $manifest['application']['identifie'], ':entry' => $p));
                unset($delete_title);
            }
            if (!empty($delete_call)) {
                pdo_query('DELETE FROM ' . tablename('modules_bindings') . " WHERE module = :module AND  entry = :entry AND do = '' AND title = '' AND `call` NOT IN ('" . implode("','", $delete_call) . "')", array(':module' => $manifest['application']['identifie'], ':entry' => $p));
                unset($delete_call);
            }
        }
    }
    if (!empty($manifest['upgrade'])) {
        if (strexists($manifest['upgrade'], '.php')) {
            if (file_exists($modulepath . $manifest['upgrade'])) {
                include_once $modulepath . $manifest['upgrade'];
            }
        } else {
            pdo_run($manifest['upgrade']);
        }
    }
    pdo_update('modules', $module, array('name' => $id));
    cache_build_modules();
    message('模块更新成功!', referer(), 'success');
}
if ($do == 'cloud') {
    template('extension/module-cloud');
}
if ($do == 'designer') {
    if (empty($_W['isfounder'])) {
        message('您没有设计模块的权限', '', 'error');
    }
    $available = array();
    $available['download'] = class_exists('ZipArchive');
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:31,代码来源:module.ctrl.php


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