Beispiel #1
0
function requreSubscribe()
{
    global $_W;
    $hasSubscribe = 1;
    if (isset($_W['fans']['from_user']) && !empty($_W['fans']['from_user'])) {
        $openid = $_W['fans']['from_user'];
        $userinfo = mc_fansinfo($openid);
        if (!$userinfo || $userinfo['follow'] == 0) {
            $hasSubscribe = 0;
        }
    } else {
        $oauthAccount = $_W['oauth_account'];
        if (empty($oauthAccount)) {
            message('未指定网页授权公众号, 无法获取用户信息.', '', 'error');
        }
        $userinfo = mc_oauth_userinfo();
        $level = pdo_fetchcolumn("SELECT `level` FROM " . tablename('account_wechats') . " WHERE `uniacid`=:uniacid", array(':uniacid' => $_W['uniacid']));
        if ($level == 4) {
            if ($userinfo['subscribe'] == 0) {
                $hasSubscribe = 0;
            }
        } else {
            $unionid = isset($userinfo['unionid']) ? $userinfo['unionid'] : '';
            if (empty($unionid)) {
                message('获取unionid失败,请确认公众号已接入微信开放平台', '', 'error');
            }
            $fieldsExist = pdo_fieldexists('mc_mapping_fans', 'unionid');
            if (!$fieldsExist) {
                pdo_query("ALTER TABLE " . tablename('mc_mapping_fans') . " ADD column unionid varchar(255) default null");
            }
            $openid = pdo_fetchcolumn("SELECT `openid` FROM " . tablename('mc_mapping_fans') . " WHERE `unionid`=:unionid AND `uniacid`=:uniacid ", array(':unionid' => $unionid, ':uniacid' => $_W['account']['uniacid']));
            if (empty($openid)) {
                $hasSubscribe = 0;
            } else {
                $userinfo = mc_fansinfo($openid);
                if (!$userinfo || $userinfo['follow'] == 0) {
                    $hasSubscribe = 0;
                }
            }
        }
    }
    return array('openid' => $openid, 'subscribe' => $hasSubscribe);
}
Beispiel #2
0
}
if (!pdo_fieldexists('weishare', 'background')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `background` varchar(100) NOT NULL COMMENT '背景颜色';");
}
if (!pdo_fieldexists('weishare', 'tip')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `tip` varchar(100) NOT NULL COMMENT '提示语';");
}
if (!pdo_fieldexists('weishare', 'copyright')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `copyright` varchar(100) NOT NULL COMMENT '版权' ;");
}
if (!pdo_fieldexists('weishare', 'cardname')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `cardname` varchar(100) NOT NULL COMMENT '卡片名称' ;");
}
if (!pdo_fieldexists('weishare', 'unit')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `unit` varchar(100) NOT NULL COMMENT '单位' ;");
}
if (!pdo_fieldexists('weishare', 'helplimit')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `helplimit` int(11) NOT NULL  COMMENT '每天助力限制次数';");
}
if (!pdo_fieldexists('weishare', 'limittype')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `limittype` int(1) NOT NULL  COMMENT '限制类型' ;");
}
if (!pdo_fieldexists('weishare_firend', 'sid')) {
    pdo_query("ALTER TABLE " . tablename('weishare_firend') . " ADD `sid` int(10) NOT NULL DEFAULT '0' ;");
}
if (!pdo_fieldexists('weishare', 'endtime')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD endtime\tint(11) unsigned NOT NULL COMMENT '日期' ;");
}
if (!pdo_fieldexists('weishare_setting', 'weid')) {
    pdo_query("ALTER TABLE " . tablename('weishare_setting') . " ADD weid INT(11) UNSIGNED DEFAULT NULL ;");
}
Beispiel #3
0
        }
    }
    $titles = implode("+", $titles);
    pdo_update("shopping_goods_option", array("title" => $titles), array("id" => $o['id']));
    pdo_update("shopping_order_goods", array("optionname" => $titles), array("optionid" => $o['id']));
}
//字段长度
if (pdo_fieldexists('shopping_goods', 'thumb')) {
    pdo_query("ALTER TABLE  " . tablename('shopping_goods') . " CHANGE `thumb` `thumb` varchar(255) DEFAULT '';");
}
if (!pdo_fieldexists('shopping_goods', 'spec')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " ADD `spec` varchar(5000) NOT NULL DEFAULT '';");
}
if (!pdo_fieldexists('shopping_goods', 'originalprice')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " ADD `originalprice` DECIMAL(10, 2) NOT NULL DEFAULT '0.00' COMMENT '原价' AFTER `costprice`;");
}
if (!pdo_fieldexists('shopping_order', 'paydetail')) {
    pdo_query("ALTER TABLE " . tablename('shopping_order') . " ADD  `paydetail` varchar(255) NOT NULL COMMENT '支付详情';");
}
if (pdo_fieldexists('shopping_goods', 'total')) {
    pdo_query("ALTER TABLE  " . tablename('shopping_goods') . " CHANGE  `total`   `total` int(10) unsigned NOT NULL DEFAULT '0';");
}
if (pdo_fieldexists('shopping_goods', 'credit')) {
    pdo_query("ALTER TABLE  " . tablename('shopping_goods') . " CHANGE  `credit`  `credit` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if (!pdo_fieldexists('shopping_goods', 'usermaxbuy')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " ADD   `usermaxbuy` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户最多购买数量';");
}
if (!pdo_fieldexists('shopping_order', 'address')) {
    pdo_query("ALTER TABLE " . tablename('shopping_order') . " ADD   `address` varchar(1024) NOT NULL DEFAULT '' COMMENT '收货地址信息';");
}
Beispiel #4
0
<?php

if (!pdo_fieldexists('egg_reply', 'periodlottery')) {
    pdo_query("ALTER TABLE `ims_egg_reply` ADD `periodlottery` SMALLINT( 10 ) UNSIGNED NOT NULL DEFAULT '1' COMMENT '0������';");
}
if (pdo_fieldexists('egg_award', 'activation_code')) {
    pdo_query("ALTER TABLE " . tablename('egg_award') . " CHANGE `activation_code` `activation_code` text;");
}
<?php

if (!pdo_fieldexists('wxwall_reply', 'logo')) {
    pdo_query("ALTER TABLE " . tablename('wxwall_reply') . " ADD `logo` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `isshow`;");
    pdo_query("ALTER TABLE " . tablename('wxwall_reply') . " ADD `background` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `logo`;");
}
Beispiel #6
0
<?php

/*
*/
if (!pdo_fieldexists('feng_wechat', 'win_mess')) {
    pdo_query("ALTER TABLE " . tablename('feng_wechat') . " ADD `win_mess` varchar(200) DEFAULT NULL;");
}
Beispiel #7
0
<?php

/**
 */
if (!pdo_fieldexists('weihaom_wb_reply', 'uniacid')) {
    pdo_query("ALTER TABLE " . tablename('weihaom_wb_reply') . " ADD   `uniacid` int(10) unsigned NOT NULL;");
}
Beispiel #8
0
            pdo_delete('rule', "id IN ('" . implode("','", $deleteid) . "')");
        }
        $subaccount = pdo_fetchall("SELECT acid FROM " . tablename('account') . " WHERE uniacid = :uniacid", array(':uniacid' => $uniacid));
        if (!empty($subaccount)) {
            foreach ($subaccount as $account) {
                @unlink(IA_ROOT . '/attachment/qrcode_' . $account['acid'] . '.jpg');
                @unlink(IA_ROOT . '/attachment/headimg_' . $account['acid'] . '.jpg');
            }
        }
        $tables = pdo_fetchall("SHOW TABLES;");
        foreach ($tables as $table) {
            $tablename = str_replace($GLOBALS['_W']['config']['db']['tablepre'], '', array_shift($table));
            if (pdo_fieldexists($tablename, 'uniacid')) {
                pdo_delete($tablename, array('uniacid' => $uniacid));
            }
            if (pdo_fieldexists($tablename, 'weid')) {
                pdo_delete($tablename, array('weid' => $uniacid));
            }
        }
    }
    message('公众帐号信息删除成功!', url('account/batch'), 'success');
} elseif ($do == 'group') {
    if (!$_GPC['accountarr']) {
        message('您没有选择要操作的公众号');
    }
    $isexpire = intval($_GPC['isexpire']);
    $endtime = strtotime($_GPC['endtime']);
    if ($isexpire && $endtime <= TIMESTAMP) {
        message('套餐过期时间必须大于当前时间');
    }
    $groupid = intval($_GPC['groupid']);
Beispiel #9
0
      `mediaid` varchar(255) DEFAULT \'\',
      `ticket` varchar(250) NOT NULL,
      `url` varchar(80) NOT NULL,
      `createtime` int(10) unsigned NOT NULL,
      `goodsid` int(11) DEFAULT \'0\',
      `qrimg` varchar(1000) DEFAULT \'\',
      PRIMARY KEY (`id`),
      KEY `idx_acid` (`acid`),
      KEY `idx_sceneid` (`sceneid`),
      KEY `idx_type` (`type`),
      FULLTEXT KEY `idx_openid` (`openid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;';
    $sql = 'CREATE TABLE  IF NOT EXISTS  ' . tablename('ewei_shop_poster_scan') . ' (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `uniacid` int(11) DEFAULT \'0\',
      `posterid` int(11) DEFAULT \'0\',
      `openid` varchar(255) DEFAULT \'\',
      `from_openid` varchar(255) DEFAULT \'\',
      `scantime` int(11) DEFAULT \'0\',
      PRIMARY KEY (`id`),
      KEY `idx_uniacid` (`uniacid`),
      KEY `idx_posterid` (`posterid`),
      KEY `idx_scantime` (`scantime`),
      FULLTEXT KEY `idx_openid` (`openid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;';
    pdo_query($sql);
}
if (!pdo_fieldexists('ewei_shop_poster', 'paytype')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_shop_poster') . ' ADD `paytype` tinyint(1) DEFAULT \'0\';');
}
pdo_update('ewei_shop_plugin', array('version' => 1.1), array('identity' => 'poster'));
Beispiel #10
0
<?php

