RepDownLevel.php 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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,"repdownpath");
  20. $url="<a href=RepDownLevel.php".$ecms_hashur['whehref'].">批量更改地址权限</a>";
  21. //栏目
  22. $fcfile="../../data/fc/ListEnews.php";
  23. $class="<script src=../../data/fc/cmsclass.js></script>";
  24. if(!file_exists($fcfile))
  25. {$class=ShowClass_AddClass("",0,0,"|-",0,0);}
  26. //数据表
  27. $tsql=$empire->query("select tid,tbname,tname from {$dbtbpre}enewstable order by tid");
  28. while($tr=$empire->fetch($tsql))
  29. {
  30. $table.="<option value='".$tr[tbname]."'>".$tr[tname]."</option>";
  31. }
  32. $table="<select name='tbname'><option value='0'>--- 选择数据表 ---</option>".$table."</select>";
  33. //访问组
  34. $ygroup='';
  35. $vgsql=$empire->query("select vgid,gname from {$dbtbpre}enewsvg order by vgid");
  36. while($vgr=$empire->fetch($vgsql))
  37. {
  38. $ygroup.="<option value=-".$vgr['vgid'].">".$vgr['gname']."</option>";
  39. }
  40. if($ygroup)
  41. {
  42. $ygroup="<option value=''>--- 访问组 ---</option>".$ygroup."<option value=''>--- 会员组 ---</option>";
  43. }
  44. //----------会员组
  45. $sql1=$empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
  46. while($l_r=$empire->fetch($sql1))
  47. {
  48. $ygroup.="<option value=".$l_r[groupid].">".$l_r[groupname]."</option>";
  49. }
  50. //----------地址前缀
  51. $qz="";
  52. $downsql=$empire->query("select urlname,urlid from {$dbtbpre}enewsdownurlqz order by urlid");
  53. while($downr=$empire->fetch($downsql))
  54. {
  55. $qz.="<option value='".$downr[urlid]."'>".$downr[urlname]."</option>";
  56. }
  57. db_close();
  58. $empire=null;
  59. ?>
  60. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  61. <html>
  62. <head>
  63. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  64. <title>批量更改地址权限</title>
  65. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  66. </head>
  67. <body>
  68. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  69. <tr>
  70. <td height="25">位置:<?=$url?></td>
  71. </tr>
  72. </table>
  73. <form name="form1" method="post" action="../ecmscom.php" target="_blank" onsubmit="return confirm('确认要操作?');">
  74. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  75. <?=$ecms_hashur['form']?>
  76. <tr class="header">
  77. <td height="25" colspan="2"> <div align="center">批量更改下载/在线地址权限
  78. <input name="enews" type="hidden" id="enews" value="RepDownLevel">
  79. </div></td>
  80. </tr>
  81. <tr bgcolor="#FFFFFF">
  82. <td width="21%" height="25">操作数据表(*):</td>
  83. <td width="79%" height="25">
  84. <?=$table?>
  85. </td>
  86. </tr>
  87. <tr bgcolor="#FFFFFF">
  88. <td height="25">操作栏目:</td>
  89. <td height="25"><select name="classid" id="classid">
  90. <option value=0>所有栏目</option>
  91. <?=$class?>
  92. </select>
  93. <font color="#666666"> (如选择大栏目,将应用于所有子栏目)</font></td>
  94. </tr>
  95. <tr bgcolor="#FFFFFF">
  96. <td height="25">操作字段(*):</td>
  97. <td height="25"><table width="100%" border="0" cellspacing="1" cellpadding="3">
  98. <tr>
  99. <td width="32%"><input name="downpath" type="checkbox" id="downpath" value="1">
  100. 下载地址(downpath)</td>
  101. <td width="68%"><input name="onlinepath" type="checkbox" id="onlinepath" value="1">
  102. 在线地址(onlinepath)</td>
  103. </tr>
  104. </table></td>
  105. </tr>
  106. <tr bgcolor="#FFFFFF">
  107. <td height="25">权限转换:
  108. <input name="dogroup" type="checkbox" id="dogroup" value="1"></td>
  109. <td height="25"><div align="left">
  110. <table width="70%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
  111. <tr>
  112. <td width="49%"><div align="center">原会员组</div></td>
  113. <td width="51%"><div align="center">新会员组</div></td>
  114. </tr>
  115. <tr bgcolor="#FFFFFF">
  116. <td><div align="center">
  117. <select name="oldgroupid" id="oldgroupid">
  118. <option value="no">不设置</option>
  119. <option value="0">游客</option>
  120. <?=$ygroup?>
  121. </select>
  122. </div></td>
  123. <td><div align="center">
  124. <select name="newgroupid" id="newgroupid">
  125. <option value="0">游客</option>
  126. <?=$ygroup?>
  127. </select>
  128. </div></td>
  129. </tr>
  130. </table>
  131. </div></td>
  132. </tr>
  133. <tr bgcolor="#FFFFFF">
  134. <td height="25">点数转换:
  135. <input name="dofen" type="checkbox" id="dofen" value="1"></td>
  136. <td height="25"><table width="70%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
  137. <tr>
  138. <td width="49%"><div align="center">原点数</div></td>
  139. <td width="51%"><div align="center">新点数</div></td>
  140. </tr>
  141. <tr bgcolor="#FFFFFF">
  142. <td><div align="center">
  143. <input name="oldfen" type="text" id="oldfen" value="no" size="6">
  144. </div></td>
  145. <td><div align="center">
  146. <input name="newfen" type="text" id="newfen" value="0" size="6">
  147. </div></td>
  148. </tr>
  149. </table></td>
  150. </tr>
  151. <tr bgcolor="#FFFFFF">
  152. <td height="25">前缀转换:
  153. <input name="doqz" type="checkbox" id="doqz" value="1"></td>
  154. <td height="25"><table width="70%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
  155. <tr>
  156. <td width="49%"><div align="center">原前缀</div></td>
  157. <td width="51%"><div align="center">新前缀</div></td>
  158. </tr>
  159. <tr bgcolor="#FFFFFF">
  160. <td><div align="center">
  161. <select name="oldqz" id="oldqz">
  162. <option value="no">不设置</option>
  163. <option value="0">空前缀</option>
  164. <?=$qz?>
  165. </select>
  166. </div></td>
  167. <td><div align="center">
  168. <select name="newqz">
  169. <option value="0">空前缀</option>
  170. <?=$qz?>
  171. </select>
  172. </div></td>
  173. </tr>
  174. </table></td>
  175. </tr>
  176. <tr bgcolor="#FFFFFF">
  177. <td height="25">地址替换:
  178. <input name="dopath" type="checkbox" id="dopath" value="1"></td>
  179. <td height="25"><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
  180. <tr>
  181. <td width="49%"><div align="center">原下载地址字符</div></td>
  182. <td width="51%"><div align="center">新下载地址字符</div></td>
  183. </tr>
  184. <tr bgcolor="#FFFFFF">
  185. <td><div align="center">
  186. <input name="oldpath" type="text" id="oldpath">
  187. </div></td>
  188. <td><div align="center">
  189. <input name="newpath" type="text" id="newpath">
  190. </div></td>
  191. </tr>
  192. </table></td>
  193. </tr>
  194. <tr bgcolor="#FFFFFF">
  195. <td height="25">名称替换:
  196. <input name="doname" type="checkbox" id="doname" value="1"></td>
  197. <td height="25"><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
  198. <tr>
  199. <td width="49%"><div align="center">原下载名称字符</div></td>
  200. <td width="51%"><div align="center">新下载名称字符</div></td>
  201. </tr>
  202. <tr bgcolor="#FFFFFF">
  203. <td><div align="center">
  204. <input name="oldname" type="text" id="oldname">
  205. </div></td>
  206. <td><div align="center">
  207. <input name="newname" type="text" id="newname">
  208. </div></td>
  209. </tr>
  210. </table></td>
  211. </tr>
  212. <tr bgcolor="#FFFFFF">
  213. <td height="25">附加SQL条件:</td>
  214. <td height="25"><input name="query" type="text" id="query" size="75"></td>
  215. </tr>
  216. <tr bgcolor="#FFFFFF">
  217. <td height="25">&nbsp;</td>
  218. <td height="25"><font color="#666666">如:title='标题' and writer='作者'</font></td>
  219. </tr>
  220. <tr bgcolor="#FFFFFF">
  221. <td height="25">&nbsp;</td>
  222. <td height="25"><input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"></td>
  223. </tr>
  224. <tr bgcolor="#FFFFFF">
  225. <td height="25">&nbsp;</td>
  226. <td height="25">说明:如原点数为no,则所有信息的点数都为新点数,如果选项为不设置,则所有信息都为新的值。<br>
  227. 注意:<font color="#FF0000">使用此功能,最好备份一下数据,以防万一</font></td>
  228. </tr>
  229. </table>
  230. </form>
  231. </body>
  232. </html>