upgrade.php 245 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123
  1. <?php
  2. //升级数据表
  3. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_account` (
  4. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  5. `weid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '所属帐号',
  6. `storeid` varchar(1000) NOT NULL,
  7. `uid` int(10) unsigned NOT NULL DEFAULT '0',
  8. `from_user` varchar(100) NOT NULL DEFAULT '',
  9. `accountname` varchar(50) NOT NULL DEFAULT '',
  10. `password` varchar(200) NOT NULL DEFAULT '',
  11. `salt` varchar(10) NOT NULL DEFAULT '',
  12. `pwd` varchar(50) NOT NULL,
  13. `mobile` varchar(20) NOT NULL,
  14. `email` varchar(20) NOT NULL,
  15. `username` varchar(50) NOT NULL,
  16. `pay_account` varchar(200) NOT NULL,
  17. `displayorder` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  18. `dateline` int(10) unsigned NOT NULL DEFAULT '0',
  19. `status` tinyint(1) unsigned NOT NULL DEFAULT '2' COMMENT '状态',
  20. `role` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1:店长,2:店员',
  21. `lastvisit` int(10) unsigned NOT NULL DEFAULT '0',
  22. `lastip` varchar(15) NOT NULL,
  23. `areaid` int(10) NOT NULL DEFAULT '0' COMMENT '区域id',
  24. `is_admin_order` tinyint(1) unsigned NOT NULL DEFAULT '1',
  25. `is_notice_order` tinyint(1) unsigned NOT NULL DEFAULT '1',
  26. `is_notice_queue` tinyint(1) unsigned NOT NULL DEFAULT '1',
  27. `is_notice_service` tinyint(1) unsigned NOT NULL DEFAULT '1',
  28. `is_notice_boss` tinyint(1) NOT NULL DEFAULT '0',
  29. `remark` varchar(1000) NOT NULL DEFAULT '' COMMENT '备注',
  30. `lat` decimal(18,10) NOT NULL DEFAULT '0.0000000000' COMMENT '经度',
  31. `lng` decimal(18,10) NOT NULL DEFAULT '0.0000000000' COMMENT '纬度',
  32. `cityname` varchar(50) NOT NULL COMMENT '城市名称',
  33. `money` decimal(10,2) NOT NULL,
  34. `authority` text NOT NULL,
  35. `city_qx` text NOT NULL,
  36. PRIMARY KEY (`id`)
  37. ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
  38. ");
  39. if(!pdo_fieldexists('zhtc_account','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD
  40. `id` int(10) unsigned NOT NULL AUTO_INCREMENT");}
  41. if(!pdo_fieldexists('zhtc_account','weid')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `weid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '所属帐号'");}
  42. if(!pdo_fieldexists('zhtc_account','storeid')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `storeid` varchar(1000) NOT NULL");}
  43. if(!pdo_fieldexists('zhtc_account','uid')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `uid` int(10) unsigned NOT NULL DEFAULT '0'");}
  44. if(!pdo_fieldexists('zhtc_account','from_user')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `from_user` varchar(100) NOT NULL DEFAULT ''");}
  45. if(!pdo_fieldexists('zhtc_account','accountname')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `accountname` varchar(50) NOT NULL DEFAULT ''");}
  46. if(!pdo_fieldexists('zhtc_account','password')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `password` varchar(200) NOT NULL DEFAULT ''");}
  47. if(!pdo_fieldexists('zhtc_account','salt')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `salt` varchar(10) NOT NULL DEFAULT ''");}
  48. if(!pdo_fieldexists('zhtc_account','pwd')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `pwd` varchar(50) NOT NULL");}
  49. if(!pdo_fieldexists('zhtc_account','mobile')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `mobile` varchar(20) NOT NULL");}
  50. if(!pdo_fieldexists('zhtc_account','email')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `email` varchar(20) NOT NULL");}
  51. if(!pdo_fieldexists('zhtc_account','username')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `username` varchar(50) NOT NULL");}
  52. if(!pdo_fieldexists('zhtc_account','pay_account')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `pay_account` varchar(200) NOT NULL");}
  53. if(!pdo_fieldexists('zhtc_account','displayorder')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `displayorder` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序'");}
  54. if(!pdo_fieldexists('zhtc_account','dateline')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `dateline` int(10) unsigned NOT NULL DEFAULT '0'");}
  55. if(!pdo_fieldexists('zhtc_account','status')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `status` tinyint(1) unsigned NOT NULL DEFAULT '2' COMMENT '状态'");}
  56. if(!pdo_fieldexists('zhtc_account','role')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `role` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1:店长,2:店员'");}
  57. if(!pdo_fieldexists('zhtc_account','lastvisit')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `lastvisit` int(10) unsigned NOT NULL DEFAULT '0'");}
  58. if(!pdo_fieldexists('zhtc_account','lastip')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `lastip` varchar(15) NOT NULL");}
  59. if(!pdo_fieldexists('zhtc_account','areaid')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `areaid` int(10) NOT NULL DEFAULT '0' COMMENT '区域id'");}
  60. if(!pdo_fieldexists('zhtc_account','is_admin_order')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `is_admin_order` tinyint(1) unsigned NOT NULL DEFAULT '1'");}
  61. if(!pdo_fieldexists('zhtc_account','is_notice_order')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `is_notice_order` tinyint(1) unsigned NOT NULL DEFAULT '1'");}
  62. if(!pdo_fieldexists('zhtc_account','is_notice_queue')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `is_notice_queue` tinyint(1) unsigned NOT NULL DEFAULT '1'");}
  63. if(!pdo_fieldexists('zhtc_account','is_notice_service')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `is_notice_service` tinyint(1) unsigned NOT NULL DEFAULT '1'");}
  64. if(!pdo_fieldexists('zhtc_account','is_notice_boss')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `is_notice_boss` tinyint(1) NOT NULL DEFAULT '0'");}
  65. if(!pdo_fieldexists('zhtc_account','remark')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `remark` varchar(1000) NOT NULL DEFAULT '' COMMENT '备注'");}
  66. if(!pdo_fieldexists('zhtc_account','lat')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `lat` decimal(18,10) NOT NULL DEFAULT '0.0000000000' COMMENT '经度'");}
  67. if(!pdo_fieldexists('zhtc_account','lng')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `lng` decimal(18,10) NOT NULL DEFAULT '0.0000000000' COMMENT '纬度'");}
  68. if(!pdo_fieldexists('zhtc_account','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `cityname` varchar(50) NOT NULL COMMENT '城市名称'");}
  69. if(!pdo_fieldexists('zhtc_account','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `money` decimal(10,2) NOT NULL");}
  70. if(!pdo_fieldexists('zhtc_account','authority')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `authority` text NOT NULL");}
  71. if(!pdo_fieldexists('zhtc_account','city_qx')) {pdo_query("ALTER TABLE ".tablename('zhtc_account')." ADD `city_qx` text NOT NULL");}
  72. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_acthxlist` (
  73. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  74. `user_id` int(11) NOT NULL,
  75. `act_id` int(11) NOT NULL,
  76. PRIMARY KEY (`id`)
  77. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  78. ");
  79. if(!pdo_fieldexists('zhtc_acthxlist','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_acthxlist')." ADD
  80. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  81. if(!pdo_fieldexists('zhtc_acthxlist','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_acthxlist')." ADD `user_id` int(11) NOT NULL");}
  82. if(!pdo_fieldexists('zhtc_acthxlist','act_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_acthxlist')." ADD `act_id` int(11) NOT NULL");}
  83. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_activity` (
  84. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  85. `title` varchar(50) NOT NULL COMMENT '活动标题',
  86. `logo` varchar(200) NOT NULL COMMENT '活动logo',
  87. `img` text NOT NULL COMMENT '活动轮播图',
  88. `details` text NOT NULL COMMENT '活动详情',
  89. `number` int(11) NOT NULL COMMENT '限制人数',
  90. `sign_num` int(11) NOT NULL COMMENT '限制人数',
  91. `time` varchar(20) NOT NULL COMMENT '发布时间',
  92. `start_time` varchar(20) NOT NULL COMMENT '开始时间',
  93. `end_time` varchar(20) NOT NULL COMMENT '结束时间',
  94. `uniacid` int(11) NOT NULL COMMENT '小程序id',
  95. `money` decimal(10,2) NOT NULL COMMENT '价格',
  96. `type_id` int(11) NOT NULL COMMENT '分类id',
  97. `tel` varchar(20) NOT NULL COMMENT '电话',
  98. `address` varchar(200) NOT NULL COMMENT '地址',
  99. `coordinate` varchar(50) NOT NULL COMMENT '坐标',
  100. `num` int(11) NOT NULL COMMENT '排序',
  101. `view` int(11) NOT NULL COMMENT '访问量',
  102. `is_bm` int(11) NOT NULL DEFAULT '1' COMMENT '1.开启2.关闭',
  103. `cityname` varchar(20) NOT NULL COMMENT '城市',
  104. PRIMARY KEY (`id`)
  105. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  106. ");
  107. if(!pdo_fieldexists('zhtc_activity','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD
  108. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  109. if(!pdo_fieldexists('zhtc_activity','title')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `title` varchar(50) NOT NULL COMMENT '活动标题'");}
  110. if(!pdo_fieldexists('zhtc_activity','logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `logo` varchar(200) NOT NULL COMMENT '活动logo'");}
  111. if(!pdo_fieldexists('zhtc_activity','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `img` text NOT NULL COMMENT '活动轮播图'");}
  112. if(!pdo_fieldexists('zhtc_activity','details')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `details` text NOT NULL COMMENT '活动详情'");}
  113. if(!pdo_fieldexists('zhtc_activity','number')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `number` int(11) NOT NULL COMMENT '限制人数'");}
  114. if(!pdo_fieldexists('zhtc_activity','sign_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `sign_num` int(11) NOT NULL COMMENT '限制人数'");}
  115. if(!pdo_fieldexists('zhtc_activity','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `time` varchar(20) NOT NULL COMMENT '发布时间'");}
  116. if(!pdo_fieldexists('zhtc_activity','start_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `start_time` varchar(20) NOT NULL COMMENT '开始时间'");}
  117. if(!pdo_fieldexists('zhtc_activity','end_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `end_time` varchar(20) NOT NULL COMMENT '结束时间'");}
  118. if(!pdo_fieldexists('zhtc_activity','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `uniacid` int(11) NOT NULL COMMENT '小程序id'");}
  119. if(!pdo_fieldexists('zhtc_activity','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `money` decimal(10,2) NOT NULL COMMENT '价格'");}
  120. if(!pdo_fieldexists('zhtc_activity','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `type_id` int(11) NOT NULL COMMENT '分类id'");}
  121. if(!pdo_fieldexists('zhtc_activity','tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `tel` varchar(20) NOT NULL COMMENT '电话'");}
  122. if(!pdo_fieldexists('zhtc_activity','address')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `address` varchar(200) NOT NULL COMMENT '地址'");}
  123. if(!pdo_fieldexists('zhtc_activity','coordinate')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `coordinate` varchar(50) NOT NULL COMMENT '坐标'");}
  124. if(!pdo_fieldexists('zhtc_activity','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `num` int(11) NOT NULL COMMENT '排序'");}
  125. if(!pdo_fieldexists('zhtc_activity','view')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `view` int(11) NOT NULL COMMENT '访问量'");}
  126. if(!pdo_fieldexists('zhtc_activity','is_bm')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `is_bm` int(11) NOT NULL DEFAULT '1' COMMENT '1.开启2.关闭'");}
  127. if(!pdo_fieldexists('zhtc_activity','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_activity')." ADD `cityname` varchar(20) NOT NULL COMMENT '城市'");}
  128. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_acttype` (
  129. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  130. `type_name` varchar(20) NOT NULL,
  131. `num` int(11) NOT NULL,
  132. `uniacid` int(11) NOT NULL,
  133. `state` int(11) NOT NULL COMMENT '1.开启2.关闭',
  134. `img` varchar(500) NOT NULL,
  135. PRIMARY KEY (`id`)
  136. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  137. ");
  138. if(!pdo_fieldexists('zhtc_acttype','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_acttype')." ADD
  139. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  140. if(!pdo_fieldexists('zhtc_acttype','type_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_acttype')." ADD `type_name` varchar(20) NOT NULL");}
  141. if(!pdo_fieldexists('zhtc_acttype','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_acttype')." ADD `num` int(11) NOT NULL");}
  142. if(!pdo_fieldexists('zhtc_acttype','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_acttype')." ADD `uniacid` int(11) NOT NULL");}
  143. if(!pdo_fieldexists('zhtc_acttype','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_acttype')." ADD `state` int(11) NOT NULL COMMENT '1.开启2.关闭'");}
  144. if(!pdo_fieldexists('zhtc_acttype','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_acttype')." ADD `img` varchar(500) NOT NULL");}
  145. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_ad` (
  146. `id` int(11) NOT NULL AUTO_INCREMENT,
  147. `title` varchar(50) NOT NULL COMMENT '轮播图标题',
  148. `logo` varchar(200) NOT NULL COMMENT '图片',
  149. `status` int(11) NOT NULL COMMENT '1.开启 2.关闭',
  150. `src` varchar(100) NOT NULL COMMENT '链接',
  151. `orderby` int(11) NOT NULL COMMENT '排序',
  152. `xcx_name` varchar(20) NOT NULL,
  153. `appid` varchar(20) NOT NULL,
  154. `uniacid` int(11) NOT NULL COMMENT '小程序id',
  155. `type` int(11) NOT NULL,
  156. `cityname` varchar(50) NOT NULL,
  157. `wb_src` varchar(300) NOT NULL,
  158. `state` int(4) NOT NULL DEFAULT '1',
  159. PRIMARY KEY (`id`)
  160. ) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8;
  161. ");
  162. if(!pdo_fieldexists('zhtc_ad','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD
  163. `id` int(11) NOT NULL AUTO_INCREMENT");}
  164. if(!pdo_fieldexists('zhtc_ad','title')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD `title` varchar(50) NOT NULL COMMENT '轮播图标题'");}
  165. if(!pdo_fieldexists('zhtc_ad','logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD `logo` varchar(200) NOT NULL COMMENT '图片'");}
  166. if(!pdo_fieldexists('zhtc_ad','status')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD `status` int(11) NOT NULL COMMENT '1.开启 2.关闭'");}
  167. if(!pdo_fieldexists('zhtc_ad','src')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD `src` varchar(100) NOT NULL COMMENT '链接'");}
  168. if(!pdo_fieldexists('zhtc_ad','orderby')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD `orderby` int(11) NOT NULL COMMENT '排序'");}
  169. if(!pdo_fieldexists('zhtc_ad','xcx_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD `xcx_name` varchar(20) NOT NULL");}
  170. if(!pdo_fieldexists('zhtc_ad','appid')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD `appid` varchar(20) NOT NULL");}
  171. if(!pdo_fieldexists('zhtc_ad','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD `uniacid` int(11) NOT NULL COMMENT '小程序id'");}
  172. if(!pdo_fieldexists('zhtc_ad','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD `type` int(11) NOT NULL");}
  173. if(!pdo_fieldexists('zhtc_ad','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD `cityname` varchar(50) NOT NULL");}
  174. if(!pdo_fieldexists('zhtc_ad','wb_src')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD `wb_src` varchar(300) NOT NULL");}
  175. if(!pdo_fieldexists('zhtc_ad','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_ad')." ADD `state` int(4) NOT NULL DEFAULT '1'");}
  176. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_area` (
  177. `id` int(11) NOT NULL AUTO_INCREMENT,
  178. `area_name` varchar(50) NOT NULL COMMENT '区域名称',
  179. `num` int(11) NOT NULL COMMENT '排序',
  180. `uniacid` int(11) NOT NULL,
  181. PRIMARY KEY (`id`)
  182. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  183. ");
  184. if(!pdo_fieldexists('zhtc_area','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_area')." ADD
  185. `id` int(11) NOT NULL AUTO_INCREMENT");}
  186. if(!pdo_fieldexists('zhtc_area','area_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_area')." ADD `area_name` varchar(50) NOT NULL COMMENT '区域名称'");}
  187. if(!pdo_fieldexists('zhtc_area','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_area')." ADD `num` int(11) NOT NULL COMMENT '排序'");}
  188. if(!pdo_fieldexists('zhtc_area','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_area')." ADD `uniacid` int(11) NOT NULL");}
  189. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_bottom` (
  190. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  191. `title` varchar(20) NOT NULL COMMENT '标题',
  192. `title_color` varchar(20) NOT NULL COMMENT '标题选中颜色',
  193. `title_color2` varchar(20) NOT NULL COMMENT '标题未选中颜色',
  194. `logo` varchar(200) NOT NULL COMMENT '选中图片',
  195. `logo2` varchar(200) NOT NULL COMMENT '未选中图片',
  196. `url` varchar(200) NOT NULL COMMENT '跳转链接',
  197. `num` int(11) NOT NULL COMMENT '排序',
  198. `state` int(11) NOT NULL DEFAULT '1' COMMENT '1开启2关闭',
  199. `uniacid` int(11) NOT NULL,
  200. `xcx_name` varchar(50) NOT NULL COMMENT '小程序名称',
  201. `appid` varchar(30) NOT NULL COMMENT '跳转appid',
  202. `item` int(4) NOT NULL DEFAULT '1',
  203. `src2` varchar(255) NOT NULL,
  204. PRIMARY KEY (`id`)
  205. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  206. ");
  207. if(!pdo_fieldexists('zhtc_bottom','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD
  208. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  209. if(!pdo_fieldexists('zhtc_bottom','title')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `title` varchar(20) NOT NULL COMMENT '标题'");}
  210. if(!pdo_fieldexists('zhtc_bottom','title_color')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `title_color` varchar(20) NOT NULL COMMENT '标题选中颜色'");}
  211. if(!pdo_fieldexists('zhtc_bottom','title_color2')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `title_color2` varchar(20) NOT NULL COMMENT '标题未选中颜色'");}
  212. if(!pdo_fieldexists('zhtc_bottom','logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `logo` varchar(200) NOT NULL COMMENT '选中图片'");}
  213. if(!pdo_fieldexists('zhtc_bottom','logo2')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `logo2` varchar(200) NOT NULL COMMENT '未选中图片'");}
  214. if(!pdo_fieldexists('zhtc_bottom','url')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `url` varchar(200) NOT NULL COMMENT '跳转链接'");}
  215. if(!pdo_fieldexists('zhtc_bottom','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `num` int(11) NOT NULL COMMENT '排序'");}
  216. if(!pdo_fieldexists('zhtc_bottom','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `state` int(11) NOT NULL DEFAULT '1' COMMENT '1开启2关闭'");}
  217. if(!pdo_fieldexists('zhtc_bottom','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `uniacid` int(11) NOT NULL");}
  218. if(!pdo_fieldexists('zhtc_bottom','xcx_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `xcx_name` varchar(50) NOT NULL COMMENT '小程序名称'");}
  219. if(!pdo_fieldexists('zhtc_bottom','appid')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `appid` varchar(30) NOT NULL COMMENT '跳转appid'");}
  220. if(!pdo_fieldexists('zhtc_bottom','item')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `item` int(4) NOT NULL DEFAULT '1'");}
  221. if(!pdo_fieldexists('zhtc_bottom','src2')) {pdo_query("ALTER TABLE ".tablename('zhtc_bottom')." ADD `src2` varchar(255) NOT NULL");}
  222. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_call` (
  223. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  224. `post_id` int(11) NOT NULL,
  225. `type` int(11) NOT NULL COMMENT '1帖子',
  226. `money` decimal(10,2) NOT NULL COMMENT '金额',
  227. `code` varchar(100) NOT NULL,
  228. `state` int(11) NOT NULL COMMENT '1待付款2已付款',
  229. `time` int(11) NOT NULL,
  230. `uniacid` int(11) NOT NULL,
  231. `user_id` int(11) NOT NULL,
  232. `userMoney` decimal(10,2) NOT NULL,
  233. PRIMARY KEY (`id`)
  234. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  235. ");
  236. if(!pdo_fieldexists('zhtc_call','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_call')." ADD
  237. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  238. if(!pdo_fieldexists('zhtc_call','post_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_call')." ADD `post_id` int(11) NOT NULL");}
  239. if(!pdo_fieldexists('zhtc_call','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_call')." ADD `type` int(11) NOT NULL COMMENT '1帖子'");}
  240. if(!pdo_fieldexists('zhtc_call','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_call')." ADD `money` decimal(10,2) NOT NULL COMMENT '金额'");}
  241. if(!pdo_fieldexists('zhtc_call','code')) {pdo_query("ALTER TABLE ".tablename('zhtc_call')." ADD `code` varchar(100) NOT NULL");}
  242. if(!pdo_fieldexists('zhtc_call','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_call')." ADD `state` int(11) NOT NULL COMMENT '1待付款2已付款'");}
  243. if(!pdo_fieldexists('zhtc_call','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_call')." ADD `time` int(11) NOT NULL");}
  244. if(!pdo_fieldexists('zhtc_call','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_call')." ADD `uniacid` int(11) NOT NULL");}
  245. if(!pdo_fieldexists('zhtc_call','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_call')." ADD `user_id` int(11) NOT NULL");}
  246. if(!pdo_fieldexists('zhtc_call','userMoney')) {pdo_query("ALTER TABLE ".tablename('zhtc_call')." ADD `userMoney` decimal(10,2) NOT NULL");}
  247. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_car` (
  248. `id` int(11) NOT NULL AUTO_INCREMENT,
  249. `user_id` int(11) NOT NULL COMMENT '用户id',
  250. `start_place` varchar(100) NOT NULL COMMENT '出发地',
  251. `end_place` varchar(100) NOT NULL COMMENT '目的地',
  252. `start_time` varchar(30) NOT NULL COMMENT '出发时间',
  253. `num` int(4) NOT NULL COMMENT '乘车人数/可乘人数',
  254. `link_name` varchar(30) NOT NULL COMMENT '联系人',
  255. `link_tel` varchar(20) NOT NULL COMMENT '联系电话',
  256. `typename` varchar(30) NOT NULL COMMENT '分类名称',
  257. `other` varchar(300) NOT NULL COMMENT '补充',
  258. `time` int(11) NOT NULL COMMENT '发布时间',
  259. `sh_time` int(11) NOT NULL COMMENT '审核时间',
  260. `top_id` int(11) NOT NULL COMMENT '置顶ID',
  261. `top` int(4) NOT NULL COMMENT '是否置顶,1,是,2否',
  262. `uniacid` varchar(50) NOT NULL,
  263. `state` int(4) NOT NULL COMMENT '1待审核,2通过,3拒绝',
  264. `tj_place` varchar(300) NOT NULL COMMENT '途经地',
  265. `hw_wet` varchar(10) NOT NULL COMMENT '货物重量',
  266. `star_lat` varchar(20) NOT NULL COMMENT '出发地维度',
  267. `star_lng` varchar(20) NOT NULL COMMENT '出发地经度',
  268. `end_lat` varchar(20) NOT NULL COMMENT '目的地维度',
  269. `end_lng` varchar(20) NOT NULL COMMENT '目的地经度',
  270. `is_open` int(4) NOT NULL,
  271. `start_time2` int(11) NOT NULL,
  272. `cityname` varchar(50) NOT NULL,
  273. `is_delete` int(4) NOT NULL DEFAULT '2',
  274. PRIMARY KEY (`id`)
  275. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='拼车';
  276. ");
  277. if(!pdo_fieldexists('zhtc_car','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD
  278. `id` int(11) NOT NULL AUTO_INCREMENT");}
  279. if(!pdo_fieldexists('zhtc_car','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `user_id` int(11) NOT NULL COMMENT '用户id'");}
  280. if(!pdo_fieldexists('zhtc_car','start_place')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `start_place` varchar(100) NOT NULL COMMENT '出发地'");}
  281. if(!pdo_fieldexists('zhtc_car','end_place')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `end_place` varchar(100) NOT NULL COMMENT '目的地'");}
  282. if(!pdo_fieldexists('zhtc_car','start_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `start_time` varchar(30) NOT NULL COMMENT '出发时间'");}
  283. if(!pdo_fieldexists('zhtc_car','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `num` int(4) NOT NULL COMMENT '乘车人数/可乘人数'");}
  284. if(!pdo_fieldexists('zhtc_car','link_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `link_name` varchar(30) NOT NULL COMMENT '联系人'");}
  285. if(!pdo_fieldexists('zhtc_car','link_tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `link_tel` varchar(20) NOT NULL COMMENT '联系电话'");}
  286. if(!pdo_fieldexists('zhtc_car','typename')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `typename` varchar(30) NOT NULL COMMENT '分类名称'");}
  287. if(!pdo_fieldexists('zhtc_car','other')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `other` varchar(300) NOT NULL COMMENT '补充'");}
  288. if(!pdo_fieldexists('zhtc_car','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `time` int(11) NOT NULL COMMENT '发布时间'");}
  289. if(!pdo_fieldexists('zhtc_car','sh_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `sh_time` int(11) NOT NULL COMMENT '审核时间'");}
  290. if(!pdo_fieldexists('zhtc_car','top_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `top_id` int(11) NOT NULL COMMENT '置顶ID'");}
  291. if(!pdo_fieldexists('zhtc_car','top')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `top` int(4) NOT NULL COMMENT '是否置顶,1,是,2否'");}
  292. if(!pdo_fieldexists('zhtc_car','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `uniacid` varchar(50) NOT NULL");}
  293. if(!pdo_fieldexists('zhtc_car','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `state` int(4) NOT NULL COMMENT '1待审核,2通过,3拒绝'");}
  294. if(!pdo_fieldexists('zhtc_car','tj_place')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `tj_place` varchar(300) NOT NULL COMMENT '途经地'");}
  295. if(!pdo_fieldexists('zhtc_car','hw_wet')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `hw_wet` varchar(10) NOT NULL COMMENT '货物重量'");}
  296. if(!pdo_fieldexists('zhtc_car','star_lat')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `star_lat` varchar(20) NOT NULL COMMENT '出发地维度'");}
  297. if(!pdo_fieldexists('zhtc_car','star_lng')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `star_lng` varchar(20) NOT NULL COMMENT '出发地经度'");}
  298. if(!pdo_fieldexists('zhtc_car','end_lat')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `end_lat` varchar(20) NOT NULL COMMENT '目的地维度'");}
  299. if(!pdo_fieldexists('zhtc_car','end_lng')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `end_lng` varchar(20) NOT NULL COMMENT '目的地经度'");}
  300. if(!pdo_fieldexists('zhtc_car','is_open')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `is_open` int(4) NOT NULL");}
  301. if(!pdo_fieldexists('zhtc_car','start_time2')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `start_time2` int(11) NOT NULL");}
  302. if(!pdo_fieldexists('zhtc_car','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `cityname` varchar(50) NOT NULL");}
  303. if(!pdo_fieldexists('zhtc_car','is_delete')) {pdo_query("ALTER TABLE ".tablename('zhtc_car')." ADD `is_delete` int(4) NOT NULL DEFAULT '2'");}
  304. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_car_my_tag` (
  305. `id` int(11) NOT NULL AUTO_INCREMENT,
  306. `tag_id` int(11) NOT NULL COMMENT '标签id',
  307. `car_id` int(11) NOT NULL COMMENT '拼车ID',
  308. PRIMARY KEY (`id`)
  309. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  310. ");
  311. if(!pdo_fieldexists('zhtc_car_my_tag','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_car_my_tag')." ADD
  312. `id` int(11) NOT NULL AUTO_INCREMENT");}
  313. if(!pdo_fieldexists('zhtc_car_my_tag','tag_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_car_my_tag')." ADD `tag_id` int(11) NOT NULL COMMENT '标签id'");}
  314. if(!pdo_fieldexists('zhtc_car_my_tag','car_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_car_my_tag')." ADD `car_id` int(11) NOT NULL COMMENT '拼车ID'");}
  315. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_car_tag` (
  316. `id` int(11) NOT NULL AUTO_INCREMENT,
  317. `typename` varchar(30) NOT NULL COMMENT '分类名称',
  318. `tagname` varchar(30) NOT NULL COMMENT '标签名称',
  319. `uniacid` varchar(11) NOT NULL COMMENT '50',
  320. PRIMARY KEY (`id`)
  321. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  322. ");
  323. if(!pdo_fieldexists('zhtc_car_tag','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_car_tag')." ADD
  324. `id` int(11) NOT NULL AUTO_INCREMENT");}
  325. if(!pdo_fieldexists('zhtc_car_tag','typename')) {pdo_query("ALTER TABLE ".tablename('zhtc_car_tag')." ADD `typename` varchar(30) NOT NULL COMMENT '分类名称'");}
  326. if(!pdo_fieldexists('zhtc_car_tag','tagname')) {pdo_query("ALTER TABLE ".tablename('zhtc_car_tag')." ADD `tagname` varchar(30) NOT NULL COMMENT '标签名称'");}
  327. if(!pdo_fieldexists('zhtc_car_tag','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_car_tag')." ADD `uniacid` varchar(11) NOT NULL COMMENT '50'");}
  328. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_car_top` (
  329. `id` int(11) NOT NULL AUTO_INCREMENT,
  330. `type` int(11) NOT NULL COMMENT '1.一天2.一周3.一个月',
  331. `money` decimal(10,2) NOT NULL COMMENT '价格',
  332. `uniacid` int(11) NOT NULL,
  333. `num` int(11) NOT NULL,
  334. PRIMARY KEY (`id`)
  335. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='拼车置顶';
  336. ");
  337. if(!pdo_fieldexists('zhtc_car_top','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_car_top')." ADD
  338. `id` int(11) NOT NULL AUTO_INCREMENT");}
  339. if(!pdo_fieldexists('zhtc_car_top','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_car_top')." ADD `type` int(11) NOT NULL COMMENT '1.一天2.一周3.一个月'");}
  340. if(!pdo_fieldexists('zhtc_car_top','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_car_top')." ADD `money` decimal(10,2) NOT NULL COMMENT '价格'");}
  341. if(!pdo_fieldexists('zhtc_car_top','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_car_top')." ADD `uniacid` int(11) NOT NULL");}
  342. if(!pdo_fieldexists('zhtc_car_top','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_car_top')." ADD `num` int(11) NOT NULL");}
  343. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_carpaylog` (
  344. `id` int(11) NOT NULL AUTO_INCREMENT,
  345. `car_id` int(44) NOT NULL COMMENT '拼车id',
  346. `money` decimal(10,2) NOT NULL COMMENT '钱',
  347. `time` datetime NOT NULL,
  348. `uniacid` varchar(50) NOT NULL,
  349. PRIMARY KEY (`id`)
  350. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='拼车支付记录表';
  351. ");
  352. if(!pdo_fieldexists('zhtc_carpaylog','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_carpaylog')." ADD
  353. `id` int(11) NOT NULL AUTO_INCREMENT");}
  354. if(!pdo_fieldexists('zhtc_carpaylog','car_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_carpaylog')." ADD `car_id` int(44) NOT NULL COMMENT '拼车id'");}
  355. if(!pdo_fieldexists('zhtc_carpaylog','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_carpaylog')." ADD `money` decimal(10,2) NOT NULL COMMENT '钱'");}
  356. if(!pdo_fieldexists('zhtc_carpaylog','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_carpaylog')." ADD `time` datetime NOT NULL");}
  357. if(!pdo_fieldexists('zhtc_carpaylog','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_carpaylog')." ADD `uniacid` varchar(50) NOT NULL");}
  358. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_comments` (
  359. `id` int(11) NOT NULL AUTO_INCREMENT,
  360. `information_id` int(11) NOT NULL COMMENT '帖子id',
  361. `details` varchar(200) NOT NULL COMMENT '评论详情',
  362. `time` varchar(20) NOT NULL COMMENT '时间',
  363. `reply` varchar(200) NOT NULL COMMENT '回复详情',
  364. `hf_time` varchar(20) NOT NULL COMMENT '回复时间',
  365. `user_id` int(11) NOT NULL,
  366. `store_id` int(11) NOT NULL,
  367. `score` decimal(10,1) NOT NULL,
  368. `bid` int(11) NOT NULL,
  369. `hf_id` int(11) NOT NULL,
  370. `state` int(1) NOT NULL DEFAULT '2',
  371. PRIMARY KEY (`id`)
  372. ) ENGINE=InnoDB AUTO_INCREMENT=240 DEFAULT CHARSET=utf8;
  373. ");
  374. if(!pdo_fieldexists('zhtc_comments','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_comments')." ADD
  375. `id` int(11) NOT NULL AUTO_INCREMENT");}
  376. if(!pdo_fieldexists('zhtc_comments','information_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_comments')." ADD `information_id` int(11) NOT NULL COMMENT '帖子id'");}
  377. if(!pdo_fieldexists('zhtc_comments','details')) {pdo_query("ALTER TABLE ".tablename('zhtc_comments')." ADD `details` varchar(200) NOT NULL COMMENT '评论详情'");}
  378. if(!pdo_fieldexists('zhtc_comments','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_comments')." ADD `time` varchar(20) NOT NULL COMMENT '时间'");}
  379. if(!pdo_fieldexists('zhtc_comments','reply')) {pdo_query("ALTER TABLE ".tablename('zhtc_comments')." ADD `reply` varchar(200) NOT NULL COMMENT '回复详情'");}
  380. if(!pdo_fieldexists('zhtc_comments','hf_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_comments')." ADD `hf_time` varchar(20) NOT NULL COMMENT '回复时间'");}
  381. if(!pdo_fieldexists('zhtc_comments','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_comments')." ADD `user_id` int(11) NOT NULL");}
  382. if(!pdo_fieldexists('zhtc_comments','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_comments')." ADD `store_id` int(11) NOT NULL");}
  383. if(!pdo_fieldexists('zhtc_comments','score')) {pdo_query("ALTER TABLE ".tablename('zhtc_comments')." ADD `score` decimal(10,1) NOT NULL");}
  384. if(!pdo_fieldexists('zhtc_comments','bid')) {pdo_query("ALTER TABLE ".tablename('zhtc_comments')." ADD `bid` int(11) NOT NULL");}
  385. if(!pdo_fieldexists('zhtc_comments','hf_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_comments')." ADD `hf_id` int(11) NOT NULL");}
  386. if(!pdo_fieldexists('zhtc_comments','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_comments')." ADD `state` int(1) NOT NULL DEFAULT '2'");}
  387. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_commission_withdrawal` (
  388. `id` int(11) NOT NULL AUTO_INCREMENT,
  389. `user_id` int(11) NOT NULL,
  390. `type` int(11) NOT NULL COMMENT '1.支付宝2.银行卡',
  391. `state` int(11) NOT NULL COMMENT '1.审核中2.通过3.拒绝',
  392. `time` int(11) NOT NULL COMMENT '申请时间',
  393. `sh_time` int(11) NOT NULL COMMENT '审核时间',
  394. `uniacid` int(11) NOT NULL,
  395. `user_name` varchar(20) NOT NULL,
  396. `account` varchar(100) NOT NULL,
  397. `tx_cost` decimal(10,2) NOT NULL COMMENT '提现金额',
  398. `sj_cost` decimal(10,2) NOT NULL COMMENT '实际到账金额',
  399. `bank` varchar(20) NOT NULL,
  400. PRIMARY KEY (`id`)
  401. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='佣金提现';
  402. ");
  403. if(!pdo_fieldexists('zhtc_commission_withdrawal','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_commission_withdrawal')." ADD
  404. `id` int(11) NOT NULL AUTO_INCREMENT");}
  405. if(!pdo_fieldexists('zhtc_commission_withdrawal','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_commission_withdrawal')." ADD `user_id` int(11) NOT NULL");}
  406. if(!pdo_fieldexists('zhtc_commission_withdrawal','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_commission_withdrawal')." ADD `type` int(11) NOT NULL COMMENT '1.支付宝2.银行卡'");}
  407. if(!pdo_fieldexists('zhtc_commission_withdrawal','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_commission_withdrawal')." ADD `state` int(11) NOT NULL COMMENT '1.审核中2.通过3.拒绝'");}
  408. if(!pdo_fieldexists('zhtc_commission_withdrawal','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_commission_withdrawal')." ADD `time` int(11) NOT NULL COMMENT '申请时间'");}
  409. if(!pdo_fieldexists('zhtc_commission_withdrawal','sh_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_commission_withdrawal')." ADD `sh_time` int(11) NOT NULL COMMENT '审核时间'");}
  410. if(!pdo_fieldexists('zhtc_commission_withdrawal','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_commission_withdrawal')." ADD `uniacid` int(11) NOT NULL");}
  411. if(!pdo_fieldexists('zhtc_commission_withdrawal','user_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_commission_withdrawal')." ADD `user_name` varchar(20) NOT NULL");}
  412. if(!pdo_fieldexists('zhtc_commission_withdrawal','account')) {pdo_query("ALTER TABLE ".tablename('zhtc_commission_withdrawal')." ADD `account` varchar(100) NOT NULL");}
  413. if(!pdo_fieldexists('zhtc_commission_withdrawal','tx_cost')) {pdo_query("ALTER TABLE ".tablename('zhtc_commission_withdrawal')." ADD `tx_cost` decimal(10,2) NOT NULL COMMENT '提现金额'");}
  414. if(!pdo_fieldexists('zhtc_commission_withdrawal','sj_cost')) {pdo_query("ALTER TABLE ".tablename('zhtc_commission_withdrawal')." ADD `sj_cost` decimal(10,2) NOT NULL COMMENT '实际到账金额'");}
  415. if(!pdo_fieldexists('zhtc_commission_withdrawal','bank')) {pdo_query("ALTER TABLE ".tablename('zhtc_commission_withdrawal')." ADD `bank` varchar(20) NOT NULL");}
  416. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_continuous` (
  417. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  418. `day` int(11) NOT NULL COMMENT '天数',
  419. `integral` int(11) NOT NULL COMMENT '积分',
  420. `uniacid` int(11) NOT NULL,
  421. PRIMARY KEY (`id`)
  422. ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
  423. ");
  424. if(!pdo_fieldexists('zhtc_continuous','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_continuous')." ADD
  425. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  426. if(!pdo_fieldexists('zhtc_continuous','day')) {pdo_query("ALTER TABLE ".tablename('zhtc_continuous')." ADD `day` int(11) NOT NULL COMMENT '天数'");}
  427. if(!pdo_fieldexists('zhtc_continuous','integral')) {pdo_query("ALTER TABLE ".tablename('zhtc_continuous')." ADD `integral` int(11) NOT NULL COMMENT '积分'");}
  428. if(!pdo_fieldexists('zhtc_continuous','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_continuous')." ADD `uniacid` int(11) NOT NULL");}
  429. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_coupons` (
  430. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  431. `name` varchar(20) NOT NULL,
  432. `number` int(11) NOT NULL,
  433. `full` varchar(20) NOT NULL,
  434. `reduce` decimal(10,1) NOT NULL COMMENT '减',
  435. `money` decimal(10,2) NOT NULL,
  436. `time` varchar(20) NOT NULL,
  437. `details` text NOT NULL COMMENT '使用说明',
  438. `surplus` int(11) NOT NULL COMMENT '剩余数量',
  439. `store_id` int(11) NOT NULL,
  440. `end_time` varchar(20) NOT NULL,
  441. `img` text NOT NULL,
  442. `is_show` int(11) NOT NULL DEFAULT '1',
  443. `state` int(11) NOT NULL DEFAULT '1',
  444. `del` int(11) NOT NULL DEFAULT '2',
  445. `type_id` int(11) NOT NULL DEFAULT '1',
  446. `is_pt` int(11) NOT NULL DEFAULT '1',
  447. `cityname` varchar(30) NOT NULL,
  448. PRIMARY KEY (`id`)
  449. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  450. ");
  451. if(!pdo_fieldexists('zhtc_coupons','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD
  452. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  453. if(!pdo_fieldexists('zhtc_coupons','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `name` varchar(20) NOT NULL");}
  454. if(!pdo_fieldexists('zhtc_coupons','number')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `number` int(11) NOT NULL");}
  455. if(!pdo_fieldexists('zhtc_coupons','full')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `full` varchar(20) NOT NULL");}
  456. if(!pdo_fieldexists('zhtc_coupons','reduce')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `reduce` decimal(10,1) NOT NULL COMMENT '减'");}
  457. if(!pdo_fieldexists('zhtc_coupons','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `money` decimal(10,2) NOT NULL");}
  458. if(!pdo_fieldexists('zhtc_coupons','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `time` varchar(20) NOT NULL");}
  459. if(!pdo_fieldexists('zhtc_coupons','details')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `details` text NOT NULL COMMENT '使用说明'");}
  460. if(!pdo_fieldexists('zhtc_coupons','surplus')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `surplus` int(11) NOT NULL COMMENT '剩余数量'");}
  461. if(!pdo_fieldexists('zhtc_coupons','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `store_id` int(11) NOT NULL");}
  462. if(!pdo_fieldexists('zhtc_coupons','end_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `end_time` varchar(20) NOT NULL");}
  463. if(!pdo_fieldexists('zhtc_coupons','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `img` text NOT NULL");}
  464. if(!pdo_fieldexists('zhtc_coupons','is_show')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `is_show` int(11) NOT NULL DEFAULT '1'");}
  465. if(!pdo_fieldexists('zhtc_coupons','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `state` int(11) NOT NULL DEFAULT '1'");}
  466. if(!pdo_fieldexists('zhtc_coupons','del')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `del` int(11) NOT NULL DEFAULT '2'");}
  467. if(!pdo_fieldexists('zhtc_coupons','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `type_id` int(11) NOT NULL DEFAULT '1'");}
  468. if(!pdo_fieldexists('zhtc_coupons','is_pt')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `is_pt` int(11) NOT NULL DEFAULT '1'");}
  469. if(!pdo_fieldexists('zhtc_coupons','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupons')." ADD `cityname` varchar(30) NOT NULL");}
  470. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_coupontype` (
  471. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  472. `type_name` varchar(20) NOT NULL COMMENT '分类名称',
  473. `img` varchar(500) NOT NULL,
  474. `uniacid` int(11) NOT NULL COMMENT '小程序id',
  475. `num` int(11) NOT NULL,
  476. `state` int(4) NOT NULL DEFAULT '1',
  477. PRIMARY KEY (`id`)
  478. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  479. ");
  480. if(!pdo_fieldexists('zhtc_coupontype','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupontype')." ADD
  481. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  482. if(!pdo_fieldexists('zhtc_coupontype','type_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupontype')." ADD `type_name` varchar(20) NOT NULL COMMENT '分类名称'");}
  483. if(!pdo_fieldexists('zhtc_coupontype','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupontype')." ADD `img` varchar(500) NOT NULL");}
  484. if(!pdo_fieldexists('zhtc_coupontype','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupontype')." ADD `uniacid` int(11) NOT NULL COMMENT '小程序id'");}
  485. if(!pdo_fieldexists('zhtc_coupontype','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupontype')." ADD `num` int(11) NOT NULL");}
  486. if(!pdo_fieldexists('zhtc_coupontype','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_coupontype')." ADD `state` int(4) NOT NULL DEFAULT '1'");}
  487. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_distribution` (
  488. `id` int(11) NOT NULL AUTO_INCREMENT,
  489. `user_id` int(11) NOT NULL,
  490. `time` int(11) NOT NULL,
  491. `user_name` varchar(20) NOT NULL,
  492. `user_tel` varchar(20) NOT NULL,
  493. `state` int(11) NOT NULL COMMENT '1.审核中2.通过3.拒绝',
  494. `uniacid` int(11) NOT NULL,
  495. `money` decimal(10,2) NOT NULL,
  496. `pay_state` int(11) NOT NULL,
  497. `code` varchar(50) NOT NULL,
  498. `level` int(11) NOT NULL,
  499. `cityname` varchar(20) NOT NULL,
  500. `is_log` int(11) NOT NULL DEFAULT '1',
  501. PRIMARY KEY (`id`)
  502. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='分销申请';
  503. ");
  504. if(!pdo_fieldexists('zhtc_distribution','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD
  505. `id` int(11) NOT NULL AUTO_INCREMENT");}
  506. if(!pdo_fieldexists('zhtc_distribution','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD `user_id` int(11) NOT NULL");}
  507. if(!pdo_fieldexists('zhtc_distribution','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD `time` int(11) NOT NULL");}
  508. if(!pdo_fieldexists('zhtc_distribution','user_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD `user_name` varchar(20) NOT NULL");}
  509. if(!pdo_fieldexists('zhtc_distribution','user_tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD `user_tel` varchar(20) NOT NULL");}
  510. if(!pdo_fieldexists('zhtc_distribution','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD `state` int(11) NOT NULL COMMENT '1.审核中2.通过3.拒绝'");}
  511. if(!pdo_fieldexists('zhtc_distribution','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD `uniacid` int(11) NOT NULL");}
  512. if(!pdo_fieldexists('zhtc_distribution','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD `money` decimal(10,2) NOT NULL");}
  513. if(!pdo_fieldexists('zhtc_distribution','pay_state')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD `pay_state` int(11) NOT NULL");}
  514. if(!pdo_fieldexists('zhtc_distribution','code')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD `code` varchar(50) NOT NULL");}
  515. if(!pdo_fieldexists('zhtc_distribution','level')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD `level` int(11) NOT NULL");}
  516. if(!pdo_fieldexists('zhtc_distribution','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD `cityname` varchar(20) NOT NULL");}
  517. if(!pdo_fieldexists('zhtc_distribution','is_log')) {pdo_query("ALTER TABLE ".tablename('zhtc_distribution')." ADD `is_log` int(11) NOT NULL DEFAULT '1'");}
  518. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_dmorder` (
  519. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  520. `user_id` int(11) NOT NULL,
  521. `money` decimal(10,2) NOT NULL,
  522. `store_id` int(11) NOT NULL,
  523. `code` varchar(100) NOT NULL,
  524. `state` int(11) NOT NULL,
  525. `time` varchar(20) NOT NULL,
  526. `uniacid` int(11) NOT NULL,
  527. PRIMARY KEY (`id`)
  528. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  529. ");
  530. if(!pdo_fieldexists('zhtc_dmorder','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_dmorder')." ADD
  531. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  532. if(!pdo_fieldexists('zhtc_dmorder','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_dmorder')." ADD `user_id` int(11) NOT NULL");}
  533. if(!pdo_fieldexists('zhtc_dmorder','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_dmorder')." ADD `money` decimal(10,2) NOT NULL");}
  534. if(!pdo_fieldexists('zhtc_dmorder','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_dmorder')." ADD `store_id` int(11) NOT NULL");}
  535. if(!pdo_fieldexists('zhtc_dmorder','code')) {pdo_query("ALTER TABLE ".tablename('zhtc_dmorder')." ADD `code` varchar(100) NOT NULL");}
  536. if(!pdo_fieldexists('zhtc_dmorder','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_dmorder')." ADD `state` int(11) NOT NULL");}
  537. if(!pdo_fieldexists('zhtc_dmorder','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_dmorder')." ADD `time` varchar(20) NOT NULL");}
  538. if(!pdo_fieldexists('zhtc_dmorder','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_dmorder')." ADD `uniacid` int(11) NOT NULL");}
  539. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_earnings` (
  540. `id` int(11) NOT NULL AUTO_INCREMENT,
  541. `user_id` int(11) NOT NULL,
  542. `son_id` int(11) NOT NULL COMMENT '下线',
  543. `money` decimal(10,2) NOT NULL,
  544. `time` int(11) NOT NULL,
  545. `uniacid` int(11) NOT NULL,
  546. PRIMARY KEY (`id`)
  547. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='佣金收益表';
  548. ");
  549. if(!pdo_fieldexists('zhtc_earnings','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_earnings')." ADD
  550. `id` int(11) NOT NULL AUTO_INCREMENT");}
  551. if(!pdo_fieldexists('zhtc_earnings','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_earnings')." ADD `user_id` int(11) NOT NULL");}
  552. if(!pdo_fieldexists('zhtc_earnings','son_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_earnings')." ADD `son_id` int(11) NOT NULL COMMENT '下线'");}
  553. if(!pdo_fieldexists('zhtc_earnings','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_earnings')." ADD `money` decimal(10,2) NOT NULL");}
  554. if(!pdo_fieldexists('zhtc_earnings','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_earnings')." ADD `time` int(11) NOT NULL");}
  555. if(!pdo_fieldexists('zhtc_earnings','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_earnings')." ADD `uniacid` int(11) NOT NULL");}
  556. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_fx` (
  557. `id` int(11) NOT NULL AUTO_INCREMENT,
  558. `user_id` int(11) NOT NULL COMMENT '用户ID',
  559. `zf_user_id` int(11) NOT NULL COMMENT '转发人ID',
  560. `money` decimal(10,2) NOT NULL COMMENT '金额',
  561. `time` int(11) NOT NULL COMMENT '时间戳',
  562. `uniacid` varchar(50) NOT NULL,
  563. PRIMARY KEY (`id`)
  564. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分销表';
  565. ");
  566. if(!pdo_fieldexists('zhtc_fx','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_fx')." ADD
  567. `id` int(11) NOT NULL AUTO_INCREMENT");}
  568. if(!pdo_fieldexists('zhtc_fx','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_fx')." ADD `user_id` int(11) NOT NULL COMMENT '用户ID'");}
  569. if(!pdo_fieldexists('zhtc_fx','zf_user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_fx')." ADD `zf_user_id` int(11) NOT NULL COMMENT '转发人ID'");}
  570. if(!pdo_fieldexists('zhtc_fx','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_fx')." ADD `money` decimal(10,2) NOT NULL COMMENT '金额'");}
  571. if(!pdo_fieldexists('zhtc_fx','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_fx')." ADD `time` int(11) NOT NULL COMMENT '时间戳'");}
  572. if(!pdo_fieldexists('zhtc_fx','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_fx')." ADD `uniacid` varchar(50) NOT NULL");}
  573. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_fxlevel` (
  574. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  575. `money` decimal(10,2) NOT NULL,
  576. `name` varchar(20) NOT NULL,
  577. `num` int(11) NOT NULL,
  578. `uniacid` int(11) NOT NULL,
  579. `commission` int(11) NOT NULL COMMENT '1级佣金比例',
  580. `commission2` int(11) NOT NULL COMMENT '2级佣金比例',
  581. PRIMARY KEY (`id`)
  582. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
  583. ");
  584. if(!pdo_fieldexists('zhtc_fxlevel','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlevel')." ADD
  585. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  586. if(!pdo_fieldexists('zhtc_fxlevel','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlevel')." ADD `money` decimal(10,2) NOT NULL");}
  587. if(!pdo_fieldexists('zhtc_fxlevel','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlevel')." ADD `name` varchar(20) NOT NULL");}
  588. if(!pdo_fieldexists('zhtc_fxlevel','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlevel')." ADD `num` int(11) NOT NULL");}
  589. if(!pdo_fieldexists('zhtc_fxlevel','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlevel')." ADD `uniacid` int(11) NOT NULL");}
  590. if(!pdo_fieldexists('zhtc_fxlevel','commission')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlevel')." ADD `commission` int(11) NOT NULL COMMENT '1级佣金比例'");}
  591. if(!pdo_fieldexists('zhtc_fxlevel','commission2')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlevel')." ADD `commission2` int(11) NOT NULL COMMENT '2级佣金比例'");}
  592. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_fxlog` (
  593. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  594. `user_id` int(11) NOT NULL,
  595. `money` decimal(10,2) NOT NULL,
  596. `time` varchar(20) NOT NULL,
  597. `code` varchar(100) NOT NULL,
  598. `level` int(11) NOT NULL,
  599. `note` varchar(20) NOT NULL,
  600. `uniacid` int(11) NOT NULL,
  601. `state` int(11) NOT NULL DEFAULT '1' COMMENT '1.待支付2.已支付',
  602. PRIMARY KEY (`id`)
  603. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  604. ");
  605. if(!pdo_fieldexists('zhtc_fxlog','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlog')." ADD
  606. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  607. if(!pdo_fieldexists('zhtc_fxlog','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlog')." ADD `user_id` int(11) NOT NULL");}
  608. if(!pdo_fieldexists('zhtc_fxlog','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlog')." ADD `money` decimal(10,2) NOT NULL");}
  609. if(!pdo_fieldexists('zhtc_fxlog','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlog')." ADD `time` varchar(20) NOT NULL");}
  610. if(!pdo_fieldexists('zhtc_fxlog','code')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlog')." ADD `code` varchar(100) NOT NULL");}
  611. if(!pdo_fieldexists('zhtc_fxlog','level')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlog')." ADD `level` int(11) NOT NULL");}
  612. if(!pdo_fieldexists('zhtc_fxlog','note')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlog')." ADD `note` varchar(20) NOT NULL");}
  613. if(!pdo_fieldexists('zhtc_fxlog','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlog')." ADD `uniacid` int(11) NOT NULL");}
  614. if(!pdo_fieldexists('zhtc_fxlog','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxlog')." ADD `state` int(11) NOT NULL DEFAULT '1' COMMENT '1.待支付2.已支付'");}
  615. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_fxset` (
  616. `id` int(11) NOT NULL AUTO_INCREMENT,
  617. `fx_details` text NOT NULL COMMENT '分销商申请协议',
  618. `tx_details` text NOT NULL COMMENT '佣金提现协议',
  619. `is_fx` int(11) NOT NULL COMMENT '1.开启分销审核2.不开启',
  620. `is_ej` int(11) NOT NULL COMMENT '是否开启二级分销1.是2.否',
  621. `tx_rate` int(11) NOT NULL COMMENT '提现手续费',
  622. `commission` varchar(10) NOT NULL COMMENT '一级佣金',
  623. `commission2` varchar(10) NOT NULL COMMENT '二级佣金',
  624. `tx_money` int(11) NOT NULL COMMENT '提现门槛',
  625. `img` varchar(100) NOT NULL COMMENT '分销中心图片',
  626. `img2` varchar(100) NOT NULL COMMENT '申请分销图片',
  627. `uniacid` int(11) NOT NULL,
  628. `is_open` int(11) NOT NULL DEFAULT '1' COMMENT '1.开启2关闭',
  629. `instructions` text NOT NULL COMMENT '分销商说明',
  630. PRIMARY KEY (`id`)
  631. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  632. ");
  633. if(!pdo_fieldexists('zhtc_fxset','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD
  634. `id` int(11) NOT NULL AUTO_INCREMENT");}
  635. if(!pdo_fieldexists('zhtc_fxset','fx_details')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `fx_details` text NOT NULL COMMENT '分销商申请协议'");}
  636. if(!pdo_fieldexists('zhtc_fxset','tx_details')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `tx_details` text NOT NULL COMMENT '佣金提现协议'");}
  637. if(!pdo_fieldexists('zhtc_fxset','is_fx')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `is_fx` int(11) NOT NULL COMMENT '1.开启分销审核2.不开启'");}
  638. if(!pdo_fieldexists('zhtc_fxset','is_ej')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `is_ej` int(11) NOT NULL COMMENT '是否开启二级分销1.是2.否'");}
  639. if(!pdo_fieldexists('zhtc_fxset','tx_rate')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `tx_rate` int(11) NOT NULL COMMENT '提现手续费'");}
  640. if(!pdo_fieldexists('zhtc_fxset','commission')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `commission` varchar(10) NOT NULL COMMENT '一级佣金'");}
  641. if(!pdo_fieldexists('zhtc_fxset','commission2')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `commission2` varchar(10) NOT NULL COMMENT '二级佣金'");}
  642. if(!pdo_fieldexists('zhtc_fxset','tx_money')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `tx_money` int(11) NOT NULL COMMENT '提现门槛'");}
  643. if(!pdo_fieldexists('zhtc_fxset','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `img` varchar(100) NOT NULL COMMENT '分销中心图片'");}
  644. if(!pdo_fieldexists('zhtc_fxset','img2')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `img2` varchar(100) NOT NULL COMMENT '申请分销图片'");}
  645. if(!pdo_fieldexists('zhtc_fxset','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `uniacid` int(11) NOT NULL");}
  646. if(!pdo_fieldexists('zhtc_fxset','is_open')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `is_open` int(11) NOT NULL DEFAULT '1' COMMENT '1.开启2关闭'");}
  647. if(!pdo_fieldexists('zhtc_fxset','instructions')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxset')." ADD `instructions` text NOT NULL COMMENT '分销商说明'");}
  648. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_fxuser` (
  649. `id` int(11) NOT NULL AUTO_INCREMENT,
  650. `user_id` int(11) NOT NULL COMMENT '一级分销',
  651. `fx_user` int(11) NOT NULL COMMENT '二级分销',
  652. `time` int(11) NOT NULL,
  653. PRIMARY KEY (`id`)
  654. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
  655. ");
  656. if(!pdo_fieldexists('zhtc_fxuser','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxuser')." ADD
  657. `id` int(11) NOT NULL AUTO_INCREMENT");}
  658. if(!pdo_fieldexists('zhtc_fxuser','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxuser')." ADD `user_id` int(11) NOT NULL COMMENT '一级分销'");}
  659. if(!pdo_fieldexists('zhtc_fxuser','fx_user')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxuser')." ADD `fx_user` int(11) NOT NULL COMMENT '二级分销'");}
  660. if(!pdo_fieldexists('zhtc_fxuser','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_fxuser')." ADD `time` int(11) NOT NULL");}
  661. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_goods` (
  662. `id` int(11) NOT NULL AUTO_INCREMENT,
  663. `store_id` int(11) NOT NULL COMMENT '商家ID',
  664. `spec_id` int(11) NOT NULL COMMENT '主规格ID',
  665. `goods_name` varchar(100) NOT NULL COMMENT '商品名称',
  666. `goods_num` int(11) NOT NULL COMMENT '商品数量',
  667. `goods_cost` decimal(10,2) NOT NULL,
  668. `freight` decimal(10,2) NOT NULL COMMENT '运费',
  669. `delivery` varchar(500) NOT NULL COMMENT '关于发货',
  670. `quality` int(4) NOT NULL COMMENT '正品1是,0否',
  671. `free` int(4) NOT NULL COMMENT '包邮1是,0否',
  672. `all_day` int(4) NOT NULL COMMENT '24小时发货1是,0否',
  673. `service` int(4) NOT NULL COMMENT '售后服务1是,0否',
  674. `refund` int(4) NOT NULL COMMENT '极速退款1是,0否',
  675. `weeks` int(4) NOT NULL COMMENT '7天包邮1是,0否',
  676. `lb_imgs` varchar(500) NOT NULL COMMENT '轮播图',
  677. `imgs` varchar(500) NOT NULL COMMENT '商品介绍图',
  678. `time` int(11) NOT NULL COMMENT '时间',
  679. `uniacid` varchar(50) NOT NULL,
  680. `goods_details` text NOT NULL COMMENT '商品详细',
  681. `state` int(4) NOT NULL COMMENT '1待审核,2通过,3拒绝',
  682. `sy_num` int(11) NOT NULL COMMENT '剩余数量',
  683. `is_show` int(11) NOT NULL DEFAULT '1',
  684. `sales` int(11) NOT NULL,
  685. `is_xs` int(11) NOT NULL DEFAULT '2',
  686. `end_time` varchar(20) NOT NULL,
  687. `vr` varchar(500) NOT NULL,
  688. PRIMARY KEY (`id`)
  689. ) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COMMENT='商品表';
  690. ");
  691. if(!pdo_fieldexists('zhtc_goods','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD
  692. `id` int(11) NOT NULL AUTO_INCREMENT");}
  693. if(!pdo_fieldexists('zhtc_goods','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `store_id` int(11) NOT NULL COMMENT '商家ID'");}
  694. if(!pdo_fieldexists('zhtc_goods','spec_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `spec_id` int(11) NOT NULL COMMENT '主规格ID'");}
  695. if(!pdo_fieldexists('zhtc_goods','goods_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `goods_name` varchar(100) NOT NULL COMMENT '商品名称'");}
  696. if(!pdo_fieldexists('zhtc_goods','goods_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `goods_num` int(11) NOT NULL COMMENT '商品数量'");}
  697. if(!pdo_fieldexists('zhtc_goods','goods_cost')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `goods_cost` decimal(10,2) NOT NULL");}
  698. if(!pdo_fieldexists('zhtc_goods','freight')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `freight` decimal(10,2) NOT NULL COMMENT '运费'");}
  699. if(!pdo_fieldexists('zhtc_goods','delivery')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `delivery` varchar(500) NOT NULL COMMENT '关于发货'");}
  700. if(!pdo_fieldexists('zhtc_goods','quality')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `quality` int(4) NOT NULL COMMENT '正品1是,0否'");}
  701. if(!pdo_fieldexists('zhtc_goods','free')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `free` int(4) NOT NULL COMMENT '包邮1是,0否'");}
  702. if(!pdo_fieldexists('zhtc_goods','all_day')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `all_day` int(4) NOT NULL COMMENT '24小时发货1是,0否'");}
  703. if(!pdo_fieldexists('zhtc_goods','service')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `service` int(4) NOT NULL COMMENT '售后服务1是,0否'");}
  704. if(!pdo_fieldexists('zhtc_goods','refund')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `refund` int(4) NOT NULL COMMENT '极速退款1是,0否'");}
  705. if(!pdo_fieldexists('zhtc_goods','weeks')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `weeks` int(4) NOT NULL COMMENT '7天包邮1是,0否'");}
  706. if(!pdo_fieldexists('zhtc_goods','lb_imgs')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `lb_imgs` varchar(500) NOT NULL COMMENT '轮播图'");}
  707. if(!pdo_fieldexists('zhtc_goods','imgs')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `imgs` varchar(500) NOT NULL COMMENT '商品介绍图'");}
  708. if(!pdo_fieldexists('zhtc_goods','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `time` int(11) NOT NULL COMMENT '时间'");}
  709. if(!pdo_fieldexists('zhtc_goods','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `uniacid` varchar(50) NOT NULL");}
  710. if(!pdo_fieldexists('zhtc_goods','goods_details')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `goods_details` text NOT NULL COMMENT '商品详细'");}
  711. if(!pdo_fieldexists('zhtc_goods','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `state` int(4) NOT NULL COMMENT '1待审核,2通过,3拒绝'");}
  712. if(!pdo_fieldexists('zhtc_goods','sy_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `sy_num` int(11) NOT NULL COMMENT '剩余数量'");}
  713. if(!pdo_fieldexists('zhtc_goods','is_show')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `is_show` int(11) NOT NULL DEFAULT '1'");}
  714. if(!pdo_fieldexists('zhtc_goods','sales')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `sales` int(11) NOT NULL");}
  715. if(!pdo_fieldexists('zhtc_goods','is_xs')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `is_xs` int(11) NOT NULL DEFAULT '2'");}
  716. if(!pdo_fieldexists('zhtc_goods','end_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `end_time` varchar(20) NOT NULL");}
  717. if(!pdo_fieldexists('zhtc_goods','vr')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods')." ADD `vr` varchar(500) NOT NULL");}
  718. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_goods_spec` (
  719. `id` int(11) NOT NULL AUTO_INCREMENT,
  720. `spec_name` varchar(100) NOT NULL COMMENT '规格名称',
  721. `sort` int(4) NOT NULL COMMENT '排序',
  722. `uniacid` varchar(50) NOT NULL COMMENT '50',
  723. PRIMARY KEY (`id`)
  724. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品规格表';
  725. ");
  726. if(!pdo_fieldexists('zhtc_goods_spec','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods_spec')." ADD
  727. `id` int(11) NOT NULL AUTO_INCREMENT");}
  728. if(!pdo_fieldexists('zhtc_goods_spec','spec_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods_spec')." ADD `spec_name` varchar(100) NOT NULL COMMENT '规格名称'");}
  729. if(!pdo_fieldexists('zhtc_goods_spec','sort')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods_spec')." ADD `sort` int(4) NOT NULL COMMENT '排序'");}
  730. if(!pdo_fieldexists('zhtc_goods_spec','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_goods_spec')." ADD `uniacid` varchar(50) NOT NULL COMMENT '50'");}
  731. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_group` (
  732. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  733. `store_id` int(11) NOT NULL COMMENT '门店id',
  734. `goods_id` int(11) NOT NULL COMMENT '商品ID',
  735. `goods_logo` varchar(255) NOT NULL,
  736. `goods_name` varchar(255) NOT NULL COMMENT '商品名称',
  737. `kt_num` int(11) NOT NULL COMMENT '开团人数',
  738. `yg_num` int(11) NOT NULL COMMENT '已购数量',
  739. `kt_time` int(11) NOT NULL COMMENT '开团时间',
  740. `dq_time` int(11) NOT NULL COMMENT '到期时间',
  741. `state` int(4) NOT NULL COMMENT '1.拼团中2成功,3失败',
  742. `user_id` int(11) NOT NULL COMMENT '团长user_id',
  743. `uniacid` int(11) NOT NULL,
  744. PRIMARY KEY (`id`)
  745. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  746. ");
  747. if(!pdo_fieldexists('zhtc_group','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_group')." ADD
  748. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  749. if(!pdo_fieldexists('zhtc_group','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_group')." ADD `store_id` int(11) NOT NULL COMMENT '门店id'");}
  750. if(!pdo_fieldexists('zhtc_group','goods_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_group')." ADD `goods_id` int(11) NOT NULL COMMENT '商品ID'");}
  751. if(!pdo_fieldexists('zhtc_group','goods_logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_group')." ADD `goods_logo` varchar(255) NOT NULL");}
  752. if(!pdo_fieldexists('zhtc_group','goods_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_group')." ADD `goods_name` varchar(255) NOT NULL COMMENT '商品名称'");}
  753. if(!pdo_fieldexists('zhtc_group','kt_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_group')." ADD `kt_num` int(11) NOT NULL COMMENT '开团人数'");}
  754. if(!pdo_fieldexists('zhtc_group','yg_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_group')." ADD `yg_num` int(11) NOT NULL COMMENT '已购数量'");}
  755. if(!pdo_fieldexists('zhtc_group','kt_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_group')." ADD `kt_time` int(11) NOT NULL COMMENT '开团时间'");}
  756. if(!pdo_fieldexists('zhtc_group','dq_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_group')." ADD `dq_time` int(11) NOT NULL COMMENT '到期时间'");}
  757. if(!pdo_fieldexists('zhtc_group','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_group')." ADD `state` int(4) NOT NULL COMMENT '1.拼团中2成功,3失败'");}
  758. if(!pdo_fieldexists('zhtc_group','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_group')." ADD `user_id` int(11) NOT NULL COMMENT '团长user_id'");}
  759. if(!pdo_fieldexists('zhtc_group','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_group')." ADD `uniacid` int(11) NOT NULL");}
  760. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_groupgoods` (
  761. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  762. `store_id` int(11) NOT NULL COMMENT '门店id',
  763. `type_id` int(11) NOT NULL COMMENT '分类ID',
  764. `name` varchar(255) NOT NULL COMMENT '名称',
  765. `logo` varchar(255) NOT NULL COMMENT 'logo',
  766. `img` text NOT NULL COMMENT '多图',
  767. `inventory` int(11) NOT NULL COMMENT '库存',
  768. `pt_price` decimal(10,2) NOT NULL COMMENT '拼团价格',
  769. `y_price` decimal(10,2) NOT NULL COMMENT '原价',
  770. `dd_price` decimal(10,2) NOT NULL COMMENT '单独购买价格',
  771. `ycd_num` int(11) NOT NULL COMMENT '已成团数量',
  772. `ysc_num` int(11) NOT NULL COMMENT '已售出数量',
  773. `people` int(11) NOT NULL COMMENT '成团人数',
  774. `start_time` int(11) NOT NULL COMMENT '开始时间',
  775. `end_time` int(11) NOT NULL COMMENT '结束时间',
  776. `xf_time` int(11) NOT NULL COMMENT '消费截止时间',
  777. `is_shelves` int(4) NOT NULL DEFAULT '1' COMMENT '1上架,2下架',
  778. `details` text NOT NULL COMMENT '商品详情',
  779. `details_img` text NOT NULL COMMENT '详情多图',
  780. `num` int(11) NOT NULL COMMENT '排序',
  781. `state` int(4) NOT NULL DEFAULT '1' COMMENT '1待审核,2通过,3拒绝',
  782. `display` int(4) NOT NULL DEFAULT '1' COMMENT '1显示,2不显示',
  783. `uniacid` int(11) NOT NULL,
  784. `introduction` text NOT NULL,
  785. `time` int(11) NOT NULL COMMENT '发布时间',
  786. `cityname` varchar(30) NOT NULL,
  787. PRIMARY KEY (`id`)
  788. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  789. ");
  790. if(!pdo_fieldexists('zhtc_groupgoods','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD
  791. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  792. if(!pdo_fieldexists('zhtc_groupgoods','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `store_id` int(11) NOT NULL COMMENT '门店id'");}
  793. if(!pdo_fieldexists('zhtc_groupgoods','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `type_id` int(11) NOT NULL COMMENT '分类ID'");}
  794. if(!pdo_fieldexists('zhtc_groupgoods','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `name` varchar(255) NOT NULL COMMENT '名称'");}
  795. if(!pdo_fieldexists('zhtc_groupgoods','logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `logo` varchar(255) NOT NULL COMMENT 'logo'");}
  796. if(!pdo_fieldexists('zhtc_groupgoods','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `img` text NOT NULL COMMENT '多图'");}
  797. if(!pdo_fieldexists('zhtc_groupgoods','inventory')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `inventory` int(11) NOT NULL COMMENT '库存'");}
  798. if(!pdo_fieldexists('zhtc_groupgoods','pt_price')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `pt_price` decimal(10,2) NOT NULL COMMENT '拼团价格'");}
  799. if(!pdo_fieldexists('zhtc_groupgoods','y_price')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `y_price` decimal(10,2) NOT NULL COMMENT '原价'");}
  800. if(!pdo_fieldexists('zhtc_groupgoods','dd_price')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `dd_price` decimal(10,2) NOT NULL COMMENT '单独购买价格'");}
  801. if(!pdo_fieldexists('zhtc_groupgoods','ycd_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `ycd_num` int(11) NOT NULL COMMENT '已成团数量'");}
  802. if(!pdo_fieldexists('zhtc_groupgoods','ysc_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `ysc_num` int(11) NOT NULL COMMENT '已售出数量'");}
  803. if(!pdo_fieldexists('zhtc_groupgoods','people')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `people` int(11) NOT NULL COMMENT '成团人数'");}
  804. if(!pdo_fieldexists('zhtc_groupgoods','start_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `start_time` int(11) NOT NULL COMMENT '开始时间'");}
  805. if(!pdo_fieldexists('zhtc_groupgoods','end_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `end_time` int(11) NOT NULL COMMENT '结束时间'");}
  806. if(!pdo_fieldexists('zhtc_groupgoods','xf_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `xf_time` int(11) NOT NULL COMMENT '消费截止时间'");}
  807. if(!pdo_fieldexists('zhtc_groupgoods','is_shelves')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `is_shelves` int(4) NOT NULL DEFAULT '1' COMMENT '1上架,2下架'");}
  808. if(!pdo_fieldexists('zhtc_groupgoods','details')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `details` text NOT NULL COMMENT '商品详情'");}
  809. if(!pdo_fieldexists('zhtc_groupgoods','details_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `details_img` text NOT NULL COMMENT '详情多图'");}
  810. if(!pdo_fieldexists('zhtc_groupgoods','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `num` int(11) NOT NULL COMMENT '排序'");}
  811. if(!pdo_fieldexists('zhtc_groupgoods','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `state` int(4) NOT NULL DEFAULT '1' COMMENT '1待审核,2通过,3拒绝'");}
  812. if(!pdo_fieldexists('zhtc_groupgoods','display')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `display` int(4) NOT NULL DEFAULT '1' COMMENT '1显示,2不显示'");}
  813. if(!pdo_fieldexists('zhtc_groupgoods','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `uniacid` int(11) NOT NULL");}
  814. if(!pdo_fieldexists('zhtc_groupgoods','introduction')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `introduction` text NOT NULL");}
  815. if(!pdo_fieldexists('zhtc_groupgoods','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `time` int(11) NOT NULL COMMENT '发布时间'");}
  816. if(!pdo_fieldexists('zhtc_groupgoods','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_groupgoods')." ADD `cityname` varchar(30) NOT NULL");}
  817. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_grouporder` (
  818. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  819. `group_id` int(11) NOT NULL COMMENT '团id',
  820. `store_id` int(11) NOT NULL COMMENT '门店id',
  821. `goods_id` int(11) NOT NULL COMMENT '商品ID',
  822. `user_id` int(11) NOT NULL COMMENT '用户ID',
  823. `order_num` varchar(30) NOT NULL COMMENT '订单号',
  824. `logo` varchar(255) NOT NULL COMMENT '商品图片',
  825. `goods_name` varchar(255) NOT NULL COMMENT '商品名称',
  826. `goods_type` varchar(50) NOT NULL COMMENT '商品类型',
  827. `price` decimal(10,2) NOT NULL COMMENT '单价',
  828. `goods_num` int(11) NOT NULL COMMENT '商品数量',
  829. `money` decimal(10,2) NOT NULL COMMENT '订单金额',
  830. `pay_type` int(4) NOT NULL COMMENT '付款方式1微信,2余额',
  831. `receive_name` varchar(30) NOT NULL COMMENT '收货人',
  832. `receive_tel` varchar(20) NOT NULL COMMENT '收货人电话',
  833. `receive_address` varchar(100) NOT NULL COMMENT '收货人地址',
  834. `note` varchar(100) NOT NULL COMMENT '备注',
  835. `state` int(4) NOT NULL COMMENT '1未付款,2已付款,3已完成,4已关闭,5已失效',
  836. `xf_time` int(11) NOT NULL COMMENT '消费截止时间',
  837. `time` int(11) NOT NULL COMMENT '下单时间',
  838. `pay_time` int(11) NOT NULL COMMENT '付款时间',
  839. `cz_time` int(11) NOT NULL COMMENT '完成/关闭/失效时间',
  840. `code` varchar(30) NOT NULL COMMENT '支付商户号',
  841. `uniacid` int(11) NOT NULL,
  842. PRIMARY KEY (`id`)
  843. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  844. ");
  845. if(!pdo_fieldexists('zhtc_grouporder','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD
  846. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  847. if(!pdo_fieldexists('zhtc_grouporder','group_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `group_id` int(11) NOT NULL COMMENT '团id'");}
  848. if(!pdo_fieldexists('zhtc_grouporder','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `store_id` int(11) NOT NULL COMMENT '门店id'");}
  849. if(!pdo_fieldexists('zhtc_grouporder','goods_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `goods_id` int(11) NOT NULL COMMENT '商品ID'");}
  850. if(!pdo_fieldexists('zhtc_grouporder','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `user_id` int(11) NOT NULL COMMENT '用户ID'");}
  851. if(!pdo_fieldexists('zhtc_grouporder','order_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `order_num` varchar(30) NOT NULL COMMENT '订单号'");}
  852. if(!pdo_fieldexists('zhtc_grouporder','logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `logo` varchar(255) NOT NULL COMMENT '商品图片'");}
  853. if(!pdo_fieldexists('zhtc_grouporder','goods_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `goods_name` varchar(255) NOT NULL COMMENT '商品名称'");}
  854. if(!pdo_fieldexists('zhtc_grouporder','goods_type')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `goods_type` varchar(50) NOT NULL COMMENT '商品类型'");}
  855. if(!pdo_fieldexists('zhtc_grouporder','price')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `price` decimal(10,2) NOT NULL COMMENT '单价'");}
  856. if(!pdo_fieldexists('zhtc_grouporder','goods_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `goods_num` int(11) NOT NULL COMMENT '商品数量'");}
  857. if(!pdo_fieldexists('zhtc_grouporder','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `money` decimal(10,2) NOT NULL COMMENT '订单金额'");}
  858. if(!pdo_fieldexists('zhtc_grouporder','pay_type')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `pay_type` int(4) NOT NULL COMMENT '付款方式1微信,2余额'");}
  859. if(!pdo_fieldexists('zhtc_grouporder','receive_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `receive_name` varchar(30) NOT NULL COMMENT '收货人'");}
  860. if(!pdo_fieldexists('zhtc_grouporder','receive_tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `receive_tel` varchar(20) NOT NULL COMMENT '收货人电话'");}
  861. if(!pdo_fieldexists('zhtc_grouporder','receive_address')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `receive_address` varchar(100) NOT NULL COMMENT '收货人地址'");}
  862. if(!pdo_fieldexists('zhtc_grouporder','note')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `note` varchar(100) NOT NULL COMMENT '备注'");}
  863. if(!pdo_fieldexists('zhtc_grouporder','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `state` int(4) NOT NULL COMMENT '1未付款,2已付款,3已完成,4已关闭,5已失效'");}
  864. if(!pdo_fieldexists('zhtc_grouporder','xf_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `xf_time` int(11) NOT NULL COMMENT '消费截止时间'");}
  865. if(!pdo_fieldexists('zhtc_grouporder','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `time` int(11) NOT NULL COMMENT '下单时间'");}
  866. if(!pdo_fieldexists('zhtc_grouporder','pay_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `pay_time` int(11) NOT NULL COMMENT '付款时间'");}
  867. if(!pdo_fieldexists('zhtc_grouporder','cz_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `cz_time` int(11) NOT NULL COMMENT '完成/关闭/失效时间'");}
  868. if(!pdo_fieldexists('zhtc_grouporder','code')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `code` varchar(30) NOT NULL COMMENT '支付商户号'");}
  869. if(!pdo_fieldexists('zhtc_grouporder','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouporder')." ADD `uniacid` int(11) NOT NULL");}
  870. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_grouptype` (
  871. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  872. `name` varchar(20) NOT NULL,
  873. `img` varchar(500) NOT NULL,
  874. `num` int(11) NOT NULL,
  875. `uniacid` int(11) NOT NULL,
  876. PRIMARY KEY (`id`)
  877. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='拼团分类';
  878. ");
  879. if(!pdo_fieldexists('zhtc_grouptype','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouptype')." ADD
  880. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  881. if(!pdo_fieldexists('zhtc_grouptype','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouptype')." ADD `name` varchar(20) NOT NULL");}
  882. if(!pdo_fieldexists('zhtc_grouptype','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouptype')." ADD `img` varchar(500) NOT NULL");}
  883. if(!pdo_fieldexists('zhtc_grouptype','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouptype')." ADD `num` int(11) NOT NULL");}
  884. if(!pdo_fieldexists('zhtc_grouptype','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_grouptype')." ADD `uniacid` int(11) NOT NULL");}
  885. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_hblq` (
  886. `id` int(11) NOT NULL AUTO_INCREMENT,
  887. `user_id` int(11) NOT NULL COMMENT '用户ID',
  888. `tz_id` int(11) NOT NULL COMMENT '帖子ID',
  889. `money` decimal(10,2) NOT NULL COMMENT '金额',
  890. `time` int(11) NOT NULL COMMENT '时间戳',
  891. `uniacid` varchar(50) NOT NULL,
  892. `type` int(1) NOT NULL DEFAULT '1',
  893. PRIMARY KEY (`id`)
  894. ) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8 COMMENT='分销表';
  895. ");
  896. if(!pdo_fieldexists('zhtc_hblq','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_hblq')." ADD
  897. `id` int(11) NOT NULL AUTO_INCREMENT");}
  898. if(!pdo_fieldexists('zhtc_hblq','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_hblq')." ADD `user_id` int(11) NOT NULL COMMENT '用户ID'");}
  899. if(!pdo_fieldexists('zhtc_hblq','tz_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_hblq')." ADD `tz_id` int(11) NOT NULL COMMENT '帖子ID'");}
  900. if(!pdo_fieldexists('zhtc_hblq','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_hblq')." ADD `money` decimal(10,2) NOT NULL COMMENT '金额'");}
  901. if(!pdo_fieldexists('zhtc_hblq','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_hblq')." ADD `time` int(11) NOT NULL COMMENT '时间戳'");}
  902. if(!pdo_fieldexists('zhtc_hblq','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_hblq')." ADD `uniacid` varchar(50) NOT NULL");}
  903. if(!pdo_fieldexists('zhtc_hblq','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_hblq')." ADD `type` int(1) NOT NULL DEFAULT '1'");}
  904. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_help` (
  905. `id` int(11) NOT NULL AUTO_INCREMENT,
  906. `question` varchar(200) NOT NULL COMMENT '标题',
  907. `answer` text NOT NULL COMMENT '回答',
  908. `sort` int(4) NOT NULL COMMENT '排序',
  909. `uniacid` varchar(50) NOT NULL,
  910. `created_time` datetime NOT NULL,
  911. PRIMARY KEY (`id`)
  912. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
  913. ");
  914. if(!pdo_fieldexists('zhtc_help','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_help')." ADD
  915. `id` int(11) NOT NULL AUTO_INCREMENT");}
  916. if(!pdo_fieldexists('zhtc_help','question')) {pdo_query("ALTER TABLE ".tablename('zhtc_help')." ADD `question` varchar(200) NOT NULL COMMENT '标题'");}
  917. if(!pdo_fieldexists('zhtc_help','answer')) {pdo_query("ALTER TABLE ".tablename('zhtc_help')." ADD `answer` text NOT NULL COMMENT '回答'");}
  918. if(!pdo_fieldexists('zhtc_help','sort')) {pdo_query("ALTER TABLE ".tablename('zhtc_help')." ADD `sort` int(4) NOT NULL COMMENT '排序'");}
  919. if(!pdo_fieldexists('zhtc_help','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_help')." ADD `uniacid` varchar(50) NOT NULL");}
  920. if(!pdo_fieldexists('zhtc_help','created_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_help')." ADD `created_time` datetime NOT NULL");}
  921. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_hotcity` (
  922. `id` int(11) NOT NULL AUTO_INCREMENT,
  923. `cityname` varchar(50) NOT NULL COMMENT '城市名称',
  924. `time` int(11) NOT NULL COMMENT '创建时间',
  925. `uniacid` varchar(50) NOT NULL,
  926. `user_id` int(11) NOT NULL,
  927. PRIMARY KEY (`id`)
  928. ) ENGINE=InnoDB AUTO_INCREMENT=4933 DEFAULT CHARSET=utf8;
  929. ");
  930. if(!pdo_fieldexists('zhtc_hotcity','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_hotcity')." ADD
  931. `id` int(11) NOT NULL AUTO_INCREMENT");}
  932. if(!pdo_fieldexists('zhtc_hotcity','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_hotcity')." ADD `cityname` varchar(50) NOT NULL COMMENT '城市名称'");}
  933. if(!pdo_fieldexists('zhtc_hotcity','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_hotcity')." ADD `time` int(11) NOT NULL COMMENT '创建时间'");}
  934. if(!pdo_fieldexists('zhtc_hotcity','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_hotcity')." ADD `uniacid` varchar(50) NOT NULL");}
  935. if(!pdo_fieldexists('zhtc_hotcity','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_hotcity')." ADD `user_id` int(11) NOT NULL");}
  936. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_in` (
  937. `id` int(11) NOT NULL AUTO_INCREMENT,
  938. `type` int(11) NOT NULL COMMENT '1.一天2.半年3.一年',
  939. `money` decimal(10,2) NOT NULL,
  940. `num` int(11) NOT NULL,
  941. `uniacid` int(11) NOT NULL,
  942. `money2` decimal(10,2) NOT NULL,
  943. PRIMARY KEY (`id`)
  944. ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
  945. ");
  946. if(!pdo_fieldexists('zhtc_in','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_in')." ADD
  947. `id` int(11) NOT NULL AUTO_INCREMENT");}
  948. if(!pdo_fieldexists('zhtc_in','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_in')." ADD `type` int(11) NOT NULL COMMENT '1.一天2.半年3.一年'");}
  949. if(!pdo_fieldexists('zhtc_in','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_in')." ADD `money` decimal(10,2) NOT NULL");}
  950. if(!pdo_fieldexists('zhtc_in','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_in')." ADD `num` int(11) NOT NULL");}
  951. if(!pdo_fieldexists('zhtc_in','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_in')." ADD `uniacid` int(11) NOT NULL");}
  952. if(!pdo_fieldexists('zhtc_in','money2')) {pdo_query("ALTER TABLE ".tablename('zhtc_in')." ADD `money2` decimal(10,2) NOT NULL");}
  953. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_information` (
  954. `id` int(11) NOT NULL AUTO_INCREMENT,
  955. `details` text NOT NULL COMMENT '内容',
  956. `img` text NOT NULL COMMENT '图片',
  957. `user_id` int(11) NOT NULL COMMENT '用户id',
  958. `user_name` varchar(20) NOT NULL COMMENT '联系人',
  959. `user_tel` varchar(20) NOT NULL COMMENT '电话',
  960. `hot` int(11) NOT NULL COMMENT '1.热门 2.不热门',
  961. `top` int(11) NOT NULL COMMENT '1.置顶 2.不置顶',
  962. `givelike` int(11) NOT NULL COMMENT '点赞数',
  963. `views` int(11) NOT NULL COMMENT '浏览量',
  964. `uniacid` int(11) NOT NULL COMMENT '小程序id',
  965. `type2_id` int(11) NOT NULL COMMENT '分类二id',
  966. `type_id` int(11) NOT NULL,
  967. `state` int(11) NOT NULL COMMENT '1.待审核 2.通过3拒绝',
  968. `money` decimal(10,2) NOT NULL,
  969. `time` int(11) NOT NULL COMMENT '发布时间',
  970. `sh_time` int(11) NOT NULL,
  971. `top_type` int(11) NOT NULL,
  972. `address` varchar(500) NOT NULL,
  973. `hb_money` decimal(10,2) NOT NULL,
  974. `hb_num` int(11) NOT NULL,
  975. `hb_type` int(11) NOT NULL,
  976. `hb_keyword` varchar(20) NOT NULL,
  977. `hb_random` int(11) NOT NULL,
  978. `hong` text NOT NULL,
  979. `store_id` int(11) NOT NULL,
  980. `del` int(11) NOT NULL DEFAULT '2',
  981. `user_img2` varchar(200) NOT NULL,
  982. `dq_time` int(11) NOT NULL,
  983. `cityname` varchar(50) NOT NULL,
  984. `hbfx_num` int(11) NOT NULL,
  985. `is_jt` int(4) NOT NULL DEFAULT '2',
  986. `lat` varchar(20) NOT NULL,
  987. `lng` varchar(20) NOT NULL,
  988. `code` varchar(50) NOT NULL,
  989. PRIMARY KEY (`id`),
  990. KEY `uniacid` (`uniacid`),
  991. KEY `user_id` (`user_id`),
  992. KEY `type2_id` (`type2_id`),
  993. KEY `type_id` (`type_id`),
  994. KEY `state` (`state`),
  995. KEY `store_id` (`store_id`),
  996. KEY `uniacid_2` (`uniacid`),
  997. KEY `user_id_2` (`user_id`),
  998. KEY `type2_id_2` (`type2_id`),
  999. KEY `type_id_2` (`type_id`),
  1000. KEY `state_2` (`state`),
  1001. KEY `store_id_2` (`store_id`),
  1002. KEY `uniacid_3` (`uniacid`),
  1003. KEY `user_id_3` (`user_id`),
  1004. KEY `type2_id_3` (`type2_id`),
  1005. KEY `type_id_3` (`type_id`),
  1006. KEY `state_3` (`state`),
  1007. KEY `store_id_3` (`store_id`),
  1008. KEY `uniacid_4` (`uniacid`),
  1009. KEY `user_id_4` (`user_id`),
  1010. KEY `type2_id_4` (`type2_id`),
  1011. KEY `type_id_4` (`type_id`),
  1012. KEY `state_4` (`state`),
  1013. KEY `store_id_4` (`store_id`),
  1014. KEY `uniacid_5` (`uniacid`),
  1015. KEY `user_id_5` (`user_id`),
  1016. KEY `type2_id_5` (`type2_id`),
  1017. KEY `type_id_5` (`type_id`),
  1018. KEY `state_5` (`state`),
  1019. KEY `store_id_5` (`store_id`),
  1020. KEY `uniacid_6` (`uniacid`),
  1021. KEY `user_id_6` (`user_id`),
  1022. KEY `type2_id_6` (`type2_id`),
  1023. KEY `type_id_6` (`type_id`),
  1024. KEY `state_6` (`state`),
  1025. KEY `store_id_6` (`store_id`),
  1026. KEY `uniacid_7` (`uniacid`),
  1027. KEY `user_id_7` (`user_id`),
  1028. KEY `type2_id_7` (`type2_id`),
  1029. KEY `type_id_7` (`type_id`),
  1030. KEY `state_7` (`state`),
  1031. KEY `store_id_7` (`store_id`),
  1032. KEY `uniacid_8` (`uniacid`),
  1033. KEY `user_id_8` (`user_id`),
  1034. KEY `type2_id_8` (`type2_id`),
  1035. KEY `type_id_8` (`type_id`),
  1036. KEY `state_8` (`state`),
  1037. KEY `store_id_8` (`store_id`),
  1038. KEY `uniacid_9` (`uniacid`),
  1039. KEY `user_id_9` (`user_id`),
  1040. KEY `type2_id_9` (`type2_id`),
  1041. KEY `type_id_9` (`type_id`),
  1042. KEY `state_9` (`state`),
  1043. KEY `store_id_9` (`store_id`),
  1044. KEY `uniacid_10` (`uniacid`),
  1045. KEY `user_id_10` (`user_id`),
  1046. KEY `type2_id_10` (`type2_id`),
  1047. KEY `type_id_10` (`type_id`),
  1048. KEY `state_10` (`state`),
  1049. KEY `store_id_10` (`store_id`),
  1050. KEY `uniacid_11` (`uniacid`),
  1051. KEY `user_id_11` (`user_id`),
  1052. KEY `type2_id_11` (`type2_id`)
  1053. ) ENGINE=InnoDB AUTO_INCREMENT=717 DEFAULT CHARSET=utf8;
  1054. ");
  1055. if(!pdo_fieldexists('zhtc_information','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD
  1056. `id` int(11) NOT NULL AUTO_INCREMENT");}
  1057. if(!pdo_fieldexists('zhtc_information','details')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `details` text NOT NULL COMMENT '内容'");}
  1058. if(!pdo_fieldexists('zhtc_information','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `img` text NOT NULL COMMENT '图片'");}
  1059. if(!pdo_fieldexists('zhtc_information','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `user_id` int(11) NOT NULL COMMENT '用户id'");}
  1060. if(!pdo_fieldexists('zhtc_information','user_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `user_name` varchar(20) NOT NULL COMMENT '联系人'");}
  1061. if(!pdo_fieldexists('zhtc_information','user_tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `user_tel` varchar(20) NOT NULL COMMENT '电话'");}
  1062. if(!pdo_fieldexists('zhtc_information','hot')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `hot` int(11) NOT NULL COMMENT '1.热门 2.不热门'");}
  1063. if(!pdo_fieldexists('zhtc_information','top')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `top` int(11) NOT NULL COMMENT '1.置顶 2.不置顶'");}
  1064. if(!pdo_fieldexists('zhtc_information','givelike')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `givelike` int(11) NOT NULL COMMENT '点赞数'");}
  1065. if(!pdo_fieldexists('zhtc_information','views')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `views` int(11) NOT NULL COMMENT '浏览量'");}
  1066. if(!pdo_fieldexists('zhtc_information','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `uniacid` int(11) NOT NULL COMMENT '小程序id'");}
  1067. if(!pdo_fieldexists('zhtc_information','type2_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `type2_id` int(11) NOT NULL COMMENT '分类二id'");}
  1068. if(!pdo_fieldexists('zhtc_information','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `type_id` int(11) NOT NULL");}
  1069. if(!pdo_fieldexists('zhtc_information','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `state` int(11) NOT NULL COMMENT '1.待审核 2.通过3拒绝'");}
  1070. if(!pdo_fieldexists('zhtc_information','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `money` decimal(10,2) NOT NULL");}
  1071. if(!pdo_fieldexists('zhtc_information','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `time` int(11) NOT NULL COMMENT '发布时间'");}
  1072. if(!pdo_fieldexists('zhtc_information','sh_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `sh_time` int(11) NOT NULL");}
  1073. if(!pdo_fieldexists('zhtc_information','top_type')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `top_type` int(11) NOT NULL");}
  1074. if(!pdo_fieldexists('zhtc_information','address')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `address` varchar(500) NOT NULL");}
  1075. if(!pdo_fieldexists('zhtc_information','hb_money')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `hb_money` decimal(10,2) NOT NULL");}
  1076. if(!pdo_fieldexists('zhtc_information','hb_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `hb_num` int(11) NOT NULL");}
  1077. if(!pdo_fieldexists('zhtc_information','hb_type')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `hb_type` int(11) NOT NULL");}
  1078. if(!pdo_fieldexists('zhtc_information','hb_keyword')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `hb_keyword` varchar(20) NOT NULL");}
  1079. if(!pdo_fieldexists('zhtc_information','hb_random')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `hb_random` int(11) NOT NULL");}
  1080. if(!pdo_fieldexists('zhtc_information','hong')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `hong` text NOT NULL");}
  1081. if(!pdo_fieldexists('zhtc_information','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `store_id` int(11) NOT NULL");}
  1082. if(!pdo_fieldexists('zhtc_information','del')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `del` int(11) NOT NULL DEFAULT '2'");}
  1083. if(!pdo_fieldexists('zhtc_information','user_img2')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `user_img2` varchar(200) NOT NULL");}
  1084. if(!pdo_fieldexists('zhtc_information','dq_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `dq_time` int(11) NOT NULL");}
  1085. if(!pdo_fieldexists('zhtc_information','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `cityname` varchar(50) NOT NULL");}
  1086. if(!pdo_fieldexists('zhtc_information','hbfx_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `hbfx_num` int(11) NOT NULL");}
  1087. if(!pdo_fieldexists('zhtc_information','is_jt')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `is_jt` int(4) NOT NULL DEFAULT '2'");}
  1088. if(!pdo_fieldexists('zhtc_information','lat')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `lat` varchar(20) NOT NULL");}
  1089. if(!pdo_fieldexists('zhtc_information','lng')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `lng` varchar(20) NOT NULL");}
  1090. if(!pdo_fieldexists('zhtc_information','code')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD `code` varchar(50) NOT NULL");}
  1091. if(!pdo_fieldexists('zhtc_information','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD PRIMARY KEY (`id`)");}
  1092. if(!pdo_fieldexists('zhtc_information','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `uniacid` (`uniacid`)");}
  1093. if(!pdo_fieldexists('zhtc_information','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `user_id` (`user_id`)");}
  1094. if(!pdo_fieldexists('zhtc_information','type2_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type2_id` (`type2_id`)");}
  1095. if(!pdo_fieldexists('zhtc_information','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type_id` (`type_id`)");}
  1096. if(!pdo_fieldexists('zhtc_information','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `state` (`state`)");}
  1097. if(!pdo_fieldexists('zhtc_information','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `store_id` (`store_id`)");}
  1098. if(!pdo_fieldexists('zhtc_information','uniacid_2')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `uniacid_2` (`uniacid`)");}
  1099. if(!pdo_fieldexists('zhtc_information','user_id_2')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `user_id_2` (`user_id`)");}
  1100. if(!pdo_fieldexists('zhtc_information','type2_id_2')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type2_id_2` (`type2_id`)");}
  1101. if(!pdo_fieldexists('zhtc_information','type_id_2')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type_id_2` (`type_id`)");}
  1102. if(!pdo_fieldexists('zhtc_information','state_2')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `state_2` (`state`)");}
  1103. if(!pdo_fieldexists('zhtc_information','store_id_2')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `store_id_2` (`store_id`)");}
  1104. if(!pdo_fieldexists('zhtc_information','uniacid_3')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `uniacid_3` (`uniacid`)");}
  1105. if(!pdo_fieldexists('zhtc_information','user_id_3')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `user_id_3` (`user_id`)");}
  1106. if(!pdo_fieldexists('zhtc_information','type2_id_3')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type2_id_3` (`type2_id`)");}
  1107. if(!pdo_fieldexists('zhtc_information','type_id_3')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type_id_3` (`type_id`)");}
  1108. if(!pdo_fieldexists('zhtc_information','state_3')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `state_3` (`state`)");}
  1109. if(!pdo_fieldexists('zhtc_information','store_id_3')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `store_id_3` (`store_id`)");}
  1110. if(!pdo_fieldexists('zhtc_information','uniacid_4')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `uniacid_4` (`uniacid`)");}
  1111. if(!pdo_fieldexists('zhtc_information','user_id_4')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `user_id_4` (`user_id`)");}
  1112. if(!pdo_fieldexists('zhtc_information','type2_id_4')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type2_id_4` (`type2_id`)");}
  1113. if(!pdo_fieldexists('zhtc_information','type_id_4')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type_id_4` (`type_id`)");}
  1114. if(!pdo_fieldexists('zhtc_information','state_4')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `state_4` (`state`)");}
  1115. if(!pdo_fieldexists('zhtc_information','store_id_4')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `store_id_4` (`store_id`)");}
  1116. if(!pdo_fieldexists('zhtc_information','uniacid_5')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `uniacid_5` (`uniacid`)");}
  1117. if(!pdo_fieldexists('zhtc_information','user_id_5')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `user_id_5` (`user_id`)");}
  1118. if(!pdo_fieldexists('zhtc_information','type2_id_5')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type2_id_5` (`type2_id`)");}
  1119. if(!pdo_fieldexists('zhtc_information','type_id_5')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type_id_5` (`type_id`)");}
  1120. if(!pdo_fieldexists('zhtc_information','state_5')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `state_5` (`state`)");}
  1121. if(!pdo_fieldexists('zhtc_information','store_id_5')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `store_id_5` (`store_id`)");}
  1122. if(!pdo_fieldexists('zhtc_information','uniacid_6')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `uniacid_6` (`uniacid`)");}
  1123. if(!pdo_fieldexists('zhtc_information','user_id_6')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `user_id_6` (`user_id`)");}
  1124. if(!pdo_fieldexists('zhtc_information','type2_id_6')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type2_id_6` (`type2_id`)");}
  1125. if(!pdo_fieldexists('zhtc_information','type_id_6')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type_id_6` (`type_id`)");}
  1126. if(!pdo_fieldexists('zhtc_information','state_6')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `state_6` (`state`)");}
  1127. if(!pdo_fieldexists('zhtc_information','store_id_6')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `store_id_6` (`store_id`)");}
  1128. if(!pdo_fieldexists('zhtc_information','uniacid_7')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `uniacid_7` (`uniacid`)");}
  1129. if(!pdo_fieldexists('zhtc_information','user_id_7')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `user_id_7` (`user_id`)");}
  1130. if(!pdo_fieldexists('zhtc_information','type2_id_7')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type2_id_7` (`type2_id`)");}
  1131. if(!pdo_fieldexists('zhtc_information','type_id_7')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type_id_7` (`type_id`)");}
  1132. if(!pdo_fieldexists('zhtc_information','state_7')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `state_7` (`state`)");}
  1133. if(!pdo_fieldexists('zhtc_information','store_id_7')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `store_id_7` (`store_id`)");}
  1134. if(!pdo_fieldexists('zhtc_information','uniacid_8')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `uniacid_8` (`uniacid`)");}
  1135. if(!pdo_fieldexists('zhtc_information','user_id_8')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `user_id_8` (`user_id`)");}
  1136. if(!pdo_fieldexists('zhtc_information','type2_id_8')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type2_id_8` (`type2_id`)");}
  1137. if(!pdo_fieldexists('zhtc_information','type_id_8')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type_id_8` (`type_id`)");}
  1138. if(!pdo_fieldexists('zhtc_information','state_8')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `state_8` (`state`)");}
  1139. if(!pdo_fieldexists('zhtc_information','store_id_8')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `store_id_8` (`store_id`)");}
  1140. if(!pdo_fieldexists('zhtc_information','uniacid_9')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `uniacid_9` (`uniacid`)");}
  1141. if(!pdo_fieldexists('zhtc_information','user_id_9')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `user_id_9` (`user_id`)");}
  1142. if(!pdo_fieldexists('zhtc_information','type2_id_9')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type2_id_9` (`type2_id`)");}
  1143. if(!pdo_fieldexists('zhtc_information','type_id_9')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type_id_9` (`type_id`)");}
  1144. if(!pdo_fieldexists('zhtc_information','state_9')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `state_9` (`state`)");}
  1145. if(!pdo_fieldexists('zhtc_information','store_id_9')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `store_id_9` (`store_id`)");}
  1146. if(!pdo_fieldexists('zhtc_information','uniacid_10')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `uniacid_10` (`uniacid`)");}
  1147. if(!pdo_fieldexists('zhtc_information','user_id_10')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `user_id_10` (`user_id`)");}
  1148. if(!pdo_fieldexists('zhtc_information','type2_id_10')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type2_id_10` (`type2_id`)");}
  1149. if(!pdo_fieldexists('zhtc_information','type_id_10')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `type_id_10` (`type_id`)");}
  1150. if(!pdo_fieldexists('zhtc_information','state_10')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `state_10` (`state`)");}
  1151. if(!pdo_fieldexists('zhtc_information','store_id_10')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `store_id_10` (`store_id`)");}
  1152. if(!pdo_fieldexists('zhtc_information','uniacid_11')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `uniacid_11` (`uniacid`)");}
  1153. if(!pdo_fieldexists('zhtc_information','user_id_11')) {pdo_query("ALTER TABLE ".tablename('zhtc_information')." ADD KEY `user_id_11` (`user_id`)");}
  1154. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_integral` (
  1155. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1156. `user_id` int(11) NOT NULL COMMENT '用户id',
  1157. `score` int(11) NOT NULL COMMENT '分数',
  1158. `type` int(4) NOT NULL COMMENT '1加,2减',
  1159. `order_id` int(11) NOT NULL COMMENT '订单id',
  1160. `cerated_time` datetime NOT NULL COMMENT '创建时间',
  1161. `uniacid` varchar(50) NOT NULL,
  1162. `note` varchar(20) NOT NULL COMMENT '备注',
  1163. `tid` int(11) NOT NULL,
  1164. PRIMARY KEY (`id`)
  1165. ) ENGINE=InnoDB AUTO_INCREMENT=1992 DEFAULT CHARSET=utf8;
  1166. ");
  1167. if(!pdo_fieldexists('zhtc_integral','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_integral')." ADD
  1168. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1169. if(!pdo_fieldexists('zhtc_integral','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_integral')." ADD `user_id` int(11) NOT NULL COMMENT '用户id'");}
  1170. if(!pdo_fieldexists('zhtc_integral','score')) {pdo_query("ALTER TABLE ".tablename('zhtc_integral')." ADD `score` int(11) NOT NULL COMMENT '分数'");}
  1171. if(!pdo_fieldexists('zhtc_integral','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_integral')." ADD `type` int(4) NOT NULL COMMENT '1加,2减'");}
  1172. if(!pdo_fieldexists('zhtc_integral','order_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_integral')." ADD `order_id` int(11) NOT NULL COMMENT '订单id'");}
  1173. if(!pdo_fieldexists('zhtc_integral','cerated_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_integral')." ADD `cerated_time` datetime NOT NULL COMMENT '创建时间'");}
  1174. if(!pdo_fieldexists('zhtc_integral','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_integral')." ADD `uniacid` varchar(50) NOT NULL");}
  1175. if(!pdo_fieldexists('zhtc_integral','note')) {pdo_query("ALTER TABLE ".tablename('zhtc_integral')." ADD `note` varchar(20) NOT NULL COMMENT '备注'");}
  1176. if(!pdo_fieldexists('zhtc_integral','tid')) {pdo_query("ALTER TABLE ".tablename('zhtc_integral')." ADD `tid` int(11) NOT NULL");}
  1177. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_jfgoods` (
  1178. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1179. `name` varchar(50) NOT NULL COMMENT '名称',
  1180. `img` varchar(100) NOT NULL,
  1181. `money` int(11) NOT NULL COMMENT '价格',
  1182. `type_id` int(11) NOT NULL COMMENT '分类id',
  1183. `goods_details` text NOT NULL,
  1184. `process_details` text NOT NULL,
  1185. `attention_details` text NOT NULL,
  1186. `number` int(11) NOT NULL COMMENT '数量',
  1187. `time` varchar(50) NOT NULL COMMENT '期限',
  1188. `is_open` int(11) NOT NULL COMMENT '1.开启2关闭',
  1189. `type` int(11) NOT NULL COMMENT '1.余额2.实物',
  1190. `num` int(11) NOT NULL COMMENT '排序',
  1191. `uniacid` int(11) NOT NULL,
  1192. `hb_moeny` decimal(10,2) NOT NULL,
  1193. PRIMARY KEY (`id`)
  1194. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  1195. ");
  1196. if(!pdo_fieldexists('zhtc_jfgoods','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD
  1197. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1198. if(!pdo_fieldexists('zhtc_jfgoods','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `name` varchar(50) NOT NULL COMMENT '名称'");}
  1199. if(!pdo_fieldexists('zhtc_jfgoods','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `img` varchar(100) NOT NULL");}
  1200. if(!pdo_fieldexists('zhtc_jfgoods','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `money` int(11) NOT NULL COMMENT '价格'");}
  1201. if(!pdo_fieldexists('zhtc_jfgoods','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `type_id` int(11) NOT NULL COMMENT '分类id'");}
  1202. if(!pdo_fieldexists('zhtc_jfgoods','goods_details')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `goods_details` text NOT NULL");}
  1203. if(!pdo_fieldexists('zhtc_jfgoods','process_details')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `process_details` text NOT NULL");}
  1204. if(!pdo_fieldexists('zhtc_jfgoods','attention_details')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `attention_details` text NOT NULL");}
  1205. if(!pdo_fieldexists('zhtc_jfgoods','number')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `number` int(11) NOT NULL COMMENT '数量'");}
  1206. if(!pdo_fieldexists('zhtc_jfgoods','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `time` varchar(50) NOT NULL COMMENT '期限'");}
  1207. if(!pdo_fieldexists('zhtc_jfgoods','is_open')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `is_open` int(11) NOT NULL COMMENT '1.开启2关闭'");}
  1208. if(!pdo_fieldexists('zhtc_jfgoods','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `type` int(11) NOT NULL COMMENT '1.余额2.实物'");}
  1209. if(!pdo_fieldexists('zhtc_jfgoods','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `num` int(11) NOT NULL COMMENT '排序'");}
  1210. if(!pdo_fieldexists('zhtc_jfgoods','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `uniacid` int(11) NOT NULL");}
  1211. if(!pdo_fieldexists('zhtc_jfgoods','hb_moeny')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfgoods')." ADD `hb_moeny` decimal(10,2) NOT NULL");}
  1212. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_jfrecord` (
  1213. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1214. `user_id` int(11) NOT NULL COMMENT '用户id',
  1215. `good_id` int(11) NOT NULL COMMENT '商品id',
  1216. `time` varchar(20) NOT NULL COMMENT '兑换时间',
  1217. `user_name` varchar(20) NOT NULL COMMENT '用户地址',
  1218. `user_tel` varchar(20) NOT NULL COMMENT '用户电话',
  1219. `address` varchar(200) NOT NULL COMMENT '地址',
  1220. `note` varchar(20) NOT NULL,
  1221. `integral` int(11) NOT NULL COMMENT '积分',
  1222. `good_name` varchar(50) NOT NULL COMMENT '商品名称',
  1223. `good_img` varchar(100) NOT NULL,
  1224. `state` int(11) NOT NULL DEFAULT '1',
  1225. PRIMARY KEY (`id`)
  1226. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  1227. ");
  1228. if(!pdo_fieldexists('zhtc_jfrecord','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfrecord')." ADD
  1229. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1230. if(!pdo_fieldexists('zhtc_jfrecord','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfrecord')." ADD `user_id` int(11) NOT NULL COMMENT '用户id'");}
  1231. if(!pdo_fieldexists('zhtc_jfrecord','good_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfrecord')." ADD `good_id` int(11) NOT NULL COMMENT '商品id'");}
  1232. if(!pdo_fieldexists('zhtc_jfrecord','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfrecord')." ADD `time` varchar(20) NOT NULL COMMENT '兑换时间'");}
  1233. if(!pdo_fieldexists('zhtc_jfrecord','user_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfrecord')." ADD `user_name` varchar(20) NOT NULL COMMENT '用户地址'");}
  1234. if(!pdo_fieldexists('zhtc_jfrecord','user_tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfrecord')." ADD `user_tel` varchar(20) NOT NULL COMMENT '用户电话'");}
  1235. if(!pdo_fieldexists('zhtc_jfrecord','address')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfrecord')." ADD `address` varchar(200) NOT NULL COMMENT '地址'");}
  1236. if(!pdo_fieldexists('zhtc_jfrecord','note')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfrecord')." ADD `note` varchar(20) NOT NULL");}
  1237. if(!pdo_fieldexists('zhtc_jfrecord','integral')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfrecord')." ADD `integral` int(11) NOT NULL COMMENT '积分'");}
  1238. if(!pdo_fieldexists('zhtc_jfrecord','good_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfrecord')." ADD `good_name` varchar(50) NOT NULL COMMENT '商品名称'");}
  1239. if(!pdo_fieldexists('zhtc_jfrecord','good_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfrecord')." ADD `good_img` varchar(100) NOT NULL");}
  1240. if(!pdo_fieldexists('zhtc_jfrecord','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_jfrecord')." ADD `state` int(11) NOT NULL DEFAULT '1'");}
  1241. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_jftype` (
  1242. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1243. `name` varchar(20) NOT NULL,
  1244. `img` varchar(100) NOT NULL,
  1245. `num` int(11) NOT NULL,
  1246. `uniacid` int(11) NOT NULL,
  1247. PRIMARY KEY (`id`)
  1248. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  1249. ");
  1250. if(!pdo_fieldexists('zhtc_jftype','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_jftype')." ADD
  1251. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1252. if(!pdo_fieldexists('zhtc_jftype','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_jftype')." ADD `name` varchar(20) NOT NULL");}
  1253. if(!pdo_fieldexists('zhtc_jftype','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_jftype')." ADD `img` varchar(100) NOT NULL");}
  1254. if(!pdo_fieldexists('zhtc_jftype','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_jftype')." ADD `num` int(11) NOT NULL");}
  1255. if(!pdo_fieldexists('zhtc_jftype','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_jftype')." ADD `uniacid` int(11) NOT NULL");}
  1256. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_joinlist` (
  1257. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1258. `user_id` int(11) NOT NULL,
  1259. `act_id` int(11) NOT NULL,
  1260. `time` varchar(20) NOT NULL,
  1261. `money` decimal(10,2) NOT NULL,
  1262. `code` varchar(100) NOT NULL,
  1263. `form_id` varchar(100) NOT NULL,
  1264. `state` int(11) NOT NULL COMMENT '1.待支付2.已支付3.已通过4.已核销5.已拒绝',
  1265. `uniacid` int(11) NOT NULL,
  1266. `user_name` varchar(20) NOT NULL,
  1267. `user_tel` varchar(20) NOT NULL,
  1268. `hx_time` varchar(20) NOT NULL,
  1269. PRIMARY KEY (`id`)
  1270. ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
  1271. ");
  1272. if(!pdo_fieldexists('zhtc_joinlist','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_joinlist')." ADD
  1273. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1274. if(!pdo_fieldexists('zhtc_joinlist','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_joinlist')." ADD `user_id` int(11) NOT NULL");}
  1275. if(!pdo_fieldexists('zhtc_joinlist','act_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_joinlist')." ADD `act_id` int(11) NOT NULL");}
  1276. if(!pdo_fieldexists('zhtc_joinlist','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_joinlist')." ADD `time` varchar(20) NOT NULL");}
  1277. if(!pdo_fieldexists('zhtc_joinlist','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_joinlist')." ADD `money` decimal(10,2) NOT NULL");}
  1278. if(!pdo_fieldexists('zhtc_joinlist','code')) {pdo_query("ALTER TABLE ".tablename('zhtc_joinlist')." ADD `code` varchar(100) NOT NULL");}
  1279. if(!pdo_fieldexists('zhtc_joinlist','form_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_joinlist')." ADD `form_id` varchar(100) NOT NULL");}
  1280. if(!pdo_fieldexists('zhtc_joinlist','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_joinlist')." ADD `state` int(11) NOT NULL COMMENT '1.待支付2.已支付3.已通过4.已核销5.已拒绝'");}
  1281. if(!pdo_fieldexists('zhtc_joinlist','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_joinlist')." ADD `uniacid` int(11) NOT NULL");}
  1282. if(!pdo_fieldexists('zhtc_joinlist','user_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_joinlist')." ADD `user_name` varchar(20) NOT NULL");}
  1283. if(!pdo_fieldexists('zhtc_joinlist','user_tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_joinlist')." ADD `user_tel` varchar(20) NOT NULL");}
  1284. if(!pdo_fieldexists('zhtc_joinlist','hx_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_joinlist')." ADD `hx_time` varchar(20) NOT NULL");}
  1285. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_label` (
  1286. `id` int(11) NOT NULL AUTO_INCREMENT,
  1287. `label_name` varchar(20) NOT NULL,
  1288. `type2_id` int(11) NOT NULL,
  1289. PRIMARY KEY (`id`)
  1290. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  1291. ");
  1292. if(!pdo_fieldexists('zhtc_label','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_label')." ADD
  1293. `id` int(11) NOT NULL AUTO_INCREMENT");}
  1294. if(!pdo_fieldexists('zhtc_label','label_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_label')." ADD `label_name` varchar(20) NOT NULL");}
  1295. if(!pdo_fieldexists('zhtc_label','type2_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_label')." ADD `type2_id` int(11) NOT NULL");}
  1296. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_like` (
  1297. `id` int(11) NOT NULL AUTO_INCREMENT,
  1298. `information_id` int(11) NOT NULL COMMENT '帖子id',
  1299. `user_id` int(11) NOT NULL COMMENT '用户id',
  1300. `zx_id` int(11) NOT NULL,
  1301. PRIMARY KEY (`id`)
  1302. ) ENGINE=InnoDB AUTO_INCREMENT=501 DEFAULT CHARSET=utf8;
  1303. ");
  1304. if(!pdo_fieldexists('zhtc_like','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_like')." ADD
  1305. `id` int(11) NOT NULL AUTO_INCREMENT");}
  1306. if(!pdo_fieldexists('zhtc_like','information_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_like')." ADD `information_id` int(11) NOT NULL COMMENT '帖子id'");}
  1307. if(!pdo_fieldexists('zhtc_like','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_like')." ADD `user_id` int(11) NOT NULL COMMENT '用户id'");}
  1308. if(!pdo_fieldexists('zhtc_like','zx_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_like')." ADD `zx_id` int(11) NOT NULL");}
  1309. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_llz` (
  1310. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1311. `name` varchar(20) NOT NULL,
  1312. `type` int(11) NOT NULL,
  1313. `status` int(11) NOT NULL,
  1314. `src` varchar(100) NOT NULL,
  1315. `cityname` varchar(20) NOT NULL,
  1316. `uniacid` int(11) NOT NULL,
  1317. PRIMARY KEY (`id`)
  1318. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  1319. ");
  1320. if(!pdo_fieldexists('zhtc_llz','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_llz')." ADD
  1321. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1322. if(!pdo_fieldexists('zhtc_llz','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_llz')." ADD `name` varchar(20) NOT NULL");}
  1323. if(!pdo_fieldexists('zhtc_llz','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_llz')." ADD `type` int(11) NOT NULL");}
  1324. if(!pdo_fieldexists('zhtc_llz','status')) {pdo_query("ALTER TABLE ".tablename('zhtc_llz')." ADD `status` int(11) NOT NULL");}
  1325. if(!pdo_fieldexists('zhtc_llz','src')) {pdo_query("ALTER TABLE ".tablename('zhtc_llz')." ADD `src` varchar(100) NOT NULL");}
  1326. if(!pdo_fieldexists('zhtc_llz','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_llz')." ADD `cityname` varchar(20) NOT NULL");}
  1327. if(!pdo_fieldexists('zhtc_llz','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_llz')." ADD `uniacid` int(11) NOT NULL");}
  1328. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_message` (
  1329. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1330. `note` varchar(100) NOT NULL,
  1331. `source` varchar(100) NOT NULL,
  1332. `content` varchar(100) NOT NULL,
  1333. `time` varchar(100) NOT NULL,
  1334. `fs_time` varchar(20) NOT NULL,
  1335. `uniacid` int(11) NOT NULL,
  1336. `src` varchar(100) NOT NULL,
  1337. PRIMARY KEY (`id`)
  1338. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  1339. ");
  1340. if(!pdo_fieldexists('zhtc_message','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_message')." ADD
  1341. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1342. if(!pdo_fieldexists('zhtc_message','note')) {pdo_query("ALTER TABLE ".tablename('zhtc_message')." ADD `note` varchar(100) NOT NULL");}
  1343. if(!pdo_fieldexists('zhtc_message','source')) {pdo_query("ALTER TABLE ".tablename('zhtc_message')." ADD `source` varchar(100) NOT NULL");}
  1344. if(!pdo_fieldexists('zhtc_message','content')) {pdo_query("ALTER TABLE ".tablename('zhtc_message')." ADD `content` varchar(100) NOT NULL");}
  1345. if(!pdo_fieldexists('zhtc_message','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_message')." ADD `time` varchar(100) NOT NULL");}
  1346. if(!pdo_fieldexists('zhtc_message','fs_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_message')." ADD `fs_time` varchar(20) NOT NULL");}
  1347. if(!pdo_fieldexists('zhtc_message','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_message')." ADD `uniacid` int(11) NOT NULL");}
  1348. if(!pdo_fieldexists('zhtc_message','src')) {pdo_query("ALTER TABLE ".tablename('zhtc_message')." ADD `src` varchar(100) NOT NULL");}
  1349. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_mylabel` (
  1350. `id` int(11) NOT NULL AUTO_INCREMENT,
  1351. `label_id` int(11) NOT NULL,
  1352. `information_id` int(11) NOT NULL,
  1353. PRIMARY KEY (`id`)
  1354. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  1355. ");
  1356. if(!pdo_fieldexists('zhtc_mylabel','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_mylabel')." ADD
  1357. `id` int(11) NOT NULL AUTO_INCREMENT");}
  1358. if(!pdo_fieldexists('zhtc_mylabel','label_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_mylabel')." ADD `label_id` int(11) NOT NULL");}
  1359. if(!pdo_fieldexists('zhtc_mylabel','information_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_mylabel')." ADD `information_id` int(11) NOT NULL");}
  1360. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_nav` (
  1361. `id` int(11) NOT NULL AUTO_INCREMENT,
  1362. `title` varchar(50) NOT NULL COMMENT '名称',
  1363. `logo` varchar(200) NOT NULL COMMENT '图标',
  1364. `status` int(11) NOT NULL COMMENT '1.开启 2.关闭',
  1365. `src` varchar(100) NOT NULL COMMENT '内部链接',
  1366. `orderby` int(11) NOT NULL COMMENT '排序',
  1367. `xcx_name` varchar(20) NOT NULL COMMENT '小程序名称',
  1368. `appid` varchar(20) NOT NULL COMMENT 'APPID',
  1369. `uniacid` int(11) NOT NULL COMMENT '小程序id',
  1370. `wb_src` varchar(300) NOT NULL COMMENT '外部链接',
  1371. `state` int(4) NOT NULL DEFAULT '1' COMMENT '1内部,2外部,3跳转',
  1372. PRIMARY KEY (`id`)
  1373. ) ENGINE=InnoDB AUTO_INCREMENT=76 DEFAULT CHARSET=utf8;
  1374. ");
  1375. if(!pdo_fieldexists('zhtc_nav','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_nav')." ADD
  1376. `id` int(11) NOT NULL AUTO_INCREMENT");}
  1377. if(!pdo_fieldexists('zhtc_nav','title')) {pdo_query("ALTER TABLE ".tablename('zhtc_nav')." ADD `title` varchar(50) NOT NULL COMMENT '名称'");}
  1378. if(!pdo_fieldexists('zhtc_nav','logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_nav')." ADD `logo` varchar(200) NOT NULL COMMENT '图标'");}
  1379. if(!pdo_fieldexists('zhtc_nav','status')) {pdo_query("ALTER TABLE ".tablename('zhtc_nav')." ADD `status` int(11) NOT NULL COMMENT '1.开启 2.关闭'");}
  1380. if(!pdo_fieldexists('zhtc_nav','src')) {pdo_query("ALTER TABLE ".tablename('zhtc_nav')." ADD `src` varchar(100) NOT NULL COMMENT '内部链接'");}
  1381. if(!pdo_fieldexists('zhtc_nav','orderby')) {pdo_query("ALTER TABLE ".tablename('zhtc_nav')." ADD `orderby` int(11) NOT NULL COMMENT '排序'");}
  1382. if(!pdo_fieldexists('zhtc_nav','xcx_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_nav')." ADD `xcx_name` varchar(20) NOT NULL COMMENT '小程序名称'");}
  1383. if(!pdo_fieldexists('zhtc_nav','appid')) {pdo_query("ALTER TABLE ".tablename('zhtc_nav')." ADD `appid` varchar(20) NOT NULL COMMENT 'APPID'");}
  1384. if(!pdo_fieldexists('zhtc_nav','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_nav')." ADD `uniacid` int(11) NOT NULL COMMENT '小程序id'");}
  1385. if(!pdo_fieldexists('zhtc_nav','wb_src')) {pdo_query("ALTER TABLE ".tablename('zhtc_nav')." ADD `wb_src` varchar(300) NOT NULL COMMENT '外部链接'");}
  1386. if(!pdo_fieldexists('zhtc_nav','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_nav')." ADD `state` int(4) NOT NULL DEFAULT '1' COMMENT '1内部,2外部,3跳转'");}
  1387. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_news` (
  1388. `id` int(11) NOT NULL AUTO_INCREMENT,
  1389. `title` varchar(50) NOT NULL COMMENT '公告标题',
  1390. `details` text NOT NULL COMMENT '公告详情',
  1391. `num` int(11) NOT NULL COMMENT '排序',
  1392. `uniacid` int(11) NOT NULL,
  1393. `time` int(11) NOT NULL,
  1394. `img` varchar(100) NOT NULL,
  1395. `state` int(11) NOT NULL,
  1396. `type` int(11) NOT NULL,
  1397. `cityname` varchar(50) NOT NULL,
  1398. PRIMARY KEY (`id`)
  1399. ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
  1400. ");
  1401. if(!pdo_fieldexists('zhtc_news','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_news')." ADD
  1402. `id` int(11) NOT NULL AUTO_INCREMENT");}
  1403. if(!pdo_fieldexists('zhtc_news','title')) {pdo_query("ALTER TABLE ".tablename('zhtc_news')." ADD `title` varchar(50) NOT NULL COMMENT '公告标题'");}
  1404. if(!pdo_fieldexists('zhtc_news','details')) {pdo_query("ALTER TABLE ".tablename('zhtc_news')." ADD `details` text NOT NULL COMMENT '公告详情'");}
  1405. if(!pdo_fieldexists('zhtc_news','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_news')." ADD `num` int(11) NOT NULL COMMENT '排序'");}
  1406. if(!pdo_fieldexists('zhtc_news','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_news')." ADD `uniacid` int(11) NOT NULL");}
  1407. if(!pdo_fieldexists('zhtc_news','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_news')." ADD `time` int(11) NOT NULL");}
  1408. if(!pdo_fieldexists('zhtc_news','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_news')." ADD `img` varchar(100) NOT NULL");}
  1409. if(!pdo_fieldexists('zhtc_news','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_news')." ADD `state` int(11) NOT NULL");}
  1410. if(!pdo_fieldexists('zhtc_news','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_news')." ADD `type` int(11) NOT NULL");}
  1411. if(!pdo_fieldexists('zhtc_news','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_news')." ADD `cityname` varchar(50) NOT NULL");}
  1412. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_order` (
  1413. `id` int(11) NOT NULL AUTO_INCREMENT,
  1414. `user_id` int(11) NOT NULL,
  1415. `store_id` int(11) NOT NULL,
  1416. `money` decimal(10,2) NOT NULL COMMENT '金额',
  1417. `user_name` varchar(20) NOT NULL COMMENT '联系人',
  1418. `address` varchar(200) NOT NULL COMMENT '联系地址',
  1419. `tel` varchar(20) NOT NULL COMMENT '电话',
  1420. `time` int(11) NOT NULL COMMENT '下单时间',
  1421. `pay_time` int(11) NOT NULL,
  1422. `complete_time` int(11) NOT NULL,
  1423. `fh_time` int(11) NOT NULL COMMENT '发货时间',
  1424. `state` int(11) NOT NULL COMMENT '1.待付款 2.待发货3.待确认4.已完成5.退款中6.已退款7.退款拒绝',
  1425. `order_num` varchar(20) NOT NULL COMMENT '订单号',
  1426. `good_id` int(11) NOT NULL,
  1427. `good_name` varchar(100) NOT NULL,
  1428. `good_img` varchar(100) NOT NULL,
  1429. `good_money` decimal(10,2) NOT NULL,
  1430. `out_trade_no` varchar(50) NOT NULL,
  1431. `good_spec` varchar(200) NOT NULL COMMENT '商品规格',
  1432. `del` int(11) NOT NULL COMMENT '用户删除1是 2否 ',
  1433. `del2` int(11) NOT NULL COMMENT '商家删除1.是2.否',
  1434. `uniacid` int(11) NOT NULL,
  1435. `freight` decimal(10,2) NOT NULL,
  1436. `note` varchar(100) NOT NULL,
  1437. `good_num` int(11) NOT NULL,
  1438. `is_zt` int(11) NOT NULL DEFAULT '2',
  1439. `zt_time` varchar(20) NOT NULL,
  1440. `kd_num` varchar(100) NOT NULL,
  1441. `kd_name` varchar(20) NOT NULL,
  1442. PRIMARY KEY (`id`)
  1443. ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COMMENT='订单表';
  1444. ");
  1445. if(!pdo_fieldexists('zhtc_order','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD
  1446. `id` int(11) NOT NULL AUTO_INCREMENT");}
  1447. if(!pdo_fieldexists('zhtc_order','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `user_id` int(11) NOT NULL");}
  1448. if(!pdo_fieldexists('zhtc_order','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `store_id` int(11) NOT NULL");}
  1449. if(!pdo_fieldexists('zhtc_order','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `money` decimal(10,2) NOT NULL COMMENT '金额'");}
  1450. if(!pdo_fieldexists('zhtc_order','user_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `user_name` varchar(20) NOT NULL COMMENT '联系人'");}
  1451. if(!pdo_fieldexists('zhtc_order','address')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `address` varchar(200) NOT NULL COMMENT '联系地址'");}
  1452. if(!pdo_fieldexists('zhtc_order','tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `tel` varchar(20) NOT NULL COMMENT '电话'");}
  1453. if(!pdo_fieldexists('zhtc_order','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `time` int(11) NOT NULL COMMENT '下单时间'");}
  1454. if(!pdo_fieldexists('zhtc_order','pay_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `pay_time` int(11) NOT NULL");}
  1455. if(!pdo_fieldexists('zhtc_order','complete_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `complete_time` int(11) NOT NULL");}
  1456. if(!pdo_fieldexists('zhtc_order','fh_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `fh_time` int(11) NOT NULL COMMENT '发货时间'");}
  1457. if(!pdo_fieldexists('zhtc_order','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `state` int(11) NOT NULL COMMENT '1.待付款 2.待发货3.待确认4.已完成5.退款中6.已退款7.退款拒绝'");}
  1458. if(!pdo_fieldexists('zhtc_order','order_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `order_num` varchar(20) NOT NULL COMMENT '订单号'");}
  1459. if(!pdo_fieldexists('zhtc_order','good_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `good_id` int(11) NOT NULL");}
  1460. if(!pdo_fieldexists('zhtc_order','good_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `good_name` varchar(100) NOT NULL");}
  1461. if(!pdo_fieldexists('zhtc_order','good_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `good_img` varchar(100) NOT NULL");}
  1462. if(!pdo_fieldexists('zhtc_order','good_money')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `good_money` decimal(10,2) NOT NULL");}
  1463. if(!pdo_fieldexists('zhtc_order','out_trade_no')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `out_trade_no` varchar(50) NOT NULL");}
  1464. if(!pdo_fieldexists('zhtc_order','good_spec')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `good_spec` varchar(200) NOT NULL COMMENT '商品规格'");}
  1465. if(!pdo_fieldexists('zhtc_order','del')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `del` int(11) NOT NULL COMMENT '用户删除1是 2否 '");}
  1466. if(!pdo_fieldexists('zhtc_order','del2')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `del2` int(11) NOT NULL COMMENT '商家删除1.是2.否'");}
  1467. if(!pdo_fieldexists('zhtc_order','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `uniacid` int(11) NOT NULL");}
  1468. if(!pdo_fieldexists('zhtc_order','freight')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `freight` decimal(10,2) NOT NULL");}
  1469. if(!pdo_fieldexists('zhtc_order','note')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `note` varchar(100) NOT NULL");}
  1470. if(!pdo_fieldexists('zhtc_order','good_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `good_num` int(11) NOT NULL");}
  1471. if(!pdo_fieldexists('zhtc_order','is_zt')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `is_zt` int(11) NOT NULL DEFAULT '2'");}
  1472. if(!pdo_fieldexists('zhtc_order','zt_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `zt_time` varchar(20) NOT NULL");}
  1473. if(!pdo_fieldexists('zhtc_order','kd_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `kd_num` varchar(100) NOT NULL");}
  1474. if(!pdo_fieldexists('zhtc_order','kd_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_order')." ADD `kd_name` varchar(20) NOT NULL");}
  1475. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_paylog` (
  1476. `id` int(11) NOT NULL AUTO_INCREMENT,
  1477. `fid` int(11) NOT NULL COMMENT '外键id(商家,帖子,黄页,拼车)',
  1478. `money` decimal(10,2) NOT NULL COMMENT '钱',
  1479. `time` datetime NOT NULL COMMENT '时间',
  1480. `uniacid` varchar(50) NOT NULL COMMENT '50',
  1481. `note` varchar(100) NOT NULL,
  1482. PRIMARY KEY (`id`)
  1483. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='支付记录表';
  1484. ");
  1485. if(!pdo_fieldexists('zhtc_paylog','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_paylog')." ADD
  1486. `id` int(11) NOT NULL AUTO_INCREMENT");}
  1487. if(!pdo_fieldexists('zhtc_paylog','fid')) {pdo_query("ALTER TABLE ".tablename('zhtc_paylog')." ADD `fid` int(11) NOT NULL COMMENT '外键id(商家,帖子,黄页,拼车)'");}
  1488. if(!pdo_fieldexists('zhtc_paylog','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_paylog')." ADD `money` decimal(10,2) NOT NULL COMMENT '钱'");}
  1489. if(!pdo_fieldexists('zhtc_paylog','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_paylog')." ADD `time` datetime NOT NULL COMMENT '时间'");}
  1490. if(!pdo_fieldexists('zhtc_paylog','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_paylog')." ADD `uniacid` varchar(50) NOT NULL COMMENT '50'");}
  1491. if(!pdo_fieldexists('zhtc_paylog','note')) {pdo_query("ALTER TABLE ".tablename('zhtc_paylog')." ADD `note` varchar(100) NOT NULL");}
  1492. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_plate` (
  1493. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1494. `type` int(4) NOT NULL,
  1495. `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '名称',
  1496. `time` int(11) NOT NULL,
  1497. `uniacid` int(11) NOT NULL,
  1498. `sort` int(11) NOT NULL COMMENT '排序',
  1499. PRIMARY KEY (`id`)
  1500. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='首页板块导航';
  1501. ");
  1502. if(!pdo_fieldexists('zhtc_plate','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_plate')." ADD
  1503. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1504. if(!pdo_fieldexists('zhtc_plate','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_plate')." ADD `type` int(4) NOT NULL");}
  1505. if(!pdo_fieldexists('zhtc_plate','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_plate')." ADD `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '名称'");}
  1506. if(!pdo_fieldexists('zhtc_plate','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_plate')." ADD `time` int(11) NOT NULL");}
  1507. if(!pdo_fieldexists('zhtc_plate','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_plate')." ADD `uniacid` int(11) NOT NULL");}
  1508. if(!pdo_fieldexists('zhtc_plate','sort')) {pdo_query("ALTER TABLE ".tablename('zhtc_plate')." ADD `sort` int(11) NOT NULL COMMENT '排序'");}
  1509. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_qbmx` (
  1510. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1511. `money` decimal(10,2) NOT NULL,
  1512. `type` int(11) NOT NULL,
  1513. `note` varchar(20) NOT NULL,
  1514. `time` varchar(20) NOT NULL,
  1515. `user_id` int(11) NOT NULL,
  1516. PRIMARY KEY (`id`)
  1517. ) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
  1518. ");
  1519. if(!pdo_fieldexists('zhtc_qbmx','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_qbmx')." ADD
  1520. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1521. if(!pdo_fieldexists('zhtc_qbmx','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_qbmx')." ADD `money` decimal(10,2) NOT NULL");}
  1522. if(!pdo_fieldexists('zhtc_qbmx','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_qbmx')." ADD `type` int(11) NOT NULL");}
  1523. if(!pdo_fieldexists('zhtc_qbmx','note')) {pdo_query("ALTER TABLE ".tablename('zhtc_qbmx')." ADD `note` varchar(20) NOT NULL");}
  1524. if(!pdo_fieldexists('zhtc_qbmx','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_qbmx')." ADD `time` varchar(20) NOT NULL");}
  1525. if(!pdo_fieldexists('zhtc_qbmx','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_qbmx')." ADD `user_id` int(11) NOT NULL");}
  1526. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_qggoods` (
  1527. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1528. `name` varchar(20) NOT NULL,
  1529. `logo` varchar(200) NOT NULL,
  1530. `price` decimal(10,1) NOT NULL COMMENT '原价',
  1531. `money` decimal(10,1) NOT NULL COMMENT '现价',
  1532. `number` int(11) NOT NULL COMMENT '数量',
  1533. `surplus` int(11) NOT NULL COMMENT '剩余',
  1534. `start_time` varchar(20) NOT NULL COMMENT '开始时间',
  1535. `end_time` varchar(20) NOT NULL COMMENT '结束时间',
  1536. `consumption_time` int(11) NOT NULL COMMENT '消费截止时间',
  1537. `details` text NOT NULL,
  1538. `store_id` int(11) NOT NULL,
  1539. `uniacid` int(11) NOT NULL,
  1540. `state` int(11) NOT NULL DEFAULT '1' COMMENT '1.上架2.下架',
  1541. `state2` int(11) NOT NULL DEFAULT '1',
  1542. `is_tg` int(11) NOT NULL DEFAULT '1',
  1543. `type_id` int(11) NOT NULL,
  1544. `img` text NOT NULL,
  1545. `num` int(11) NOT NULL,
  1546. `hot` int(11) NOT NULL,
  1547. `content` varchar(100) NOT NULL,
  1548. `details_img` text NOT NULL,
  1549. `time` varchar(20) NOT NULL,
  1550. `cityname` varchar(20) NOT NULL,
  1551. PRIMARY KEY (`id`)
  1552. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  1553. ");
  1554. if(!pdo_fieldexists('zhtc_qggoods','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD
  1555. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1556. if(!pdo_fieldexists('zhtc_qggoods','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `name` varchar(20) NOT NULL");}
  1557. if(!pdo_fieldexists('zhtc_qggoods','logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `logo` varchar(200) NOT NULL");}
  1558. if(!pdo_fieldexists('zhtc_qggoods','price')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `price` decimal(10,1) NOT NULL COMMENT '原价'");}
  1559. if(!pdo_fieldexists('zhtc_qggoods','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `money` decimal(10,1) NOT NULL COMMENT '现价'");}
  1560. if(!pdo_fieldexists('zhtc_qggoods','number')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `number` int(11) NOT NULL COMMENT '数量'");}
  1561. if(!pdo_fieldexists('zhtc_qggoods','surplus')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `surplus` int(11) NOT NULL COMMENT '剩余'");}
  1562. if(!pdo_fieldexists('zhtc_qggoods','start_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `start_time` varchar(20) NOT NULL COMMENT '开始时间'");}
  1563. if(!pdo_fieldexists('zhtc_qggoods','end_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `end_time` varchar(20) NOT NULL COMMENT '结束时间'");}
  1564. if(!pdo_fieldexists('zhtc_qggoods','consumption_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `consumption_time` int(11) NOT NULL COMMENT '消费截止时间'");}
  1565. if(!pdo_fieldexists('zhtc_qggoods','details')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `details` text NOT NULL");}
  1566. if(!pdo_fieldexists('zhtc_qggoods','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `store_id` int(11) NOT NULL");}
  1567. if(!pdo_fieldexists('zhtc_qggoods','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `uniacid` int(11) NOT NULL");}
  1568. if(!pdo_fieldexists('zhtc_qggoods','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `state` int(11) NOT NULL DEFAULT '1' COMMENT '1.上架2.下架'");}
  1569. if(!pdo_fieldexists('zhtc_qggoods','state2')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `state2` int(11) NOT NULL DEFAULT '1'");}
  1570. if(!pdo_fieldexists('zhtc_qggoods','is_tg')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `is_tg` int(11) NOT NULL DEFAULT '1'");}
  1571. if(!pdo_fieldexists('zhtc_qggoods','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `type_id` int(11) NOT NULL");}
  1572. if(!pdo_fieldexists('zhtc_qggoods','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `img` text NOT NULL");}
  1573. if(!pdo_fieldexists('zhtc_qggoods','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `num` int(11) NOT NULL");}
  1574. if(!pdo_fieldexists('zhtc_qggoods','hot')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `hot` int(11) NOT NULL");}
  1575. if(!pdo_fieldexists('zhtc_qggoods','content')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `content` varchar(100) NOT NULL");}
  1576. if(!pdo_fieldexists('zhtc_qggoods','details_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `details_img` text NOT NULL");}
  1577. if(!pdo_fieldexists('zhtc_qggoods','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `time` varchar(20) NOT NULL");}
  1578. if(!pdo_fieldexists('zhtc_qggoods','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_qggoods')." ADD `cityname` varchar(20) NOT NULL");}
  1579. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_qgorder` (
  1580. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1581. `order_num` varchar(50) NOT NULL,
  1582. `user_id` int(11) NOT NULL,
  1583. `user_name` varchar(20) NOT NULL,
  1584. `user_tel` varchar(20) NOT NULL,
  1585. `store_id` int(11) NOT NULL,
  1586. `money` decimal(10,2) NOT NULL,
  1587. `good_id` int(11) NOT NULL,
  1588. `pay_type` int(11) NOT NULL COMMENT '1.微信支付2.余额支付',
  1589. `state` int(11) NOT NULL COMMENT '1.待支付2已支付3.已核销',
  1590. `dq_time` varchar(20) NOT NULL COMMENT '到期时间',
  1591. `uniacid` int(11) NOT NULL,
  1592. `code` varchar(100) NOT NULL,
  1593. `good_name` varchar(20) NOT NULL,
  1594. `good_logo` varchar(200) NOT NULL,
  1595. `pay_time` varchar(20) NOT NULL,
  1596. `hx_time` varchar(20) NOT NULL,
  1597. `del` int(11) NOT NULL DEFAULT '2' COMMENT '1删除2.未删除',
  1598. `note` varchar(50) NOT NULL,
  1599. PRIMARY KEY (`id`)
  1600. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  1601. ");
  1602. if(!pdo_fieldexists('zhtc_qgorder','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD
  1603. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1604. if(!pdo_fieldexists('zhtc_qgorder','order_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `order_num` varchar(50) NOT NULL");}
  1605. if(!pdo_fieldexists('zhtc_qgorder','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `user_id` int(11) NOT NULL");}
  1606. if(!pdo_fieldexists('zhtc_qgorder','user_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `user_name` varchar(20) NOT NULL");}
  1607. if(!pdo_fieldexists('zhtc_qgorder','user_tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `user_tel` varchar(20) NOT NULL");}
  1608. if(!pdo_fieldexists('zhtc_qgorder','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `store_id` int(11) NOT NULL");}
  1609. if(!pdo_fieldexists('zhtc_qgorder','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `money` decimal(10,2) NOT NULL");}
  1610. if(!pdo_fieldexists('zhtc_qgorder','good_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `good_id` int(11) NOT NULL");}
  1611. if(!pdo_fieldexists('zhtc_qgorder','pay_type')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `pay_type` int(11) NOT NULL COMMENT '1.微信支付2.余额支付'");}
  1612. if(!pdo_fieldexists('zhtc_qgorder','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `state` int(11) NOT NULL COMMENT '1.待支付2已支付3.已核销'");}
  1613. if(!pdo_fieldexists('zhtc_qgorder','dq_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `dq_time` varchar(20) NOT NULL COMMENT '到期时间'");}
  1614. if(!pdo_fieldexists('zhtc_qgorder','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `uniacid` int(11) NOT NULL");}
  1615. if(!pdo_fieldexists('zhtc_qgorder','code')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `code` varchar(100) NOT NULL");}
  1616. if(!pdo_fieldexists('zhtc_qgorder','good_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `good_name` varchar(20) NOT NULL");}
  1617. if(!pdo_fieldexists('zhtc_qgorder','good_logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `good_logo` varchar(200) NOT NULL");}
  1618. if(!pdo_fieldexists('zhtc_qgorder','pay_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `pay_time` varchar(20) NOT NULL");}
  1619. if(!pdo_fieldexists('zhtc_qgorder','hx_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `hx_time` varchar(20) NOT NULL");}
  1620. if(!pdo_fieldexists('zhtc_qgorder','del')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `del` int(11) NOT NULL DEFAULT '2' COMMENT '1删除2.未删除'");}
  1621. if(!pdo_fieldexists('zhtc_qgorder','note')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgorder')." ADD `note` varchar(50) NOT NULL");}
  1622. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_qgtype` (
  1623. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1624. `name` varchar(20) NOT NULL,
  1625. `num` int(11) NOT NULL,
  1626. `uniacid` int(11) NOT NULL,
  1627. `state` int(4) NOT NULL DEFAULT '1',
  1628. `img` varchar(500) NOT NULL,
  1629. PRIMARY KEY (`id`)
  1630. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  1631. ");
  1632. if(!pdo_fieldexists('zhtc_qgtype','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgtype')." ADD
  1633. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1634. if(!pdo_fieldexists('zhtc_qgtype','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgtype')." ADD `name` varchar(20) NOT NULL");}
  1635. if(!pdo_fieldexists('zhtc_qgtype','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgtype')." ADD `num` int(11) NOT NULL");}
  1636. if(!pdo_fieldexists('zhtc_qgtype','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgtype')." ADD `uniacid` int(11) NOT NULL");}
  1637. if(!pdo_fieldexists('zhtc_qgtype','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgtype')." ADD `state` int(4) NOT NULL DEFAULT '1'");}
  1638. if(!pdo_fieldexists('zhtc_qgtype','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_qgtype')." ADD `img` varchar(500) NOT NULL");}
  1639. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_sensitive` (
  1640. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1641. `content` text NOT NULL COMMENT '内容',
  1642. `uniacid` int(11) NOT NULL COMMENT '11',
  1643. PRIMARY KEY (`id`)
  1644. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='敏感词表';
  1645. ");
  1646. if(!pdo_fieldexists('zhtc_sensitive','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_sensitive')." ADD
  1647. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1648. if(!pdo_fieldexists('zhtc_sensitive','content')) {pdo_query("ALTER TABLE ".tablename('zhtc_sensitive')." ADD `content` text NOT NULL COMMENT '内容'");}
  1649. if(!pdo_fieldexists('zhtc_sensitive','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_sensitive')." ADD `uniacid` int(11) NOT NULL COMMENT '11'");}
  1650. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_share` (
  1651. `id` int(11) NOT NULL AUTO_INCREMENT,
  1652. `information_id` int(11) NOT NULL COMMENT '帖子id',
  1653. `user_id` int(11) NOT NULL COMMENT '用户id',
  1654. `store_id` int(11) NOT NULL,
  1655. PRIMARY KEY (`id`)
  1656. ) ENGINE=InnoDB AUTO_INCREMENT=391 DEFAULT CHARSET=utf8;
  1657. ");
  1658. if(!pdo_fieldexists('zhtc_share','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_share')." ADD
  1659. `id` int(11) NOT NULL AUTO_INCREMENT");}
  1660. if(!pdo_fieldexists('zhtc_share','information_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_share')." ADD `information_id` int(11) NOT NULL COMMENT '帖子id'");}
  1661. if(!pdo_fieldexists('zhtc_share','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_share')." ADD `user_id` int(11) NOT NULL COMMENT '用户id'");}
  1662. if(!pdo_fieldexists('zhtc_share','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_share')." ADD `store_id` int(11) NOT NULL");}
  1663. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_signlist` (
  1664. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1665. `user_id` int(11) NOT NULL,
  1666. `time` varchar(20) NOT NULL COMMENT '签到时间',
  1667. `time2` int(11) NOT NULL,
  1668. `integral` int(11) NOT NULL,
  1669. `uniacid` int(11) NOT NULL,
  1670. `time3` int(11) NOT NULL,
  1671. PRIMARY KEY (`id`)
  1672. ) ENGINE=InnoDB AUTO_INCREMENT=1356 DEFAULT CHARSET=utf8;
  1673. ");
  1674. if(!pdo_fieldexists('zhtc_signlist','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_signlist')." ADD
  1675. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1676. if(!pdo_fieldexists('zhtc_signlist','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_signlist')." ADD `user_id` int(11) NOT NULL");}
  1677. if(!pdo_fieldexists('zhtc_signlist','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_signlist')." ADD `time` varchar(20) NOT NULL COMMENT '签到时间'");}
  1678. if(!pdo_fieldexists('zhtc_signlist','time2')) {pdo_query("ALTER TABLE ".tablename('zhtc_signlist')." ADD `time2` int(11) NOT NULL");}
  1679. if(!pdo_fieldexists('zhtc_signlist','integral')) {pdo_query("ALTER TABLE ".tablename('zhtc_signlist')." ADD `integral` int(11) NOT NULL");}
  1680. if(!pdo_fieldexists('zhtc_signlist','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_signlist')." ADD `uniacid` int(11) NOT NULL");}
  1681. if(!pdo_fieldexists('zhtc_signlist','time3')) {pdo_query("ALTER TABLE ".tablename('zhtc_signlist')." ADD `time3` int(11) NOT NULL");}
  1682. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_signset` (
  1683. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1684. `one` int(11) NOT NULL COMMENT '首次奖励积分',
  1685. `integral` int(11) NOT NULL COMMENT '每天签到积分',
  1686. `is_open` int(11) NOT NULL COMMENT '1.开启2.关闭 签到',
  1687. `is_bq` int(11) NOT NULL COMMENT '1.开启2.关闭 补签',
  1688. `bq_integral` int(11) NOT NULL COMMENT '补签扣除积分',
  1689. `details` text NOT NULL COMMENT '签到说明',
  1690. `uniacid` int(11) NOT NULL,
  1691. `qd_img` varchar(200) NOT NULL,
  1692. PRIMARY KEY (`id`)
  1693. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  1694. ");
  1695. if(!pdo_fieldexists('zhtc_signset','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_signset')." ADD
  1696. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1697. if(!pdo_fieldexists('zhtc_signset','one')) {pdo_query("ALTER TABLE ".tablename('zhtc_signset')." ADD `one` int(11) NOT NULL COMMENT '首次奖励积分'");}
  1698. if(!pdo_fieldexists('zhtc_signset','integral')) {pdo_query("ALTER TABLE ".tablename('zhtc_signset')." ADD `integral` int(11) NOT NULL COMMENT '每天签到积分'");}
  1699. if(!pdo_fieldexists('zhtc_signset','is_open')) {pdo_query("ALTER TABLE ".tablename('zhtc_signset')." ADD `is_open` int(11) NOT NULL COMMENT '1.开启2.关闭 签到'");}
  1700. if(!pdo_fieldexists('zhtc_signset','is_bq')) {pdo_query("ALTER TABLE ".tablename('zhtc_signset')." ADD `is_bq` int(11) NOT NULL COMMENT '1.开启2.关闭 补签'");}
  1701. if(!pdo_fieldexists('zhtc_signset','bq_integral')) {pdo_query("ALTER TABLE ".tablename('zhtc_signset')." ADD `bq_integral` int(11) NOT NULL COMMENT '补签扣除积分'");}
  1702. if(!pdo_fieldexists('zhtc_signset','details')) {pdo_query("ALTER TABLE ".tablename('zhtc_signset')." ADD `details` text NOT NULL COMMENT '签到说明'");}
  1703. if(!pdo_fieldexists('zhtc_signset','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_signset')." ADD `uniacid` int(11) NOT NULL");}
  1704. if(!pdo_fieldexists('zhtc_signset','qd_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_signset')." ADD `qd_img` varchar(200) NOT NULL");}
  1705. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_sms` (
  1706. `id` int(11) NOT NULL AUTO_INCREMENT,
  1707. `appkey` varchar(100) NOT NULL,
  1708. `tpl_id` varchar(20) NOT NULL,
  1709. `uniacid` int(11) NOT NULL,
  1710. `is_open` int(11) NOT NULL DEFAULT '2',
  1711. `tid1` varchar(50) NOT NULL,
  1712. `tid2` varchar(50) NOT NULL,
  1713. `tid3` varchar(50) NOT NULL,
  1714. `tpl2_id` varchar(20) NOT NULL,
  1715. `fh_tid` varchar(200) NOT NULL,
  1716. `gm_tid` varchar(200) NOT NULL,
  1717. `hp_tid` varchar(200) NOT NULL,
  1718. `dz_tid` varchar(200) NOT NULL,
  1719. `tg_tid` varchar(200) NOT NULL,
  1720. `qf_tid` varchar(200) NOT NULL,
  1721. `qg_tid` varchar(200) NOT NULL,
  1722. `hd_tid` varchar(200) NOT NULL,
  1723. `pt_tid` varchar(200) NOT NULL,
  1724. `kq_tid` varchar(200) NOT NULL,
  1725. `aliyun_appkey` varchar(100) NOT NULL,
  1726. `aliyun_appsecret` varchar(50) NOT NULL,
  1727. `aliyun_sign` varchar(20) NOT NULL,
  1728. `item` int(4) NOT NULL DEFAULT '1',
  1729. PRIMARY KEY (`id`)
  1730. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
  1731. ");
  1732. if(!pdo_fieldexists('zhtc_sms','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD
  1733. `id` int(11) NOT NULL AUTO_INCREMENT");}
  1734. if(!pdo_fieldexists('zhtc_sms','appkey')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `appkey` varchar(100) NOT NULL");}
  1735. if(!pdo_fieldexists('zhtc_sms','tpl_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `tpl_id` varchar(20) NOT NULL");}
  1736. if(!pdo_fieldexists('zhtc_sms','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `uniacid` int(11) NOT NULL");}
  1737. if(!pdo_fieldexists('zhtc_sms','is_open')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `is_open` int(11) NOT NULL DEFAULT '2'");}
  1738. if(!pdo_fieldexists('zhtc_sms','tid1')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `tid1` varchar(50) NOT NULL");}
  1739. if(!pdo_fieldexists('zhtc_sms','tid2')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `tid2` varchar(50) NOT NULL");}
  1740. if(!pdo_fieldexists('zhtc_sms','tid3')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `tid3` varchar(50) NOT NULL");}
  1741. if(!pdo_fieldexists('zhtc_sms','tpl2_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `tpl2_id` varchar(20) NOT NULL");}
  1742. if(!pdo_fieldexists('zhtc_sms','fh_tid')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `fh_tid` varchar(200) NOT NULL");}
  1743. if(!pdo_fieldexists('zhtc_sms','gm_tid')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `gm_tid` varchar(200) NOT NULL");}
  1744. if(!pdo_fieldexists('zhtc_sms','hp_tid')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `hp_tid` varchar(200) NOT NULL");}
  1745. if(!pdo_fieldexists('zhtc_sms','dz_tid')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `dz_tid` varchar(200) NOT NULL");}
  1746. if(!pdo_fieldexists('zhtc_sms','tg_tid')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `tg_tid` varchar(200) NOT NULL");}
  1747. if(!pdo_fieldexists('zhtc_sms','qf_tid')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `qf_tid` varchar(200) NOT NULL");}
  1748. if(!pdo_fieldexists('zhtc_sms','qg_tid')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `qg_tid` varchar(200) NOT NULL");}
  1749. if(!pdo_fieldexists('zhtc_sms','hd_tid')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `hd_tid` varchar(200) NOT NULL");}
  1750. if(!pdo_fieldexists('zhtc_sms','pt_tid')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `pt_tid` varchar(200) NOT NULL");}
  1751. if(!pdo_fieldexists('zhtc_sms','kq_tid')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `kq_tid` varchar(200) NOT NULL");}
  1752. if(!pdo_fieldexists('zhtc_sms','aliyun_appkey')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `aliyun_appkey` varchar(100) NOT NULL");}
  1753. if(!pdo_fieldexists('zhtc_sms','aliyun_appsecret')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `aliyun_appsecret` varchar(50) NOT NULL");}
  1754. if(!pdo_fieldexists('zhtc_sms','aliyun_sign')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `aliyun_sign` varchar(20) NOT NULL");}
  1755. if(!pdo_fieldexists('zhtc_sms','item')) {pdo_query("ALTER TABLE ".tablename('zhtc_sms')." ADD `item` int(4) NOT NULL DEFAULT '1'");}
  1756. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_spec_value` (
  1757. `id` int(11) NOT NULL AUTO_INCREMENT,
  1758. `goods_id` int(11) NOT NULL COMMENT '商品ID',
  1759. `spec_id` int(11) NOT NULL,
  1760. `money` decimal(10,2) NOT NULL COMMENT '价格',
  1761. `name` varchar(50) NOT NULL COMMENT '名称',
  1762. `num` int(11) NOT NULL COMMENT '数量',
  1763. PRIMARY KEY (`id`)
  1764. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  1765. ");
  1766. if(!pdo_fieldexists('zhtc_spec_value','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_spec_value')." ADD
  1767. `id` int(11) NOT NULL AUTO_INCREMENT");}
  1768. if(!pdo_fieldexists('zhtc_spec_value','goods_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_spec_value')." ADD `goods_id` int(11) NOT NULL COMMENT '商品ID'");}
  1769. if(!pdo_fieldexists('zhtc_spec_value','spec_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_spec_value')." ADD `spec_id` int(11) NOT NULL");}
  1770. if(!pdo_fieldexists('zhtc_spec_value','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_spec_value')." ADD `money` decimal(10,2) NOT NULL COMMENT '价格'");}
  1771. if(!pdo_fieldexists('zhtc_spec_value','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_spec_value')." ADD `name` varchar(50) NOT NULL COMMENT '名称'");}
  1772. if(!pdo_fieldexists('zhtc_spec_value','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_spec_value')." ADD `num` int(11) NOT NULL COMMENT '数量'");}
  1773. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_special` (
  1774. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1775. `day` varchar(20) NOT NULL COMMENT '日期',
  1776. `integral` int(11) NOT NULL COMMENT '积分',
  1777. `title` varchar(20) NOT NULL COMMENT '标题说明',
  1778. `color` varchar(20) NOT NULL COMMENT '颜色',
  1779. `uniacid` int(11) NOT NULL,
  1780. PRIMARY KEY (`id`)
  1781. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  1782. ");
  1783. if(!pdo_fieldexists('zhtc_special','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_special')." ADD
  1784. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  1785. if(!pdo_fieldexists('zhtc_special','day')) {pdo_query("ALTER TABLE ".tablename('zhtc_special')." ADD `day` varchar(20) NOT NULL COMMENT '日期'");}
  1786. if(!pdo_fieldexists('zhtc_special','integral')) {pdo_query("ALTER TABLE ".tablename('zhtc_special')." ADD `integral` int(11) NOT NULL COMMENT '积分'");}
  1787. if(!pdo_fieldexists('zhtc_special','title')) {pdo_query("ALTER TABLE ".tablename('zhtc_special')." ADD `title` varchar(20) NOT NULL COMMENT '标题说明'");}
  1788. if(!pdo_fieldexists('zhtc_special','color')) {pdo_query("ALTER TABLE ".tablename('zhtc_special')." ADD `color` varchar(20) NOT NULL COMMENT '颜色'");}
  1789. if(!pdo_fieldexists('zhtc_special','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_special')." ADD `uniacid` int(11) NOT NULL");}
  1790. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_store` (
  1791. `id` int(11) NOT NULL AUTO_INCREMENT,
  1792. `user_id` int(11) NOT NULL COMMENT '用户id',
  1793. `store_name` varchar(50) NOT NULL COMMENT '商家名称',
  1794. `address` varchar(200) NOT NULL COMMENT '商家地址',
  1795. `announcement` varchar(100) NOT NULL COMMENT '公告',
  1796. `storetype_id` int(11) NOT NULL COMMENT '主行业分类id',
  1797. `storetype2_id` int(11) NOT NULL COMMENT '商家子分类id',
  1798. `area_id` int(11) NOT NULL COMMENT '区域id',
  1799. `yy_time` varchar(50) NOT NULL COMMENT '营业时间',
  1800. `keyword` varchar(50) NOT NULL COMMENT '关键字',
  1801. `skzf` int(11) NOT NULL COMMENT '1.是 2否(刷卡支付)',
  1802. `wifi` int(11) NOT NULL COMMENT '1.是 2否',
  1803. `mftc` int(11) NOT NULL COMMENT '1.是 2否(免费停车)',
  1804. `jzxy` int(11) NOT NULL COMMENT '1.是 2否(禁止吸烟)',
  1805. `tgbj` int(11) NOT NULL COMMENT '1.是 2否(提供包间)',
  1806. `sfxx` int(11) NOT NULL COMMENT '1.是 2否(沙发休闲)',
  1807. `tel` varchar(20) NOT NULL COMMENT '手机号',
  1808. `logo` varchar(100) NOT NULL,
  1809. `weixin_logo` varchar(100) NOT NULL,
  1810. `ad` text NOT NULL COMMENT '轮播图',
  1811. `state` int(11) NOT NULL COMMENT '1.待审核2通过3拒绝',
  1812. `money` decimal(10,2) NOT NULL COMMENT '金额',
  1813. `password` varchar(100) NOT NULL COMMENT '核销密码',
  1814. `details` text NOT NULL COMMENT '商家简介',
  1815. `uniacid` int(11) NOT NULL,
  1816. `coordinates` varchar(50) NOT NULL,
  1817. `views` int(11) NOT NULL,
  1818. `score` decimal(10,1) NOT NULL,
  1819. `type` int(11) NOT NULL,
  1820. `sh_time` int(11) NOT NULL,
  1821. `time_over` int(11) NOT NULL,
  1822. `img` text NOT NULL,
  1823. `vr_link` text NOT NULL,
  1824. `num` int(11) NOT NULL,
  1825. `start_time` varchar(20) NOT NULL,
  1826. `end_time` varchar(20) NOT NULL,
  1827. `wallet` decimal(10,2) NOT NULL,
  1828. `user_name` varchar(30) NOT NULL,
  1829. `pwd` varchar(50) NOT NULL,
  1830. `dq_time` int(11) NOT NULL,
  1831. `cityname` varchar(50) NOT NULL,
  1832. `time` datetime NOT NULL,
  1833. `fx_num` int(11) NOT NULL,
  1834. `ewm_logo` varchar(100) NOT NULL,
  1835. `is_top` int(4) NOT NULL DEFAULT '2',
  1836. `yyzz_img` varchar(100) NOT NULL,
  1837. `sfz_img` varchar(100) NOT NULL,
  1838. `is_rm` int(11) NOT NULL DEFAULT '2',
  1839. `video` varchar(300) NOT NULL,
  1840. `is_shop` int(1) NOT NULL DEFAULT '1',
  1841. `is_pt` int(1) NOT NULL DEFAULT '1',
  1842. `is_qg` int(1) NOT NULL DEFAULT '1',
  1843. `is_yhq` int(1) NOT NULL DEFAULT '1',
  1844. PRIMARY KEY (`id`),
  1845. KEY `uniacid` (`uniacid`),
  1846. KEY `user_id` (`user_id`),
  1847. KEY `storetype2_id` (`storetype2_id`),
  1848. KEY `storetype_id` (`storetype_id`),
  1849. KEY `state` (`state`),
  1850. KEY `uniacid_2` (`uniacid`),
  1851. KEY `user_id_2` (`user_id`),
  1852. KEY `storetype2_id_2` (`storetype2_id`),
  1853. KEY `storetype_id_2` (`storetype_id`),
  1854. KEY `state_2` (`state`),
  1855. KEY `uniacid_3` (`uniacid`),
  1856. KEY `user_id_3` (`user_id`),
  1857. KEY `storetype2_id_3` (`storetype2_id`),
  1858. KEY `storetype_id_3` (`storetype_id`),
  1859. KEY `state_3` (`state`),
  1860. KEY `uniacid_4` (`uniacid`),
  1861. KEY `user_id_4` (`user_id`),
  1862. KEY `storetype2_id_4` (`storetype2_id`),
  1863. KEY `storetype_id_4` (`storetype_id`),
  1864. KEY `state_4` (`state`),
  1865. KEY `uniacid_5` (`uniacid`),
  1866. KEY `user_id_5` (`user_id`),
  1867. KEY `storetype2_id_5` (`storetype2_id`),
  1868. KEY `storetype_id_5` (`storetype_id`),
  1869. KEY `state_5` (`state`),
  1870. KEY `uniacid_6` (`uniacid`),
  1871. KEY `user_id_6` (`user_id`),
  1872. KEY `storetype2_id_6` (`storetype2_id`),
  1873. KEY `storetype_id_6` (`storetype_id`),
  1874. KEY `state_6` (`state`),
  1875. KEY `uniacid_7` (`uniacid`),
  1876. KEY `user_id_7` (`user_id`),
  1877. KEY `storetype2_id_7` (`storetype2_id`),
  1878. KEY `storetype_id_7` (`storetype_id`),
  1879. KEY `state_7` (`state`),
  1880. KEY `uniacid_8` (`uniacid`),
  1881. KEY `user_id_8` (`user_id`),
  1882. KEY `storetype2_id_8` (`storetype2_id`),
  1883. KEY `storetype_id_8` (`storetype_id`),
  1884. KEY `state_8` (`state`),
  1885. KEY `uniacid_9` (`uniacid`),
  1886. KEY `user_id_9` (`user_id`),
  1887. KEY `storetype2_id_9` (`storetype2_id`),
  1888. KEY `storetype_id_9` (`storetype_id`),
  1889. KEY `state_9` (`state`),
  1890. KEY `uniacid_10` (`uniacid`),
  1891. KEY `user_id_10` (`user_id`),
  1892. KEY `storetype2_id_10` (`storetype2_id`),
  1893. KEY `storetype_id_10` (`storetype_id`),
  1894. KEY `state_10` (`state`),
  1895. KEY `uniacid_11` (`uniacid`),
  1896. KEY `user_id_11` (`user_id`),
  1897. KEY `storetype2_id_11` (`storetype2_id`),
  1898. KEY `storetype_id_11` (`storetype_id`),
  1899. KEY `state_11` (`state`),
  1900. KEY `uniacid_12` (`uniacid`),
  1901. KEY `user_id_12` (`user_id`),
  1902. KEY `storetype2_id_12` (`storetype2_id`),
  1903. KEY `storetype_id_12` (`storetype_id`),
  1904. KEY `state_12` (`state`)
  1905. ) ENGINE=InnoDB AUTO_INCREMENT=195 DEFAULT CHARSET=utf8;
  1906. ");
  1907. if(!pdo_fieldexists('zhtc_store','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD
  1908. `id` int(11) NOT NULL AUTO_INCREMENT");}
  1909. if(!pdo_fieldexists('zhtc_store','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `user_id` int(11) NOT NULL COMMENT '用户id'");}
  1910. if(!pdo_fieldexists('zhtc_store','store_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `store_name` varchar(50) NOT NULL COMMENT '商家名称'");}
  1911. if(!pdo_fieldexists('zhtc_store','address')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `address` varchar(200) NOT NULL COMMENT '商家地址'");}
  1912. if(!pdo_fieldexists('zhtc_store','announcement')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `announcement` varchar(100) NOT NULL COMMENT '公告'");}
  1913. if(!pdo_fieldexists('zhtc_store','storetype_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `storetype_id` int(11) NOT NULL COMMENT '主行业分类id'");}
  1914. if(!pdo_fieldexists('zhtc_store','storetype2_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `storetype2_id` int(11) NOT NULL COMMENT '商家子分类id'");}
  1915. if(!pdo_fieldexists('zhtc_store','area_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `area_id` int(11) NOT NULL COMMENT '区域id'");}
  1916. if(!pdo_fieldexists('zhtc_store','yy_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `yy_time` varchar(50) NOT NULL COMMENT '营业时间'");}
  1917. if(!pdo_fieldexists('zhtc_store','keyword')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `keyword` varchar(50) NOT NULL COMMENT '关键字'");}
  1918. if(!pdo_fieldexists('zhtc_store','skzf')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `skzf` int(11) NOT NULL COMMENT '1.是 2否(刷卡支付)'");}
  1919. if(!pdo_fieldexists('zhtc_store','wifi')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `wifi` int(11) NOT NULL COMMENT '1.是 2否'");}
  1920. if(!pdo_fieldexists('zhtc_store','mftc')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `mftc` int(11) NOT NULL COMMENT '1.是 2否(免费停车)'");}
  1921. if(!pdo_fieldexists('zhtc_store','jzxy')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `jzxy` int(11) NOT NULL COMMENT '1.是 2否(禁止吸烟)'");}
  1922. if(!pdo_fieldexists('zhtc_store','tgbj')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `tgbj` int(11) NOT NULL COMMENT '1.是 2否(提供包间)'");}
  1923. if(!pdo_fieldexists('zhtc_store','sfxx')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `sfxx` int(11) NOT NULL COMMENT '1.是 2否(沙发休闲)'");}
  1924. if(!pdo_fieldexists('zhtc_store','tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `tel` varchar(20) NOT NULL COMMENT '手机号'");}
  1925. if(!pdo_fieldexists('zhtc_store','logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `logo` varchar(100) NOT NULL");}
  1926. if(!pdo_fieldexists('zhtc_store','weixin_logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `weixin_logo` varchar(100) NOT NULL");}
  1927. if(!pdo_fieldexists('zhtc_store','ad')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `ad` text NOT NULL COMMENT '轮播图'");}
  1928. if(!pdo_fieldexists('zhtc_store','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `state` int(11) NOT NULL COMMENT '1.待审核2通过3拒绝'");}
  1929. if(!pdo_fieldexists('zhtc_store','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `money` decimal(10,2) NOT NULL COMMENT '金额'");}
  1930. if(!pdo_fieldexists('zhtc_store','password')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `password` varchar(100) NOT NULL COMMENT '核销密码'");}
  1931. if(!pdo_fieldexists('zhtc_store','details')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `details` text NOT NULL COMMENT '商家简介'");}
  1932. if(!pdo_fieldexists('zhtc_store','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `uniacid` int(11) NOT NULL");}
  1933. if(!pdo_fieldexists('zhtc_store','coordinates')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `coordinates` varchar(50) NOT NULL");}
  1934. if(!pdo_fieldexists('zhtc_store','views')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `views` int(11) NOT NULL");}
  1935. if(!pdo_fieldexists('zhtc_store','score')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `score` decimal(10,1) NOT NULL");}
  1936. if(!pdo_fieldexists('zhtc_store','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `type` int(11) NOT NULL");}
  1937. if(!pdo_fieldexists('zhtc_store','sh_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `sh_time` int(11) NOT NULL");}
  1938. if(!pdo_fieldexists('zhtc_store','time_over')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `time_over` int(11) NOT NULL");}
  1939. if(!pdo_fieldexists('zhtc_store','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `img` text NOT NULL");}
  1940. if(!pdo_fieldexists('zhtc_store','vr_link')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `vr_link` text NOT NULL");}
  1941. if(!pdo_fieldexists('zhtc_store','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `num` int(11) NOT NULL");}
  1942. if(!pdo_fieldexists('zhtc_store','start_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `start_time` varchar(20) NOT NULL");}
  1943. if(!pdo_fieldexists('zhtc_store','end_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `end_time` varchar(20) NOT NULL");}
  1944. if(!pdo_fieldexists('zhtc_store','wallet')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `wallet` decimal(10,2) NOT NULL");}
  1945. if(!pdo_fieldexists('zhtc_store','user_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `user_name` varchar(30) NOT NULL");}
  1946. if(!pdo_fieldexists('zhtc_store','pwd')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `pwd` varchar(50) NOT NULL");}
  1947. if(!pdo_fieldexists('zhtc_store','dq_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `dq_time` int(11) NOT NULL");}
  1948. if(!pdo_fieldexists('zhtc_store','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `cityname` varchar(50) NOT NULL");}
  1949. if(!pdo_fieldexists('zhtc_store','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `time` datetime NOT NULL");}
  1950. if(!pdo_fieldexists('zhtc_store','fx_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `fx_num` int(11) NOT NULL");}
  1951. if(!pdo_fieldexists('zhtc_store','ewm_logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `ewm_logo` varchar(100) NOT NULL");}
  1952. if(!pdo_fieldexists('zhtc_store','is_top')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `is_top` int(4) NOT NULL DEFAULT '2'");}
  1953. if(!pdo_fieldexists('zhtc_store','yyzz_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `yyzz_img` varchar(100) NOT NULL");}
  1954. if(!pdo_fieldexists('zhtc_store','sfz_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `sfz_img` varchar(100) NOT NULL");}
  1955. if(!pdo_fieldexists('zhtc_store','is_rm')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `is_rm` int(11) NOT NULL DEFAULT '2'");}
  1956. if(!pdo_fieldexists('zhtc_store','video')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `video` varchar(300) NOT NULL");}
  1957. if(!pdo_fieldexists('zhtc_store','is_shop')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `is_shop` int(1) NOT NULL DEFAULT '1'");}
  1958. if(!pdo_fieldexists('zhtc_store','is_pt')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `is_pt` int(1) NOT NULL DEFAULT '1'");}
  1959. if(!pdo_fieldexists('zhtc_store','is_qg')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `is_qg` int(1) NOT NULL DEFAULT '1'");}
  1960. if(!pdo_fieldexists('zhtc_store','is_yhq')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD `is_yhq` int(1) NOT NULL DEFAULT '1'");}
  1961. if(!pdo_fieldexists('zhtc_store','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD PRIMARY KEY (`id`)");}
  1962. if(!pdo_fieldexists('zhtc_store','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `uniacid` (`uniacid`)");}
  1963. if(!pdo_fieldexists('zhtc_store','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `user_id` (`user_id`)");}
  1964. if(!pdo_fieldexists('zhtc_store','storetype2_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype2_id` (`storetype2_id`)");}
  1965. if(!pdo_fieldexists('zhtc_store','storetype_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype_id` (`storetype_id`)");}
  1966. if(!pdo_fieldexists('zhtc_store','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `state` (`state`)");}
  1967. if(!pdo_fieldexists('zhtc_store','uniacid_2')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `uniacid_2` (`uniacid`)");}
  1968. if(!pdo_fieldexists('zhtc_store','user_id_2')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `user_id_2` (`user_id`)");}
  1969. if(!pdo_fieldexists('zhtc_store','storetype2_id_2')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype2_id_2` (`storetype2_id`)");}
  1970. if(!pdo_fieldexists('zhtc_store','storetype_id_2')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype_id_2` (`storetype_id`)");}
  1971. if(!pdo_fieldexists('zhtc_store','state_2')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `state_2` (`state`)");}
  1972. if(!pdo_fieldexists('zhtc_store','uniacid_3')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `uniacid_3` (`uniacid`)");}
  1973. if(!pdo_fieldexists('zhtc_store','user_id_3')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `user_id_3` (`user_id`)");}
  1974. if(!pdo_fieldexists('zhtc_store','storetype2_id_3')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype2_id_3` (`storetype2_id`)");}
  1975. if(!pdo_fieldexists('zhtc_store','storetype_id_3')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype_id_3` (`storetype_id`)");}
  1976. if(!pdo_fieldexists('zhtc_store','state_3')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `state_3` (`state`)");}
  1977. if(!pdo_fieldexists('zhtc_store','uniacid_4')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `uniacid_4` (`uniacid`)");}
  1978. if(!pdo_fieldexists('zhtc_store','user_id_4')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `user_id_4` (`user_id`)");}
  1979. if(!pdo_fieldexists('zhtc_store','storetype2_id_4')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype2_id_4` (`storetype2_id`)");}
  1980. if(!pdo_fieldexists('zhtc_store','storetype_id_4')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype_id_4` (`storetype_id`)");}
  1981. if(!pdo_fieldexists('zhtc_store','state_4')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `state_4` (`state`)");}
  1982. if(!pdo_fieldexists('zhtc_store','uniacid_5')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `uniacid_5` (`uniacid`)");}
  1983. if(!pdo_fieldexists('zhtc_store','user_id_5')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `user_id_5` (`user_id`)");}
  1984. if(!pdo_fieldexists('zhtc_store','storetype2_id_5')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype2_id_5` (`storetype2_id`)");}
  1985. if(!pdo_fieldexists('zhtc_store','storetype_id_5')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype_id_5` (`storetype_id`)");}
  1986. if(!pdo_fieldexists('zhtc_store','state_5')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `state_5` (`state`)");}
  1987. if(!pdo_fieldexists('zhtc_store','uniacid_6')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `uniacid_6` (`uniacid`)");}
  1988. if(!pdo_fieldexists('zhtc_store','user_id_6')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `user_id_6` (`user_id`)");}
  1989. if(!pdo_fieldexists('zhtc_store','storetype2_id_6')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype2_id_6` (`storetype2_id`)");}
  1990. if(!pdo_fieldexists('zhtc_store','storetype_id_6')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype_id_6` (`storetype_id`)");}
  1991. if(!pdo_fieldexists('zhtc_store','state_6')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `state_6` (`state`)");}
  1992. if(!pdo_fieldexists('zhtc_store','uniacid_7')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `uniacid_7` (`uniacid`)");}
  1993. if(!pdo_fieldexists('zhtc_store','user_id_7')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `user_id_7` (`user_id`)");}
  1994. if(!pdo_fieldexists('zhtc_store','storetype2_id_7')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype2_id_7` (`storetype2_id`)");}
  1995. if(!pdo_fieldexists('zhtc_store','storetype_id_7')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype_id_7` (`storetype_id`)");}
  1996. if(!pdo_fieldexists('zhtc_store','state_7')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `state_7` (`state`)");}
  1997. if(!pdo_fieldexists('zhtc_store','uniacid_8')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `uniacid_8` (`uniacid`)");}
  1998. if(!pdo_fieldexists('zhtc_store','user_id_8')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `user_id_8` (`user_id`)");}
  1999. if(!pdo_fieldexists('zhtc_store','storetype2_id_8')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype2_id_8` (`storetype2_id`)");}
  2000. if(!pdo_fieldexists('zhtc_store','storetype_id_8')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype_id_8` (`storetype_id`)");}
  2001. if(!pdo_fieldexists('zhtc_store','state_8')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `state_8` (`state`)");}
  2002. if(!pdo_fieldexists('zhtc_store','uniacid_9')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `uniacid_9` (`uniacid`)");}
  2003. if(!pdo_fieldexists('zhtc_store','user_id_9')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `user_id_9` (`user_id`)");}
  2004. if(!pdo_fieldexists('zhtc_store','storetype2_id_9')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype2_id_9` (`storetype2_id`)");}
  2005. if(!pdo_fieldexists('zhtc_store','storetype_id_9')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype_id_9` (`storetype_id`)");}
  2006. if(!pdo_fieldexists('zhtc_store','state_9')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `state_9` (`state`)");}
  2007. if(!pdo_fieldexists('zhtc_store','uniacid_10')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `uniacid_10` (`uniacid`)");}
  2008. if(!pdo_fieldexists('zhtc_store','user_id_10')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `user_id_10` (`user_id`)");}
  2009. if(!pdo_fieldexists('zhtc_store','storetype2_id_10')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype2_id_10` (`storetype2_id`)");}
  2010. if(!pdo_fieldexists('zhtc_store','storetype_id_10')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype_id_10` (`storetype_id`)");}
  2011. if(!pdo_fieldexists('zhtc_store','state_10')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `state_10` (`state`)");}
  2012. if(!pdo_fieldexists('zhtc_store','uniacid_11')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `uniacid_11` (`uniacid`)");}
  2013. if(!pdo_fieldexists('zhtc_store','user_id_11')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `user_id_11` (`user_id`)");}
  2014. if(!pdo_fieldexists('zhtc_store','storetype2_id_11')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype2_id_11` (`storetype2_id`)");}
  2015. if(!pdo_fieldexists('zhtc_store','storetype_id_11')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype_id_11` (`storetype_id`)");}
  2016. if(!pdo_fieldexists('zhtc_store','state_11')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `state_11` (`state`)");}
  2017. if(!pdo_fieldexists('zhtc_store','uniacid_12')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `uniacid_12` (`uniacid`)");}
  2018. if(!pdo_fieldexists('zhtc_store','user_id_12')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `user_id_12` (`user_id`)");}
  2019. if(!pdo_fieldexists('zhtc_store','storetype2_id_12')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype2_id_12` (`storetype2_id`)");}
  2020. if(!pdo_fieldexists('zhtc_store','storetype_id_12')) {pdo_query("ALTER TABLE ".tablename('zhtc_store')." ADD KEY `storetype_id_12` (`storetype_id`)");}
  2021. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_store_wallet` (
  2022. `id` int(11) NOT NULL AUTO_INCREMENT,
  2023. `store_id` int(11) NOT NULL,
  2024. `money` decimal(10,2) NOT NULL,
  2025. `note` varchar(20) NOT NULL,
  2026. `type` int(11) NOT NULL COMMENT '1加2减',
  2027. `time` varchar(20) NOT NULL,
  2028. `tx_id` int(11) NOT NULL,
  2029. PRIMARY KEY (`id`)
  2030. ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='商家钱包明细';
  2031. ");
  2032. if(!pdo_fieldexists('zhtc_store_wallet','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_store_wallet')." ADD
  2033. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2034. if(!pdo_fieldexists('zhtc_store_wallet','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_store_wallet')." ADD `store_id` int(11) NOT NULL");}
  2035. if(!pdo_fieldexists('zhtc_store_wallet','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_store_wallet')." ADD `money` decimal(10,2) NOT NULL");}
  2036. if(!pdo_fieldexists('zhtc_store_wallet','note')) {pdo_query("ALTER TABLE ".tablename('zhtc_store_wallet')." ADD `note` varchar(20) NOT NULL");}
  2037. if(!pdo_fieldexists('zhtc_store_wallet','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_store_wallet')." ADD `type` int(11) NOT NULL COMMENT '1加2减'");}
  2038. if(!pdo_fieldexists('zhtc_store_wallet','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_store_wallet')." ADD `time` varchar(20) NOT NULL");}
  2039. if(!pdo_fieldexists('zhtc_store_wallet','tx_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_store_wallet')." ADD `tx_id` int(11) NOT NULL");}
  2040. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_storepaylog` (
  2041. `id` int(11) NOT NULL AUTO_INCREMENT,
  2042. `store_id` int(11) NOT NULL COMMENT '商家ID',
  2043. `money` decimal(10,2) NOT NULL,
  2044. `time` datetime NOT NULL,
  2045. `uniacid` varchar(50) NOT NULL,
  2046. `note` varchar(20) NOT NULL,
  2047. PRIMARY KEY (`id`)
  2048. ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='商家入驻支付记录表';
  2049. ");
  2050. if(!pdo_fieldexists('zhtc_storepaylog','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_storepaylog')." ADD
  2051. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2052. if(!pdo_fieldexists('zhtc_storepaylog','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_storepaylog')." ADD `store_id` int(11) NOT NULL COMMENT '商家ID'");}
  2053. if(!pdo_fieldexists('zhtc_storepaylog','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_storepaylog')." ADD `money` decimal(10,2) NOT NULL");}
  2054. if(!pdo_fieldexists('zhtc_storepaylog','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_storepaylog')." ADD `time` datetime NOT NULL");}
  2055. if(!pdo_fieldexists('zhtc_storepaylog','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_storepaylog')." ADD `uniacid` varchar(50) NOT NULL");}
  2056. if(!pdo_fieldexists('zhtc_storepaylog','note')) {pdo_query("ALTER TABLE ".tablename('zhtc_storepaylog')." ADD `note` varchar(20) NOT NULL");}
  2057. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_storetype` (
  2058. `id` int(11) NOT NULL AUTO_INCREMENT,
  2059. `type_name` varchar(20) NOT NULL COMMENT '分类名称',
  2060. `img` varchar(100) NOT NULL COMMENT '分类图片',
  2061. `uniacid` int(11) NOT NULL,
  2062. `num` int(11) NOT NULL COMMENT '排序',
  2063. `money` decimal(10,2) NOT NULL,
  2064. `state` int(4) NOT NULL DEFAULT '1',
  2065. PRIMARY KEY (`id`)
  2066. ) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8;
  2067. ");
  2068. if(!pdo_fieldexists('zhtc_storetype','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype')." ADD
  2069. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2070. if(!pdo_fieldexists('zhtc_storetype','type_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype')." ADD `type_name` varchar(20) NOT NULL COMMENT '分类名称'");}
  2071. if(!pdo_fieldexists('zhtc_storetype','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype')." ADD `img` varchar(100) NOT NULL COMMENT '分类图片'");}
  2072. if(!pdo_fieldexists('zhtc_storetype','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype')." ADD `uniacid` int(11) NOT NULL");}
  2073. if(!pdo_fieldexists('zhtc_storetype','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype')." ADD `num` int(11) NOT NULL COMMENT '排序'");}
  2074. if(!pdo_fieldexists('zhtc_storetype','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype')." ADD `money` decimal(10,2) NOT NULL");}
  2075. if(!pdo_fieldexists('zhtc_storetype','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype')." ADD `state` int(4) NOT NULL DEFAULT '1'");}
  2076. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_storetype2` (
  2077. `id` int(11) NOT NULL AUTO_INCREMENT,
  2078. `name` varchar(20) NOT NULL,
  2079. `type_id` int(11) NOT NULL COMMENT '主分类id',
  2080. `num` int(11) NOT NULL COMMENT '排序',
  2081. `uniacid` int(11) NOT NULL,
  2082. `state` int(4) NOT NULL DEFAULT '1',
  2083. PRIMARY KEY (`id`)
  2084. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
  2085. ");
  2086. if(!pdo_fieldexists('zhtc_storetype2','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype2')." ADD
  2087. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2088. if(!pdo_fieldexists('zhtc_storetype2','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype2')." ADD `name` varchar(20) NOT NULL");}
  2089. if(!pdo_fieldexists('zhtc_storetype2','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype2')." ADD `type_id` int(11) NOT NULL COMMENT '主分类id'");}
  2090. if(!pdo_fieldexists('zhtc_storetype2','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype2')." ADD `num` int(11) NOT NULL COMMENT '排序'");}
  2091. if(!pdo_fieldexists('zhtc_storetype2','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype2')." ADD `uniacid` int(11) NOT NULL");}
  2092. if(!pdo_fieldexists('zhtc_storetype2','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetype2')." ADD `state` int(4) NOT NULL DEFAULT '1'");}
  2093. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_storetypead` (
  2094. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  2095. `title` varchar(50) NOT NULL COMMENT '轮播图标题',
  2096. `logo` varchar(200) NOT NULL COMMENT '图片',
  2097. `status` int(11) NOT NULL COMMENT '1.开启 2.关闭',
  2098. `src` varchar(100) NOT NULL COMMENT '链接',
  2099. `orderby` int(11) NOT NULL COMMENT '排序',
  2100. `xcx_name` varchar(20) NOT NULL,
  2101. `appid` varchar(20) NOT NULL,
  2102. `type_id` int(11) NOT NULL,
  2103. `type_id2` int(11) NOT NULL,
  2104. `uniacid` int(11) NOT NULL COMMENT '小程序id',
  2105. `cityname` varchar(50) NOT NULL COMMENT '城市名称',
  2106. `wb_src` varchar(300) NOT NULL COMMENT '外部链接',
  2107. `state` int(4) NOT NULL DEFAULT '1' COMMENT '1内部,2外部,3跳转',
  2108. PRIMARY KEY (`id`)
  2109. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
  2110. ");
  2111. if(!pdo_fieldexists('zhtc_storetypead','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD
  2112. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  2113. if(!pdo_fieldexists('zhtc_storetypead','title')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `title` varchar(50) NOT NULL COMMENT '轮播图标题'");}
  2114. if(!pdo_fieldexists('zhtc_storetypead','logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `logo` varchar(200) NOT NULL COMMENT '图片'");}
  2115. if(!pdo_fieldexists('zhtc_storetypead','status')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `status` int(11) NOT NULL COMMENT '1.开启 2.关闭'");}
  2116. if(!pdo_fieldexists('zhtc_storetypead','src')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `src` varchar(100) NOT NULL COMMENT '链接'");}
  2117. if(!pdo_fieldexists('zhtc_storetypead','orderby')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `orderby` int(11) NOT NULL COMMENT '排序'");}
  2118. if(!pdo_fieldexists('zhtc_storetypead','xcx_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `xcx_name` varchar(20) NOT NULL");}
  2119. if(!pdo_fieldexists('zhtc_storetypead','appid')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `appid` varchar(20) NOT NULL");}
  2120. if(!pdo_fieldexists('zhtc_storetypead','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `type_id` int(11) NOT NULL");}
  2121. if(!pdo_fieldexists('zhtc_storetypead','type_id2')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `type_id2` int(11) NOT NULL");}
  2122. if(!pdo_fieldexists('zhtc_storetypead','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `uniacid` int(11) NOT NULL COMMENT '小程序id'");}
  2123. if(!pdo_fieldexists('zhtc_storetypead','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `cityname` varchar(50) NOT NULL COMMENT '城市名称'");}
  2124. if(!pdo_fieldexists('zhtc_storetypead','wb_src')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `wb_src` varchar(300) NOT NULL COMMENT '外部链接'");}
  2125. if(!pdo_fieldexists('zhtc_storetypead','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_storetypead')." ADD `state` int(4) NOT NULL DEFAULT '1' COMMENT '1内部,2外部,3跳转'");}
  2126. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_system` (
  2127. `id` int(11) NOT NULL AUTO_INCREMENT,
  2128. `appid` varchar(100) NOT NULL COMMENT 'appid',
  2129. `appsecret` varchar(200) NOT NULL COMMENT 'appsecret',
  2130. `mchid` varchar(20) NOT NULL COMMENT '商户号',
  2131. `wxkey` varchar(100) NOT NULL COMMENT '商户秘钥',
  2132. `uniacid` varchar(50) NOT NULL,
  2133. `url_name` varchar(20) NOT NULL COMMENT '网址名称',
  2134. `details` text NOT NULL COMMENT '关于我们',
  2135. `url_logo` varchar(100) NOT NULL COMMENT '网址logo',
  2136. `bq_name` varchar(50) NOT NULL COMMENT '版权名称',
  2137. `link_name` varchar(30) NOT NULL COMMENT '网站名称',
  2138. `link_logo` varchar(100) NOT NULL COMMENT '网站logo',
  2139. `support` varchar(20) NOT NULL COMMENT '技术支持',
  2140. `bq_logo` varchar(100) NOT NULL,
  2141. `color` varchar(20) NOT NULL,
  2142. `tz_appid` varchar(30) NOT NULL,
  2143. `tz_name` varchar(30) NOT NULL,
  2144. `pt_name` varchar(30) NOT NULL COMMENT '平台名称',
  2145. `tz_audit` int(11) NOT NULL COMMENT '帖子审核1.是 2否',
  2146. `sj_audit` int(11) NOT NULL COMMENT '商家审核1.是 2否',
  2147. `mapkey` varchar(200) NOT NULL,
  2148. `tel` varchar(20) NOT NULL,
  2149. `gd_key` varchar(100) NOT NULL,
  2150. `rz_xuz` text NOT NULL,
  2151. `ft_xuz` text NOT NULL,
  2152. `fx_money` decimal(10,2) NOT NULL,
  2153. `hb_sxf` int(11) NOT NULL,
  2154. `tx_money` decimal(10,2) NOT NULL,
  2155. `tx_sxf` int(11) NOT NULL,
  2156. `tx_details` text NOT NULL,
  2157. `is_hhr` int(4) NOT NULL DEFAULT '2',
  2158. `is_hbfl` int(4) NOT NULL DEFAULT '2',
  2159. `is_zx` int(4) NOT NULL DEFAULT '2',
  2160. `is_car` int(4) NOT NULL,
  2161. `pc_xuz` text NOT NULL,
  2162. `pc_money` decimal(10,2) NOT NULL,
  2163. `is_sjrz` int(4) NOT NULL,
  2164. `is_pcfw` int(4) NOT NULL,
  2165. `total_num` int(11) NOT NULL,
  2166. `is_goods` int(4) NOT NULL,
  2167. `apiclient_cert` text NOT NULL,
  2168. `apiclient_key` text NOT NULL,
  2169. `is_openzx` int(4) NOT NULL,
  2170. `is_hyset` int(4) NOT NULL,
  2171. `is_tzopen` int(4) NOT NULL,
  2172. `is_pageopen` int(4) NOT NULL,
  2173. `cityname` varchar(50) NOT NULL,
  2174. `is_tel` int(4) NOT NULL DEFAULT '1',
  2175. `tx_mode` int(4) NOT NULL DEFAULT '1',
  2176. `many_city` int(4) NOT NULL DEFAULT '2',
  2177. `tx_type` int(4) NOT NULL DEFAULT '2',
  2178. `is_hbzf` int(4) NOT NULL DEFAULT '1',
  2179. `hb_img` varchar(100) NOT NULL,
  2180. `tz_num` int(11) NOT NULL,
  2181. `client_ip` varchar(30) NOT NULL,
  2182. `hb_content` varchar(100) NOT NULL,
  2183. `is_tzhb` int(4) NOT NULL DEFAULT '1',
  2184. `sj_max` varchar(1) NOT NULL,
  2185. `zfwl_max` varchar(1) NOT NULL,
  2186. `zfwl_open` int(4) NOT NULL DEFAULT '1',
  2187. `zx_type` int(4) NOT NULL DEFAULT '1',
  2188. `ft_num` int(11) NOT NULL,
  2189. `is_img` int(11) NOT NULL DEFAULT '2',
  2190. `is_sjhb` int(11) NOT NULL DEFAULT '1',
  2191. `is_tzdz` int(11) NOT NULL DEFAULT '1',
  2192. `is_rz` int(11) NOT NULL DEFAULT '1',
  2193. `integral` int(11) NOT NULL,
  2194. `integral2` int(11) NOT NULL,
  2195. `is_jf` int(11) NOT NULL DEFAULT '1',
  2196. `is_kf` int(11) NOT NULL DEFAULT '1',
  2197. `dw_more` int(11) NOT NULL DEFAULT '2',
  2198. `is_zxrz` int(11) NOT NULL DEFAULT '1',
  2199. `tzmc` varchar(20) NOT NULL DEFAULT '帖子',
  2200. `is_dnss` int(11) NOT NULL DEFAULT '1',
  2201. `is_vr` int(11) NOT NULL DEFAULT '1',
  2202. `is_yysj` int(11) NOT NULL DEFAULT '1',
  2203. `tc_img` varchar(100) NOT NULL,
  2204. `tc_gg` varchar(100) NOT NULL,
  2205. `hbbj_img` varchar(200) NOT NULL,
  2206. `gs_img` text NOT NULL,
  2207. `gs_details` text NOT NULL,
  2208. `gs_tel` varchar(20) NOT NULL,
  2209. `gs_time` varchar(50) NOT NULL,
  2210. `gs_add` varchar(200) NOT NULL,
  2211. `gs_zb` varchar(50) NOT NULL,
  2212. `model` int(4) NOT NULL DEFAULT '1',
  2213. `is_bm` int(11) NOT NULL DEFAULT '2',
  2214. `zf_title` varchar(50) NOT NULL,
  2215. `sh_time` int(11) NOT NULL,
  2216. `is_qgb` int(11) NOT NULL DEFAULT '2',
  2217. `is_qgb2` int(11) NOT NULL DEFAULT '2',
  2218. `is_coupon` int(11) NOT NULL DEFAULT '2',
  2219. `is_sy` int(11) NOT NULL DEFAULT '2',
  2220. `coupon_img` varchar(500) NOT NULL,
  2221. `kp_img` varchar(500) NOT NULL,
  2222. `kp_time` int(11) NOT NULL DEFAULT '3',
  2223. `is_hd` int(11) NOT NULL DEFAULT '2',
  2224. `sj_max2` int(11) NOT NULL,
  2225. `is_pcqx` int(11) NOT NULL DEFAULT '1',
  2226. `is_hyqx` int(11) NOT NULL DEFAULT '1',
  2227. `is_yhqqx` int(11) NOT NULL DEFAULT '1',
  2228. `is_syqx` int(11) NOT NULL DEFAULT '1',
  2229. `is_hdqx` int(11) NOT NULL DEFAULT '1',
  2230. `is_hbqx` int(11) NOT NULL DEFAULT '1',
  2231. `is_hhrqx` int(11) NOT NULL DEFAULT '1',
  2232. `is_dcsqx` int(11) NOT NULL DEFAULT '1',
  2233. `is_jfqx` int(11) NOT NULL DEFAULT '1',
  2234. `is_spqx` int(11) NOT NULL DEFAULT '1',
  2235. `is_sp` int(11) NOT NULL DEFAULT '1',
  2236. `sygg_name` varchar(20) NOT NULL DEFAULT '同城头条',
  2237. `sjgg_name` varchar(20) NOT NULL DEFAULT '信息头条',
  2238. `flgg_name` varchar(20) NOT NULL DEFAULT '商家快报',
  2239. `is_zf` int(11) NOT NULL DEFAULT '1',
  2240. `is_yhqsh` int(11) NOT NULL DEFAULT '1',
  2241. `hb_name` varchar(20) NOT NULL DEFAULT '红包',
  2242. `fl_name` varchar(20) NOT NULL DEFAULT '福利',
  2243. `is_pzsj` int(11) NOT NULL DEFAULT '1',
  2244. `ggoods_set` int(4) NOT NULL DEFAULT '1',
  2245. `is_xsqg` int(4) NOT NULL DEFAULT '2',
  2246. `xgsh` int(4) NOT NULL DEFAULT '1',
  2247. `is_qgqx` int(4) NOT NULL DEFAULT '2',
  2248. `g_open` int(4) NOT NULL DEFAULT '2',
  2249. `g_qx` int(4) NOT NULL DEFAULT '1',
  2250. `fx_jf` int(11) NOT NULL,
  2251. `good_jf` int(11) NOT NULL,
  2252. `is_city` int(11) NOT NULL DEFAULT '1',
  2253. `hy_title` varchar(20) NOT NULL DEFAULT '黄页114',
  2254. `kp_url` varchar(300) NOT NULL,
  2255. `is_message` int(4) NOT NULL DEFAULT '1',
  2256. `is_bdtel` int(4) NOT NULL DEFAULT '1',
  2257. `is_ff` int(4) NOT NULL DEFAULT '2',
  2258. `is_pgzf` int(4) NOT NULL DEFAULT '2',
  2259. `is_video` int(4) NOT NULL DEFAULT '1',
  2260. `fj_tz` int(4) NOT NULL DEFAULT '2',
  2261. `cz_password` varchar(20) NOT NULL,
  2262. `is_style` int(1) NOT NULL DEFAULT '1',
  2263. `is_pl` int(1) NOT NULL DEFAULT '1',
  2264. `is_plsh` int(1) NOT NULL DEFAULT '2',
  2265. `callProportion` int(11) NOT NULL,
  2266. `is_zxplsh` int(1) NOT NULL DEFAULT '2',
  2267. PRIMARY KEY (`id`)
  2268. ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
  2269. ");
  2270. if(!pdo_fieldexists('zhtc_system','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD
  2271. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2272. if(!pdo_fieldexists('zhtc_system','appid')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `appid` varchar(100) NOT NULL COMMENT 'appid'");}
  2273. if(!pdo_fieldexists('zhtc_system','appsecret')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `appsecret` varchar(200) NOT NULL COMMENT 'appsecret'");}
  2274. if(!pdo_fieldexists('zhtc_system','mchid')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `mchid` varchar(20) NOT NULL COMMENT '商户号'");}
  2275. if(!pdo_fieldexists('zhtc_system','wxkey')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `wxkey` varchar(100) NOT NULL COMMENT '商户秘钥'");}
  2276. if(!pdo_fieldexists('zhtc_system','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `uniacid` varchar(50) NOT NULL");}
  2277. if(!pdo_fieldexists('zhtc_system','url_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `url_name` varchar(20) NOT NULL COMMENT '网址名称'");}
  2278. if(!pdo_fieldexists('zhtc_system','details')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `details` text NOT NULL COMMENT '关于我们'");}
  2279. if(!pdo_fieldexists('zhtc_system','url_logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `url_logo` varchar(100) NOT NULL COMMENT '网址logo'");}
  2280. if(!pdo_fieldexists('zhtc_system','bq_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `bq_name` varchar(50) NOT NULL COMMENT '版权名称'");}
  2281. if(!pdo_fieldexists('zhtc_system','link_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `link_name` varchar(30) NOT NULL COMMENT '网站名称'");}
  2282. if(!pdo_fieldexists('zhtc_system','link_logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `link_logo` varchar(100) NOT NULL COMMENT '网站logo'");}
  2283. if(!pdo_fieldexists('zhtc_system','support')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `support` varchar(20) NOT NULL COMMENT '技术支持'");}
  2284. if(!pdo_fieldexists('zhtc_system','bq_logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `bq_logo` varchar(100) NOT NULL");}
  2285. if(!pdo_fieldexists('zhtc_system','color')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `color` varchar(20) NOT NULL");}
  2286. if(!pdo_fieldexists('zhtc_system','tz_appid')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tz_appid` varchar(30) NOT NULL");}
  2287. if(!pdo_fieldexists('zhtc_system','tz_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tz_name` varchar(30) NOT NULL");}
  2288. if(!pdo_fieldexists('zhtc_system','pt_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `pt_name` varchar(30) NOT NULL COMMENT '平台名称'");}
  2289. if(!pdo_fieldexists('zhtc_system','tz_audit')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tz_audit` int(11) NOT NULL COMMENT '帖子审核1.是 2否'");}
  2290. if(!pdo_fieldexists('zhtc_system','sj_audit')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `sj_audit` int(11) NOT NULL COMMENT '商家审核1.是 2否'");}
  2291. if(!pdo_fieldexists('zhtc_system','mapkey')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `mapkey` varchar(200) NOT NULL");}
  2292. if(!pdo_fieldexists('zhtc_system','tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tel` varchar(20) NOT NULL");}
  2293. if(!pdo_fieldexists('zhtc_system','gd_key')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `gd_key` varchar(100) NOT NULL");}
  2294. if(!pdo_fieldexists('zhtc_system','rz_xuz')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `rz_xuz` text NOT NULL");}
  2295. if(!pdo_fieldexists('zhtc_system','ft_xuz')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `ft_xuz` text NOT NULL");}
  2296. if(!pdo_fieldexists('zhtc_system','fx_money')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `fx_money` decimal(10,2) NOT NULL");}
  2297. if(!pdo_fieldexists('zhtc_system','hb_sxf')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `hb_sxf` int(11) NOT NULL");}
  2298. if(!pdo_fieldexists('zhtc_system','tx_money')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tx_money` decimal(10,2) NOT NULL");}
  2299. if(!pdo_fieldexists('zhtc_system','tx_sxf')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tx_sxf` int(11) NOT NULL");}
  2300. if(!pdo_fieldexists('zhtc_system','tx_details')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tx_details` text NOT NULL");}
  2301. if(!pdo_fieldexists('zhtc_system','is_hhr')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_hhr` int(4) NOT NULL DEFAULT '2'");}
  2302. if(!pdo_fieldexists('zhtc_system','is_hbfl')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_hbfl` int(4) NOT NULL DEFAULT '2'");}
  2303. if(!pdo_fieldexists('zhtc_system','is_zx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_zx` int(4) NOT NULL DEFAULT '2'");}
  2304. if(!pdo_fieldexists('zhtc_system','is_car')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_car` int(4) NOT NULL");}
  2305. if(!pdo_fieldexists('zhtc_system','pc_xuz')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `pc_xuz` text NOT NULL");}
  2306. if(!pdo_fieldexists('zhtc_system','pc_money')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `pc_money` decimal(10,2) NOT NULL");}
  2307. if(!pdo_fieldexists('zhtc_system','is_sjrz')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_sjrz` int(4) NOT NULL");}
  2308. if(!pdo_fieldexists('zhtc_system','is_pcfw')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_pcfw` int(4) NOT NULL");}
  2309. if(!pdo_fieldexists('zhtc_system','total_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `total_num` int(11) NOT NULL");}
  2310. if(!pdo_fieldexists('zhtc_system','is_goods')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_goods` int(4) NOT NULL");}
  2311. if(!pdo_fieldexists('zhtc_system','apiclient_cert')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `apiclient_cert` text NOT NULL");}
  2312. if(!pdo_fieldexists('zhtc_system','apiclient_key')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `apiclient_key` text NOT NULL");}
  2313. if(!pdo_fieldexists('zhtc_system','is_openzx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_openzx` int(4) NOT NULL");}
  2314. if(!pdo_fieldexists('zhtc_system','is_hyset')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_hyset` int(4) NOT NULL");}
  2315. if(!pdo_fieldexists('zhtc_system','is_tzopen')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_tzopen` int(4) NOT NULL");}
  2316. if(!pdo_fieldexists('zhtc_system','is_pageopen')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_pageopen` int(4) NOT NULL");}
  2317. if(!pdo_fieldexists('zhtc_system','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `cityname` varchar(50) NOT NULL");}
  2318. if(!pdo_fieldexists('zhtc_system','is_tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_tel` int(4) NOT NULL DEFAULT '1'");}
  2319. if(!pdo_fieldexists('zhtc_system','tx_mode')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tx_mode` int(4) NOT NULL DEFAULT '1'");}
  2320. if(!pdo_fieldexists('zhtc_system','many_city')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `many_city` int(4) NOT NULL DEFAULT '2'");}
  2321. if(!pdo_fieldexists('zhtc_system','tx_type')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tx_type` int(4) NOT NULL DEFAULT '2'");}
  2322. if(!pdo_fieldexists('zhtc_system','is_hbzf')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_hbzf` int(4) NOT NULL DEFAULT '1'");}
  2323. if(!pdo_fieldexists('zhtc_system','hb_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `hb_img` varchar(100) NOT NULL");}
  2324. if(!pdo_fieldexists('zhtc_system','tz_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tz_num` int(11) NOT NULL");}
  2325. if(!pdo_fieldexists('zhtc_system','client_ip')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `client_ip` varchar(30) NOT NULL");}
  2326. if(!pdo_fieldexists('zhtc_system','hb_content')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `hb_content` varchar(100) NOT NULL");}
  2327. if(!pdo_fieldexists('zhtc_system','is_tzhb')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_tzhb` int(4) NOT NULL DEFAULT '1'");}
  2328. if(!pdo_fieldexists('zhtc_system','sj_max')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `sj_max` varchar(1) NOT NULL");}
  2329. if(!pdo_fieldexists('zhtc_system','zfwl_max')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `zfwl_max` varchar(1) NOT NULL");}
  2330. if(!pdo_fieldexists('zhtc_system','zfwl_open')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `zfwl_open` int(4) NOT NULL DEFAULT '1'");}
  2331. if(!pdo_fieldexists('zhtc_system','zx_type')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `zx_type` int(4) NOT NULL DEFAULT '1'");}
  2332. if(!pdo_fieldexists('zhtc_system','ft_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `ft_num` int(11) NOT NULL");}
  2333. if(!pdo_fieldexists('zhtc_system','is_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_img` int(11) NOT NULL DEFAULT '2'");}
  2334. if(!pdo_fieldexists('zhtc_system','is_sjhb')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_sjhb` int(11) NOT NULL DEFAULT '1'");}
  2335. if(!pdo_fieldexists('zhtc_system','is_tzdz')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_tzdz` int(11) NOT NULL DEFAULT '1'");}
  2336. if(!pdo_fieldexists('zhtc_system','is_rz')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_rz` int(11) NOT NULL DEFAULT '1'");}
  2337. if(!pdo_fieldexists('zhtc_system','integral')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `integral` int(11) NOT NULL");}
  2338. if(!pdo_fieldexists('zhtc_system','integral2')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `integral2` int(11) NOT NULL");}
  2339. if(!pdo_fieldexists('zhtc_system','is_jf')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_jf` int(11) NOT NULL DEFAULT '1'");}
  2340. if(!pdo_fieldexists('zhtc_system','is_kf')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_kf` int(11) NOT NULL DEFAULT '1'");}
  2341. if(!pdo_fieldexists('zhtc_system','dw_more')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `dw_more` int(11) NOT NULL DEFAULT '2'");}
  2342. if(!pdo_fieldexists('zhtc_system','is_zxrz')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_zxrz` int(11) NOT NULL DEFAULT '1'");}
  2343. if(!pdo_fieldexists('zhtc_system','tzmc')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tzmc` varchar(20) NOT NULL DEFAULT '帖子'");}
  2344. if(!pdo_fieldexists('zhtc_system','is_dnss')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_dnss` int(11) NOT NULL DEFAULT '1'");}
  2345. if(!pdo_fieldexists('zhtc_system','is_vr')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_vr` int(11) NOT NULL DEFAULT '1'");}
  2346. if(!pdo_fieldexists('zhtc_system','is_yysj')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_yysj` int(11) NOT NULL DEFAULT '1'");}
  2347. if(!pdo_fieldexists('zhtc_system','tc_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tc_img` varchar(100) NOT NULL");}
  2348. if(!pdo_fieldexists('zhtc_system','tc_gg')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `tc_gg` varchar(100) NOT NULL");}
  2349. if(!pdo_fieldexists('zhtc_system','hbbj_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `hbbj_img` varchar(200) NOT NULL");}
  2350. if(!pdo_fieldexists('zhtc_system','gs_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `gs_img` text NOT NULL");}
  2351. if(!pdo_fieldexists('zhtc_system','gs_details')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `gs_details` text NOT NULL");}
  2352. if(!pdo_fieldexists('zhtc_system','gs_tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `gs_tel` varchar(20) NOT NULL");}
  2353. if(!pdo_fieldexists('zhtc_system','gs_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `gs_time` varchar(50) NOT NULL");}
  2354. if(!pdo_fieldexists('zhtc_system','gs_add')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `gs_add` varchar(200) NOT NULL");}
  2355. if(!pdo_fieldexists('zhtc_system','gs_zb')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `gs_zb` varchar(50) NOT NULL");}
  2356. if(!pdo_fieldexists('zhtc_system','model')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `model` int(4) NOT NULL DEFAULT '1'");}
  2357. if(!pdo_fieldexists('zhtc_system','is_bm')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_bm` int(11) NOT NULL DEFAULT '2'");}
  2358. if(!pdo_fieldexists('zhtc_system','zf_title')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `zf_title` varchar(50) NOT NULL");}
  2359. if(!pdo_fieldexists('zhtc_system','sh_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `sh_time` int(11) NOT NULL");}
  2360. if(!pdo_fieldexists('zhtc_system','is_qgb')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_qgb` int(11) NOT NULL DEFAULT '2'");}
  2361. if(!pdo_fieldexists('zhtc_system','is_qgb2')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_qgb2` int(11) NOT NULL DEFAULT '2'");}
  2362. if(!pdo_fieldexists('zhtc_system','is_coupon')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_coupon` int(11) NOT NULL DEFAULT '2'");}
  2363. if(!pdo_fieldexists('zhtc_system','is_sy')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_sy` int(11) NOT NULL DEFAULT '2'");}
  2364. if(!pdo_fieldexists('zhtc_system','coupon_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `coupon_img` varchar(500) NOT NULL");}
  2365. if(!pdo_fieldexists('zhtc_system','kp_img')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `kp_img` varchar(500) NOT NULL");}
  2366. if(!pdo_fieldexists('zhtc_system','kp_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `kp_time` int(11) NOT NULL DEFAULT '3'");}
  2367. if(!pdo_fieldexists('zhtc_system','is_hd')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_hd` int(11) NOT NULL DEFAULT '2'");}
  2368. if(!pdo_fieldexists('zhtc_system','sj_max2')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `sj_max2` int(11) NOT NULL");}
  2369. if(!pdo_fieldexists('zhtc_system','is_pcqx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_pcqx` int(11) NOT NULL DEFAULT '1'");}
  2370. if(!pdo_fieldexists('zhtc_system','is_hyqx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_hyqx` int(11) NOT NULL DEFAULT '1'");}
  2371. if(!pdo_fieldexists('zhtc_system','is_yhqqx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_yhqqx` int(11) NOT NULL DEFAULT '1'");}
  2372. if(!pdo_fieldexists('zhtc_system','is_syqx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_syqx` int(11) NOT NULL DEFAULT '1'");}
  2373. if(!pdo_fieldexists('zhtc_system','is_hdqx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_hdqx` int(11) NOT NULL DEFAULT '1'");}
  2374. if(!pdo_fieldexists('zhtc_system','is_hbqx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_hbqx` int(11) NOT NULL DEFAULT '1'");}
  2375. if(!pdo_fieldexists('zhtc_system','is_hhrqx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_hhrqx` int(11) NOT NULL DEFAULT '1'");}
  2376. if(!pdo_fieldexists('zhtc_system','is_dcsqx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_dcsqx` int(11) NOT NULL DEFAULT '1'");}
  2377. if(!pdo_fieldexists('zhtc_system','is_jfqx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_jfqx` int(11) NOT NULL DEFAULT '1'");}
  2378. if(!pdo_fieldexists('zhtc_system','is_spqx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_spqx` int(11) NOT NULL DEFAULT '1'");}
  2379. if(!pdo_fieldexists('zhtc_system','is_sp')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_sp` int(11) NOT NULL DEFAULT '1'");}
  2380. if(!pdo_fieldexists('zhtc_system','sygg_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `sygg_name` varchar(20) NOT NULL DEFAULT '同城头条'");}
  2381. if(!pdo_fieldexists('zhtc_system','sjgg_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `sjgg_name` varchar(20) NOT NULL DEFAULT '信息头条'");}
  2382. if(!pdo_fieldexists('zhtc_system','flgg_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `flgg_name` varchar(20) NOT NULL DEFAULT '商家快报'");}
  2383. if(!pdo_fieldexists('zhtc_system','is_zf')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_zf` int(11) NOT NULL DEFAULT '1'");}
  2384. if(!pdo_fieldexists('zhtc_system','is_yhqsh')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_yhqsh` int(11) NOT NULL DEFAULT '1'");}
  2385. if(!pdo_fieldexists('zhtc_system','hb_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `hb_name` varchar(20) NOT NULL DEFAULT '红包'");}
  2386. if(!pdo_fieldexists('zhtc_system','fl_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `fl_name` varchar(20) NOT NULL DEFAULT '福利'");}
  2387. if(!pdo_fieldexists('zhtc_system','is_pzsj')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_pzsj` int(11) NOT NULL DEFAULT '1'");}
  2388. if(!pdo_fieldexists('zhtc_system','ggoods_set')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `ggoods_set` int(4) NOT NULL DEFAULT '1'");}
  2389. if(!pdo_fieldexists('zhtc_system','is_xsqg')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_xsqg` int(4) NOT NULL DEFAULT '2'");}
  2390. if(!pdo_fieldexists('zhtc_system','xgsh')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `xgsh` int(4) NOT NULL DEFAULT '1'");}
  2391. if(!pdo_fieldexists('zhtc_system','is_qgqx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_qgqx` int(4) NOT NULL DEFAULT '2'");}
  2392. if(!pdo_fieldexists('zhtc_system','g_open')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `g_open` int(4) NOT NULL DEFAULT '2'");}
  2393. if(!pdo_fieldexists('zhtc_system','g_qx')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `g_qx` int(4) NOT NULL DEFAULT '1'");}
  2394. if(!pdo_fieldexists('zhtc_system','fx_jf')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `fx_jf` int(11) NOT NULL");}
  2395. if(!pdo_fieldexists('zhtc_system','good_jf')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `good_jf` int(11) NOT NULL");}
  2396. if(!pdo_fieldexists('zhtc_system','is_city')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_city` int(11) NOT NULL DEFAULT '1'");}
  2397. if(!pdo_fieldexists('zhtc_system','hy_title')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `hy_title` varchar(20) NOT NULL DEFAULT '黄页114'");}
  2398. if(!pdo_fieldexists('zhtc_system','kp_url')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `kp_url` varchar(300) NOT NULL");}
  2399. if(!pdo_fieldexists('zhtc_system','is_message')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_message` int(4) NOT NULL DEFAULT '1'");}
  2400. if(!pdo_fieldexists('zhtc_system','is_bdtel')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_bdtel` int(4) NOT NULL DEFAULT '1'");}
  2401. if(!pdo_fieldexists('zhtc_system','is_ff')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_ff` int(4) NOT NULL DEFAULT '2'");}
  2402. if(!pdo_fieldexists('zhtc_system','is_pgzf')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_pgzf` int(4) NOT NULL DEFAULT '2'");}
  2403. if(!pdo_fieldexists('zhtc_system','is_video')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_video` int(4) NOT NULL DEFAULT '1'");}
  2404. if(!pdo_fieldexists('zhtc_system','fj_tz')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `fj_tz` int(4) NOT NULL DEFAULT '2'");}
  2405. if(!pdo_fieldexists('zhtc_system','cz_password')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `cz_password` varchar(20) NOT NULL");}
  2406. if(!pdo_fieldexists('zhtc_system','is_style')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_style` int(1) NOT NULL DEFAULT '1'");}
  2407. if(!pdo_fieldexists('zhtc_system','is_pl')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_pl` int(1) NOT NULL DEFAULT '1'");}
  2408. if(!pdo_fieldexists('zhtc_system','is_plsh')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_plsh` int(1) NOT NULL DEFAULT '2'");}
  2409. if(!pdo_fieldexists('zhtc_system','callProportion')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `callProportion` int(11) NOT NULL");}
  2410. if(!pdo_fieldexists('zhtc_system','is_zxplsh')) {pdo_query("ALTER TABLE ".tablename('zhtc_system')." ADD `is_zxplsh` int(1) NOT NULL DEFAULT '2'");}
  2411. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_top` (
  2412. `id` int(11) NOT NULL AUTO_INCREMENT,
  2413. `type` int(11) NOT NULL COMMENT '1.一天2.一周3.一个月',
  2414. `money` decimal(10,2) NOT NULL COMMENT '价格',
  2415. `uniacid` int(11) NOT NULL,
  2416. `num` int(11) NOT NULL,
  2417. `money2` decimal(10,2) NOT NULL,
  2418. PRIMARY KEY (`id`)
  2419. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  2420. ");
  2421. if(!pdo_fieldexists('zhtc_top','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_top')." ADD
  2422. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2423. if(!pdo_fieldexists('zhtc_top','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_top')." ADD `type` int(11) NOT NULL COMMENT '1.一天2.一周3.一个月'");}
  2424. if(!pdo_fieldexists('zhtc_top','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_top')." ADD `money` decimal(10,2) NOT NULL COMMENT '价格'");}
  2425. if(!pdo_fieldexists('zhtc_top','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_top')." ADD `uniacid` int(11) NOT NULL");}
  2426. if(!pdo_fieldexists('zhtc_top','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_top')." ADD `num` int(11) NOT NULL");}
  2427. if(!pdo_fieldexists('zhtc_top','money2')) {pdo_query("ALTER TABLE ".tablename('zhtc_top')." ADD `money2` decimal(10,2) NOT NULL");}
  2428. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_type` (
  2429. `id` int(11) NOT NULL AUTO_INCREMENT,
  2430. `type_name` varchar(20) NOT NULL COMMENT '分类名称',
  2431. `img` varchar(100) NOT NULL COMMENT '分类图片',
  2432. `uniacid` int(11) NOT NULL COMMENT '小程序id',
  2433. `num` int(11) NOT NULL,
  2434. `money` decimal(10,2) NOT NULL,
  2435. `state` int(4) NOT NULL DEFAULT '1',
  2436. `sx_money` decimal(10,2) NOT NULL,
  2437. `money2` decimal(10,2) NOT NULL,
  2438. `tel_money` decimal(10,2) NOT NULL,
  2439. PRIMARY KEY (`id`)
  2440. ) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8;
  2441. ");
  2442. if(!pdo_fieldexists('zhtc_type','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_type')." ADD
  2443. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2444. if(!pdo_fieldexists('zhtc_type','type_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_type')." ADD `type_name` varchar(20) NOT NULL COMMENT '分类名称'");}
  2445. if(!pdo_fieldexists('zhtc_type','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_type')." ADD `img` varchar(100) NOT NULL COMMENT '分类图片'");}
  2446. if(!pdo_fieldexists('zhtc_type','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_type')." ADD `uniacid` int(11) NOT NULL COMMENT '小程序id'");}
  2447. if(!pdo_fieldexists('zhtc_type','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_type')." ADD `num` int(11) NOT NULL");}
  2448. if(!pdo_fieldexists('zhtc_type','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_type')." ADD `money` decimal(10,2) NOT NULL");}
  2449. if(!pdo_fieldexists('zhtc_type','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_type')." ADD `state` int(4) NOT NULL DEFAULT '1'");}
  2450. if(!pdo_fieldexists('zhtc_type','sx_money')) {pdo_query("ALTER TABLE ".tablename('zhtc_type')." ADD `sx_money` decimal(10,2) NOT NULL");}
  2451. if(!pdo_fieldexists('zhtc_type','money2')) {pdo_query("ALTER TABLE ".tablename('zhtc_type')." ADD `money2` decimal(10,2) NOT NULL");}
  2452. if(!pdo_fieldexists('zhtc_type','tel_money')) {pdo_query("ALTER TABLE ".tablename('zhtc_type')." ADD `tel_money` decimal(10,2) NOT NULL");}
  2453. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_type2` (
  2454. `id` int(11) NOT NULL AUTO_INCREMENT,
  2455. `name` varchar(20) NOT NULL COMMENT '分类名称',
  2456. `type_id` int(11) NOT NULL COMMENT '主分类id',
  2457. `num` int(11) NOT NULL,
  2458. `uniacid` int(11) NOT NULL,
  2459. `state` int(4) NOT NULL DEFAULT '1',
  2460. `tel_money` decimal(10,2) NOT NULL,
  2461. PRIMARY KEY (`id`)
  2462. ) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8;
  2463. ");
  2464. if(!pdo_fieldexists('zhtc_type2','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_type2')." ADD
  2465. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2466. if(!pdo_fieldexists('zhtc_type2','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_type2')." ADD `name` varchar(20) NOT NULL COMMENT '分类名称'");}
  2467. if(!pdo_fieldexists('zhtc_type2','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_type2')." ADD `type_id` int(11) NOT NULL COMMENT '主分类id'");}
  2468. if(!pdo_fieldexists('zhtc_type2','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_type2')." ADD `num` int(11) NOT NULL");}
  2469. if(!pdo_fieldexists('zhtc_type2','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_type2')." ADD `uniacid` int(11) NOT NULL");}
  2470. if(!pdo_fieldexists('zhtc_type2','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_type2')." ADD `state` int(4) NOT NULL DEFAULT '1'");}
  2471. if(!pdo_fieldexists('zhtc_type2','tel_money')) {pdo_query("ALTER TABLE ".tablename('zhtc_type2')." ADD `tel_money` decimal(10,2) NOT NULL");}
  2472. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_tzpaylog` (
  2473. `id` int(11) NOT NULL AUTO_INCREMENT,
  2474. `tz_id` int(11) NOT NULL,
  2475. `money` decimal(10,2) NOT NULL,
  2476. `time` datetime NOT NULL,
  2477. `uniacid` varchar(50) NOT NULL,
  2478. `note` varchar(20) NOT NULL,
  2479. PRIMARY KEY (`id`)
  2480. ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COMMENT='帖子支付记录表';
  2481. ");
  2482. if(!pdo_fieldexists('zhtc_tzpaylog','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_tzpaylog')." ADD
  2483. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2484. if(!pdo_fieldexists('zhtc_tzpaylog','tz_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_tzpaylog')." ADD `tz_id` int(11) NOT NULL");}
  2485. if(!pdo_fieldexists('zhtc_tzpaylog','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_tzpaylog')." ADD `money` decimal(10,2) NOT NULL");}
  2486. if(!pdo_fieldexists('zhtc_tzpaylog','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_tzpaylog')." ADD `time` datetime NOT NULL");}
  2487. if(!pdo_fieldexists('zhtc_tzpaylog','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_tzpaylog')." ADD `uniacid` varchar(50) NOT NULL");}
  2488. if(!pdo_fieldexists('zhtc_tzpaylog','note')) {pdo_query("ALTER TABLE ".tablename('zhtc_tzpaylog')." ADD `note` varchar(20) NOT NULL");}
  2489. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_user` (
  2490. `id` int(11) NOT NULL AUTO_INCREMENT,
  2491. `openid` varchar(100) NOT NULL COMMENT 'openid',
  2492. `img` varchar(200) NOT NULL COMMENT '头像',
  2493. `time` varchar(20) NOT NULL COMMENT '注册时间',
  2494. `name` varchar(20) NOT NULL,
  2495. `uniacid` int(11) NOT NULL,
  2496. `money` decimal(10,2) NOT NULL,
  2497. `user_name` varchar(20) NOT NULL,
  2498. `user_tel` varchar(20) NOT NULL,
  2499. `user_address` varchar(200) NOT NULL,
  2500. `commission` decimal(10,2) NOT NULL,
  2501. `state` int(4) NOT NULL DEFAULT '1',
  2502. `total_score` int(11) NOT NULL,
  2503. `day` int(11) NOT NULL,
  2504. PRIMARY KEY (`id`)
  2505. ) ENGINE=InnoDB AUTO_INCREMENT=12230 DEFAULT CHARSET=utf8;
  2506. ");
  2507. if(!pdo_fieldexists('zhtc_user','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD
  2508. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2509. if(!pdo_fieldexists('zhtc_user','openid')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `openid` varchar(100) NOT NULL COMMENT 'openid'");}
  2510. if(!pdo_fieldexists('zhtc_user','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `img` varchar(200) NOT NULL COMMENT '头像'");}
  2511. if(!pdo_fieldexists('zhtc_user','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `time` varchar(20) NOT NULL COMMENT '注册时间'");}
  2512. if(!pdo_fieldexists('zhtc_user','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `name` varchar(20) NOT NULL");}
  2513. if(!pdo_fieldexists('zhtc_user','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `uniacid` int(11) NOT NULL");}
  2514. if(!pdo_fieldexists('zhtc_user','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `money` decimal(10,2) NOT NULL");}
  2515. if(!pdo_fieldexists('zhtc_user','user_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `user_name` varchar(20) NOT NULL");}
  2516. if(!pdo_fieldexists('zhtc_user','user_tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `user_tel` varchar(20) NOT NULL");}
  2517. if(!pdo_fieldexists('zhtc_user','user_address')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `user_address` varchar(200) NOT NULL");}
  2518. if(!pdo_fieldexists('zhtc_user','commission')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `commission` decimal(10,2) NOT NULL");}
  2519. if(!pdo_fieldexists('zhtc_user','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `state` int(4) NOT NULL DEFAULT '1'");}
  2520. if(!pdo_fieldexists('zhtc_user','total_score')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `total_score` int(11) NOT NULL");}
  2521. if(!pdo_fieldexists('zhtc_user','day')) {pdo_query("ALTER TABLE ".tablename('zhtc_user')." ADD `day` int(11) NOT NULL");}
  2522. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_usercoupons` (
  2523. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  2524. `coupons_id` int(11) NOT NULL,
  2525. `user_id` int(11) NOT NULL,
  2526. `state` int(11) NOT NULL DEFAULT '2' COMMENT '1.使用2.未使用',
  2527. `time` varchar(20) NOT NULL,
  2528. `pay_type` int(11) NOT NULL,
  2529. `code` varchar(100) NOT NULL,
  2530. `lq_money` decimal(10,2) NOT NULL,
  2531. `del` int(11) NOT NULL DEFAULT '2',
  2532. `hx_time` varchar(20) NOT NULL,
  2533. PRIMARY KEY (`id`)
  2534. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
  2535. ");
  2536. if(!pdo_fieldexists('zhtc_usercoupons','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_usercoupons')." ADD
  2537. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  2538. if(!pdo_fieldexists('zhtc_usercoupons','coupons_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_usercoupons')." ADD `coupons_id` int(11) NOT NULL");}
  2539. if(!pdo_fieldexists('zhtc_usercoupons','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_usercoupons')." ADD `user_id` int(11) NOT NULL");}
  2540. if(!pdo_fieldexists('zhtc_usercoupons','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_usercoupons')." ADD `state` int(11) NOT NULL DEFAULT '2' COMMENT '1.使用2.未使用'");}
  2541. if(!pdo_fieldexists('zhtc_usercoupons','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_usercoupons')." ADD `time` varchar(20) NOT NULL");}
  2542. if(!pdo_fieldexists('zhtc_usercoupons','pay_type')) {pdo_query("ALTER TABLE ".tablename('zhtc_usercoupons')." ADD `pay_type` int(11) NOT NULL");}
  2543. if(!pdo_fieldexists('zhtc_usercoupons','code')) {pdo_query("ALTER TABLE ".tablename('zhtc_usercoupons')." ADD `code` varchar(100) NOT NULL");}
  2544. if(!pdo_fieldexists('zhtc_usercoupons','lq_money')) {pdo_query("ALTER TABLE ".tablename('zhtc_usercoupons')." ADD `lq_money` decimal(10,2) NOT NULL");}
  2545. if(!pdo_fieldexists('zhtc_usercoupons','del')) {pdo_query("ALTER TABLE ".tablename('zhtc_usercoupons')." ADD `del` int(11) NOT NULL DEFAULT '2'");}
  2546. if(!pdo_fieldexists('zhtc_usercoupons','hx_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_usercoupons')." ADD `hx_time` varchar(20) NOT NULL");}
  2547. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_userformid` (
  2548. `id` int(11) NOT NULL AUTO_INCREMENT,
  2549. `user_id` int(11) NOT NULL COMMENT '用户id',
  2550. `form_id` varchar(50) NOT NULL COMMENT 'form_id',
  2551. `time` datetime NOT NULL,
  2552. `uniacid` varchar(50) NOT NULL,
  2553. `openid` varchar(50) NOT NULL COMMENT 'openid',
  2554. PRIMARY KEY (`id`)
  2555. ) ENGINE=InnoDB AUTO_INCREMENT=12424 DEFAULT CHARSET=utf8 COMMENT='formid表';
  2556. ");
  2557. if(!pdo_fieldexists('zhtc_userformid','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_userformid')." ADD
  2558. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2559. if(!pdo_fieldexists('zhtc_userformid','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_userformid')." ADD `user_id` int(11) NOT NULL COMMENT '用户id'");}
  2560. if(!pdo_fieldexists('zhtc_userformid','form_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_userformid')." ADD `form_id` varchar(50) NOT NULL COMMENT 'form_id'");}
  2561. if(!pdo_fieldexists('zhtc_userformid','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_userformid')." ADD `time` datetime NOT NULL");}
  2562. if(!pdo_fieldexists('zhtc_userformid','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_userformid')." ADD `uniacid` varchar(50) NOT NULL");}
  2563. if(!pdo_fieldexists('zhtc_userformid','openid')) {pdo_query("ALTER TABLE ".tablename('zhtc_userformid')." ADD `openid` varchar(50) NOT NULL COMMENT 'openid'");}
  2564. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_video` (
  2565. `id` int(11) NOT NULL AUTO_INCREMENT,
  2566. `type_id` int(11) NOT NULL COMMENT '分类ID',
  2567. `title` varchar(200) NOT NULL COMMENT '标题',
  2568. `time` datetime NOT NULL,
  2569. `yd_num` int(11) NOT NULL COMMENT '阅读数量',
  2570. `pl_num` int(11) NOT NULL COMMENT '评论数量',
  2571. `dz_num` int(11) NOT NULL COMMENT '点赞数量',
  2572. `uniacid` varchar(50) NOT NULL,
  2573. `url` varchar(500) NOT NULL COMMENT '视频链接',
  2574. `logo` varchar(200) NOT NULL COMMENT '发布人logo',
  2575. `nick_name` varchar(30) NOT NULL COMMENT '昵称',
  2576. `cityname` varchar(50) NOT NULL COMMENT '城市名称',
  2577. `num` int(11) NOT NULL COMMENT '排序',
  2578. `fm_logo` varchar(200) NOT NULL,
  2579. PRIMARY KEY (`id`)
  2580. ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
  2581. ");
  2582. if(!pdo_fieldexists('zhtc_video','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD
  2583. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2584. if(!pdo_fieldexists('zhtc_video','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `type_id` int(11) NOT NULL COMMENT '分类ID'");}
  2585. if(!pdo_fieldexists('zhtc_video','title')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `title` varchar(200) NOT NULL COMMENT '标题'");}
  2586. if(!pdo_fieldexists('zhtc_video','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `time` datetime NOT NULL");}
  2587. if(!pdo_fieldexists('zhtc_video','yd_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `yd_num` int(11) NOT NULL COMMENT '阅读数量'");}
  2588. if(!pdo_fieldexists('zhtc_video','pl_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `pl_num` int(11) NOT NULL COMMENT '评论数量'");}
  2589. if(!pdo_fieldexists('zhtc_video','dz_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `dz_num` int(11) NOT NULL COMMENT '点赞数量'");}
  2590. if(!pdo_fieldexists('zhtc_video','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `uniacid` varchar(50) NOT NULL");}
  2591. if(!pdo_fieldexists('zhtc_video','url')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `url` varchar(500) NOT NULL COMMENT '视频链接'");}
  2592. if(!pdo_fieldexists('zhtc_video','logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `logo` varchar(200) NOT NULL COMMENT '发布人logo'");}
  2593. if(!pdo_fieldexists('zhtc_video','nick_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `nick_name` varchar(30) NOT NULL COMMENT '昵称'");}
  2594. if(!pdo_fieldexists('zhtc_video','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `cityname` varchar(50) NOT NULL COMMENT '城市名称'");}
  2595. if(!pdo_fieldexists('zhtc_video','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `num` int(11) NOT NULL COMMENT '排序'");}
  2596. if(!pdo_fieldexists('zhtc_video','fm_logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_video')." ADD `fm_logo` varchar(200) NOT NULL");}
  2597. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_videodz` (
  2598. `id` int(11) NOT NULL AUTO_INCREMENT,
  2599. `user_id` int(11) NOT NULL,
  2600. `video_id` int(11) NOT NULL,
  2601. PRIMARY KEY (`id`)
  2602. ) ENGINE=InnoDB AUTO_INCREMENT=148 DEFAULT CHARSET=utf8;
  2603. ");
  2604. if(!pdo_fieldexists('zhtc_videodz','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_videodz')." ADD
  2605. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2606. if(!pdo_fieldexists('zhtc_videodz','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_videodz')." ADD `user_id` int(11) NOT NULL");}
  2607. if(!pdo_fieldexists('zhtc_videodz','video_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_videodz')." ADD `video_id` int(11) NOT NULL");}
  2608. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_videopl` (
  2609. `id` int(11) NOT NULL AUTO_INCREMENT,
  2610. `user_id` int(11) NOT NULL,
  2611. `content` varchar(500) NOT NULL,
  2612. `video_id` int(11) NOT NULL,
  2613. `time` varchar(20) NOT NULL,
  2614. PRIMARY KEY (`id`)
  2615. ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
  2616. ");
  2617. if(!pdo_fieldexists('zhtc_videopl','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_videopl')." ADD
  2618. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2619. if(!pdo_fieldexists('zhtc_videopl','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_videopl')." ADD `user_id` int(11) NOT NULL");}
  2620. if(!pdo_fieldexists('zhtc_videopl','content')) {pdo_query("ALTER TABLE ".tablename('zhtc_videopl')." ADD `content` varchar(500) NOT NULL");}
  2621. if(!pdo_fieldexists('zhtc_videopl','video_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_videopl')." ADD `video_id` int(11) NOT NULL");}
  2622. if(!pdo_fieldexists('zhtc_videopl','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_videopl')." ADD `time` varchar(20) NOT NULL");}
  2623. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_videotype` (
  2624. `id` int(11) NOT NULL AUTO_INCREMENT,
  2625. `type_name` varchar(20) NOT NULL COMMENT '分类名称',
  2626. `img` varchar(100) NOT NULL COMMENT '分类图片',
  2627. `uniacid` int(11) NOT NULL COMMENT '小程序id',
  2628. `num` int(11) NOT NULL,
  2629. `state` int(4) NOT NULL DEFAULT '1',
  2630. PRIMARY KEY (`id`)
  2631. ) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
  2632. ");
  2633. if(!pdo_fieldexists('zhtc_videotype','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_videotype')." ADD
  2634. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2635. if(!pdo_fieldexists('zhtc_videotype','type_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_videotype')." ADD `type_name` varchar(20) NOT NULL COMMENT '分类名称'");}
  2636. if(!pdo_fieldexists('zhtc_videotype','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_videotype')." ADD `img` varchar(100) NOT NULL COMMENT '分类图片'");}
  2637. if(!pdo_fieldexists('zhtc_videotype','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_videotype')." ADD `uniacid` int(11) NOT NULL COMMENT '小程序id'");}
  2638. if(!pdo_fieldexists('zhtc_videotype','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_videotype')." ADD `num` int(11) NOT NULL");}
  2639. if(!pdo_fieldexists('zhtc_videotype','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_videotype')." ADD `state` int(4) NOT NULL DEFAULT '1'");}
  2640. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_withdrawal` (
  2641. `id` int(11) NOT NULL AUTO_INCREMENT,
  2642. `name` varchar(10) NOT NULL COMMENT '真实姓名',
  2643. `username` varchar(100) NOT NULL COMMENT '账号',
  2644. `type` int(11) NOT NULL COMMENT '1支付宝 2.微信 3.银行',
  2645. `time` int(11) NOT NULL COMMENT '申请时间',
  2646. `sh_time` int(11) NOT NULL COMMENT '审核时间',
  2647. `state` int(11) NOT NULL COMMENT '1.待审核 2.通过 3.拒绝',
  2648. `tx_cost` decimal(10,2) NOT NULL COMMENT '提现金额',
  2649. `sj_cost` decimal(10,2) NOT NULL COMMENT '实际金额',
  2650. `user_id` int(11) NOT NULL COMMENT '用户id',
  2651. `uniacid` int(11) NOT NULL,
  2652. `method` int(11) NOT NULL,
  2653. `store_id` int(11) NOT NULL,
  2654. `bank` varchar(20) NOT NULL,
  2655. PRIMARY KEY (`id`)
  2656. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  2657. ");
  2658. if(!pdo_fieldexists('zhtc_withdrawal','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD
  2659. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2660. if(!pdo_fieldexists('zhtc_withdrawal','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `name` varchar(10) NOT NULL COMMENT '真实姓名'");}
  2661. if(!pdo_fieldexists('zhtc_withdrawal','username')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `username` varchar(100) NOT NULL COMMENT '账号'");}
  2662. if(!pdo_fieldexists('zhtc_withdrawal','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `type` int(11) NOT NULL COMMENT '1支付宝 2.微信 3.银行'");}
  2663. if(!pdo_fieldexists('zhtc_withdrawal','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `time` int(11) NOT NULL COMMENT '申请时间'");}
  2664. if(!pdo_fieldexists('zhtc_withdrawal','sh_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `sh_time` int(11) NOT NULL COMMENT '审核时间'");}
  2665. if(!pdo_fieldexists('zhtc_withdrawal','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `state` int(11) NOT NULL COMMENT '1.待审核 2.通过 3.拒绝'");}
  2666. if(!pdo_fieldexists('zhtc_withdrawal','tx_cost')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `tx_cost` decimal(10,2) NOT NULL COMMENT '提现金额'");}
  2667. if(!pdo_fieldexists('zhtc_withdrawal','sj_cost')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `sj_cost` decimal(10,2) NOT NULL COMMENT '实际金额'");}
  2668. if(!pdo_fieldexists('zhtc_withdrawal','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `user_id` int(11) NOT NULL COMMENT '用户id'");}
  2669. if(!pdo_fieldexists('zhtc_withdrawal','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `uniacid` int(11) NOT NULL");}
  2670. if(!pdo_fieldexists('zhtc_withdrawal','method')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `method` int(11) NOT NULL");}
  2671. if(!pdo_fieldexists('zhtc_withdrawal','store_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `store_id` int(11) NOT NULL");}
  2672. if(!pdo_fieldexists('zhtc_withdrawal','bank')) {pdo_query("ALTER TABLE ".tablename('zhtc_withdrawal')." ADD `bank` varchar(20) NOT NULL");}
  2673. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_yellowpaylog` (
  2674. `id` int(11) NOT NULL AUTO_INCREMENT,
  2675. `hy_id` int(11) NOT NULL,
  2676. `money` decimal(10,2) NOT NULL,
  2677. `time` datetime NOT NULL,
  2678. `uniacid` varchar(50) NOT NULL,
  2679. PRIMARY KEY (`id`)
  2680. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='黄页支付记录表';
  2681. ");
  2682. if(!pdo_fieldexists('zhtc_yellowpaylog','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowpaylog')." ADD
  2683. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2684. if(!pdo_fieldexists('zhtc_yellowpaylog','hy_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowpaylog')." ADD `hy_id` int(11) NOT NULL");}
  2685. if(!pdo_fieldexists('zhtc_yellowpaylog','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowpaylog')." ADD `money` decimal(10,2) NOT NULL");}
  2686. if(!pdo_fieldexists('zhtc_yellowpaylog','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowpaylog')." ADD `time` datetime NOT NULL");}
  2687. if(!pdo_fieldexists('zhtc_yellowpaylog','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowpaylog')." ADD `uniacid` varchar(50) NOT NULL");}
  2688. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_yellowset` (
  2689. `id` int(11) NOT NULL AUTO_INCREMENT,
  2690. `days` int(11) NOT NULL COMMENT '入住天数',
  2691. `money` decimal(10,2) NOT NULL,
  2692. `num` int(11) NOT NULL,
  2693. `uniacid` int(11) NOT NULL,
  2694. PRIMARY KEY (`id`)
  2695. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='黄页设置表';
  2696. ");
  2697. if(!pdo_fieldexists('zhtc_yellowset','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowset')." ADD
  2698. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2699. if(!pdo_fieldexists('zhtc_yellowset','days')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowset')." ADD `days` int(11) NOT NULL COMMENT '入住天数'");}
  2700. if(!pdo_fieldexists('zhtc_yellowset','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowset')." ADD `money` decimal(10,2) NOT NULL");}
  2701. if(!pdo_fieldexists('zhtc_yellowset','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowset')." ADD `num` int(11) NOT NULL");}
  2702. if(!pdo_fieldexists('zhtc_yellowset','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowset')." ADD `uniacid` int(11) NOT NULL");}
  2703. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_yellowstore` (
  2704. `id` int(11) NOT NULL AUTO_INCREMENT,
  2705. `user_id` int(11) NOT NULL,
  2706. `logo` varchar(200) NOT NULL COMMENT 'logo图片',
  2707. `company_name` varchar(100) NOT NULL COMMENT '公司名称',
  2708. `company_address` varchar(200) NOT NULL COMMENT '公司地址',
  2709. `type_id` int(11) NOT NULL COMMENT '二级分类',
  2710. `link_tel` varchar(20) NOT NULL COMMENT '联系电话',
  2711. `sort` int(11) NOT NULL COMMENT '排序',
  2712. `rz_time` int(11) NOT NULL COMMENT '入住时间',
  2713. `sh_time` int(11) NOT NULL COMMENT '审核时间',
  2714. `state` int(4) NOT NULL COMMENT '1待,2通过,3拒绝',
  2715. `rz_type` int(4) NOT NULL COMMENT '入驻类型',
  2716. `time_over` int(4) NOT NULL COMMENT '1到期,2没到期',
  2717. `uniacid` varchar(50) NOT NULL,
  2718. `coordinates` varchar(50) NOT NULL COMMENT '坐标',
  2719. `content` text NOT NULL COMMENT '简介',
  2720. `imgs` varchar(500) NOT NULL COMMENT '多图',
  2721. `views` int(11) NOT NULL,
  2722. `tel2` varchar(20) NOT NULL,
  2723. `cityname` varchar(50) NOT NULL,
  2724. `dq_time` int(11) NOT NULL,
  2725. `type2_id` int(11) NOT NULL,
  2726. `is_delete` int(4) NOT NULL DEFAULT '2',
  2727. PRIMARY KEY (`id`)
  2728. ) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8;
  2729. ");
  2730. if(!pdo_fieldexists('zhtc_yellowstore','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD
  2731. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2732. if(!pdo_fieldexists('zhtc_yellowstore','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `user_id` int(11) NOT NULL");}
  2733. if(!pdo_fieldexists('zhtc_yellowstore','logo')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `logo` varchar(200) NOT NULL COMMENT 'logo图片'");}
  2734. if(!pdo_fieldexists('zhtc_yellowstore','company_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `company_name` varchar(100) NOT NULL COMMENT '公司名称'");}
  2735. if(!pdo_fieldexists('zhtc_yellowstore','company_address')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `company_address` varchar(200) NOT NULL COMMENT '公司地址'");}
  2736. if(!pdo_fieldexists('zhtc_yellowstore','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `type_id` int(11) NOT NULL COMMENT '二级分类'");}
  2737. if(!pdo_fieldexists('zhtc_yellowstore','link_tel')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `link_tel` varchar(20) NOT NULL COMMENT '联系电话'");}
  2738. if(!pdo_fieldexists('zhtc_yellowstore','sort')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `sort` int(11) NOT NULL COMMENT '排序'");}
  2739. if(!pdo_fieldexists('zhtc_yellowstore','rz_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `rz_time` int(11) NOT NULL COMMENT '入住时间'");}
  2740. if(!pdo_fieldexists('zhtc_yellowstore','sh_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `sh_time` int(11) NOT NULL COMMENT '审核时间'");}
  2741. if(!pdo_fieldexists('zhtc_yellowstore','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `state` int(4) NOT NULL COMMENT '1待,2通过,3拒绝'");}
  2742. if(!pdo_fieldexists('zhtc_yellowstore','rz_type')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `rz_type` int(4) NOT NULL COMMENT '入驻类型'");}
  2743. if(!pdo_fieldexists('zhtc_yellowstore','time_over')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `time_over` int(4) NOT NULL COMMENT '1到期,2没到期'");}
  2744. if(!pdo_fieldexists('zhtc_yellowstore','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `uniacid` varchar(50) NOT NULL");}
  2745. if(!pdo_fieldexists('zhtc_yellowstore','coordinates')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `coordinates` varchar(50) NOT NULL COMMENT '坐标'");}
  2746. if(!pdo_fieldexists('zhtc_yellowstore','content')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `content` text NOT NULL COMMENT '简介'");}
  2747. if(!pdo_fieldexists('zhtc_yellowstore','imgs')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `imgs` varchar(500) NOT NULL COMMENT '多图'");}
  2748. if(!pdo_fieldexists('zhtc_yellowstore','views')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `views` int(11) NOT NULL");}
  2749. if(!pdo_fieldexists('zhtc_yellowstore','tel2')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `tel2` varchar(20) NOT NULL");}
  2750. if(!pdo_fieldexists('zhtc_yellowstore','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `cityname` varchar(50) NOT NULL");}
  2751. if(!pdo_fieldexists('zhtc_yellowstore','dq_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `dq_time` int(11) NOT NULL");}
  2752. if(!pdo_fieldexists('zhtc_yellowstore','type2_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `type2_id` int(11) NOT NULL");}
  2753. if(!pdo_fieldexists('zhtc_yellowstore','is_delete')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowstore')." ADD `is_delete` int(4) NOT NULL DEFAULT '2'");}
  2754. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_yellowtype` (
  2755. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  2756. `type_name` varchar(20) NOT NULL COMMENT '分类名称',
  2757. `img` varchar(100) NOT NULL COMMENT '分类图片',
  2758. `uniacid` int(11) NOT NULL COMMENT '小程序id',
  2759. `num` int(11) NOT NULL,
  2760. `money` decimal(10,2) NOT NULL,
  2761. `state` int(4) NOT NULL DEFAULT '1' COMMENT '1启用,2禁用',
  2762. PRIMARY KEY (`id`)
  2763. ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
  2764. ");
  2765. if(!pdo_fieldexists('zhtc_yellowtype','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype')." ADD
  2766. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  2767. if(!pdo_fieldexists('zhtc_yellowtype','type_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype')." ADD `type_name` varchar(20) NOT NULL COMMENT '分类名称'");}
  2768. if(!pdo_fieldexists('zhtc_yellowtype','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype')." ADD `img` varchar(100) NOT NULL COMMENT '分类图片'");}
  2769. if(!pdo_fieldexists('zhtc_yellowtype','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype')." ADD `uniacid` int(11) NOT NULL COMMENT '小程序id'");}
  2770. if(!pdo_fieldexists('zhtc_yellowtype','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype')." ADD `num` int(11) NOT NULL");}
  2771. if(!pdo_fieldexists('zhtc_yellowtype','money')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype')." ADD `money` decimal(10,2) NOT NULL");}
  2772. if(!pdo_fieldexists('zhtc_yellowtype','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype')." ADD `state` int(4) NOT NULL DEFAULT '1' COMMENT '1启用,2禁用'");}
  2773. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_yellowtype2` (
  2774. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  2775. `name` varchar(20) NOT NULL COMMENT '分类名称',
  2776. `type_id` int(11) NOT NULL COMMENT '主分类id',
  2777. `num` int(11) NOT NULL,
  2778. `uniacid` int(11) NOT NULL,
  2779. `state` int(4) NOT NULL DEFAULT '1' COMMENT '1启用,2禁用',
  2780. PRIMARY KEY (`id`)
  2781. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
  2782. ");
  2783. if(!pdo_fieldexists('zhtc_yellowtype2','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype2')." ADD
  2784. `id` int(11) unsigned NOT NULL AUTO_INCREMENT");}
  2785. if(!pdo_fieldexists('zhtc_yellowtype2','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype2')." ADD `name` varchar(20) NOT NULL COMMENT '分类名称'");}
  2786. if(!pdo_fieldexists('zhtc_yellowtype2','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype2')." ADD `type_id` int(11) NOT NULL COMMENT '主分类id'");}
  2787. if(!pdo_fieldexists('zhtc_yellowtype2','num')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype2')." ADD `num` int(11) NOT NULL");}
  2788. if(!pdo_fieldexists('zhtc_yellowtype2','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype2')." ADD `uniacid` int(11) NOT NULL");}
  2789. if(!pdo_fieldexists('zhtc_yellowtype2','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_yellowtype2')." ADD `state` int(4) NOT NULL DEFAULT '1' COMMENT '1启用,2禁用'");}
  2790. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_yjset` (
  2791. `id` int(11) NOT NULL AUTO_INCREMENT,
  2792. `type` int(4) NOT NULL DEFAULT '1' COMMENT '1统一模式,2分开模式',
  2793. `typer` varchar(10) NOT NULL COMMENT '统一比例',
  2794. `sjper` varchar(10) NOT NULL COMMENT '商家比例',
  2795. `hyper` varchar(10) NOT NULL COMMENT '黄页比例',
  2796. `pcper` varchar(10) NOT NULL COMMENT '拼车比例',
  2797. `tzper` varchar(10) NOT NULL COMMENT '帖子比例',
  2798. `uniacid` varchar(50) NOT NULL,
  2799. PRIMARY KEY (`id`)
  2800. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='佣金比例表';
  2801. ");
  2802. if(!pdo_fieldexists('zhtc_yjset','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjset')." ADD
  2803. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2804. if(!pdo_fieldexists('zhtc_yjset','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjset')." ADD `type` int(4) NOT NULL DEFAULT '1' COMMENT '1统一模式,2分开模式'");}
  2805. if(!pdo_fieldexists('zhtc_yjset','typer')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjset')." ADD `typer` varchar(10) NOT NULL COMMENT '统一比例'");}
  2806. if(!pdo_fieldexists('zhtc_yjset','sjper')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjset')." ADD `sjper` varchar(10) NOT NULL COMMENT '商家比例'");}
  2807. if(!pdo_fieldexists('zhtc_yjset','hyper')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjset')." ADD `hyper` varchar(10) NOT NULL COMMENT '黄页比例'");}
  2808. if(!pdo_fieldexists('zhtc_yjset','pcper')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjset')." ADD `pcper` varchar(10) NOT NULL COMMENT '拼车比例'");}
  2809. if(!pdo_fieldexists('zhtc_yjset','tzper')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjset')." ADD `tzper` varchar(10) NOT NULL COMMENT '帖子比例'");}
  2810. if(!pdo_fieldexists('zhtc_yjset','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjset')." ADD `uniacid` varchar(50) NOT NULL");}
  2811. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_yjtx` (
  2812. `id` int(11) NOT NULL AUTO_INCREMENT,
  2813. `account_id` int(11) NOT NULL COMMENT '账号id',
  2814. `tx_type` int(4) NOT NULL COMMENT '提现方式 1,支付宝,2微信,3银联',
  2815. `tx_cost` decimal(10,2) NOT NULL COMMENT '提现金额',
  2816. `status` int(4) NOT NULL COMMENT '状态 1申请,2通过,3拒绝',
  2817. `uniacid` varchar(50) NOT NULL,
  2818. `cerated_time` datetime NOT NULL COMMENT '日期',
  2819. `sj_cost` decimal(10,2) NOT NULL COMMENT '实际金额',
  2820. `account` varchar(30) NOT NULL COMMENT '账户',
  2821. `name` varchar(30) NOT NULL COMMENT '姓名',
  2822. `sx_cost` decimal(10,2) NOT NULL COMMENT '手续费',
  2823. `time` datetime NOT NULL COMMENT '审核时间',
  2824. `is_del` int(4) NOT NULL DEFAULT '1' COMMENT '1正常,2删除',
  2825. PRIMARY KEY (`id`)
  2826. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  2827. ");
  2828. if(!pdo_fieldexists('zhtc_yjtx','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD
  2829. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2830. if(!pdo_fieldexists('zhtc_yjtx','account_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD `account_id` int(11) NOT NULL COMMENT '账号id'");}
  2831. if(!pdo_fieldexists('zhtc_yjtx','tx_type')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD `tx_type` int(4) NOT NULL COMMENT '提现方式 1,支付宝,2微信,3银联'");}
  2832. if(!pdo_fieldexists('zhtc_yjtx','tx_cost')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD `tx_cost` decimal(10,2) NOT NULL COMMENT '提现金额'");}
  2833. if(!pdo_fieldexists('zhtc_yjtx','status')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD `status` int(4) NOT NULL COMMENT '状态 1申请,2通过,3拒绝'");}
  2834. if(!pdo_fieldexists('zhtc_yjtx','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD `uniacid` varchar(50) NOT NULL");}
  2835. if(!pdo_fieldexists('zhtc_yjtx','cerated_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD `cerated_time` datetime NOT NULL COMMENT '日期'");}
  2836. if(!pdo_fieldexists('zhtc_yjtx','sj_cost')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD `sj_cost` decimal(10,2) NOT NULL COMMENT '实际金额'");}
  2837. if(!pdo_fieldexists('zhtc_yjtx','account')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD `account` varchar(30) NOT NULL COMMENT '账户'");}
  2838. if(!pdo_fieldexists('zhtc_yjtx','name')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD `name` varchar(30) NOT NULL COMMENT '姓名'");}
  2839. if(!pdo_fieldexists('zhtc_yjtx','sx_cost')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD `sx_cost` decimal(10,2) NOT NULL COMMENT '手续费'");}
  2840. if(!pdo_fieldexists('zhtc_yjtx','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD `time` datetime NOT NULL COMMENT '审核时间'");}
  2841. if(!pdo_fieldexists('zhtc_yjtx','is_del')) {pdo_query("ALTER TABLE ".tablename('zhtc_yjtx')." ADD `is_del` int(4) NOT NULL DEFAULT '1' COMMENT '1正常,2删除'");}
  2842. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_zx` (
  2843. `id` int(11) NOT NULL AUTO_INCREMENT,
  2844. `type_id` int(11) NOT NULL COMMENT '分类ID',
  2845. `user_id` int(11) NOT NULL COMMENT '发布人ID',
  2846. `title` varchar(200) NOT NULL COMMENT '标题',
  2847. `content` text NOT NULL COMMENT '内容',
  2848. `time` datetime NOT NULL,
  2849. `yd_num` int(11) NOT NULL COMMENT '阅读数量',
  2850. `pl_num` int(11) NOT NULL COMMENT '评论数量',
  2851. `uniacid` varchar(50) NOT NULL,
  2852. `imgs` text NOT NULL COMMENT '图片',
  2853. `state` int(4) NOT NULL,
  2854. `sh_time` datetime NOT NULL,
  2855. `type` int(4) NOT NULL,
  2856. `cityname` varchar(50) NOT NULL,
  2857. `video` varchar(300) NOT NULL,
  2858. PRIMARY KEY (`id`)
  2859. ) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8;
  2860. ");
  2861. if(!pdo_fieldexists('zhtc_zx','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD
  2862. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2863. if(!pdo_fieldexists('zhtc_zx','type_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `type_id` int(11) NOT NULL COMMENT '分类ID'");}
  2864. if(!pdo_fieldexists('zhtc_zx','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `user_id` int(11) NOT NULL COMMENT '发布人ID'");}
  2865. if(!pdo_fieldexists('zhtc_zx','title')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `title` varchar(200) NOT NULL COMMENT '标题'");}
  2866. if(!pdo_fieldexists('zhtc_zx','content')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `content` text NOT NULL COMMENT '内容'");}
  2867. if(!pdo_fieldexists('zhtc_zx','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `time` datetime NOT NULL");}
  2868. if(!pdo_fieldexists('zhtc_zx','yd_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `yd_num` int(11) NOT NULL COMMENT '阅读数量'");}
  2869. if(!pdo_fieldexists('zhtc_zx','pl_num')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `pl_num` int(11) NOT NULL COMMENT '评论数量'");}
  2870. if(!pdo_fieldexists('zhtc_zx','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `uniacid` varchar(50) NOT NULL");}
  2871. if(!pdo_fieldexists('zhtc_zx','imgs')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `imgs` text NOT NULL COMMENT '图片'");}
  2872. if(!pdo_fieldexists('zhtc_zx','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `state` int(4) NOT NULL");}
  2873. if(!pdo_fieldexists('zhtc_zx','sh_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `sh_time` datetime NOT NULL");}
  2874. if(!pdo_fieldexists('zhtc_zx','type')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `type` int(4) NOT NULL");}
  2875. if(!pdo_fieldexists('zhtc_zx','cityname')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `cityname` varchar(50) NOT NULL");}
  2876. if(!pdo_fieldexists('zhtc_zx','video')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx')." ADD `video` varchar(300) NOT NULL");}
  2877. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_zx_assess` (
  2878. `id` int(11) NOT NULL AUTO_INCREMENT,
  2879. `zx_id` int(4) NOT NULL,
  2880. `score` int(11) NOT NULL,
  2881. `content` text NOT NULL,
  2882. `img` varchar(500) NOT NULL,
  2883. `cerated_time` datetime NOT NULL,
  2884. `user_id` int(11) NOT NULL,
  2885. `uniacid` varchar(50) NOT NULL,
  2886. `status` int(4) NOT NULL,
  2887. `reply` text NOT NULL,
  2888. `reply_time` datetime NOT NULL,
  2889. `state` int(1) NOT NULL DEFAULT '2',
  2890. PRIMARY KEY (`id`)
  2891. ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
  2892. ");
  2893. if(!pdo_fieldexists('zhtc_zx_assess','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_assess')." ADD
  2894. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2895. if(!pdo_fieldexists('zhtc_zx_assess','zx_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_assess')." ADD `zx_id` int(4) NOT NULL");}
  2896. if(!pdo_fieldexists('zhtc_zx_assess','score')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_assess')." ADD `score` int(11) NOT NULL");}
  2897. if(!pdo_fieldexists('zhtc_zx_assess','content')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_assess')." ADD `content` text NOT NULL");}
  2898. if(!pdo_fieldexists('zhtc_zx_assess','img')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_assess')." ADD `img` varchar(500) NOT NULL");}
  2899. if(!pdo_fieldexists('zhtc_zx_assess','cerated_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_assess')." ADD `cerated_time` datetime NOT NULL");}
  2900. if(!pdo_fieldexists('zhtc_zx_assess','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_assess')." ADD `user_id` int(11) NOT NULL");}
  2901. if(!pdo_fieldexists('zhtc_zx_assess','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_assess')." ADD `uniacid` varchar(50) NOT NULL");}
  2902. if(!pdo_fieldexists('zhtc_zx_assess','status')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_assess')." ADD `status` int(4) NOT NULL");}
  2903. if(!pdo_fieldexists('zhtc_zx_assess','reply')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_assess')." ADD `reply` text NOT NULL");}
  2904. if(!pdo_fieldexists('zhtc_zx_assess','reply_time')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_assess')." ADD `reply_time` datetime NOT NULL");}
  2905. if(!pdo_fieldexists('zhtc_zx_assess','state')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_assess')." ADD `state` int(1) NOT NULL DEFAULT '2'");}
  2906. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_zx_type` (
  2907. `id` int(11) NOT NULL AUTO_INCREMENT,
  2908. `type_name` varchar(100) NOT NULL COMMENT '分类名称',
  2909. `icon` varchar(100) NOT NULL COMMENT '图标',
  2910. `sort` int(4) NOT NULL COMMENT '排序',
  2911. `time` datetime NOT NULL COMMENT '时间',
  2912. `uniacid` varchar(50) NOT NULL,
  2913. PRIMARY KEY (`id`)
  2914. ) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
  2915. ");
  2916. if(!pdo_fieldexists('zhtc_zx_type','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_type')." ADD
  2917. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2918. if(!pdo_fieldexists('zhtc_zx_type','type_name')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_type')." ADD `type_name` varchar(100) NOT NULL COMMENT '分类名称'");}
  2919. if(!pdo_fieldexists('zhtc_zx_type','icon')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_type')." ADD `icon` varchar(100) NOT NULL COMMENT '图标'");}
  2920. if(!pdo_fieldexists('zhtc_zx_type','sort')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_type')." ADD `sort` int(4) NOT NULL COMMENT '排序'");}
  2921. if(!pdo_fieldexists('zhtc_zx_type','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_type')." ADD `time` datetime NOT NULL COMMENT '时间'");}
  2922. if(!pdo_fieldexists('zhtc_zx_type','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_type')." ADD `uniacid` varchar(50) NOT NULL");}
  2923. pdo_query("CREATE TABLE IF NOT EXISTS `ims_zhtc_zx_zj` (
  2924. `id` int(11) NOT NULL AUTO_INCREMENT,
  2925. `zx_id` int(11) NOT NULL COMMENT '资讯ID',
  2926. `user_id` int(11) NOT NULL COMMENT '用户ID',
  2927. `uniacid` varchar(50) NOT NULL,
  2928. `time` int(11) NOT NULL,
  2929. PRIMARY KEY (`id`)
  2930. ) ENGINE=InnoDB AUTO_INCREMENT=1021 DEFAULT CHARSET=utf8 COMMENT='资讯足迹';
  2931. ");
  2932. if(!pdo_fieldexists('zhtc_zx_zj','id')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_zj')." ADD
  2933. `id` int(11) NOT NULL AUTO_INCREMENT");}
  2934. if(!pdo_fieldexists('zhtc_zx_zj','zx_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_zj')." ADD `zx_id` int(11) NOT NULL COMMENT '资讯ID'");}
  2935. if(!pdo_fieldexists('zhtc_zx_zj','user_id')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_zj')." ADD `user_id` int(11) NOT NULL COMMENT '用户ID'");}
  2936. if(!pdo_fieldexists('zhtc_zx_zj','uniacid')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_zj')." ADD `uniacid` varchar(50) NOT NULL");}
  2937. if(!pdo_fieldexists('zhtc_zx_zj','time')) {pdo_query("ALTER TABLE ".tablename('zhtc_zx_zj')." ADD `time` int(11) NOT NULL");}