if (!pdo_fieldexists('wxwall_reply', 'logo')) {
    pdo_query("ALTER TABLE " . tablename('wxwall_reply') . " ADD `logo` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `isshow`;");
    pdo_query("ALTER TABLE " . tablename('wxwall_reply') . " ADD `background` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `logo`;");
    pdo_query("ALTER TABLE " . tablename('wxwall_reply') . " ADD `acid` INT NOT NULL AFTER `id`;");
}
if (!pdo_fieldexists('wxwall_members', 'avatar')) {
    pdo_query("ALTER TABLE " . tablename('wxwall_members') . " ADD  `avatar` varchar(255) NOT NULL COMMENT '粉丝头像';");
}
Beispiel #11
0
}
if (!pdo_fieldexists('activity', 'location_p')) {
    pdo_query("ALTER TABLE " . tablename('activity') . " ADD `location_p` varchar(100) NOT NULL COMMENT '所在地区_省' ;");
}
if (!pdo_fieldexists('activity', 'location_c')) {
    pdo_query("ALTER TABLE " . tablename('activity') . " ADD `location_c` varchar(100) NOT NULL COMMENT '所在地区_市' ;");
}
if (!pdo_fieldexists('activity', 'location_a')) {
    pdo_query("ALTER TABLE " . tablename('activity') . " ADD `location_a` varchar(100) NOT NULL COMMENT '所在地区_区' ;");
}
if (!pdo_fieldexists('activity', 'lng')) {
    pdo_query("ALTER TABLE " . tablename('activity') . " `lng` decimal(18,10) NOT NULL DEFAULT '0.0000000000' ;");
}
if (!pdo_fieldexists('activity', 'lat')) {
    pdo_query("ALTER TABLE " . tablename('activity') . " `lat` decimal(18,10) NOT NULL DEFAULT '0.0000000000' ;");
}
if (!pdo_fieldexists('activity', 'istip')) {
    pdo_query("ALTER TABLE " . tablename('activity') . " ADD istip INT(1) DEFAULT 0 ;");
}
if (!pdo_fieldexists('activity', 'isrepeat')) {
    pdo_query("ALTER TABLE " . tablename('activity') . " ADD isrepeat INT(1) DEFAULT 0 ;");
}
if (!pdo_fieldexists('activity', 'costdes')) {
    pdo_query("ALTER TABLE " . tablename('activity') . " ADD costdes VARCHAR(500) DEFAULT NULL ;");
}
if (!pdo_fieldexists('activity_reply', 'new_pic')) {
    pdo_query("ALTER TABLE " . tablename('activity_reply') . " ADD new_pic VARCHAR(200) NOT NULL ;");
}
if (!pdo_fieldexists('activity_reply', 'news_content')) {
    pdo_query("ALTER TABLE " . tablename('activity_reply') . " ADD news_content VARCHAR(500) NOT NULL ;");
}
Beispiel #12
0
<?php

