ecmsmod.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../class/connect.php");
  4. require("../class/db_sql.php");
  5. require("../class/functions.php");
  6. require("../data/dbcache/class.php");
  7. require LoadLang("pub/fun.php");
  8. $link=db_connect();
  9. $empire=new mysqlquery();
  10. $enews=$_POST['enews'];
  11. if(empty($enews))
  12. {
  13. $enews=$_GET['enews'];
  14. }
  15. //验证用户
  16. $lur=is_login();
  17. $logininid=$lur['userid'];
  18. $loginin=$lur['username'];
  19. $loginrnd=$lur['rnd'];
  20. $loginlevel=$lur['groupid'];
  21. $loginadminstyleid=$lur['adminstyleid'];
  22. hCheckEcmsRHash();
  23. @set_time_limit(0);
  24. require("../class/moddofun.php");
  25. //设置访问端
  26. $moreportpid=0;
  27. if($enews=='ChangeAllModForm')
  28. {
  29. $moreportpid=Moreport_hDoSetSelfPath(0);
  30. }
  31. //增加字段
  32. if($enews=="AddF")
  33. {
  34. $add=$_POST;
  35. AddF($add,$logininid,$loginin);
  36. }
  37. //修改字段
  38. elseif($enews=="EditF")
  39. {
  40. $add=$_POST;
  41. EditF($add,$logininid,$loginin);
  42. }
  43. //修改系统字段
  44. elseif($enews=="EditSysF")
  45. {
  46. EditSysF($_POST,$logininid,$loginin);
  47. }
  48. //删除字段
  49. elseif($enews=="DelF")
  50. {
  51. $fid=$_GET['fid'];
  52. $tid=$_GET['tid'];
  53. $tbname=$_GET['tbname'];
  54. DelF($fid,$tid,$tbname,$logininid,$loginin);
  55. }
  56. //修改字段顺序
  57. elseif($enews=="EditFOrder")
  58. {
  59. $fid=$_POST['fid'];
  60. $tid=$_POST['tid'];
  61. $tbname=$_POST['tbname'];
  62. $myorder=$_POST['myorder'];
  63. EditFOrder($fid,$myorder,$tid,$tbname,$logininid,$loginin);
  64. }
  65. elseif($enews=='ChangeDataTableF')//转移字段
  66. {
  67. ChangeDataTableF($_GET,$logininid,$loginin);
  68. }
  69. elseif($enews=='ChangeDocDataTableF')//转移字段(归档)
  70. {
  71. ChangeDocDataTableF($_GET,$logininid,$loginin);
  72. }
  73. //增加模型
  74. elseif($enews=="AddM")
  75. {
  76. $add=$_POST['add'];
  77. $cname=$_POST['cname'];
  78. $cchange=$_POST['cchange'];
  79. $schange=$_POST['schange'];
  80. $center=$_POST['center'];
  81. $cqenter=$_POST['cqenter'];
  82. $menter=$_POST['menter'];
  83. AddM($add,$cname,$cchange,$schange,$center,$cqenter,$menter,$_POST['listand'],$_POST['ltempf'],$_POST['ptempf'],$_POST['canadd'],$_POST['canedit'],$_POST['listorder'],$logininid,$loginin);
  84. }
  85. //修改模型
  86. elseif($enews=="EditM")
  87. {
  88. $add=$_POST['add'];
  89. $cname=$_POST['cname'];
  90. $cchange=$_POST['cchange'];
  91. $schange=$_POST['schange'];
  92. $center=$_POST['center'];
  93. $cqenter=$_POST['cqenter'];
  94. $menter=$_POST['menter'];
  95. EditM($add,$cname,$cchange,$schange,$center,$cqenter,$menter,$_POST['listand'],$_POST['ltempf'],$_POST['ptempf'],$_POST['canadd'],$_POST['canedit'],$_POST['listorder'],$logininid,$loginin);
  96. }
  97. //删除模型
  98. elseif($enews=="DelM")
  99. {
  100. $mid=$_GET['mid'];
  101. $tid=$_GET['tid'];
  102. $tbname=$_GET['tbname'];
  103. DelM($mid,$tid,$tbname,$logininid,$loginin);
  104. }
  105. //默认模型
  106. elseif($enews=="DefM")
  107. {
  108. $mid=$_GET['mid'];
  109. $tid=$_GET['tid'];
  110. $tbname=$_GET['tbname'];
  111. DefM($mid,$tid,$tbname,$logininid,$loginin);
  112. }
  113. //新建数据表
  114. elseif($enews=="AddTable")
  115. {
  116. AddTable($_POST,$logininid,$loginin);
  117. }
  118. //复制数据表
  119. elseif($enews=="CopyNewTable")
  120. {
  121. CopyNewTable($_POST,$logininid,$loginin);
  122. }
  123. //修改数据表
  124. elseif($enews=="EditTable")
  125. {
  126. EditTable($_POST,$logininid,$loginin);
  127. }
  128. //删除数据表
  129. elseif($enews=="DelTable")
  130. {
  131. $tid=$_GET['tid'];
  132. DelTable($tid,$logininid,$loginin);
  133. }
  134. //默认数据表
  135. elseif($enews=="DefaultTable")
  136. {
  137. $tid=$_GET['tid'];
  138. DefaultTable($tid,$logininid,$loginin);
  139. }
  140. elseif($enews=="AddDataTable")//增加副表分表
  141. {
  142. AddDataTable($_POST,$logininid,$loginin);
  143. }
  144. elseif($enews=="DefDataTable")//默认副表分表
  145. {
  146. DefDataTable($_GET,$logininid,$loginin);
  147. }
  148. elseif($enews=="DelDataTable")//删除副表分表
  149. {
  150. DelDataTable($_GET,$logininid,$loginin);
  151. }
  152. //导入模型
  153. elseif($enews=="LoadInMod")
  154. {
  155. $file=$_FILES['file']['tmp_name'];
  156. $file_name=$_FILES['file']['name'];
  157. $file_type=$_FILES['file']['type'];
  158. $file_size=$_FILES['file']['size'];
  159. LoadInMod($_POST,$file,$file_name,$file_type,$file_size,$logininid,$loginin);
  160. }
  161. elseif($enews=='ChangeAllModForm')//批量更新模型表单
  162. {
  163. ChangeAllModForm($_GET,$logininid,$loginin);
  164. }
  165. else
  166. {printerror("ErrorUrl","history.go(-1)");}
  167. db_close();
  168. $empire=null;
  169. ?>