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

215 lines
8.8KB

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