if (!pdo_fieldexists('ewei_dream_oversee', 'fansid')) {
    pdo_query("ALTER TABLE " . tablename('ewei_dream_oversee') . " ADD `fansid` int(11) NOT NULL DEFAULT '0';");
}
Beispiel #13
0
}
if (!pdo_fieldexists('ewei_shop_goods', 'followurl')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_goods') . " ADD  `followurl` varchar(255) DEFAULT '0';");
}
if (!pdo_fieldexists('ewei_shop_goods', 'deduct')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_goods') . " ADD  `deduct` decimal(10,2) DEFAULT '0.00';");
}
if (!pdo_fieldexists('ewei_shop_member', 'agentselectgoods')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_member') . " ADD    `agentselectgoods` tinyint(3) DEFAULT '0';");
}
if (!pdo_fieldexists('ewei_shop_order', 'verifytime')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_order') . " ADD   `verifytime` int(11) DEFAULT '0';");
}
if (!pdo_fieldexists('ewei_shop_order', 'verifystoreid')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_order') . " ADD   `verifystoreid` int(11) DEFAULT '0';");
}
if (!pdo_fieldexists('ewei_shop_order', 'deductprice')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_order') . " ADD    `deductprice` decimal(10,2) DEFAULT '0.00';");
}
if (!pdo_fieldexists('ewei_shop_order', 'deductcredit')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_order') . " ADD    `deductcredit` int(11) DEFAULT '0';");
}
if (!pdo_fieldexists('ewei_shop_order', 'deductcredit2')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_order') . " ADD    `deductcredit2` decimal(10,2) DEFAULT '0.00';");
}
if (!pdo_fieldexists('ewei_shop_order', 'deductenough')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_order') . " ADD    `deductenough` decimal(10,2) DEFAULT '0.00';");
}
if (!pdo_fieldexists('ewei_shop_plugin', 'status')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_plugin') . " ADD    `status` tinyint(3) DEFAULT '0';");
}
Beispiel #14
0
if (!pdo_fieldexists('xc_article_article', 'templatefile')) {
    pdo_query("ALTER TABLE " . tablename('xc_article_article') . " ADD `templatefile` varchar(500) NOT NULL DEFAULT '' AFTER `template`;");
}
if (!pdo_fieldexists('xc_article_article', 'recommendation')) {
    pdo_query("ALTER TABLE " . tablename('xc_article_article') . " ADD `recommendation` varchar(1024) NOT NULL COMMENT '推荐ID列表' AFTER `author`;");
}
if (!pdo_fieldexists('xc_article_article', 'recommendation_source')) {
    pdo_query("ALTER TABLE " . tablename('xc_article_article') . " ADD `recommendation_source` varchar(1024) NOT NULL COMMENT '推荐来源user自定义rand随机' AFTER `recommendation`;");
    pdo_query("UPDATE " . tablename('xc_article_article') . " SET `recommendation_source`='rand'");
}
if (!pdo_fieldexists('xc_article_article_category', 'templatefile')) {
    pdo_query("ALTER TABLE " . tablename('xc_article_article_category') . " ADD `templatefile` varchar(500) NOT NULL DEFAULT '' AFTER `template`;");
}
if (!pdo_fieldexists('xc_article_share_track', 'ip')) {
    pdo_query("ALTER TABLE " . tablename('xc_article_share_track') . " ADD `ip` varchar(64) NOT NULL DEFAULT '' AFTER `access_time`;");
}
if (!pdo_fieldexists('xc_article_share_track', 'clicker_id')) {
    pdo_query("ALTER TABLE " . tablename('xc_article_share_track') . " ADD `clicker_id` varchar(100) NOT NULL DEFAULT '' AFTER `access_time`;");
}
if (!pdo_fieldexists('xc_article_article', 'adv_top')) {
    pdo_query("ALTER TABLE " . tablename('xc_article_article') . " ADD `adv_on_off` varchar(10) NOT NULL DEFAULT 'off', ADD `adv_top` TEXT(10240) NOT NULL DEFAULT '',  ADD `adv_status` TEXT(10240) NOT NULL DEFAULT '', ADD `adv_bottom` TEXT(10240) NOT NULL DEFAULT '' ");
}
pdo_query("CREATE TABLE IF NOT EXISTS " . tablename('xc_article_adv_cache') . "(\r\n  `weid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '所属帐号',\r\n  `adv_on_off` varchar(10) NOT NULL DEFAULT 'off',\r\n  `adv_top` TEXT(10240) NOT NULL DEFAULT '',\r\n  `adv_status` TEXT(10240) NOT NULL DEFAULT '',\r\n  `adv_bottom` TEXT(10240) NOT NULL DEFAULT ''\r\n  ) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
pdo_query("UPDATE " . tablename('xc_article_article') . " SET template='jupai' WHERE template='round_box' or template='thumb_plain' or template='plain'");
pdo_query("UPDATE " . tablename('xc_article_article_category') . " SET template='jupai' WHERE template='round_box' or template='thumb_plain' or template='plain'");
if (!pdo_fieldexists('xc_article_article', 'per_user_credit')) {
    pdo_query("ALTER TABLE " . tablename('xc_article_article') . " ADD `per_user_credit` int(10) NOT NULL DEFAULT '0' AFTER `max_credit`;");
}
if (pdo_fieldexists('xc_article_article', 'max_credit')) {
    pdo_query("ALTER TABLE  " . tablename("xc_article_article") . " CHANGE  `max_credit`  `max_credit` INT( 10 ) NOT NULL DEFAULT  '0' COMMENT  '积分奖励上限';");
}
Beispiel #15
0
<?php

if (!pdo_fieldexists('research', 'pretotal')) {
    pdo_query("ALTER TABLE " . tablename('research') . " ADD `pretotal` INT( 10 ) UNSIGNED NOT NULL DEFAULT '1';");
}
//pdo_query("ALTER TABLE `ims_research` CHANGE `description` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';");
if (!pdo_fieldexists('research', 'noticeemail')) {
    pdo_query("ALTER TABLE " . tablename('research') . " ADD `noticeemail` VARCHAR( 50 ) NOT NULL DEFAULT '';");
}
if (!pdo_fieldexists('research', 'endtime')) {
    pdo_query("ALTER TABLE " . tablename('research') . " ADD `endtime` INT( 10 ) UNSIGNED NOT NULL ;");
}
if (!pdo_fieldexists('research', 'content')) {
    pdo_query("ALTER TABLE " . tablename('research') . " CHANGE `description` `content` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;");
    pdo_query("ALTER TABLE " . tablename('research') . " ADD `description` VARCHAR( 1000 ) NOT NULL DEFAULT '' AFTER `title` ;");
}
if (!pdo_fieldexists('research', 'status')) {
    pdo_query("ALTER TABLE " . tablename('research') . " ADD `status` VARCHAR(1)  NULL DEFAULT '';");
}
Beispiel #16
0
}
if (!pdo_fieldexists('brand_reply', 'news_content')) {
    pdo_query("ALTER TABLE " . tablename('brand_reply') . " ADD `news_content` VARCHAR(500) NOT NULL;");
}
if (!pdo_fieldexists('brand', 'btnName')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD btnName VARCHAR(20) DEFAULT NUL ;");
}
if (!pdo_fieldexists('brand', 'btnUrl')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD btnUrl VARCHAR(100) DEFAULT NULL ;");
}
if (!pdo_fieldexists('brand', 'showMsg')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD showMsg INT(1) DEFAULT 0 ;");
}
if (!pdo_fieldexists('brand', 'btnName1')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD btnName1 VARCHAR(20) DEFAULT NULL ;");
}
if (!pdo_fieldexists('brand', 'btnUrl1')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD btnUrl1 VARCHAR(100) DEFAULT NULL ;");
}
if (!pdo_fieldexists('brand', 'btnName2')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD btnName2 VARCHAR(20) DEFAULT NULL ;");
}
if (!pdo_fieldexists('brand', 'btnUrl2')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD btnUrl2 VARCHAR(100) DEFAULT NULL ;");
}
if (!pdo_fieldexists('brand', 'intro2')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD intro2 VARCHAR(500) NOT NULL ;");
}
if (!pdo_fieldexists('brand_message', 'address')) {
    pdo_query("ALTER TABLE " . tablename('brand_message') . " ADD address VARCHAR(200) NOT NULL ;");
}
Beispiel #17
0
<?php

