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

131 lines
5.2KB

  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.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. </script>
  22. </head>
  23. <body>
  24. <table cellpadding="1" cellspacing="1" align="center" class="table maintable my-3">
  25. <form name="form1" action="diy_edit.php" method="post" onSubmit="return checkSubmit();">
  26. <input type="hidden" name="diyid" value="<?php echo $diyid;?>">
  27. <input type="hidden" name="dopost" value="save">
  28. <tr>
  29. <td bgcolor="#f5f5f5" colspan="2"><a href="diy_main.php">自定义表单管理</a> &gt; 修改自定义表单</td>
  30. </tr>
  31. <tr>
  32. <td width="260">自定义表单diyid:</td>
  33. <td><?php echo $diyid;?>(创建后不可修改,并具有唯一性)</td>
  34. </tr>
  35. <tr>
  36. <td>自定义表单名称:</td>
  37. <td><input type="text" name="name" id="name" class="admin-input-sm" value="<?php echo $row['name']?>">(修改表名不会创建新表,如果您不懂手工处理这些表,请不要修改)</td>
  38. </tr>
  39. <tr>
  40. <td>数据表:</td>
  41. <td><input type="text" name="table" id="table" class="admin-input-sm" value="<?php echo $row['table'];?>" disabled="1">(自定义表单数据表创建后不可修改表名)</td>
  42. </tr>
  43. <tr>
  44. <td>列表模板:</td>
  45. <td><input type="text" name="listtemplate" id="listtemplate" class="admin-input-sm" value="<?php echo $row['listtemplate'];?>"></td>
  46. </tr>
  47. <tr>
  48. <td>文档模板:</td>
  49. <td><input type="text" name="viewtemplate" id="viewtemplate" class="admin-input-sm" value="<?php echo $row['viewtemplate'];?>"></td>
  50. </tr>
  51. <tr>
  52. <td>发布模板:</td>
  53. <td><input type="text" name="posttemplate" id="posttemplate" class="admin-input-sm" value="<?php echo $row['posttemplate'];?>"></td>
  54. </tr>
  55. <tr>
  56. <td>前台列表和文档页公开:</td>
  57. <td>
  58. <label><input type="radio" name="public" value="2" <?php echo $row['public'] == 2 ? 'checked' : '';?>> 完全公开</label>
  59. <label><input type="radio" name="public" value="1" <?php echo $row['public'] == 1 ? 'checked' : '';?>> 公开审核过的</label>
  60. <label><input type="radio" name="public" value="0" <?php echo $row['public'] == 0 ? 'checked' : '';?>> 不公开</label>
  61. </td>
  62. </tr>
  63. <tr>
  64. <td colspan="2">
  65. <table width="100%" cellpadding="1" cellspacing="1" align="center">
  66. <tr bgcolor="#e9ecef" align="center">
  67. <td width="16%">表单提示文字</td>
  68. <td width="16%">数据字段名</td>
  69. <td width="16%">数据类型</td>
  70. <td width="16%">表单类型</td>
  71. <td>操作</td>
  72. </tr>
  73. <?php
  74. $ds = file(DedeInclude('/inc/fieldtype.txt'));
  75. foreach($ds as $d){
  76. $dds = explode(',',trim($d));
  77. $fieldtypes[$dds[0]] = $dds[1];
  78. }
  79. $fieldset = stripslashes($row['info']);
  80. $dtp = new DedeTagParse();
  81. $dtp->SetNameSpace("field","<",">");
  82. $dtp->LoadSource($fieldset);
  83. if (is_array($dtp->CTags)){
  84. foreach($dtp->CTags as $ctag)
  85. {
  86. ?>
  87. <tr align="center">
  88. <td>
  89. <?php
  90. $itname = $ctag->GetAtt('itemname');
  91. if ($itname=='') echo "没指定";
  92. else echo $itname;
  93. ?>
  94. </td>
  95. <td><?php echo $ctag->GetTagName()?></td>
  96. <td>
  97. <?php
  98. $ft = $ctag->GetAtt('type');
  99. if (isset($fieldtypes[$ft])) echo $fieldtypes[$ft];
  100. else echo "系统专用类型";
  101. ?>
  102. </td>
  103. <td>
  104. <?php
  105. $ft = $ctag->GetAtt('autofield');
  106. if ($ft==''||$ft==0) echo "固化表单";
  107. else echo "自动表单";
  108. ?>
  109. </td>
  110. <td>
  111. <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"></i> 修改</a>
  112. <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>
  113. </td>
  114. </tr>
  115. <?php }}?>
  116. </table>
  117. </td>
  118. </tr>
  119. <tr>
  120. <td colspan="2"><button type="button" name="fset" id="fset" class="btn btn-success btn-sm" onclick="location.href='diy_field_add.php?diyid=<?php echo $diyid;?>'">添加新字段</button></td>
  121. </tr>
  122. <tr>
  123. <td bgcolor="#f5f5f5" colspan="2" align="center">
  124. <button type="submit" name="button" id="button" class="btn btn-success btn-sm">保存</button>
  125. <button type="button" id="button2" class="btn btn-outline-success btn-sm" onclick="location='diy_main.php';">返回</button>
  126. </td>
  127. </tr>
  128. </form>
  129. </table>
  130. </body>
  131. </html>