AddMoreport.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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,"moreport");
  20. //是否主端
  21. if($ecms_config['sets']['selfmoreportid']>1)
  22. {
  23. printerror2('请在主端下使用本操作','history.go(-1)',9);
  24. }
  25. $enews=ehtmlspecialchars($_GET['enews']);
  26. $r['ppath']=ReturnAbsEcmsPath();
  27. $url="<a href=ListMoreport.php".$ecms_hashur['whehref'].">管理网站访问端</a> &gt; 增加网站访问端";
  28. $postword='增加网站访问端';
  29. if($enews=="EditMoreport")
  30. {
  31. $pid=(int)$_GET['pid'];
  32. if($pid==1)
  33. {
  34. printerror("ErrorUrl","history.go(-1)");
  35. }
  36. $r=$empire->fetch1("select * from {$dbtbpre}enewsmoreport where pid='$pid' limit 1");
  37. $url="<a href=ListMoreport.php".$ecms_hashur['whehref'].">管理网站访问端</a> &gt; 修改网站访问端:<b>".$r[pname]."</b>";
  38. $postword='修改网站访问端';
  39. }
  40. $tgtemps='';
  41. $tgsql=$empire->query("select gid,gname,isdefault from {$dbtbpre}enewstempgroup order by gid");
  42. while($tgr=$empire->fetch($tgsql))
  43. {
  44. $selected='';
  45. if($tgr['gid']==$r['tempgid'])
  46. {
  47. $selected=' selected';
  48. }
  49. $tgtemps.="<option value='".$tgr['gid']."'".$selected.">".$tgr['gname']."</option>";
  50. }
  51. ?>
  52. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  53. <html>
  54. <head>
  55. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  56. <title>网站访问端</title>
  57. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  58. <script>
  59. function eshowesay(ss)
  60. {
  61. if (ss.style.display=="")
  62. ss.style.display="none";
  63. else
  64. ss.style.display="";
  65. }
  66. </script>
  67. </head>
  68. <body>
  69. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  70. <tr>
  71. <td>位置:<?=$url?></td>
  72. </tr>
  73. </table>
  74. <form name="moreportform" method="post" action="ListMoreport.php" autocomplete="off">
  75. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  76. <?=$ecms_hashur['form']?>
  77. <tr class="header">
  78. <td height="25" colspan="2"><?=$postword?>
  79. <input name="enews" type="hidden" id="enews" value="<?=$enews?>">
  80. <input name="pid" type="hidden" id="pid" value="<?=$pid?>"></td>
  81. </tr>
  82. <tr bgcolor="#FFFFFF">
  83. <td width="25%" height="25">访问端名称:</td>
  84. <td width="75%" height="25"><input name="pname" type="text" id="pname" value="<?=$r[pname]?>" size="50">
  85. *
  86. <font color="#666666">(比如:手机访问端)</font></td>
  87. </tr>
  88. <tr bgcolor="#FFFFFF">
  89. <td height="25">访问端地址:</td>
  90. <td height="25"><input name="purl" type="text" id="purl" value="<?=$r[purl]?>" size="50">
  91. * <font color="#666666">(结尾需加“/”,比如:http://3g.phome.net/)</font></td>
  92. </tr>
  93. <tr bgcolor="#FFFFFF">
  94. <td height="25">访问端目录:</td>
  95. <td height="25"><input name="ppath" type="text" id="ppath" value="<?=$r[ppath]?>" size="50">
  96. *<font color="#666666">(需填绝对目录地址,结尾需加“/”,比如:d:/abc/3g/)</font></td>
  97. </tr>
  98. <tr bgcolor="#FFFFFF">
  99. <td height="25">通讯密钥:</td>
  100. <td height="25"><input name="postpass" type="text" id="postpass" value="<?=$r[postpass]?>" size="50">
  101. *
  102. <input type="button" name="Submit32" value="随机" onclick="document.moreportform.postpass.value='<?=make_password(60)?>';">
  103. <font color="#666666">(填写10~100个任意字符,最好多种字符组合)</font></td>
  104. </tr>
  105. <tr bgcolor="#FFFFFF">
  106. <td height="25">使用模板组:</td>
  107. <td height="25"><select name="tempgid" id="tempgid">
  108. <?=$tgtemps?>
  109. </select>
  110. * <font color="#666666">(选择本访问端使用的模板组)</font></td>
  111. </tr>
  112. <tr bgcolor="#FFFFFF">
  113. <td height="25">页面模式:</td>
  114. <td height="25"><input type="radio" name="mustdt" value="1"<?=$r[mustdt]==1?' checked':''?>>
  115. <a href="#empirecms" title="强制动态页面模式时,访问端首页、栏目、内容页等均采用动态页面方式显示,好处是:不用再生成静态页面">强制动态页面模式</a>
  116. <input type="radio" name="mustdt" value="0"<?=$r[mustdt]==0?' checked':''?>>
  117. <a href="#empirecms" title="与主端相同:如果主端是采用静态页面模式,需要在本访问端后台生成页面,才会同步显示。">与主端相同</a></td>
  118. </tr>
  119. <tr bgcolor="#FFFFFF">
  120. <td height="25">同步静态页面:</td>
  121. <td height="25"><select name="rehtml" id="rehtml" disabled="disabled">
  122. <option value="0"<?=$r['rehtml']==0?' selected':''?>>不同步</option>
  123. </select>
  124. (此设置商业版才有效)</td>
  125. </tr>
  126. <tr bgcolor="#FFFFFF" id="rehtmlesay" style="display:none">
  127. <td height="25">&nbsp;</td>
  128. <td height="25">基本页含:<font color="#666666">(首页、栏目页、信息内容页、碎片文件、自定义页面)</font><br>
  129. 标准页含:基本页+<font color="#666666">(专题页、标题分类页)</font><br>
  130. 所有页含:标准页+<font color="#666666">(自定义列表、自定义JS)</font></td>
  131. </tr>
  132. <tr bgcolor="#FFFFFF">
  133. <td height="25">关闭访问端:</td>
  134. <td height="25"><input name="isclose" type="checkbox" id="isclose" value="1"<?=$r[isclose]==1?' checked':''?>>
  135. 关闭</td>
  136. </tr>
  137. <tr bgcolor="#FFFFFF">
  138. <td height="25">关闭投稿:</td>
  139. <td height="25"><input name="closeadd" type="checkbox" id="closeadd" value="1"<?=$r[closeadd]==1?' checked':''?>>
  140. 关闭</td>
  141. </tr>
  142. <tr bgcolor="#FFFFFF">
  143. <td height="25">后台管理:</td>
  144. <td height="25"><select name="openadmin" id="openadmin">
  145. <option value="0"<?=$r['openadmin']==0?' selected':''?>>开启</option>
  146. <option value="1"<?=$r['openadmin']==1?' selected':''?>>关闭登录</option>
  147. <option value="2"<?=$r['openadmin']==2?' selected':''?>>关闭登录和后台管理</option>
  148. </select> </td>
  149. </tr>
  150. <tr bgcolor="#FFFFFF">
  151. <td height="25">&nbsp;</td>
  152. <td height="25"><input type="submit" name="Submit" value="提交">&nbsp;<input type="reset" name="Submit2" value="重置"></td>
  153. </tr>
  154. </table>
  155. </form>
  156. </body>
  157. </html>
  158. <?
  159. db_close();
  160. $empire=null;
  161. ?>