if (!pdo_fieldexists('izclightbox_items', 'video')) {
    pdo_query("ALTER TABLE " . tablename('izclightbox_items') . " ADD `video` varchar(300) NOT NULL DEFAULT ''");
}
if (!pdo_fieldexists('izclightbox_items', 'video_thumb')) {
    pdo_query("ALTER TABLE " . tablename('izclightbox_items') . " ADD `video_thumb` varchar(300) NOT NULL DEFAULT ''");
}
if (!pdo_fieldexists('izclightbox_items', 'lng')) {
    pdo_query("ALTER TABLE " . tablename('izclightbox_items') . " ADD `lng` double unsigned NOT NULL DEFAULT '0'");
}
if (!pdo_fieldexists('izclightbox_items', 'lat')) {
    pdo_query("ALTER TABLE " . tablename('izclightbox_items') . " ADD `lat` double unsigned NOT NULL DEFAULT '0'");
}
if (!pdo_fieldexists('izclightbox_items', 'address')) {
    pdo_query("ALTER TABLE " . tablename('izclightbox_items') . " ADD `address` varchar(300) NOT NULL DEFAULT ''");
}
if (!pdo_fieldexists('izclightbox_items', 'tel')) {
    pdo_query("ALTER TABLE " . tablename('izclightbox_items') . " ADD `tel` varchar(50) NOT NULL DEFAULT ''");
}
if (!pdo_fieldexists('izclightbox_items', 'wechat')) {
    pdo_query("ALTER TABLE " . tablename('izclightbox_items') . " ADD `wechat` varchar(300) NOT NULL DEFAULT ''");
}
if (!pdo_fieldexists('izclightbox_items', 'map_thumb')) {
    pdo_query("ALTER TABLE " . tablename('izclightbox_items') . " ADD `map_thumb` varchar(300) NOT NULL DEFAULT ''");
}
Beispiel #18
0
<?php

