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

200 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" class='alltxt' />
  69. *<img src="../static/web/img/help.gif" alt="帮助" border="0" style="cursor:hand" onClick="showHide2('help3')">
  70. </td>
  71. </tr>
  72. <tr>
  73. <td height="26" align="left" bgcolor="#FFFFFF">数据表:<br>
  74. <span class="STYLE2" id="help5">自定义表单数据表创建后不可修改表名</span></td>
  75. <td bgcolor="#FFFFFF">
  76. <input name="table" type="text" id="table" style="width:180px" value="<?php echo $row['table']; ?>" class='alltxt' disabled='1' />
  77. *<img src="../static/web/img/help.gif" alt="帮助" border="0" style="cursor:hand" onClick="showHide2('help5')">
  78. </td>
  79. </tr>
  80. <tr>
  81. <td height="26" align="left" bgcolor="#f8f8f8">模型字段配置:<br>
  82. 信息索引类字段系统已经加入,<br>
  83. 您只需要增加其它个性化字段即可</td>
  84. <td bgcolor="#f8f8f8">
  85. <button name="fset" type="button" id="fset" onClick="location.href='diy_field_add.php?diyid=<?php echo $diyid; ?>'" class="btn btn-success btn-sm"
  86. >添加新字段</button>
  87. </td>
  88. </tr>
  89. <tr>
  90. <td colspan='2' bgcolor="#FFFFFF" style="padding:6px">
  91. <table width="100%" border="0" cellpadding="1" cellspacing="1" align="center">
  92. <tr align="center" bgcolor="#FBFCE2" height="26">
  93. <td width="28%">表单提示文字</td>
  94. <td width="18%">数据字段名</td>
  95. <td width="20%">数据类型</td>
  96. <td width="18%">表单类型</td>
  97. <td>维护</td>
  98. </tr>
  99. <?php
  100. $ds = file(DedeInclude('/inc/fieldtype.txt'));
  101. foreach($ds as $d){
  102. $dds = explode(',',trim($d));
  103. $fieldtypes[$dds[0]] = $dds[1];
  104. }
  105. $fieldset = stripslashes($row['info']);
  106. $dtp = new DedeTagParse();
  107. $dtp->SetNameSpace("field","<",">");
  108. $dtp->LoadSource($fieldset);
  109. if(is_array($dtp->CTags)){
  110. foreach($dtp->CTags as $ctag)
  111. {
  112. ?> <tr align="center" bgcolor="#FFFFFF" height="26">
  113. <td>
  114. <?php
  115. $itname = $ctag->GetAtt('itemname');
  116. if($itname=='') echo "没指定";
  117. else echo $itname;
  118. ?>
  119. </td>
  120. <td>
  121. <?php echo $ctag->GetTagName()?>
  122. </td>
  123. <td>
  124. <?php
  125. $ft = $ctag->GetAtt('type');
  126. if(isset($fieldtypes[$ft])) echo $fieldtypes[$ft];
  127. else echo "系统专用类型";
  128. ?>
  129. </td>
  130. <td>
  131. <?php
  132. $ft = $ctag->GetAtt('autofield');
  133. if($ft==''||$ft==0) echo "固化表单";
  134. else echo "自动表单";
  135. ?>
  136. </td>
  137. <td>
  138. <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>
  139. <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>
  140. </td>
  141. </tr>
  142. <?php
  143. }}
  144. ?>
  145. </table>
  146. </td>
  147. </tr>
  148. <tr>
  149. <td height="26" align="left" bgcolor="#FFFFFF">列表模板:</td>
  150. <td bgcolor="#FFFFFF">
  151. <input name="listtemplate" type="text" id="listtemplate" style="width:180px" value="<?php echo $row['listtemplate']; ?>" class='alltxt' />
  152. </td>
  153. </tr>
  154. <tr>
  155. <td height="26" align="left" bgcolor="#FFFFFF">内容模板:</td>
  156. <td bgcolor="#FFFFFF">
  157. <input name="viewtemplate" type="text" id="viewtemplate" style="width:180px" value="<?php echo $row['viewtemplate']; ?>" class='alltxt' />
  158. </td>
  159. </tr>
  160. <tr>
  161. <td height="26" align="left" bgcolor="#FFFFFF">发布模板:</td>
  162. <td bgcolor="#FFFFFF">
  163. <input name="posttemplate" type="text" id="posttemplate" style="width:180px" value="<?php echo $row['posttemplate']; ?>" class='alltxt' />
  164. </td>
  165. </tr>
  166. <tr>
  167. <td height="26" align="left" bgcolor="#FFFFFF">前台列表和内容页公开:</td>
  168. <td bgcolor="#FFFFFF">
  169. <label><input name="public" type="radio" value="2" <?php echo $row['public'] == 2 ? 'checked' : ''; ?>
  170. class='np' /> 完全公开 </label>
  171. <label><input name="public" type="radio" value="1" <?php echo $row['public'] == 1 ? 'checked' : ''; ?>
  172. class='np' /> 公开审核过的 </label>
  173. <label><input name="public" type="radio" value="0" <?php echo $row['public'] == 0 ? 'checked' : ''; ?>
  174. class='np' /> 不公开 </label>
  175. </td>
  176. </tr>
  177. <tr bgcolor="#f8f8f8">
  178. <td height="26" colspan="2">
  179. <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-borderless">
  180. <tr>
  181. <td width="26%" height="36"></td>
  182. <td width="15%">
  183. <button type="submit" name="button" id="button" class='btn btn-success'>确定</button>
  184. </td>
  185. <td width="59%">
  186. <button type="button" class='btn btn-success' id="button2" onclick="location='diy_main.php';"
  187. >返回</button>
  188. </td>
  189. </tr>
  190. </table>
  191. </td>
  192. </tr>
  193. </form>
  194. </table>
  195. </body>
  196. </html>