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

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