/**
 */
if (!pdo_fieldexists('qiyue_canvas', 'uid')) {
    pdo_query("ALTER TABLE " . tablename('qiyue_canvas') . " ADD  `uid` int(10) unsigned NOT NULL DEFAULT '0';");
}
Beispiel #19
0
 * DELIMITER //
 * CREATE PROCEDURE schema_add() BEGIN
 * DECLARE CurrentDatabase VARCHAR(100);
 * SELECT DATABASE() INTO CurrentDatabase;
 * IF NOT EXISTS (SELECT * FROM information_schema.columns WHERE table_schema=CurrentDatabase AND table_name = 'ims_users_profile' AND column_name = 'jd_account') THEN
 * ALTER TABLE `ims_users_profile` ADD `jd_account` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '无' COMMENT '京东账号';
 * END IF;
 * IF NOT EXISTS (SELECT * FROM information_schema.columns WHERE table_schema=CurrentDatabase AND table_name = 'ims_mc_members' AND column_name = 'jd_account') THEN
 * ALTER TABLE `ims_mc_members` ADD `jd_account` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '无' COMMENT '京东账号';
 * END IF;
 * IF NOT EXISTS (SELECT * FROM information_schema.columns WHERE table_schema=CurrentDatabase AND table_name = 'ims_mc_members' AND column_name = 'modifytime') THEN
 * ALTER TABLE `ims_mc_members` ADD `modifytime` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改时间';
 * END IF;
 * END;//
 * DELIMITER ;
 * CALL schema_add();
 * INSERT INTO `ims_profile_fields`(field,available, title,description,displayorder,required,unchangeable,showinregister) SELECT 'jd_account', '1', '京东帐号', '', '0', '0', '0', '1' FROM DUAL WHERE NOT EXISTS(SELECT `field` FROM `ims_profile_fields` WHERE `field` = 'jd_account');"
 */
if (!pdo_fieldexists('users_profile', 'jd_account')) {
    pdo_query("ALTER TABLE " . table('users_profile') . " ADD `jd_account` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '无' COMMENT '京东账号'");
}
if (!pdo_fieldexists('mc_members', 'jd_account')) {
    pdo_query("ALTER TABLE " . table('mc_members') . " ADD `jd_account` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '无' COMMENT '京东账号'");
}
if (!pdo_fieldexists('mc_members', 'modifytime')) {
    pdo_query("ALTER TABLE " . table('mc_members') . " ADD `modifytime` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改时间'");
}
if (empty(pdo_fetch('SELECT field,title FROM ' . tablename('profile_fields') . ' WHERE field = :field', array(':field' => 'jd_account')))) {
    $data = array('field' => 'jd_account', 'available' => '1', 'title' => '京东帐号', 'description' => '', 'displayorder' => '0', 'required' => '0', 'unchangeable' => '0', 'showinregister' => '1');
    pdo_insert('profile_fields', $data);
}
Beispiel #20
0
}
if (!pdo_fieldexists('article', 'type')) {
    pdo_query("ALTER TABLE " . tablename('article') . " ADD `type` VARCHAR( 10 ) NOT NULL DEFAULT '' ;");
}
if (!pdo_fieldexists('article_category', 'template')) {
    pdo_query("ALTER TABLE " . tablename('article_category') . " ADD `template` VARCHAR(300) NOT NULL DEFAULT '' COMMENT '分类模板' AFTER `description`;");
}
if (!pdo_fieldexists('article', 'template')) {
    pdo_query("ALTER TABLE " . tablename('article') . " ADD `template` VARCHAR(300) NOT NULL DEFAULT '' COMMENT '内容模板' AFTER `ccate`;");
}
if (!pdo_fieldexists('article', 'displayorder')) {
    pdo_query("ALTER TABLE " . tablename('article') . " ADD `displayorder` int(10) unsigned NOT NULL DEFAULT '0' AFTER `author`;");
}
if (!pdo_fieldexists('article', 'linkurl')) {
    pdo_query("ALTER TABLE " . tablename('article') . " ADD `linkurl` varchar(500) NOT NULL DEFAULT '' AFTER `displayorder`;");
}
if (!pdo_fieldexists('article_category', 'linkurl')) {
    pdo_query("ALTER TABLE " . tablename('article_category') . " ADD `linkurl` VARCHAR( 500 ) NOT NULL DEFAULT '';");
}
if (!pdo_fieldexists('article_category', 'templatefile')) {
    pdo_query("ALTER TABLE " . tablename('article_category') . " ADD `templatefile` VARCHAR( 100 ) NOT NULL DEFAULT '' AFTER `template`");
}
if (!pdo_fieldexists('article_category', 'ishomepage')) {
    pdo_query("ALTER TABLE " . tablename('article_category') . " ADD `ishomepage` TINYINT( 1 ) NOT NULL DEFAULT '0'");
}
if (!pdo_fieldexists('article_category', 'icontype')) {
    pdo_query("ALTER TABLE " . tablename('article_category') . " ADD `icontype` tinyint(1) unsigned NOT NULL");
}
if (!pdo_fieldexists('article_category', 'css')) {
    pdo_query("ALTER TABLE " . tablename('article_category') . " ADD `css` varchar(500) NOT NULL");
}
Beispiel #21
0
    pdo_query("ALTER TABLE " . tablename('weisrc_dish_print_setting') . " ADD `title` varchar(200) DEFAULT '';");
}
//ims_weisrc_dish_email_setting
if (!pdo_fieldexists('weisrc_dish_email_setting', 'email_host')) {
    pdo_query("ALTER TABLE " . tablename('weisrc_dish_email_setting') . " ADD `email_host` varchar(50) DEFAULT '' COMMENT '邮箱服务器';");
}
if (!pdo_fieldexists('weisrc_dish_email_setting', 'email_send')) {
    pdo_query("ALTER TABLE " . tablename('weisrc_dish_email_setting') . " ADD `email_send` varchar(20) DEFAULT '' COMMENT '商户发送邮件邮箱';");
}
if (!pdo_fieldexists('weisrc_dish_email_setting', 'email_pwd')) {
    pdo_query("ALTER TABLE " . tablename('weisrc_dish_email_setting') . " ADD `email_pwd` varchar(20) DEFAULT '' COMMENT '邮箱密码';");
}
if (!pdo_fieldexists('weisrc_dish_email_setting', 'email_user')) {
    pdo_query("ALTER TABLE " . tablename('weisrc_dish_email_setting') . " ADD `email_user` varchar(100) DEFAULT '' COMMENT '发信人名称';");
}
if (!pdo_fieldexists('weisrc_dish_stores', 'is_meal')) {
    pdo_query("ALTER TABLE " . tablename('weisrc_dish_stores') . " ADD `is_meal` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否店内点餐';");
}
if (!pdo_fieldexists('weisrc_dish_stores', 'is_delivery')) {
    pdo_query("ALTER TABLE " . tablename('weisrc_dish_stores') . " ADD `is_delivery` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否外卖订餐';");
}
if (!pdo_fieldexists('weisrc_dish_stores', 'sendingprice')) {
    pdo_query("ALTER TABLE " . tablename('weisrc_dish_stores') . " ADD `sendingprice` varchar(10) NOT NULL DEFAULT '' COMMENT '起送价格';");
}
/**
 * 微点餐
 *
 * 作者:迷失卍国度
 *
 * qq : 15595755
 */
