国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

57 行
2.8KB

  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. </head>
  13. <body>
  14. <form name="form1" method="post" enctype="multipart/form-data" action="diy_list.php?action=edit&diyid=<?php echo $diy->diyid ?>&id=<?php echo $row['id'] ?>&do=2">
  15. <input type="hidden" name="dopost" value="edit">
  16. <input type="hidden" name="id" value="<?php echo $row['id'];?>">
  17. <table cellpadding="1" cellspacing="1" align="center" class="table maintable my-3">
  18. <tr>
  19. <td bgcolor="#f5f5f5" colspan="2"><a href="<?php echo $ENV_GOBACK_URL;?>">自定义表单管理</a> &gt; 修改表单数据</td>
  20. </tr>
  21. <tr>
  22. <td colspan="2">
  23. <table width="100%" cellpadding="3" cellspacing="1">
  24. <?php
  25. $formfields = '';
  26. foreach($fieldlist as $field=>$fielddata)
  27. {
  28. $allowhtml = array('htmltext');
  29. if ($row[$field]=='') continue;
  30. if ($fielddata[1]=='img') {
  31. $row[$field] = "<input type='file' name='photo'> <a href='{$row[$field]}' target='_blank' class='btn btn-light btn-sm'>浏览原图</a><a href='diy_list.php?action=delete&diyid=$diy->diyid&id=$row[id]&do=1&name=$field' class='btn btn-light btn-sm'>删除原图</a>";
  32. } else if ($fielddata[1]=='addon') {
  33. $row[$field] = "<input type='file' name='file'> <a href='{$row[$field]}' target='_blank' class='btn btn-light btn-sm'>浏览附件</a><a href='diy_list.php?action=delete&diyid=$diy->diyid&id=$row[id]&do=1&name=$field' class='btn btn-danger btn-sm'>删除附件</a>";
  34. } else {
  35. if (!in_array($fielddata[1],$allowhtml)) {
  36. $row[$field] = dede_htmlspecialchars($row[$field]);
  37. $row[$field] = "<input type='text' name='".$field."' value='".$row[$field]."'>";
  38. }
  39. }
  40. echo '<tr><td width="260">'.$fielddata[0].':'.'</td><td>'.$row[$field].'</td></tr>';
  41. $formfields .= $formfields == ''? $field.','.$fielddata[1] : ';'.$field.','.$fielddata[1];
  42. }
  43. echo "<input type='hidden' name='dede_fields' value='".$formfields."'>";
  44. ?>
  45. <tr>
  46. <td colspan="2" align="center">
  47. <button type="submit" name="Submit1" class="btn btn-success btn-sm">保存</button>
  48. <button type="button" name="Submit2" class="btn btn-outline-success btn-sm" onclick="location='<?php echo $ENV_GOBACK_URL;?>';">返回</button>
  49. </td>
  50. </tr>
  51. </table>
  52. </td>
  53. </tr>
  54. </table>
  55. </form>
  56. </body>
  57. </html>