ListGroup.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../../class/connect.php");
  4. require("../../class/db_sql.php");
  5. require("../../class/functions.php");
  6. $link=db_connect();
  7. $empire=new mysqlquery();
  8. $editor=1;
  9. //验证用户
  10. $lur=is_login();
  11. $logininid=$lur['userid'];
  12. $loginin=$lur['username'];
  13. $loginrnd=$lur['rnd'];
  14. $loginlevel=$lur['groupid'];
  15. $loginadminstyleid=$lur['adminstyleid'];
  16. //ehash
  17. $ecms_hashur=hReturnEcmsHashStrAll();
  18. //验证权限
  19. CheckLevel($logininid,$loginin,$classid,"group");
  20. //增加用户组
  21. function AddGroup($groupname,$gr,$userid,$username){
  22. global $empire,$dbtbpre;
  23. if(empty($groupname))
  24. {printerror("EmptyGroupname","history.go(-1)");}
  25. //验证权限
  26. CheckLevel($userid,$username,$classid,"group");
  27. //处理变量
  28. $gr[doall]=(int)$gr[doall];
  29. $gr[dopublic]=(int)$gr[dopublic];
  30. $gr[doclass]=(int)$gr[doclass];
  31. $gr[dotemplate]=(int)$gr[dotemplate];
  32. $gr[dopicnews]=(int)$gr[dopicnews];
  33. $gr[dofile]=(int)$gr[dofile];
  34. $gr[douser]=(int)$gr[douser];
  35. $gr[dolog]=(int)$gr[dolog];
  36. $gr[domember]=(int)$gr[domember];
  37. $gr[dobefrom]=(int)$gr[dobefrom];
  38. $gr[doword]=(int)$gr[doword];
  39. $gr[dokey]=(int)$gr[dokey];
  40. $gr[doad]=(int)$gr[doad];
  41. $gr[dovote]=(int)$gr[dovote];
  42. $gr[dogroup]=(int)$gr[dogroup];
  43. $gr[docj]=(int)$gr[docj];
  44. $gr[dobq]=(int)$gr[dobq];
  45. $gr[domovenews]=(int)$gr[domovenews];
  46. $gr[dopostdata]=(int)$gr[dopostdata];
  47. $gr[dochangedata]=(int)$gr[dochangedata];
  48. $gr[dopl]=(int)$gr[dopl];
  49. $gr[dof]=(int)$gr[dof];
  50. $gr[dom]=(int)$gr[dom];
  51. $gr[dodo]=(int)$gr[dodo];
  52. $gr[dodbdata]=(int)$gr[dodbdata];
  53. $gr[dorepnewstext]=(int)$gr[dorepnewstext];
  54. $gr[dotempvar]=(int)$gr[dotempvar];
  55. $gr[dostats]=(int)$gr[dostats];
  56. $gr[dowriter]=(int)$gr[dowriter];
  57. $gr[dototaldata]=(int)$gr[dototaldata];
  58. $gr[dosearchkey]=(int)$gr[dosearchkey];
  59. $gr[dozt]=(int)$gr[dozt];
  60. $gr[docard]=(int)$gr[docard];
  61. $gr[dolink]=(int)$gr[dolink];
  62. $gr[doselfinfo]=(int)$gr[doselfinfo];
  63. $gr[dotable]=(int)$gr[dotable];
  64. $gr[doexecsql]=(int)$gr[doexecsql];
  65. $gr[dodownurl]=(int)$gr[dodownurl];
  66. $gr[dodeldownrecord]=(int)$gr[dodeldownrecord];
  67. $gr[doshoppayfs]=(int)$gr[doshoppayfs];
  68. $gr[doshopps]=(int)$gr[doshopps];
  69. $gr[doshopdd]=(int)$gr[doshopdd];
  70. $gr[dogbook]=(int)$gr[dogbook];
  71. $gr[dofeedback]=(int)$gr[dofeedback];
  72. $gr[donotcj]=(int)$gr[donotcj];
  73. $gr[dodownerror]=(int)$gr[dodownerror];
  74. $gr[douserpage]=(int)$gr[douserpage];
  75. $gr[dodelinfodata]=(int)$gr[dodelinfodata];
  76. $gr[doaddinfo]=(int)$gr[doaddinfo];
  77. $gr[doeditinfo]=(int)$gr[doeditinfo];
  78. $gr[dodelinfo]=(int)$gr[dodelinfo];
  79. $gr[doadminstyle]=(int)$gr[doadminstyle];
  80. $gr[dorepdownpath]=(int)$gr[dorepdownpath];
  81. $gr[douserjs]=(int)$gr[douserjs];
  82. $gr[douserlist]=(int)$gr[douserlist];
  83. $gr[domsg]=(int)$gr[domsg];
  84. $gr[dosendemail]=(int)$gr[dosendemail];
  85. $gr[dosetmclass]=(int)$gr[dosetmclass];
  86. $gr[doinfodoc]=(int)$gr[doinfodoc];
  87. $gr[dotempgroup]=(int)$gr[dotempgroup];
  88. $gr[dofeedbackf]=(int)$gr[dofeedbackf];
  89. $gr[dotask]=(int)$gr[dotask];
  90. $gr[domemberf]=(int)$gr[domemberf];
  91. $gr[dospacestyle]=(int)$gr[dospacestyle];
  92. $gr[dospacedata]=(int)$gr[dospacedata];
  93. $gr[dovotemod]=(int)$gr[dovotemod];
  94. $gr[doplayer]=(int)$gr[doplayer];
  95. $gr[dowap]=(int)$gr[dowap];
  96. $gr[dopay]=(int)$gr[dopay];
  97. $gr[dobuygroup]=(int)$gr[dobuygroup];
  98. $gr[dosearchall]=(int)$gr[dosearchall];
  99. $gr[doinfotype]=(int)$gr[doinfotype];
  100. $gr[doplf]=(int)$gr[doplf];
  101. $gr[dopltable]=(int)$gr[dopltable];
  102. $gr[dochadminstyle]=(int)$gr[dochadminstyle];
  103. $gr[dotags]=(int)$gr[dotags];
  104. $gr[dosp]=(int)$gr[dosp];
  105. $gr[doyh]=(int)$gr[doyh];
  106. $gr[dofirewall]=(int)$gr[dofirewall];
  107. $gr[dosetsafe]=(int)$gr[dosetsafe];
  108. $gr[douserclass]=(int)$gr[douserclass];
  109. $gr[doworkflow]=(int)$gr[doworkflow];
  110. $gr[domenu]=(int)$gr[domenu];
  111. $gr[dopubvar]=(int)$gr[dopubvar];
  112. $gr[doclassf]=(int)$gr[doclassf];
  113. $gr[doztf]=(int)$gr[doztf];
  114. $gr[dofiletable]=(int)$gr[dofiletable];
  115. $gr[docheckinfo]=(int)$gr[docheckinfo];
  116. $gr[dogoodinfo]=(int)$gr[dogoodinfo];
  117. $gr[dodocinfo]=(int)$gr[dodocinfo];
  118. $gr[domoveinfo]=(int)$gr[domoveinfo];
  119. $gr[dodttemp]=(int)$gr[dodttemp];
  120. $gr[doloadcj]=(int)$gr[doloadcj];
  121. $gr[domustcheck]=(int)$gr[domustcheck];
  122. $gr[docheckedit]=(int)$gr[docheckedit];
  123. $gr[domemberconnect]=(int)$gr[domemberconnect];
  124. $gr[doprecode]=(int)$gr[doprecode];
  125. $gr[domoreport]=(int)$gr[domoreport];
  126. $gr[docanhtml]=(int)$gr[docanhtml];
  127. $gr[dodelclass]=(int)$gr[dodelclass];
  128. $gr[doinfofile]=(int)$gr[doinfofile];
  129. $gr[doingroup]=(int)$gr[doingroup];
  130. $gr[domembergroup]=(int)$gr[domembergroup];
  131. $gr[doviewgroup]=(int)$gr[doviewgroup];
  132. $gr[domadmingroup]=(int)$gr[domadmingroup];
  133. $gr[dochmoreport]=(int)$gr[dochmoreport];
  134. $gr[doisqf]=(int)$gr[doisqf];
  135. $groupname=hRepPostStr($groupname,1);
  136. $sql=$empire->query("insert into {$dbtbpre}enewsgroup(groupname,doall,dopublic,doclass,dotemplate,dopicnews,dofile,douser,dolog,domember,dobefrom,doword,dokey,doad,dovote,dogroup,docj,dobq,domovenews,dopostdata,dochangedata,dopl,dof,dom,dodo,dodbdata,dorepnewstext,dotempvar,dostats,dowriter,dototaldata,dosearchkey,dozt,docard,dolink,doselfinfo,dotable,doexecsql,dodownurl,dodeldownrecord,doshoppayfs,doshopps,doshopdd,dogbook,dofeedback,donotcj,dodownerror,douserpage,dodelinfodata,doaddinfo,doeditinfo,dodelinfo,doadminstyle,dorepdownpath,douserjs,douserlist,domsg,dosendemail,dosetmclass,doinfodoc,dotempgroup,dofeedbackf,dotask,domemberf,dospacestyle,dospacedata,dovotemod,doplayer,dowap,dopay,dobuygroup,dosearchall,doinfotype,doplf,dopltable,dochadminstyle,dotags,dosp,doyh,dofirewall,dosetsafe,douserclass,doworkflow,domenu,dopubvar,doclassf,doztf,dofiletable,docheckinfo,dogoodinfo,dodocinfo,domoveinfo,dodttemp,doloadcj,domustcheck,docheckedit,domemberconnect,doprecode,domoreport,docanhtml,dodelclass,doinfofile,doingroup,domembergroup,doviewgroup,domadmingroup,dochmoreport,doisqf) values('$groupname',$gr[doall],$gr[dopublic],$gr[doclass],$gr[dotemplate],$gr[dopicnews],$gr[dofile],$gr[douser],$gr[dolog],$gr[domember],$gr[dobefrom],$gr[doword],$gr[dokey],$gr[doad],$gr[dovote],$gr[dogroup],$gr[docj],$gr[dobq],$gr[domovenews],$gr[dopostdata],$gr[dochangedata],$gr[dopl],$gr[dof],$gr[dom],$gr[dodo],$gr[dodbdata],$gr[dorepnewstext],$gr[dotempvar],$gr[dostats],$gr[dowriter],$gr[dototaldata],$gr[dosearchkey],$gr[dozt],$gr[docard],$gr[dolink],$gr[doselfinfo],$gr[dotable],$gr[doexecsql],$gr[dodownurl],$gr[dodeldownrecord],$gr[doshoppayfs],$gr[doshopps],$gr[doshopdd],$gr[dogbook],$gr[dofeedback],$gr[donotcj],$gr[dodownerror],$gr[douserpage],$gr[dodelinfodata],$gr[doaddinfo],$gr[doeditinfo],$gr[dodelinfo],$gr[doadminstyle],$gr[dorepdownpath],$gr[douserjs],$gr[douserlist],$gr[domsg],$gr[dosendemail],$gr[dosetmclass],$gr[doinfodoc],$gr[dotempgroup],$gr[dofeedbackf],$gr[dotask],$gr[domemberf],$gr[dospacestyle],$gr[dospacedata],$gr[dovotemod],$gr[doplayer],$gr[dowap],$gr[dopay],$gr[dobuygroup],$gr[dosearchall],$gr[doinfotype],$gr[doplf],$gr[dopltable],$gr[dochadminstyle],$gr[dotags],$gr[dosp],$gr[doyh],$gr[dofirewall],$gr[dosetsafe],$gr[douserclass],$gr[doworkflow],$gr[domenu],$gr[dopubvar],$gr[doclassf],$gr[doztf],$gr[dofiletable],'$gr[docheckinfo]','$gr[dogoodinfo]','$gr[dodocinfo]','$gr[domoveinfo]','$gr[dodttemp]','$gr[doloadcj]','$gr[domustcheck]','$gr[docheckedit]','$gr[domemberconnect]','$gr[doprecode]','$gr[domoreport]','$gr[docanhtml]','$gr[dodelclass]','$gr[doinfofile]','$gr[doingroup]','$gr[domembergroup]','$gr[doviewgroup]','$gr[domadmingroup]','$gr[dochmoreport]','$gr[doisqf]');");
  137. $groupid=$empire->lastid();
  138. if($sql)
  139. {
  140. //操作日志
  141. insert_dolog("groupid=".$groupid."<br>groupname=".$groupname);
  142. printerror("AddGroupSuccess","AddGroup.php?enews=AddGroup".hReturnEcmsHashStrHref2(0));
  143. }
  144. else
  145. {printerror("DbError","history.go(-1)");}
  146. }
  147. //修改用户组
  148. function EditGroup($groupid,$groupname,$gr,$userid,$username){
  149. global $empire,$dbtbpre;
  150. $groupid=(int)$groupid;
  151. if(empty($groupname)||empty($groupid))
  152. {printerror("EmptyGroupname","history.go(-1)");}
  153. //验证权限
  154. CheckLevel($userid,$username,$classid,"group");
  155. //处理变量
  156. $gr[doall]=(int)$gr[doall];
  157. $gr[dopublic]=(int)$gr[dopublic];
  158. $gr[doclass]=(int)$gr[doclass];
  159. $gr[dotemplate]=(int)$gr[dotemplate];
  160. $gr[dopicnews]=(int)$gr[dopicnews];
  161. $gr[dofile]=(int)$gr[dofile];
  162. $gr[douser]=(int)$gr[douser];
  163. $gr[dolog]=(int)$gr[dolog];
  164. $gr[domember]=(int)$gr[domember];
  165. $gr[dobefrom]=(int)$gr[dobefrom];
  166. $gr[doword]=(int)$gr[doword];
  167. $gr[dokey]=(int)$gr[dokey];
  168. $gr[doad]=(int)$gr[doad];
  169. $gr[dovote]=(int)$gr[dovote];
  170. $gr[dogroup]=(int)$gr[dogroup];
  171. $gr[docj]=(int)$gr[docj];
  172. $gr[dobq]=(int)$gr[dobq];
  173. $gr[domovenews]=(int)$gr[domovenews];
  174. $gr[dopostdata]=(int)$gr[dopostdata];
  175. $gr[dochangedata]=(int)$gr[dochangedata];
  176. $gr[dopl]=(int)$gr[dopl];
  177. $gr[dof]=(int)$gr[dof];
  178. $gr[dom]=(int)$gr[dom];
  179. $gr[dodo]=(int)$gr[dodo];
  180. $gr[dodbdata]=(int)$gr[dodbdata];
  181. $gr[dorepnewstext]=(int)$gr[dorepnewstext];
  182. $gr[dotempvar]=(int)$gr[dotempvar];
  183. $gr[dostats]=(int)$gr[dostats];
  184. $gr[dowriter]=(int)$gr[dowriter];
  185. $gr[dototaldata]=(int)$gr[dototaldata];
  186. $gr[dosearchkey]=(int)$gr[dosearchkey];
  187. $gr[dozt]=(int)$gr[dozt];
  188. $gr[docard]=(int)$gr[docard];
  189. $gr[dolink]=(int)$gr[dolink];
  190. $gr[doselfinfo]=(int)$gr[doselfinfo];
  191. $gr[dotable]=(int)$gr[dotable];
  192. $gr[doexecsql]=(int)$gr[doexecsql];
  193. $gr[dodownurl]=(int)$gr[dodownurl];
  194. $gr[dodeldownrecord]=(int)$gr[dodeldownrecord];
  195. $gr[doshoppayfs]=(int)$gr[doshoppayfs];
  196. $gr[doshopps]=(int)$gr[doshopps];
  197. $gr[doshopdd]=(int)$gr[doshopdd];
  198. $gr[dogbook]=(int)$gr[dogbook];
  199. $gr[dofeedback]=(int)$gr[dofeedback];
  200. $gr[donotcj]=(int)$gr[donotcj];
  201. $gr[dodownerror]=(int)$gr[dodownerror];
  202. $gr[douserpage]=(int)$gr[douserpage];
  203. $gr[dodelinfodata]=(int)$gr[dodelinfodata];
  204. $gr[doaddinfo]=(int)$gr[doaddinfo];
  205. $gr[doeditinfo]=(int)$gr[doeditinfo];
  206. $gr[dodelinfo]=(int)$gr[dodelinfo];
  207. $gr[doadminstyle]=(int)$gr[doadminstyle];
  208. $gr[dorepdownpath]=(int)$gr[dorepdownpath];
  209. $gr[douserjs]=(int)$gr[douserjs];
  210. $gr[douserlist]=(int)$gr[douserlist];
  211. $gr[domsg]=(int)$gr[domsg];
  212. $gr[dosendemail]=(int)$gr[dosendemail];
  213. $gr[dosetmclass]=(int)$gr[dosetmclass];
  214. $gr[doinfodoc]=(int)$gr[doinfodoc];
  215. $gr[dotempgroup]=(int)$gr[dotempgroup];
  216. $gr[dofeedbackf]=(int)$gr[dofeedbackf];
  217. $gr[dotask]=(int)$gr[dotask];
  218. $gr[domemberf]=(int)$gr[domemberf];
  219. $gr[dospacestyle]=(int)$gr[dospacestyle];
  220. $gr[dospacedata]=(int)$gr[dospacedata];
  221. $gr[dovotemod]=(int)$gr[dovotemod];
  222. $gr[doplayer]=(int)$gr[doplayer];
  223. $gr[dowap]=(int)$gr[dowap];
  224. $gr[dopay]=(int)$gr[dopay];
  225. $gr[dobuygroup]=(int)$gr[dobuygroup];
  226. $gr[dosearchall]=(int)$gr[dosearchall];
  227. $gr[doinfotype]=(int)$gr[doinfotype];
  228. $gr[doplf]=(int)$gr[doplf];
  229. $gr[dopltable]=(int)$gr[dopltable];
  230. $gr[dochadminstyle]=(int)$gr[dochadminstyle];
  231. $gr[dotags]=(int)$gr[dotags];
  232. $gr[dosp]=(int)$gr[dosp];
  233. $gr[doyh]=(int)$gr[doyh];
  234. $gr[dofirewall]=(int)$gr[dofirewall];
  235. $gr[dosetsafe]=(int)$gr[dosetsafe];
  236. $gr[douserclass]=(int)$gr[douserclass];
  237. $gr[doworkflow]=(int)$gr[doworkflow];
  238. $gr[domenu]=(int)$gr[domenu];
  239. $gr[dopubvar]=(int)$gr[dopubvar];
  240. $gr[doclassf]=(int)$gr[doclassf];
  241. $gr[doztf]=(int)$gr[doztf];
  242. $gr[dofiletable]=(int)$gr[dofiletable];
  243. $gr[docheckinfo]=(int)$gr[docheckinfo];
  244. $gr[dogoodinfo]=(int)$gr[dogoodinfo];
  245. $gr[dodocinfo]=(int)$gr[dodocinfo];
  246. $gr[domoveinfo]=(int)$gr[domoveinfo];
  247. $gr[dodttemp]=(int)$gr[dodttemp];
  248. $gr[doloadcj]=(int)$gr[doloadcj];
  249. $gr[domustcheck]=(int)$gr[domustcheck];
  250. $gr[docheckedit]=(int)$gr[docheckedit];
  251. $gr[domemberconnect]=(int)$gr[domemberconnect];
  252. $gr[doprecode]=(int)$gr[doprecode];
  253. $gr[domoreport]=(int)$gr[domoreport];
  254. $gr[docanhtml]=(int)$gr[docanhtml];
  255. $gr[dodelclass]=(int)$gr[dodelclass];
  256. $gr[doinfofile]=(int)$gr[doinfofile];
  257. $gr[doingroup]=(int)$gr[doingroup];
  258. $gr[domembergroup]=(int)$gr[domembergroup];
  259. $gr[doviewgroup]=(int)$gr[doviewgroup];
  260. $gr[domadmingroup]=(int)$gr[domadmingroup];
  261. $gr[dochmoreport]=(int)$gr[dochmoreport];
  262. $gr[doisqf]=(int)$gr[doisqf];
  263. $groupname=hRepPostStr($groupname,1);
  264. $sql=$empire->query("update {$dbtbpre}enewsgroup set groupname='$groupname',doall=$gr[doall],dopublic=$gr[dopublic],doclass=$gr[doclass],dotemplate=$gr[dotemplate],dopicnews=$gr[dopicnews],dofile=$gr[dofile],douser=$gr[douser],dolog=$gr[dolog],domember=$gr[domember],dobefrom=$gr[dobefrom],doword=$gr[doword],dokey=$gr[dokey],doad=$gr[doad],dovote=$gr[dovote],dogroup=$gr[dogroup],docj=$gr[docj],dobq=$gr[dobq],domovenews=$gr[domovenews],dopostdata=$gr[dopostdata],dochangedata=$gr[dochangedata],dopl=$gr[dopl],dof=$gr[dof],dom=$gr[dom],dodo=$gr[dodo],dodbdata=$gr[dodbdata],dorepnewstext=$gr[dorepnewstext],dotempvar=$gr[dotempvar],dostats=$gr[dostats],dowriter=$gr[dowriter],dototaldata=$gr[dototaldata],dosearchkey=$gr[dosearchkey],dozt=$gr[dozt],docard=$gr[docard],dolink=$gr[dolink],doselfinfo=$gr[doselfinfo],dotable=$gr[dotable],doexecsql=$gr[doexecsql],dodownurl=$gr[dodownurl],dodeldownrecord=$gr[dodeldownrecord],doshoppayfs=$gr[doshoppayfs],doshopps=$gr[doshopps],doshopdd=$gr[doshopdd],dogbook=$gr[dogbook],dofeedback=$gr[dofeedback],donotcj=$gr[donotcj],dodownerror=$gr[dodownerror],douserpage=$gr[douserpage],dodelinfodata=$gr[dodelinfodata],doaddinfo=$gr[doaddinfo],doeditinfo=$gr[doeditinfo],dodelinfo=$gr[dodelinfo],doadminstyle=$gr[doadminstyle],dorepdownpath=$gr[dorepdownpath],douserjs=$gr[douserjs],douserlist=$gr[douserlist],domsg=$gr[domsg],dosendemail=$gr[dosendemail],dosetmclass=$gr[dosetmclass],doinfodoc=$gr[doinfodoc],dotempgroup=$gr[dotempgroup],dofeedbackf=$gr[dofeedbackf],dotask=$gr[dotask],domemberf=$gr[domemberf],dospacestyle=$gr[dospacestyle],dospacedata=$gr[dospacedata],dovotemod=$gr[dovotemod],doplayer=$gr[doplayer],dowap=$gr[dowap],dopay=$gr[dopay],dobuygroup=$gr[dobuygroup],dosearchall=$gr[dosearchall],doinfotype='$gr[doinfotype]',doplf='$gr[doplf]',dopltable='$gr[dopltable]',dochadminstyle='$gr[dochadminstyle]',dotags='$gr[dotags]',dosp='$gr[dosp]',doyh='$gr[doyh]',dofirewall='$gr[dofirewall]',dosetsafe='$gr[dosetsafe]',douserclass='$gr[douserclass]',doworkflow='$gr[doworkflow]',domenu='$gr[domenu]',dopubvar='$gr[dopubvar]',doclassf='$gr[doclassf]',doztf='$gr[doztf]',dofiletable='$gr[dofiletable]',docheckinfo='$gr[docheckinfo]',dogoodinfo='$gr[dogoodinfo]',dodocinfo='$gr[dodocinfo]',domoveinfo='$gr[domoveinfo]',dodttemp='$gr[dodttemp]',doloadcj='$gr[doloadcj]',domustcheck='$gr[domustcheck]',docheckedit='$gr[docheckedit]',domemberconnect='$gr[domemberconnect]',doprecode='$gr[doprecode]',domoreport='$gr[domoreport]',docanhtml='$gr[docanhtml]',dodelclass='$gr[dodelclass]',doinfofile='$gr[doinfofile]',doingroup='$gr[doingroup]',domembergroup='$gr[domembergroup]',doviewgroup='$gr[doviewgroup]',domadmingroup='$gr[domadmingroup]',dochmoreport='$gr[dochmoreport]',doisqf='$gr[doisqf]' where groupid='$groupid'");
  265. if($sql)
  266. {
  267. //操作日志
  268. insert_dolog("groupid=".$groupid."<br>groupname=".$groupname);
  269. printerror("EditGroupSuccess","ListGroup.php".hReturnEcmsHashStrHref2(1));
  270. }
  271. else
  272. {printerror("DbError","history.go(-1)");}
  273. }
  274. //删除用户组
  275. function DelGroup($groupid,$userid,$username){
  276. global $empire,$dbtbpre;
  277. $groupid=(int)$groupid;
  278. if(empty($groupid))
  279. {printerror("NotDelGroupid","history.go(-1)");}
  280. //验证权限
  281. CheckLevel($userid,$username,$classid,"group");
  282. $r=$empire->fetch1("select groupname from {$dbtbpre}enewsgroup where groupid='$groupid'");
  283. $sql=$empire->query("delete from {$dbtbpre}enewsgroup where groupid='$groupid'");
  284. if($sql)
  285. {
  286. //操作日志
  287. insert_dolog("groupid=".$groupid."<br>groupname=".$r[groupname]);
  288. printerror("DelGroupSuccess","ListGroup.php".hReturnEcmsHashStrHref2(1));
  289. }
  290. else
  291. {printerror("DbError","history.go(-1)");}
  292. }
  293. $enews=$_POST['enews'];
  294. if(empty($enews))
  295. {$enews=$_GET['enews'];}
  296. if($enews)
  297. {
  298. hCheckEcmsRHash();
  299. }
  300. //增加用户组
  301. if($enews=="AddGroup")
  302. {
  303. $groupname=$_POST['groupname'];
  304. $gr=$_POST['gr'];
  305. AddGroup($groupname,$gr,$logininid,$loginin);
  306. }
  307. //修改用户组
  308. elseif($enews=="EditGroup")
  309. {
  310. $groupid=$_POST['groupid'];
  311. $groupname=$_POST['groupname'];
  312. $gr=$_POST['gr'];
  313. EditGroup($groupid,$groupname,$gr,$logininid,$loginin);
  314. }
  315. //删除用户组
  316. elseif($enews=="DelGroup")
  317. {
  318. $groupid=$_GET['groupid'];
  319. DelGroup($groupid,$logininid,$loginin);
  320. }
  321. $sql=$empire->query("select groupid,groupname from {$dbtbpre}enewsgroup order by groupid desc");
  322. $url="位置:<a href=ListGroup.php".$ecms_hashur['whehref'].">管理用户组</a>";
  323. ?>
  324. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  325. <html>
  326. <head>
  327. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  328. <title>用户组</title>
  329. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  330. </head>
  331. <body>
  332. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  333. <tr>
  334. <td width="50%">
  335. <?=$url?>
  336. </td>
  337. <td><div align="right" class="emenubutton">
  338. <input type="button" name="Submit5" value="增加用户组" onclick="self.location.href='AddGroup.php?enews=AddGroup<?=$ecms_hashur['ehref']?>';">
  339. </div></td>
  340. </tr>
  341. </table>
  342. <br>
  343. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  344. <tr class="header">
  345. <td width="13%"><div align="center">ID</div></td>
  346. <td width="63%" height="25"><div align="center">用户组名称</div></td>
  347. <td width="24%" height="25"><div align="center">操作</div></td>
  348. </tr>
  349. <?
  350. while($r=$empire->fetch($sql))
  351. {
  352. ?>
  353. <tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#C3EFFF'">
  354. <td><div align="center"><?=$r[groupid]?></div></td>
  355. <td height="25"><div align="center"><?=$r[groupname]?></div></td>
  356. <td height="25"><div align="center"> [<a href="AddGroup.php?enews=EditGroup&groupid=<?=$r[groupid]?><?=$ecms_hashur['ehref']?>">修改</a>]
  357. [<a href="ListGroup.php?enews=DelGroup&groupid=<?=$r[groupid]?><?=$ecms_hashur['href']?>" onclick="return confirm('确认要删除此用户组?');">删除</a>]</div></td>
  358. </tr>
  359. <?
  360. }
  361. db_close();
  362. $empire=null;
  363. ?>
  364. </table>
  365. </body>
  366. </html>