Beispiel #22
0
<?php

if (!pdo_fieldexists('lxy_buildpro_full_view', 'quanjinglink')) {
    pdo_query("ALTER TABLE " . tablename('lxy_buildpro_full_view') . "  ADD  `quanjinglink` varchar(500) DEFAULT NULL COMMENT '全景外链';");
}
if (!pdo_fieldexists('lxy_buildpro_full_view', 'pic_xia')) {
    pdo_query("ALTER TABLE " . tablename('lxy_buildpro_full_view') . " ADD `pic_xia` varchar(1023) DEFAULT NULL;");
}
if (!pdo_fieldexists('lxy_buildpro_full_view', 'sort')) {
    pdo_query("ALTER TABLE " . tablename('lxy_buildpro_full_view') . " ADD `sort` int(11) DEFAULT NULL;");
}
if (!pdo_fieldexists('lxy_buildpro_full_view', 'status')) {
    pdo_query("ALTER TABLE " . tablename('lxy_buildpro_full_view') . " ADD  `status` tinyint(4) DEFAULT '1';");
}
Beispiel #23
0
//0731
if (!pdo_fieldexists('fm_photosvote_reply', 'fansmostvote')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD   `fansmostvote` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户最高投票数';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'mtemplates')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD  `mtemplates` varchar(500) NOT NULL COMMENT '模板ID';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'huodong')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD    `huodong` varchar(500) NOT NULL COMMENT '活动';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'command')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD   `command` varchar(10) NOT NULL COMMENT '报名命令';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'istop')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD  `istop` varchar(300) NOT NULL COMMENT '顶部设置';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'isid')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD    `isid` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT 'isid';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'hhhdpicture')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD      `hhhdpicture` varchar(150) NOT NULL COMMENT '会话活动图片';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'iplocallimit')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD    `iplocallimit` varchar(100) NOT NULL COMMENT '地区限制';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'iplocaldes')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD    `iplocaldes` varchar(100) NOT NULL COMMENT '地区限制';");
}
if (!pdo_fieldexists('fm_photosvote_provevote', 'ysid')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_provevote') . " ADD   `ysid` int(10) unsigned NOT NULL COMMENT 'ysid';");
}
Beispiel #24
0
}
if (!pdo_fieldexists('stonefish_grabgifts_reply', 'xuninum')) {
    pdo_query("ALTER TABLE " . tablename('stonefish_grabgifts_reply') . " ADD `xuninum` int(10) unsigned NOT NULL DEFAULT '50' COMMENT '虚拟人数' AFTER `status`;");
}
if (!pdo_fieldexists('stonefish_grabgifts_reply', 'xuninumtime')) {
    pdo_query("ALTER TABLE " . tablename('stonefish_grabgifts_reply') . " ADD `xuninumtime` int(10) unsigned NOT NULL DEFAULT '86400' COMMENT '虚拟间隔时间' AFTER `xuninum`;");
}
if (!pdo_fieldexists('stonefish_grabgifts_reply', 'xuninuminitial')) {
    pdo_query("ALTER TABLE " . tablename('stonefish_grabgifts_reply') . " ADD `xuninuminitial` int(10) unsigned NOT NULL DEFAULT '10' COMMENT '虚拟随机数值1' AFTER `xuninumtime`;");
}
if (!pdo_fieldexists('stonefish_grabgifts_reply', 'xuninumending')) {
    pdo_query("ALTER TABLE " . tablename('stonefish_grabgifts_reply') . " ADD `xuninumending` int(10) unsigned NOT NULL DEFAULT '50' COMMENT '虚拟随机数值2' AFTER `xuninuminitial`;");
}
if (!pdo_fieldexists('stonefish_grabgifts_reply', 'xuninum_time')) {
    pdo_query("ALTER TABLE " . tablename('stonefish_grabgifts_reply') . " ADD `xuninum_time` int(10) unsigned NOT NULL COMMENT '虚拟更新时间' AFTER `xuninumending`;");
}
if (!pdo_fieldexists('stonefish_grabgifts_reply', 'awarding')) {
    pdo_query("ALTER TABLE " . tablename('stonefish_grabgifts_reply') . " ADD `awarding` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '兑奖地点选择' AFTER `ndrankstatusnum`;");
}
if (!pdo_fieldexists('stonefish_grabgifts_userlist', 'mikaid')) {
    pdo_query("ALTER TABLE " . tablename('stonefish_grabgifts_userlist') . " ADD `mikaid` varchar(500) NOT NULL DEFAULT '' COMMENT '领取密卡列表' AFTER `grabgifts`;");
}
if (!pdo_fieldexists('stonefish_grabgifts_userlist', 'awardingid')) {
    pdo_query("ALTER TABLE " . tablename('stonefish_grabgifts_userlist') . " ADD `awardingid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '兑奖地址ID' AFTER `ndranknums`;");
}
if (!pdo_fieldexists('stonefish_grabgifts_userlist', 'awardingtypeid')) {
    pdo_query("ALTER TABLE " . tablename('stonefish_grabgifts_userlist') . " ADD `awardingtypeid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '兑奖地址区域ID' AFTER `awardingid`;");
}
pdo_query("CREATE TABLE IF NOT EXISTS `ims_stonefish_grabgifts_awarding` (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `weid` int(10) unsigned NOT NULL COMMENT '公众号ID',\n  `typeid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '区域ID',\n  `shoptitle` varchar(50) NOT NULL DEFAULT '' COMMENT '兑奖店面名称',\n  `address` varchar(512) NOT NULL DEFAULT '' COMMENT '兑奖地址',\n  `tel` varchar(50) NOT NULL DEFAULT '' COMMENT '联系电话',\n  `pass` varchar(20) NOT NULL DEFAULT '' COMMENT '兑奖密码',\n  `images` varchar(512) NOT NULL DEFAULT '' COMMENT '广告或店面图',\n  `carmap` varchar(50) NOT NULL COMMENT '地图导航',\n  PRIMARY KEY (`id`)\n) ENGINE = MYISAM DEFAULT CHARSET = utf8;");
pdo_query("CREATE TABLE IF NOT EXISTS `ims_stonefish_grabgifts_awardingtype` (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `weid` int(10) unsigned NOT NULL COMMENT '公众号ID',\n  `quyutitle` varchar(50) NOT NULL DEFAULT '' COMMENT '分类名称',\n  `orderid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序',\n  PRIMARY KEY (`id`)\n) ENGINE = MYISAM DEFAULT CHARSET = utf8;");
pdo_query("CREATE TABLE IF NOT EXISTS `ims_stonefish_grabgifts_giftmika` (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `rid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '规则id',\n  `giftid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '礼盒ID', \n  `from_user` varchar(50) NOT NULL DEFAULT '' COMMENT '用户openid',  \n  `mika` varchar(50) NOT NULL COMMENT '密卡字符串',\n  `activationurl` varchar(200) NOT NULL COMMENT '激活地址',\n  `description` varchar(100) NOT NULL DEFAULT '' COMMENT '描述',\n  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否领取1为领取过',\n  PRIMARY KEY (`id`),\n  KEY `indx_rid` (`rid`)\n) ENGINE = MYISAM DEFAULT CHARSET = utf8;");
Beispiel #25
0
<?php

