示例#1
0
文件: module.php 项目: aspnmy/weizan
 public function ruleDeleted($rid)
 {
     //删除规则时调用,这里 $rid 为对应的规则编号
     if (pdo_tableexists('dream_wish')) {
         pdo_delete('dream_wish', array('rid' => $rid));
     }
     if (pdo_tableexists('dream_reply')) {
         pdo_delete('dream_reply', array('rid' => $rid));
     }
 }
示例#2
0
<?php

if (!pdo_tableexists('abc_replace')) {
    $sql = "\r\n\tCREATE TABLE `ims_abc_replace` (\r\n\t  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\r\n\t  `replace` varchar(32) DEFAULT NULL,\r\n\t  `name` varchar(32) DEFAULT NULL,\r\n\t  `uniacid` int(11) unsigned NOT NULL DEFAULT '0',\r\n\t  PRIMARY KEY (`id`),\r\n\t  KEY `uniacid` (`uniacid`) USING BTREE,\r\n\t  KEY `id` (`id`) USING BTREE\r\n\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\t";
    pdo_query($sql);
    $data = array();
    $data[] = array('replace' => '#用户ID#', 'name' => 'uid', 'uniacid' => $_W['uniacid']);
    $data[] = array('replace' => '#用户名#', 'name' => 'username', 'uniacid' => $_W['uniacid']);
    $data[] = array('replace' => '#会员组#', 'name' => 'groupid', 'uniacid' => $_W['uniacid']);
    $data[] = array('replace' => '#积分#', 'name' => 'credit1', 'uniacid' => $_W['uniacid']);
    $data[] = array('replace' => '#余额#', 'name' => 'credit2', 'uniacid' => $_W['uniacid']);
    $data[] = array('replace' => '#真实姓名#', 'name' => 'realname', 'uniacid' => $_W['uniacid']);
    $data[] = array('replace' => '#昵称#', 'name' => 'nickname', 'uniacid' => $_W['uniacid']);
    $data[] = array('replace' => '#头像#', 'name' => 'avatar', 'uniacid' => $_W['uniacid']);
    $data[] = array('replace' => '#qq#', 'name' => 'qq', 'uniacid' => $_W['uniacid']);
    $data[] = array('replace' => '#推荐人#', 'name' => 'father', 'uniacid' => $_W['uniacid']);
    $data[] = array('replace' => '#二级推荐人#', 'name' => 'grandpa', 'uniacid' => $_W['uniacid']);
    $data[] = array('replace' => '#三级推荐人#', 'name' => 'grandfather', 'uniacid' => $_W['uniacid']);
    foreach ($data as $da) {
        pdo_insert('abc_replace', $da);
    }
}
示例#3
0
文件: init.php 项目: noikiy/mygit
<?php

