<?php
/**
* pnp8_com源码
* https://www.mofangmall.com
* QQ:5090531 承接网站建设、公众号搭建、小程序建设、企业网站
*/
pdo_query("CREATE TABLE IF NOT EXISTS `ims_wx_school_address` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`weid` int(11) NOT NULL,
`schoolid` int(11) NOT NULL,
`openid` varchar(30) NOT NULL,
`name` varchar(50) NOT NULL,
`phone` varchar(30) NOT NULL,
`province` varchar(40) NOT NULL,
`city` varchar(40) NOT NULL,
`county` varchar(40) NOT NULL,
`address` varchar(300) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=46 DEFAULT CHARSET=utf8;
");
if(!pdo_fieldexists('wx_school_address','id')) {pdo_query("ALTER TABLE ".tablename('wx_school_address')." ADD
`id` int(10) NOT NULL AUTO_INCREMENT");}
if(!pdo_fieldexists('wx_school_address','weid')) {pdo_query("ALTER TABLE ".tablename('wx_school_address')." ADD `weid` int(11) NOT NULL");}
if(!pdo_fieldexists('wx_school_address','schoolid')) {pdo_query("ALTER TABLE ".tablename('wx_school_address')." ADD `schoolid` int(11) NOT NULL");}
if(!pdo_fieldexists('wx_school_address','openid')) {pdo_query("ALTER TABLE ".tablename('wx_school_address')." ADD `openid` varchar(30) NOT NULL");}
if(!pdo_fieldexists('wx_school_address','name')) {pdo_query("ALTER TABLE ".tablename('wx_school_address')." ADD `name` varchar(50) NOT NULL");}
if(!pdo_fieldexists('wx_school_address','phone')) {pdo_query("ALTER TABLE ".tablename('wx_school_address')." ADD `phone` varchar(30) NOT NULL");}
if(!pdo_fieldexists('wx_school_address','province')) {pdo_query("ALTER TABLE ".tablename('wx_school_address')." ADD `province` varchar(40) NOT NULL");}
if(!pdo_fieldexists('wx_school_address','city')) {pdo_query("ALTER TABLE ".tablename('wx_school_address')." ADD `city` varchar(40) NOT NULL");}
if(!pdo_fieldexists('wx_school_address','county')) {pdo_query("ALTER TABLE ".tablename('wx_school_address')." ADD `county` varchar(40) NOT NULL");}
if(!pdo_fieldexists('wx_school_address','address')) {pdo_query("ALTER TABLE ".tablename('wx_school_address')." ADD `address` varchar(300) NOT NULL");}
pdo_query("CREATE TABLE IF NOT EXISTS `ims_wx_school_allcamera` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`weid` int(10) unsigned NOT NULL,
`schoolid` int(10) unsigned NOT NULL,
`kcid` int(10) unsigned NOT NULL,
`name` varchar(50) NOT NULL COMMENT '画面名称',
`conet` text NOT NULL COMMENT '说明',
`videopic` varchar(1000) NOT NULL DEFAULT '' COMMENT '监控地址',
`videourl` varchar(1000) NOT NULL DEFAULT '' COMMENT '监控地址',
`starttime1` varchar(50) NOT NULL,
`endtime1` varchar(50) NOT NULL,
`createtime` int(10) unsigned NOT NULL,
`allowpy` tinyint(1) NOT NULL DEFAULT '1',
`type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1监控2课程直播',
`videotype` tinyint(1) NOT NULL DEFAULT '1',
`bj_id` text NOT NULL,
`click` int(10) unsigned NOT NULL COMMENT '查看量',
`ssort` int(10) unsigned NOT NULL COMMENT '排序',
`starttime2` varchar(50) NOT NULL,
`endtime2` varchar(50) NOT NULL,
`starttime3` varchar(50) NOT NULL,
`endtime3` varchar(50) NOT NULL,
`is_pay` tinyint(1) NOT NULL DEFAULT '2',
`payweid` int(10) NOT NULL,
`price_one` float NOT NULL,
`price_one_cun` float NOT NULL,
`price_all` float NOT NULL,
`price_all_cun` float NOT NULL,
`days` int(10) NOT NULL DEFAULT '10',
`is_try` tinyint(1) NOT NULL DEFAULT '1',
`try_time` int(10) NOT NULL DEFAULT '30',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
");
if(!pdo_fieldexists('wx_school_allcamera','id')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD
`id` int(10) unsigned NOT NULL AUTO_INCREMENT");}
if(!pdo_fieldexists('wx_school_allcamera','weid')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `weid` int(10) unsigned NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','schoolid')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `schoolid` int(10) unsigned NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','kcid')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `kcid` int(10) unsigned NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','name')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `name` varchar(50) NOT NULL COMMENT '画面名称'");}
if(!pdo_fieldexists('wx_school_allcamera','conet')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `conet` text NOT NULL COMMENT '说明'");}
if(!pdo_fieldexists('wx_school_allcamera','videopic')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `videopic` varchar(1000) NOT NULL DEFAULT '' COMMENT '监控地址'");}
if(!pdo_fieldexists('wx_school_allcamera','videourl')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `videourl` varchar(1000) NOT NULL DEFAULT '' COMMENT '监控地址'");}
if(!pdo_fieldexists('wx_school_allcamera','starttime1')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `starttime1` varchar(50) NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','endtime1')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `endtime1` varchar(50) NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','createtime')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `createtime` int(10) unsigned NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','allowpy')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `allowpy` tinyint(1) NOT NULL DEFAULT '1'");}
if(!pdo_fieldexists('wx_school_allcamera','type')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1监控2课程直播'");}
if(!pdo_fieldexists('wx_school_allcamera','videotype')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `videotype` tinyint(1) NOT NULL DEFAULT '1'");}
if(!pdo_fieldexists('wx_school_allcamera','bj_id')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `bj_id` text NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','click')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `click` int(10) unsigned NOT NULL COMMENT '查看量'");}
if(!pdo_fieldexists('wx_school_allcamera','ssort')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `ssort` int(10) unsigned NOT NULL COMMENT '排序'");}
if(!pdo_fieldexists('wx_school_allcamera','starttime2')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `starttime2` varchar(50) NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','endtime2')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `endtime2` varchar(50) NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','starttime3')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `starttime3` varchar(50) NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','endtime3')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `endtime3` varchar(50) NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','is_pay')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `is_pay` tinyint(1) NOT NULL DEFAULT '2'");}
if(!pdo_fieldexists('wx_school_allcamera','payweid')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `payweid` int(10) NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','price_one')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `price_one` float NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','price_one_cun')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `price_one_cun` float NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','price_all')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD `price_all` float NOT NULL");}
if(!pdo_fieldexists('wx_school_allcamera','price_all_cun')) {pdo_query("ALTER TABLE ".tablename('wx_school_allcamera')." ADD