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

202 lines
8.3KB

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