//www.012wz.com
if (!defined('IN_IA')) {
    die('Access Denied');
}
if (!pdo_tableexists('ewei_shop_poster')) {
    $sql = 'CREATE TABLE IF NOT EXISTS ' . tablename('ewei_shop_poster') . ' (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `uniacid` int(11) DEFAULT \'0\',
      `type` tinyint(3) DEFAULT \'0\' COMMENT \'1 首页 2 小店 3 商城 4 自定义\',
      `title` varchar(255) DEFAULT \'\',
      `bg` varchar(255) DEFAULT \'\',
      `data` text,
      `keyword` varchar(255) DEFAULT \'\',
      `times` int(11) DEFAULT \'0\',
      `follows` int(11) DEFAULT \'0\',
      `isdefault` tinyint(3) DEFAULT \'0\',
      `resptitle` varchar(255) DEFAULT \'\',
      `respthumb` varchar(255) DEFAULT \'\',
      `createtime` int(11) DEFAULT \'0\',
      `respdesc` varchar(255) DEFAULT \'\',
      `respurl` varchar(255) DEFAULT \'\',
      `waittext` varchar(255) DEFAULT \'\',
      `oktext` varchar(255) DEFAULT \'\',
      `subcredit` int(11) DEFAULT \'0\',
      `submoney` decimal(10,2) DEFAULT \'0.00\',
      `reccredit` int(11) DEFAULT \'0\',
      `recmoney` decimal(10,2) DEFAULT \'0.00\',
      `paytype` tinyint(1) DEFAULT \'0\',
      `scantext` varchar(255) DEFAULT \'\',
示例#4
0
文件: site.php 项目: aspnmy/weizan
 public function __init()
 {
     global $_W;
     if (!pdo_tableexists('meepo_begging')) {
         $sql = "CREATE TABLE `ims_meepo_begging` (\r\n\t\t\t\t\t`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,\r\n\t\t\t\t\t`uniacid` int(11) UNSIGNED NOT NULL DEFAULT 0,\r\n\t\t\t\t\t`uid` int(11) UNSIGNED NOT NULL DEFAULT 0,\r\n\t\t\t\t\t`money` float UNSIGNED NOT NULL DEFAULT 0.00,\r\n\t\t\t\t\t`createtime` int(11) UNSIGNED NOT NULL DEFAULT 0,\r\n\t\t\t\t\tPRIMARY KEY (`id`)\r\n\t\t\t\t) ENGINE=MyISAM\r\n\t\t\t\tCHECKSUM=0\r\n\t\t\t\tDELAY_KEY_WRITE=0;";
         pdo_query($sql);
     }
     if (!pdo_tableexists('meepo_begging_user')) {
         $sql = "CREATE TABLE `ims_meepo_begging_user` (\r\n\t\t\t\t\t`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,\r\n\t\t\t\t\t`uid` int(11) UNSIGNED NOT NULL DEFAULT 0,\r\n\t\t\t\t\t`uniacid` int(11) UNSIGNED NOT NULL DEFAULT 0,\r\n\t\t\t\t\t`fopenid` varchar(40) NULL,\r\n\t\t\t\t\t`money` float NOT NULL DEFAULT 0.00,\r\n\t\t\t\t\t`message` text NULL,\r\n\t\t\t\t\t`createtime` int(11) UNSIGNED NOT NULL DEFAULT 0,\r\n\t\t\t\t\t`avatar` varchar(132) NULL,\r\n\t\t\t\t\t`nickname` varchar(32) NULL,\r\n\t\t\t\t\t`status` tinyint(2) NOT NULL DEFAULT 0,\r\n\t\t\t\t\tPRIMARY KEY (`id`)\r\n\t\t\t\t) ENGINE=MyISAM\r\n\t\t\t\tCHECKSUM=0\r\n\t\t\t\tDELAY_KEY_WRITE=0;";
         pdo_query($sql);
     }
     if (!pdo_tableexists('meepo_begging_set')) {
         $sql = "CREATE TABLE `ims_meepo_begging_set` (\r\n\t\t\t\t\t`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,\r\n\t\t\t\t\t`uniacid` int(11) UNSIGNED NOT NULL DEFAULT 0,\r\n\t\t\t\t\t`set` text NULL,\r\n\t\t\t\t\t`createtime` int(11) UNSIGNED NOT NULL DEFAULT 0,\r\n\t\t\t\t\tPRIMARY KEY (`id`)\r\n\t\t\t\t) ENGINE=MyISAM\r\n\t\t\t\tCHECKSUM=0\r\n\t\t\t\tDELAY_KEY_WRITE=0;";
         pdo_query($sql);
     }
     if (!pdo_tableexists('meepo_begging_log')) {
         $sql = "CREATE TABLE `ims_meepo_begging_log` (\r\n\t\t\t\t\t`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,\r\n\t\t\t\t\t`uid` int(11) UNSIGNED NOT NULL DEFAULT 0,\r\n\t\t\t\t\t`uniacid` int(11) UNSIGNED NOT NULL DEFAULT 0,\r\n\t\t\t\t\t`openid` varchar(40) NULL,\r\n\t\t\t\t\t`apply` varchar(40) NULL,\r\n\t\t\t\t\t`type` tinyint(2) NOT NULL DEFAULT 0,\r\n\t\t\t\t\t`createtime` int(11) UNSIGNED NOT NULL DEFAULT 0,\r\n\t\t\t\t\t`status` tinyint(2) NOT NULL DEFAULT 0,\r\n\t\t\t\t\tPRIMARY KEY (`id`)\r\n\t\t\t\t) ENGINE=MyISAM\r\n\t\t\t\tCHECKSUM=0\r\n\t\t\t\tDELAY_KEY_WRITE=0;";
         pdo_query($sql);
     }
     if (!pdo_fieldexists('meepo_begging', 'cash')) {
         pdo_query('ALTER TABLE ' . tablename('meepo_begging') . " ADD COLUMN cash float(5) DEFAULT '0'");
     }
     if (!pdo_fieldexists('meepo_begging_log', 'money')) {
         pdo_query('ALTER TABLE ' . tablename('meepo_begging_log') . " ADD COLUMN money float(5) DEFAULT '0'");
     }
 }
示例#5
0
文件: site.php 项目: aspnmy/weizan
 public function doWebCreate()
 {
     global $_GPC, $_W;
     load()->func('tpl');
     if (checksubmit('submit')) {
         $rule = $_GPC['rule'];
         $list = pdo_fetchall("SELECT *  from " . tablename($this->data) . " where code like '{$_GPC['sStr']}%'");
         if (!empty($list)) {
             message('防伪码前缀已存在,请修改');
         }
         $i = 1;
         while ($i <= intval($_GPC['sNum'])) {
             $code = $this->random(intval($_GPC['slen']), $rule, false);
             $data = array('code' => $_GPC['sStr'] . $code, 'type' => $_GPC['sName'], 'brand' => $_GPC['sBrand'], 'spec' => $_GPC['sSpec'], 'weight' => $_GPC['sWeight'], 'factory' => $_GPC['sFactory'], 'remarks' => $_GPC['sRemarks'], 'stime' => strtotime($_GPC['sTime_1']), 'createtime' => time(), 'creditname' => $_GPC['creditname'], 'creditnum' => intval($_GPC['creditnum']), 'creditstatus' => intval($_GPC['creditstatus']), 'num' => 0, 'status' => 1, 'tourl' => $_GPC['tourl'], 'img_logo' => $_GPC['img_logo'], 'img_banner' => $_GPC['img_banner'], 'video' => $_GPC['video'], 'buyurl' => $_GPC['buyurl']);
             pdo_insert($this->data, $data);
             $i++;
         }
         message('成功生成' . intval($_GPC['sNum']) . '条防伪码!', referer(), 'success');
     }
     if (checksubmit('submitone')) {
         $security = $_GPC['security'];
         $list = pdo_fetchall("SELECT *  from " . tablename($this->data) . " where code = '{$security}'");
         if (!empty($list)) {
             message('防伪码已存在,请修改');
         }
         $insert = array('code' => $security, 'type' => $_GPC['sName2'], 'brand' => $_GPC['sBrand2'], 'spec' => $_GPC['sSpec2'], 'weight' => $_GPC['sWeight2'], 'factory' => $_GPC['sFactory2'], 'remarks' => $_GPC['sRemarks2'], 'stime' => strtotime($_GPC['sTime_2']), 'createtime' => time(), 'creditname' => $_GPC['creditname2'], 'creditnum' => intval($_GPC['creditnum2']), 'creditstatus' => intval($_GPC['creditstatus2']), 'num' => 0, 'status' => 1, 'img_logo' => $_GPC['img_logo'], 'img_banner' => $_GPC['img_banner'], 'video' => $_GPC['video'], 'buyurl' => $_GPC['buyurl']);
         pdo_insert($this->data, $insert);
         message('成功添加防伪码!', referer(), 'success');
     }
     $have_shop = pdo_tableexists("shopping_goods");
     if ($have_shop) {
         $sql = 'SELECT * FROM ' . tablename('shopping_category') . ' WHERE `weid` = :weid ORDER BY `parentid`, `displayorder` DESC';
         $category = pdo_fetchall($sql, array(':weid' => $_W['uniacid']), 'id');
         if (!empty($category)) {
             $parent = $children = array();
             foreach ($category as $cid => $cate) {
                 if (!empty($cate['parentid'])) {
                     $children[$cate['parentid']][] = $cate;
                 } else {
                     $parent[$cate['id']] = $cate;
                 }
             }
         }
     }
     include $this->template('create');
 }
示例#6
0
<?php

if (!pdo_fieldexists('str_order', 'print_nums')) {
    pdo_query("ALTER TABLE `ims_str_order` ADD `print_nums` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `comment`;");
}
if (!pdo_fieldexists('str_order', 'notice_acid')) {
    pdo_query("ALTER TABLE `ims_str_store` ADD `notice_acid` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `displayorder`;");
}
if (!pdo_fieldexists('str_order', 'groupid')) {
    pdo_query("ALTER TABLE `ims_str_store` ADD `groupid` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `notice_acid`;");
}
if (!pdo_tableexists('str_order_print')) {
    pdo_query("CREATE TABLE IF NOT EXISTS `ims_str_order_print` (\r\n\t\t  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\r\n\t\t  `uniacid` int(10) unsigned NOT NULL DEFAULT '0',\r\n\t\t  `sid` int(10) unsigned NOT NULL DEFAULT '0',\r\n\t\t  `pid` tinyint(3) unsigned NOT NULL DEFAULT '0',\r\n\t\t  `oid` int(10) unsigned NOT NULL DEFAULT '0',\r\n\t\t  `foid` varchar(50) NOT NULL,\r\n\t\t  `status` tinyint(3) unsigned NOT NULL DEFAULT '2',\r\n\t\t  `addtime` int(10) unsigned NOT NULL,\r\n\t\t  PRIMARY KEY (`id`),\r\n\t\t  KEY `addtime` (`addtime`),\r\n\t\t  KEY `foid` (`foid`),\r\n\t\t  KEY `uniacid` (`uniacid`),\r\n\t\t  KEY `pid` (`pid`)\r\n\t\t) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ;\r\n\t");
}
if (!pdo_tableexists('str_print')) {
    pdo_query("CREATE TABLE IF NOT EXISTS `ims_str_print` (\r\n\t\t  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\r\n\t\t  `uniacid` int(10) unsigned NOT NULL DEFAULT '0',\r\n\t\t  `sid` int(10) unsigned NOT NULL,\r\n\t\t  `name` varchar(20) NOT NULL,\r\n\t\t  `print_no` varchar(30) NOT NULL,\r\n\t\t  `key` varchar(30) NOT NULL,\r\n\t\t  `print_nums` tinyint(3) unsigned NOT NULL DEFAULT '1',\r\n\t\t  `qrcode_link` varchar(100) NOT NULL,\r\n\t\t  `status` tinyint(3) unsigned NOT NULL DEFAULT '1',\r\n\t\t  PRIMARY KEY (`id`),\r\n\t\t  KEY `uniacid` (`uniacid`),\r\n\t\t  KEY `sid` (`sid`)\r\n\t\t) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ;\r\n\t");
}
示例#7
0
<?php

//session_start();
//$_SESSION['__:proxy:openid'] = 'oyIjYt9lQx9flMXl9F9NiAqrJd3g';
//debug
global $_W, $_GPC;
if (!pdo_tableexists('mbrp_gifts')) {
    message('本次模块更新内容较多, 需要将模块卸载后重新安装');
}
$this->checkLicense();
$modulePublic = '../addons/microb_redpack/static/';
$foo = $_GPC['foo'];
$foos = array('list', 'create', 'modify', 'delete', 'records');
$foo = in_array($foo, $foos) ? $foo : 'list';
require_once MB_ROOT . '/source/Activity.class.php';
if ($foo == 'create') {
    if ($_W['ispost']) {
        $input = $_GPC;
        $input['rules'] = htmlspecialchars_decode($input['rules']);
        $input['start'] = strtotime($input['time']['start'] . ':00');
        $input['end'] = strtotime($input['time']['end'] . ':59');
        $input['share'] = serialize($input['share']);
        $input['limit'] = serialize($input['limit']);
        if ($input['type'] == 'game') {
            $input['tag'] = serialize($input['game']);
        } elseif ($input['type'] == 'shared') {
            $input['tag'] = serialize($input['shared']);
        } else {
            $input['tag'] = serialize($input['tag']);
        }
        $gifts = array();
示例#8
0
 public function doWebZmfwpee()
 {
     global $_W, $_GPC, $codeca, $codeset, $luckset, $settings, $webset;
     $settings = $this->module['config'];
     $foo = !empty($_GPC['foo']) ? $_GPC['foo'] : 'display';
     load()->func('tpl');
     load()->func('communication');
     if (empty($codeset['k']['1'])) {
         message('请先进行部署好密码,再使用!', 'index.php?c=profile&a=module&do=setting&m=' . $webset['moid'], 'error');
         exit;
     }
     $iii = 1;
     if ($foo == 'display') {
         $pindex = max(1, intval($_GPC['page']));
         $psize = 10;
         $condition = '';
         $params = array();
         if (!empty($_GPC['keyword'])) {
             $condition .= " AND product LIKE :keyword";
             $params[':keyword'] = "%{$_GPC['keyword']}%";
         }
         $list = pdo_fetchall("SELECT * FROM " . tablename('zmcn_fw_batch') . " WHERE uniacid = '{$_W['uniacid']}' {$condition} ORDER BY id DESC LIMIT " . ($pindex - 1) * $psize . ',' . $psize, $params);
         $total = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename('zmcn_fw_batch') . " WHERE uniacid = '{$_W['uniacid']}' {$condition}", $params);
         $pager = pagination($total, $pindex, $psize);
     } elseif ($foo == 'post') {
         $parent_cate = array();
         $sub_cate = array();
         if ($settings['isint'] == "1" && pdo_tableexists('shopping_category')) {
             $parent_cate = pdo_fetchall("SELECT id as a, name as b FROM " . tablename('shopping_category') . " WHERE weid = :weid AND parentid > 0  ORDER BY parentid ASC", array(":weid" => $_W['uniacid']));
             $tmp = array();
             foreach ($parent_cate as $parent) {
                 array_push($tmp, $parent['a']);
             }
             $tmp = implode(",", $tmp);
             if (strlen($tmp) >= 1) {
                 $sub_cate = pdo_fetchall("SELECT id as a , title as b , ccate as c FROM " . tablename('shopping_goods') . " WHERE weid = :weid AND ccate IN (" . $tmp . ") AND deleted = 0 ORDER BY displayorder ASC", array(":weid" => $_W['uniacid']));
             }
         } elseif ($settings['isint'] == "2" && pdo_tableexists('ewei_shop_category')) {
         }
         $batch = array();
         if ($_GPC['id'] > 0) {
             $batch = pdo_fetch("SELECT * FROM " . tablename('zmcn_fw_batch') . " WHERE uniacid = :uniacid and id = :id", array(':uniacid' => $_W['uniacid'], ':id' => (int) $_GPC['id']));
             $params = iunserializer($batch['param']);
             $batch['id'] = $batch['id'] == "" ? "0" : $batch['id'];
             $toshop = iunserializer($batch['toshop']);
         } else {
             $batch['id'] = 0;
         }
         if (checksubmit('submit')) {
             $insert = array();
             for ($i = 0; $i < count($_GPC['titles']); $i++) {
                 $insert[$i] = array('title' => $_GPC['titles'][$i], 'value' => $_GPC['values'][$i]);
             }
             $toshop = array('shioip' => $settings['isint'], 'proid' => $_GPC['shopproid']);
             $inbatch = array('remark' => $_GPC['remark'], 'product' => $_GPC['product'], 'factory' => $_GPC['factory'], 'brand' => $_GPC['brand'], 'ischuanhuo' => $_GPC['ischuanhuo'], 'province' => $_GPC['chuanhuo']['province'], 'city' => $_GPC['chuanhuo']['city'], 'video' => $_GPC['video'], 'buylink' => $_GPC['buylink'], 'validity' => empty($_GPC['validity']) ? strtotime('+30 month') : strtotime($_GPC['validity']), 'inttype' => $_GPC['inttype'], 'integral' => $_GPC['integral'], 'logo' => $_GPC['logo'], 'banner' => $_GPC['banner'], 'param' => iserializer($insert), 'lasttime' => TIMESTAMP, 'toshop' => iserializer($toshop));
             if ($batch['id'] == "0") {
                 if (strlen($_GPC['batch']) != (int) $codeset['m'][2]) {
                     $_GPC['batch'] = substr("0000000000" . (int) $_GPC['batch'], 0 - $codeset['m'][2]);
                 }
                 $bl = array('1111111', '2222222', '3333333', '4444444', '5555555', '6666666', '7777777', '0000000');
                 if (in_array($_GPC['batch'], $bl)) {
                     message('这个批号已经被系统保留,请更换批号', 'refresh', 'error ');
                     exit;
                 }
                 $batch = pdo_fetch("SELECT COUNT(*) as a FROM " . tablename('zmcn_fw_batch') . " WHERE uniacid = :uniacid and batch=:batch", array(':uniacid' => $_W['uniacid'], ':batch' => $_GPC['batch']));
                 if (!empty($batch['a'])) {
                     message('这个批号已经有记录,请更换批号', 'refresh', 'error ');
                     exit;
                 }
                 $inbatch1 = array('uniacid' => $_W['uniacid'], 'm1' => $_GPC['m1'], 'batch' => $_GPC['batch'], 'num' => 0, 'addtime' => TIMESTAMP, 'rcon' => 0);
                 $inbatchs = array_merge($inbatch1, $inbatch);
                 pdo_insert('zmcn_fw_batch', $inbatchs);
                 $data1 = array('uniacid' => $_W['uniacid'], 'type' => 1, 'summary' => $_GPC['m1'] . $_GPC['batch'], 'uid' => $_W['uid'], 'addtime' => TIMESTAMP, 'ip' => $_W['clientip'], 'remark' => '新增批次:' . $_GPC['m1'] . $_GPC['batch']);
                 pdo_insert('zmcn_fw_history', $data1);
                 message('新增批次信息成功!', referer(), 'success');
             } else {
                 pdo_update('zmcn_fw_batch', $inbatch, array('uniacid' => $_W['uniacid'], 'id' => (int) $_GPC['id']));
                 $data1 = array('uniacid' => $_W['uniacid'], 'type' => 1, 'summary' => $batch['m1'] . $batch['batch'], 'uid' => $_W['uid'], 'addtime' => TIMESTAMP, 'ip' => $_W['clientip'], 'remark' => '更新批次:' . $batch['m1'] . $batch['batch']);
                 pdo_insert('zmcn_fw_history', $data1);
                 message('更新批次信息成功!', referer(), 'success');
             }
         }
     } elseif ($foo == 'daoru') {
         $pp = pdo_fetch("SELECT COUNT(*) FROM " . tablename('zmcn_fw_batch') . " WHERE uniacid = :uniacid  AND m1 = :m1 AND batch = :batch", array(':uniacid' => $_W['uniacid'], ':m1' => 'FW', ':batch' => '8888888'));
         if (empty($pp)) {
             $insert = array('uniacid' => $_W['uniacid'], 'm1' => 'FW', 'batch' => '8888888', 'product' => '微防伪演示商品', 'addtime' => TIMESTAMP, 'lasttime' => TIMESTAMP, 'factory' => $_W['account']['name'], 'remark' => '系统保留演示专用');
             pdo_insert('zmcn_fw_batch', $insert);
         }
         if (checksubmit('submit')) {
             $insert = array('cid' => $_W['uniacid'], 'm1' => 'FW');
             $a = ihttp_post($codeca . '&ac=4', $insert);
             if (strlen($a['content']) > 5) {
                 $a = @json_decode($a['content'], true);
             }
             if ($a['content'] == '3' && $a['isok'] == '666') {
                 if ($_GPC['codetype'] == '3') {
                     for ($i = 0; $i < $a['coden']; ++$i) {
                         $mima .= wordwrap($a['codes'][$i], 4, " ", TRUE) . "\n";
                     }
                 } elseif ($_GPC['codetype'] == '4') {
                     $html = "";
                     for ($i = 0; $i < $a['coden']; ++$i) {
                         $aaa = $_W['siteroot'] . "app/index.php?c=entry&do=t&m=zmcn_fwfree&co=" . $a['codes'][$i] . "&i=" . $_W['uniacid'];
                         $html .= "<img src='./index.php?c=platform&a=url2qr&do=qr&url=" . urlencode($aaa) . "' style='width:200px; height:200px;  margin: 10px;' />";
                     }
                 } elseif ($_GPC['codetype'] == '6') {
                     for ($i = 0; $i < $a['coden']; ++$i) {
                         $mima .= $a['codes'][$i] . "\n";
                     }
                 }
                 pdo_query('update ' . tablename('zmcn_fw_batch') . ' set num = ' . (int) $a['codeg'] . " , lasttime = '" . TIMESTAMP . "'  where batch='8888888'");
                 $data1 = array('uniacid' => $_W['uniacid'], 'type' => 1, 'summary' => 'FW8888888', 'uid' => $_W['uid'], 'addtime' => TIMESTAMP, 'ip' => $_W['clientip'], 'remark' => '生成演示防伪码:(' . $_GPC['codetype'] . ')' . $a['codef'] . '-' . $a['codeg'] . '共' . $a['coden'] . '条');
                 pdo_insert('zmcn_fw_history', $data1);
             } elseif ($a['content'] == '3' && $a['isok'] == '234') {
                 $html = "今天演示防伪码生成个数已经够多了,请明天再来!演示防伪码总数有限,请节约使用!";
             } elseif ($a['content'] == '3' && $a['isok'] == '599') {
                 $html = "请重新提交一下密码部署!";
             }
         }
     } elseif ($foo == 'chong') {
         if (strlen($_GPC['b']) != (int) $codeset['m'][2]) {
             $_GPC['b'] = substr('0000000000' . (int) $_GPC['b'], 0 - $codeset['m'][2]);
         }
         $bl = array('1111111', '2222222', '3333333', '4444444', '5555555', '6666666', '7777777', '0000000');
         if (in_array($_GPC['batch'], $bl)) {
             echo "1";
             exit;
         }
         $batch = pdo_fetch("SELECT COUNT(*) as a FROM " . tablename('zmcn_fw_batch') . " WHERE uniacid = :uniacid and batch=:batch", array(':uniacid' => $_W['uniacid'], ':batch' => $_GPC['b']));
         if (!empty($batch['a'])) {
             echo "1";
         } else {
             echo "0";
         }
         exit;
     }
     include $this->template('batch');
 }