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

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