国内流行的内容管理系统(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.

212 lines
8.4KB

  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  6. <title>修改自定义表单</title>
  7. <link href="css/base.css" rel="stylesheet" type="text/css" />
  8. <script language="javascript" src="../static/js/jquery.js"></script>
  9. <script language="javascript" src="js/main.js"></script>
  10. <script language="javascript" src="js/diy.js"></script>
  11. <script language="javascript">
  12. function checkSubmit() {
  13. if (document.form1.typename.value == '') {
  14. alert("自定义表单名称不能为空!");
  15. return false;
  16. }
  17. return true;
  18. }
  19. //删除
  20. function DelNote(gourl) {
  21. if (!window.confirm("你确认要删除这条记录么!")) { return false; }
  22. location.href = gourl;
  23. }
  24. </script>
  25. <style type="text/css">
  26. .STYLE1 {
  27. color: #FF0000
  28. }
  29. td {
  30. padding: 2px;
  31. padding-left: 6px;
  32. line-height: 150%;
  33. }
  34. .STYLE2 {
  35. color: #666666;
  36. display: none;
  37. }
  38. </style>
  39. </head>
  40. <body background='images/allbg.gif' leftmargin='8' topmargin='8'>
  41. <div class="bodytitle">
  42. <div class="bodytitleleft"></div>
  43. <div class="bodytitletxt" style="padding-left:10px;">自定义表单管理</div>
  44. </div>
  45. <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle"
  46. style="background:#CFCFCF;">
  47. <form name="form1" action="diy_edit.php" method="post" onSubmit="return checkSubmit();">
  48. <input type='hidden' name='diyid' value='<?php echo $diyid;?>'>
  49. <input type='hidden' name='dopost' value='save'>
  50. <tr bgcolor="#CFCFCF">
  51. <td height="28" colspan="2" bgcolor="#EDF9D5" background='images/tbg.gif' style="padding-left:10px;">
  52. <b><a href="diy_main.php"><u>自定义表单管理</u></a> &gt; 修改自定义表单:</b>
  53. (修改表名不会创建新表,如果您不懂手工处理这些表,请不要更改)
  54. </td>
  55. </tr>
  56. <tr>
  57. <td width="170" height="28" align="left" bgcolor="#FFFFFF">自定义表单 diyid:<br />
  58. <span class="STYLE2" id='help1'>  数字,创建后不可更改,并具有唯一性。</span> </td>
  59. <td bgcolor="#FFFFFF">
  60. <?php echo $diyid;?>
  61. * <img src="images/help.gif" alt="帮助" width="16" height="16" border="0" style="cursor:hand"
  62. onclick="showHide2('help1')" /></td>
  63. </tr>
  64. <tr>
  65. <td height="28" align="left" bgcolor="#F9FCEF">自定义表单名称:<br />
  66. <span class="STYLE2" id="help3">  自定义表单的中文名称,在后台管理,前台发布等均使用此名字。</span></td>
  67. <td bgcolor="#F9FCEF">
  68. <input name="name" type="text" id="name" value="<?php echo $row['name']?>" style="width:180px"
  69. class='alltxt' />
  70. *<img src="images/help.gif" alt="帮助" width="16" height="16" border="0" style="cursor:hand"
  71. onclick="showHide2('help3')" />
  72. </td>
  73. </tr>
  74. <tr>
  75. <td height="28" align="left" bgcolor="#FFFFFF">数据表:<br />
  76. <span class="STYLE2" id="help5">  自定义表单数据表创建后不可修改表名</span></td>
  77. <td bgcolor="#FFFFFF">
  78. <input name="table" type="text" id="table" style="width:180px" value="<?php echo $row['table']; ?>"
  79. class='alltxt' disabled='1' />
  80. *<img src="images/help.gif" alt="帮助" width="16" height="16" border="0" style="cursor:hand"
  81. onclick="showHide2('help5')" />
  82. </td>
  83. </tr>
  84. <tr>
  85. <td height="28" align="left" bgcolor="#F9FCEF">模型字段配置:<br />
  86. 信息索引类字段系统已经加入,<br />
  87. 您只需要增加其它个性化字段即可。</td>
  88. <td bgcolor="#F9FCEF">
  89. <input name="fset" type="button" id="fset" value="添加新字段"
  90. onClick="location.href='diy_field_add.php?diyid=<?php echo $diyid; ?>'" class="np coolbg"
  91. style="margin-top:5px" />
  92. </td>
  93. </tr>
  94. <tr>
  95. <td colspan='2' bgcolor="#FFFFFF" style="padding:6px">
  96. <table width="100%" border="0" cellpadding="1" cellspacing="1" align="center" style="background:#cfcfcf;">
  97. <tr align="center" bgcolor="#FBFCE2" height="26">
  98. <td width="28%">表单提示文字</td>
  99. <td width="18%">数据字段名</td>
  100. <td width="20%">数据类型</td>
  101. <td width="18%">表单类型</td>
  102. <td>维护</td>
  103. </tr>
  104. <?php
  105. $ds = file(DedeInclude('/inc/fieldtype.txt'));
  106. foreach($ds as $d){
  107. $dds = explode(',',trim($d));
  108. $fieldtypes[$dds[0]] = $dds[1];
  109. }
  110. $fieldset = $row['info'];
  111. $dtp = new DedeTagParse();
  112. $dtp->SetNameSpace("field","<",">");
  113. $dtp->LoadSource($fieldset);
  114. if(is_array($dtp->CTags)){
  115. foreach($dtp->CTags as $ctag)
  116. {
  117. ?> <tr align="center" bgcolor="#FFFFFF" height="24">
  118. <td>
  119. <?php
  120. $itname = $ctag->GetAtt('itemname');
  121. if($itname=='') echo "没指定";
  122. else echo $itname;
  123. ?>
  124. </td>
  125. <td>
  126. <?php echo $ctag->GetTagName()?>
  127. </td>
  128. <td>
  129. <?php
  130. $ft = $ctag->GetAtt('type');
  131. if(isset($fieldtypes[$ft])) echo $fieldtypes[$ft];
  132. else echo "系统专用类型";
  133. ?>
  134. </td>
  135. <td>
  136. <?php
  137. $ft = $ctag->GetAtt('autofield');
  138. if($ft==''||$ft==0) echo "固化表单";
  139. else echo "自动表单";
  140. ?>
  141. </td>
  142. <td>
  143. <a href="diy_field_edit.php?diyid=<?php echo $diyid;?>&fname=<?php echo $ctag->GetTagName()?>">[修改]</a>
  144. <a
  145. href="diy_field_edit.php?diyid=<?php echo $diyid;?>&action=delete&fname=<?php echo $ctag->GetTagName()?>">[删除]</a>
  146. </td>
  147. </tr>
  148. <?php
  149. }}
  150. ?>
  151. </table>
  152. </td>
  153. </tr>
  154. <tr>
  155. <td height="28" align="left" bgcolor="#FFFFFF">列表模板:</td>
  156. <td bgcolor="#FFFFFF">
  157. <input name="listtemplate" type="text" id="listtemplate" style="width:180px"
  158. value="<?php echo $row['listtemplate'];?>" class='alltxt' />
  159. </td>
  160. </tr>
  161. <tr>
  162. <td height="28" align="left" bgcolor="#FFFFFF">内容模板:</td>
  163. <td bgcolor="#FFFFFF">
  164. <input name="viewtemplate" type="text" id="viewtemplate" style="width:180px"
  165. value="<?php echo $row['viewtemplate'];?>" class='alltxt' />
  166. </td>
  167. </tr>
  168. <tr>
  169. <td height="28" align="left" bgcolor="#FFFFFF">发布模板:</td>
  170. <td bgcolor="#FFFFFF">
  171. <input name="posttemplate" type="text" id="posttemplate" style="width:180px"
  172. value="<?php echo $row['posttemplate'];?>" class='alltxt' />
  173. </td>
  174. </tr>
  175. <tr>
  176. <td height="28" align="left" bgcolor="#FFFFFF">前台列表和内容页公开?:</td>
  177. <td bgcolor="#FFFFFF">
  178. <label><input name="public" type="radio" value="2" <?php echo $row['public'] == 2 ? 'checked' : '';?>
  179. class='np' />完全公开</label>
  180. <label><input name="public" type="radio" value="1" <?php echo $row['public'] == 1 ? 'checked' : '';?>
  181. class='np' />公开审核过的</label>
  182. <label><input name="public" type="radio" value="0" <?php echo $row['public'] == 0 ? 'checked' : '';?>
  183. class='np' />不公开</label>
  184. </td>
  185. </tr>
  186. <tr bgcolor="#F9FCEF">
  187. <td height="28" colspan="2">
  188. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  189. <tr>
  190. <td width="26%" height="45">&nbsp;</td>
  191. <td width="15%">
  192. <input type="submit" name="button" id="button" value="确定" class='np coolbg' />
  193. </td>
  194. <td width="59%">
  195. <input name="按钮" type="button" class='np coolbg' id="button2" onclick="location='diy_main.php';"
  196. value="返回" />
  197. </td>
  198. </tr>
  199. </table>
  200. </td>
  201. </tr>
  202. </form>
  203. </table>
  204. </body>
  205. </html>