/**
 * 游戏设置
 *
 * @version     $Id: settings.inc.php 1 18:42 2015年09月15日Z lions $
 * @copyright   Copyright (c) 2013 - 2020, haobama.net, Inc.
 * @link        http://www.haobama.net
 */
global $_W, $_GPC;
if (isset($_GPC['item']) && $_GPC['item'] == 'ajax' && $_GPC['key'] == 'require') {
    $data['uniacid'] = $_W['uniacid'];
    $data['setting_key'] = 'require_subscribe';
    $data['setting_value'] = $_GPC['require'] == 1 ? 1 : 0;
    if ($data['setting_value'] == 1) {
        $fieldsExist = pdo_fieldexists('mc_mapping_fans', 'unionid');
        if (!$fieldsExist) {
            pdo_query("ALTER TABLE " . tablename('mc_mapping_fans') . " ADD column unionid varchar(255) default null");
        }
    }
    pdo_query("DELETE FROM " . tablename('lions_zq_settings') . " WHERE `uniacid`=:uniacid AND `setting_key`='require_subscribe'", array(':uniacid' => $_W['uniacid']));
    pdo_insert('lions_zq_settings', $data);
    echo pdo_insertid();
    exit;
} elseif (isset($_GPC['item']) && $_GPC['item'] == 'ajax' && $_GPC['key'] == 'thumb') {
    $data['uniacid'] = $_W['uniacid'];
    $data['setting_key'] = 'thumb';
    $data['setting_value'] = $_GPC['thumb'];
    pdo_query("DELETE FROM " . tablename('lions_zq_settings') . " WHERE `uniacid`=:uniacid AND `setting_key`='thumb'", array(':uniacid' => $_W['uniacid']));
    pdo_insert('lions_zq_settings', $data);
    echo pdo_insertid();
Beispiel #26
0
<?php

if (!defined('IN_IA')) {
    exit('Access Denied');
}
if (!pdo_fieldexists('ewei_dshop_goods', 'taotaoid')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods') . ' ADD `taotaoid` varchar(255) DEFAULT \'\';');
}
if (!pdo_fieldexists('ewei_dshop_goods', 'taobaourl')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods') . ' ADD `taobaourl` varchar(255) DEFAULT \'\';');
}
if (!pdo_fieldexists('ewei_dshop_goods', 'updatetime')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods') . ' ADD `updatetime` int(11) default 0;');
}
if (!pdo_fieldexists('ewei_dshop_goods', 'updatetime')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods') . ' ADD `updatetime` int(11) default 0;');
}
if (!pdo_fieldexists('ewei_dshop_goods_option', 'skuId')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods_option') . ' ADD `skuId` varchar(255) DEFAULT \'\';');
}
if (!pdo_fieldexists('ewei_dshop_goods_spec', 'propId')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods_spec') . ' ADD `propId` varchar(255) DEFAULT \'\';');
}
if (!pdo_fieldexists('ewei_dshop_goods_spec_item', 'valueId')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods_spec_item') . ' ADD `valueId` varchar(255) DEFAULT \'\';');
}
Beispiel #27
0
}
if (!pdo_fieldexists('weishare', 'tip')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `tip` varchar(100) NOT NULL COMMENT '提示语';");
}
if (!pdo_fieldexists('weishare', 'copyright')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `copyright` varchar(100) NOT NULL COMMENT '版权' ;");
}
if (!pdo_fieldexists('weishare', 'cardname')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `cardname` varchar(100) NOT NULL COMMENT '卡片名称' ;");
}
if (!pdo_fieldexists('weishare', 'unit')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `unit` varchar(100) NOT NULL COMMENT '单位' ;");
}
if (!pdo_fieldexists('weishare', 'helplimit')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `helplimit` int(11) NOT NULL  COMMENT '每天助力限制次数';");
}
if (!pdo_fieldexists('weishare', 'limittype')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `limittype` int(1) NOT NULL  COMMENT '限制类型' ;");
}
if (!pdo_fieldexists('weishare_firend', 'sid')) {
    pdo_query("ALTER TABLE " . tablename('weishare_firend') . " ADD `sid` int(10) NOT NULL DEFAULT '0' ;");
}
if (!pdo_fieldexists('weishare', 'endtime')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD endtime\tint(11) unsigned NOT NULL COMMENT '日期' ;");
}
if (!pdo_fieldexists('weishare_setting', 'weid')) {
    pdo_query("ALTER TABLE " . tablename('weishare_setting') . " ADD weid INT(11) UNSIGNED DEFAULT NULL ;");
}
if (!pdo_fieldexists('weishare', 'rule')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD   `rule` text NOT NULL COMMENT '规则';");
}
Beispiel #28
0
<?php

