国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

225 lines
8.0KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  5. <title>系统配置参数</title>
  6. <script language="javascript" src="../static/js/dedeajax2.js"></script>
  7. <script language="javascript" src="../static/js/jquery/jquery.js"></script>
  8. <script language="javascript">
  9. var searchconfig = false;
  10. function Nav()
  11. {
  12. if(window.navigator.userAgent.indexOf("MSIE")>=1) return 'IE';
  13. else if(window.navigator.userAgent.indexOf("Firefox")>=1) return 'FF';
  14. else return "OT";
  15. }
  16. function $Obj(objname)
  17. {
  18. return document.getElementById(objname);
  19. }
  20. function ShowConfig(em,allgr)
  21. {
  22. if(searchconfig) location.reload();
  23. for(var i=1;i<=allgr;i++)
  24. {
  25. if(i==em) $Obj('td'+i).style.display = (Nav()=='IE' ? 'block' : 'table');
  26. else $Obj('td'+i).style.display = 'none';
  27. }
  28. $Obj('addvar').style.display = 'none';
  29. }
  30. function ShowHide(objname)
  31. {
  32. var obj = $Obj(objname);
  33. if(obj.style.display != "none") obj.style.display = "none";
  34. else obj.style.display = (Nav()=='IE' ? 'block' : 'table-row');
  35. }
  36. function backSearch()
  37. {
  38. location.reload();
  39. }
  40. function getSearch()
  41. {
  42. var searchKeywords = $Obj('keywds').value;
  43. var myajax = new DedeAjax($Obj('_search'));
  44. myajax.SendGet('sys_info.php?dopost=search&keywords='+searchKeywords)
  45. $Obj('_searchback').innerHTML = '<input name="searchbackBtn" type="button" value="返回" id="searchbackBtn" onclick="backSearch()"/>'
  46. $Obj('_mainsearch').innerHTML = '';
  47. searchconfig = true;
  48. }
  49. function resetCookieEncode()
  50. {
  51. jQuery.get("sys_info.php?dopost=make_encode", function(data){
  52. jQuery("#edit___cfg_cookie_encode").val(data);
  53. });
  54. }
  55. </script>
  56. <link href="css/base.css" rel="stylesheet" type="text/css">
  57. </head>
  58. <body background='images/allbg.gif' leftmargin='8' topmargin='8'>
  59. <div style="min-width:780px">
  60. <table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D6D6D6" align="center">
  61. <tr>
  62. <td height="28" background="images/tbg.gif" style="padding-left:10px;"><b>DedeCMS系统配置参数:</b></td>
  63. </tr>
  64. <tr>
  65. <td height="24" bgcolor="#ffffff" align="center"><?php
  66. $ds = file(DEDEADMIN.'/inc/configgroup.txt');
  67. $totalGroup = count($ds);
  68. $i = 0;
  69. foreach($ds as $dl)
  70. {
  71. $dl = trim($dl);
  72. if(empty($dl)) continue;
  73. $dls = explode(',',$dl);
  74. $i++;
  75. if($i>1) echo " | <a href='javascript:ShowConfig($i,$totalGroup)'>{$dls[1]}</a> ";
  76. else{
  77. echo " <a href='javascript:ShowConfig($i,$totalGroup)'>{$dls[1]}</a> ";
  78. }
  79. }
  80. ?>
  81. | <a href="#" onClick="ShowHide('addvar')">添加新变量</a></td>
  82. </tr>
  83. <tr id="addvar" style="display:none">
  84. <td height="24" bgcolor="#ffffff" align="center"><form name="fadd" action="sys_info.php" method="post">
  85. <input type='hidden' name='dopost' value='add'>
  86. <input type="hidden" name="token" value="<?php echo $_SESSION['token']; ?>">
  87. <table width="98%" border="0" cellspacing="0" cellpadding="0">
  88. <tr>
  89. <td width="12%" height="26">变量名称:</td>
  90. <td width="38%" align="left"><input name="nvarname" type="text" id="nvarname" class="npvar" style="width:80%" /></td>
  91. <td width="12%" align="center">变量值:</td>
  92. <td width="38%" align="left"><input name="nvarvalue" type="text" id="nvarvalue" class="npvar" style="width:80%" /></td>
  93. </tr>
  94. <tr>
  95. <td width="10%" height="26">变量类型:</td>
  96. <td colspan='3' align="left"><input name="vartype" type="radio" value="string" class='np' checked='checked' />
  97. 文本
  98. <input name="vartype" type="radio" value="number" class='np' />
  99. 数字
  100. <input type="radio" name="vartype" value="bool" class='np' />
  101. 布尔(Y/N)
  102. <input type="radio" name="vartype" value="bstring" class='np' />
  103. 多行文本 </td>
  104. </tr>
  105. <tr>
  106. <td height="26">参数说明:</td>
  107. <td align="left"><input type="text" name="varmsg" id="varmsg" class="npvar" style="width:80%" /></td>
  108. <td align="center">所属组:</td>
  109. <td align="left"><?php
  110. echo "<select name='vargroup' class='npvar'>\r\n";
  111. foreach($ds as $dl){
  112. $dl = trim($dl);
  113. if(empty($dl)) continue;
  114. $dls = explode(',',$dl);
  115. echo "<option value='{$dls[0]}'>{$dls[1]}</option>\r\n";
  116. }
  117. echo "</select>\r\n";
  118. ?>
  119. <input type="submit" name="Submit" value="保存变量" class="np coolbg" /></td>
  120. </tr>
  121. </table>
  122. </form></td>
  123. </tr>
  124. </table>
  125. <table width="98%" border="0" cellpadding="0" cellspacing="0" style="margin-top:10px" bgcolor="#D6D6D6" align="center">
  126. <tr>
  127. <td height="28" align="right" background="images/tbg.gif" style="border:1px solid #cfcfcf;border-bottom:none;">&nbsp;&nbsp;&nbsp;配置搜索:
  128. <input type="text" name="keywds" id="keywds" />
  129. <input name="searchBtn" type="button" value="搜索" id="searchBtn" onclick="getSearch()"/>
  130. &nbsp;<span id="_searchback"></span></td>
  131. </tr>
  132. <tr>
  133. <td bgcolor="#FFFFFF" width="100%">
  134. <form action="sys_info.php" method="post" name="form1">
  135. <input type="hidden" name="token" value="<?php echo $_SESSION['token']; ?>">
  136. <input type="hidden" name="dopost" value="save">
  137. <div id="_search"></div>
  138. <div id="_mainsearch">
  139. <?php
  140. $n = 0;
  141. if(!isset($gp)) $gp = 1;
  142. foreach($ds as $dl)
  143. {
  144. $dl = trim($dl);
  145. if(empty($dl)) continue;
  146. $dls = explode(',',$dl);
  147. $n++;
  148. ?>
  149. <table width="100%" style='<?php if($n!=$gp) echo "display:none"; ?>' id="td<?php echo $n?>" border="0" cellspacing="1" cellpadding="1" bgcolor="#cfcfcf">
  150. <tr align="center" bgcolor="#FBFCE2" height="25">
  151. <td width="300">参数说明</td>
  152. <td>参数值</td>
  153. <td width="220">变量名</td>
  154. </tr>
  155. <?php
  156. $dsql->SetQuery("Select * From `#@__sysconfig` where groupid='{$dls[0]}' order by aid asc");
  157. $dsql->Execute();
  158. $i = 1;
  159. while($row = $dsql->GetArray())
  160. {
  161. if($i%2==0)
  162. {
  163. $bgcolor = "#F9FCEF";
  164. }
  165. else
  166. {
  167. $bgcolor = "#ffffff";
  168. }
  169. $i++;
  170. ?>
  171. <tr align="center" height="25" bgcolor="<?php echo $bgcolor?>">
  172. <td width="300"><?php echo $row['info']; ?>: </td>
  173. <td align="left" style="padding:3px;"><?php
  174. if($row['type']=='bool')
  175. {
  176. $c1='';
  177. $c2 = '';
  178. $row['value']=='Y' ? $c1=" checked" : $c2=" checked";
  179. echo "<input type='radio' class='np' name='edit___{$row['varname']}' value='Y'$c1>是 ";
  180. echo "<input type='radio' class='np' name='edit___{$row['varname']}' value='N'$c2>否 ";
  181. }else if($row['type']=='bstring')
  182. {
  183. echo "<textarea name='edit___{$row['varname']}' row='4' id='edit___{$row['varname']}' class='textarea_info' style='width:98%;height:50px'>".dede_htmlspecialchars($row['value'])."</textarea>";
  184. }else if($row['type']=='number')
  185. {
  186. echo "<input type='text' name='edit___{$row['varname']}' id='edit___{$row['varname']}' value='{$row['value']}' style='width:30%'>";
  187. }else
  188. {
  189. $addstr='';
  190. if ($row['varname']=='cfg_cookie_encode') {
  191. $addstr=' <a href="javascript:resetCookieEncode();" style="color:blue">[重新生成]</a>';
  192. }
  193. echo "<input type='text' name='edit___{$row['varname']}' id='edit___{$row['varname']}' value=\"".dede_htmlspecialchars($row['value'])."\" style='width:80%'>{$addstr}";
  194. }
  195. ?></td>
  196. <td><?php echo $row['varname']?></td>
  197. </tr>
  198. <?php
  199. }
  200. ?>
  201. </table>
  202. <?php
  203. }
  204. ?>
  205. </div>
  206. <table width="100%" border="0" cellspacing="1" cellpadding="1" style="border:1px solid #cfcfcf;border-top:none;">
  207. <tr bgcolor="#F9FCEF">
  208. <td height="50" colspan="3"><table width="98%" border="0" cellspacing="1" cellpadding="1">
  209. <tr>
  210. <td width="11%">&nbsp;</td>
  211. <td width="11%"><input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" border="0" class="np"></td>
  212. <td width="78%"><img src="images/button_reset.gif" width="60" height="22" style="cursor:pointer" onClick="document.form1.reset()"></td>
  213. </tr>
  214. </table></td>
  215. </tr>
  216. </table>
  217. </form></td>
  218. </tr>
  219. </table>
  220. </div>
  221. </body>
  222. </html>