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

136 lines
5.5KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6. <title>修改自定义表单</title>
  7. <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="../static/web/css/bootstrap.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>
  14. function checkSubmit() {
  15. if (document.form1.name.value == '') {
  16. ShowMsg("自定义表单名称不能为空");
  17. return false;
  18. }
  19. return true;
  20. }
  21. function DelNote(gourl) {
  22. if (!window.confirm("您确认要删除这条记录吗")) { return false; }
  23. location.href = gourl;
  24. }
  25. </script>
  26. </head>
  27. <body>
  28. <table cellpadding="1" cellspacing="1" align="center" class="table maintable my-3">
  29. <form name="form1" action="diy_edit.php" method="post" onSubmit="return checkSubmit();">
  30. <input type="hidden" name="diyid" value="<?php echo $diyid;?>">
  31. <input type="hidden" name="dopost" value="save">
  32. <tr>
  33. <td bgcolor="#f5f5f5" colspan="2"><a href="diy_main.php">自定义表单管理</a> &gt; 修改自定义表单</td>
  34. </tr>
  35. <tr>
  36. <td width="260">自定义表单diyid:创建后不可修改,并具有唯一性</td>
  37. <td><?php echo $diyid;?></td>
  38. </tr>
  39. <tr>
  40. <td>自定义表单名称:修改表名不会创建新表,如果您不懂手工处理这些表,请不要修改</td>
  41. <td><input type="text" name="name" id="name" value="<?php echo $row['name']?>" class="admin-input-sm"></td>
  42. </tr>
  43. <tr>
  44. <td>数据表:自定义表单数据表创建后不可修改表名</td>
  45. <td><input type="text" name="table" id="table" value="<?php echo $row['table'];?>" disabled="1" class="admin-input-sm"></td>
  46. </tr>
  47. <tr>
  48. <td bgcolor="#f5f5f5">模型字段配置:信息索引类字段系统已经加入,您只需要增加其它个性化字段即可</td>
  49. <td bgcolor="#f5f5f5"><button type="button" name="fset" id="fset" onClick="location.href='diy_field_add.php?diyid=<?php echo $diyid;?>'" class="btn btn-success btn-sm">添加新字段</button></td>
  50. </tr>
  51. <tr>
  52. <td colspan="2">
  53. <table width="100%" cellpadding="1" cellspacing="1" align="center">
  54. <tr bgcolor="#e9ecef" align="center">
  55. <td width="28%">表单提示文字</td>
  56. <td width="18%">数据字段名</td>
  57. <td width="20%">数据类型</td>
  58. <td width="18%">表单类型</td>
  59. <td>维护</td>
  60. </tr>
  61. <?php
  62. $ds = file(DedeInclude('/inc/fieldtype.txt'));
  63. foreach($ds as $d){
  64. $dds = explode(',',trim($d));
  65. $fieldtypes[$dds[0]] = $dds[1];
  66. }
  67. $fieldset = stripslashes($row['info']);
  68. $dtp = new DedeTagParse();
  69. $dtp->SetNameSpace("field","<",">");
  70. $dtp->LoadSource($fieldset);
  71. if (is_array($dtp->CTags)){
  72. foreach($dtp->CTags as $ctag)
  73. {
  74. ?>
  75. <tr align="center">
  76. <td>
  77. <?php
  78. $itname = $ctag->GetAtt('itemname');
  79. if ($itname=='') echo "没指定";
  80. else echo $itname;
  81. ?>
  82. </td>
  83. <td><?php echo $ctag->GetTagName()?></td>
  84. <td>
  85. <?php
  86. $ft = $ctag->GetAtt('type');
  87. if (isset($fieldtypes[$ft])) echo $fieldtypes[$ft];
  88. else echo "系统专用类型";
  89. ?>
  90. </td>
  91. <td>
  92. <?php
  93. $ft = $ctag->GetAtt('autofield');
  94. if ($ft==''||$ft==0) echo "固化表单";
  95. else echo "自动表单";
  96. ?>
  97. </td>
  98. <td>
  99. <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>
  100. <a href="diy_field_edit.php?diyid=<?php echo $diyid;?>&action=delete&fname=<?php echo $ctag->GetTagName()?>" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i> 删除</a>
  101. </td>
  102. </tr>
  103. <?php }}?>
  104. </table>
  105. </td>
  106. </tr>
  107. <tr>
  108. <td>列表模板:</td>
  109. <td><input type="text" name="listtemplate" id="listtemplate" class="admin-input-sm" value="<?php echo $row['listtemplate'];?>"></td>
  110. </tr>
  111. <tr>
  112. <td>文档模板:</td>
  113. <td><input type="text" name="viewtemplate" id="viewtemplate" class="admin-input-sm" value="<?php echo $row['viewtemplate'];?>"></td>
  114. </tr>
  115. <tr>
  116. <td>发布模板:</td>
  117. <td><input type="text" name="posttemplate" id="posttemplate" class="admin-input-sm" value="<?php echo $row['posttemplate'];?>"></td>
  118. </tr>
  119. <tr>
  120. <td>前台列表和文档页公开:</td>
  121. <td>
  122. <label><input type="radio" name="public" value="2" <?php echo $row['public'] == 2 ? 'checked' : '';?>> 完全公开</label>
  123. <label><input type="radio" name="public" value="1" <?php echo $row['public'] == 1 ? 'checked' : '';?>> 公开审核过的</label>
  124. <label><input type="radio" name="public" value="0" <?php echo $row['public'] == 0 ? 'checked' : '';?>> 不公开</label>
  125. </td>
  126. </tr>
  127. <tr>
  128. <td bgcolor="#f5f5f5" colspan="2" align="center">
  129. <button type="submit" name="button" id="button" class="btn btn-success btn-sm">保存</button>
  130. <button type="button" id="button2" class="btn btn-outline-success btn-sm" onclick="location='diy_main.php';">返回</button>
  131. </td>
  132. </tr>
  133. </form>
  134. </table>
  135. </body>
  136. </html>