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

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