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

162 lines
6.8KB

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