if (!pdo_fieldexists('wwx_sign', 'new_title')) {
    pdo_query("ALTER TABLE " . tablename('wwx_sign') . "ADD  `new_title` varchar(200);");
}
if (!pdo_fieldexists('wwx_sign', 'copyright')) {
    pdo_query("ALTER TABLE " . tablename('wwx_sign') . "ADD  `copyright` varchar(200) ;");
}
if (!pdo_fieldexists('wwx_sign', 'new_icon')) {
    pdo_query("ALTER TABLE " . tablename('wwx_sign') . "ADD  `new_icon` varchar(200);");
}
if (!pdo_fieldexists('wwx_sign', 'new_content')) {
    pdo_query("ALTER TABLE " . tablename('wwx_sign') . "ADD  `new_content` varchar(200);");
}
if (!pdo_fieldexists('wwx_sign_award', 'serial_day')) {
    pdo_query("ALTER TABLE " . tablename('wwx_sign_award') . "ADD  serial_day int(10) ;");
}
/**
* links
*/
$sql = "\r\nCREATE TABLE IF NOT EXISTS " . tablename('wwx_sign_link') . " (\r\n`id` int(10) unsigned NOT NULL AUTO_INCREMENT,\r\n`sid` INT(11) UNSIGNED DEFAULT NULL,\r\n`sort` int(2) default 0,\r\n`link_name` varchar(50) NOT NULL ,\r\n`link_url` varchar(50) NOT NULL,\r\n`createtime` int(10) unsigned NOT NULL COMMENT '日期',\r\n PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8";
pdo_query($sql);
Beispiel #29
0
<?php

if (!pdo_fieldexists('mbrp_activities', 'banner')) {
    pdo_run("ALTER TABLE `ims_mbrp_activities` ADD `banner` VARCHAR(500) NOT NULL DEFAULT '';");
}
<?php

if(!pdo_fieldexists('jufeng_wcy_category', 'count1')) {
	pdo_query("ALTER TABLE ".tablename('jufeng_wcy_category')." ADD  `count1` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists('jufeng_wcy_category', 'count2')) {
	pdo_query("ALTER TABLE ".tablename('jufeng_wcy_category')." ADD  `count2` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists('jufeng_wcy_category', 'count3')) {
	pdo_query("ALTER TABLE ".tablename('jufeng_wcy_category')." ADD  `count3` varchar(20) NOT NULL;");
}
?>