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

167 lines
6.9KB

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