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

173 lines
7.1KB

  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%" cellpadding="1" cellspacing="1" align="center" class="table maintable mt-3 mb-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"><a href="diy_main.php">自定义表单管理</a> &gt; 修改自定义表单</td>
  49. </tr>
  50. <tr>
  51. <td width="260" height="26">自定义表单 diyid:<br>
  52. <span class="style2" id='help1'>数字,创建后不可修改,并具有唯一性</span>
  53. </td>
  54. <td>
  55. <?php echo $diyid; ?>
  56. <i class="fa fa-question-circle" alt="帮助" style="cursor:hand" onClick="showHide2('help1')"></i>
  57. </td>
  58. </tr>
  59. <tr>
  60. <td height="26">自定义表单名称:(修改表名不会创建新表,如果您不懂手工处理这些表,请不要修改)<br>
  61. <span class="style2" id="help3">自定义表单的中文名称,在后台管理,前台发布等均使用此名字</span></td>
  62. <td>
  63. <input name="name" type="text" id="name" value="<?php echo $row['name']?>" style="width:160px" class='alltxt'> * <i class="fa fa-question-circle" lt="帮助" style="cursor:hand" onClick="showHide2('help3')"></i>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td height="26">数据表:<br>
  68. <span class="style2" id="help5">自定义表单数据表创建后不可修改表名</span>
  69. </td>
  70. <td>
  71. <input name="table" type="text" id="table" style="width:160px" value="<?php echo $row['table']; ?>" class='alltxt' disabled='1'> * <i class="fa fa-question-circle" alt="帮助" style="cursor:hand" onClick="showHide2('help5')"></i>
  72. </td>
  73. </tr>
  74. <tr>
  75. <td height="26" bgcolor="#f8f8f8">模型字段配置:<br>
  76. 信息索引类字段系统已经加入,您只需要增加其它个性化字段即可
  77. </td>
  78. <td bgcolor="#f8f8f8">
  79. <button name="fset" type="button" id="fset" onClick="location.href='diy_field_add.php?diyid=<?php echo $diyid; ?>'" class="btn btn-success btn-sm"
  80. >添加新字段</button>
  81. </td>
  82. </tr>
  83. <tr>
  84. <td colspan='2'>
  85. <table width="100%" cellpadding="1" cellspacing="1" align="center">
  86. <tr align="center" bgcolor="#F8FCF1" height="26">
  87. <td width="28%">表单提示文字</td>
  88. <td width="18%">数据字段名</td>
  89. <td width="20%">数据类型</td>
  90. <td width="18%">表单类型</td>
  91. <td>维护</td>
  92. </tr>
  93. <?php
  94. $ds = file(DedeInclude('/inc/fieldtype.txt'));
  95. foreach($ds as $d){
  96. $dds = explode(',',trim($d));
  97. $fieldtypes[$dds[0]] = $dds[1];
  98. }
  99. $fieldset = stripslashes($row['info']);
  100. $dtp = new DedeTagParse();
  101. $dtp->SetNameSpace("field","<",">");
  102. $dtp->LoadSource($fieldset);
  103. if(is_array($dtp->CTags)){
  104. foreach($dtp->CTags as $ctag)
  105. {
  106. ?> <tr height="26" align="center">
  107. <td>
  108. <?php
  109. $itname = $ctag->GetAtt('itemname');
  110. if($itname=='') echo "没指定";
  111. else echo $itname;
  112. ?>
  113. </td>
  114. <td>
  115. <?php echo $ctag->GetTagName()?>
  116. </td>
  117. <td>
  118. <?php
  119. $ft = $ctag->GetAtt('type');
  120. if(isset($fieldtypes[$ft])) echo $fieldtypes[$ft];
  121. else echo "系统专用类型";
  122. ?>
  123. </td>
  124. <td>
  125. <?php
  126. $ft = $ctag->GetAtt('autofield');
  127. if($ft==''||$ft==0) echo "固化表单";
  128. else echo "自动表单";
  129. ?>
  130. </td>
  131. <td>
  132. <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>
  133. <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>
  134. </td>
  135. </tr>
  136. <?php
  137. }}
  138. ?>
  139. </table>
  140. </td>
  141. </tr>
  142. <tr>
  143. <td height="26">列表模板:</td>
  144. <td><input name="listtemplate" type="text" id="listtemplate" style="width:160px" value="<?php echo $row['listtemplate']; ?>" class='alltxt'></td>
  145. </tr>
  146. <tr>
  147. <td height="26">内容模板:</td>
  148. <td><input name="viewtemplate" type="text" id="viewtemplate" style="width:160px" value="<?php echo $row['viewtemplate']; ?>" class='alltxt'></td>
  149. </tr>
  150. <tr>
  151. <td height="26">发布模板:</td>
  152. <td><input name="posttemplate" type="text" id="posttemplate" style="width:160px" value="<?php echo $row['posttemplate']; ?>" class='alltxt'></td>
  153. </tr>
  154. <tr>
  155. <td height="26">前台列表和内容页公开:</td>
  156. <td>
  157. <label><input name="public" type="radio" value="2" <?php echo $row['public'] == 2 ? 'checked' : ''; ?> class='np'> 完全公开 </label>
  158. <label><input name="public" type="radio" value="1" <?php echo $row['public'] == 1 ? 'checked' : ''; ?> class='np'> 公开审核过的 </label>
  159. <label><input name="public" type="radio" value="0" <?php echo $row['public'] == 0 ? 'checked' : ''; ?> class='np'> 不公开 </label>
  160. </td>
  161. </tr>
  162. <tr>
  163. <td bgcolor="#f8f8f8" colspan="2" align="center" class="py-3">
  164. <button type="submit" name="button" id="button" class='btn btn-success btn-sm'>保存</button>
  165. <button type="button" class='btn btn-success btn-sm' id="button2" onclick="location='diy_main.php';">返回</button>
  166. </td>
  167. </tr>
  168. </form>
  169. </table>
  170. </body>
  171. </html>