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

57 lines
2.7KB

  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. <table cellpadding="1" cellspacing="1" align="center" class="table maintable my-3">
  15. <tr>
  16. <td bgcolor="#f5f5f5" colspan="2"><a href="<?php echo $ENV_GOBACK_URL;?>">自定义表单管理</a> &gt; 修改表单数据</td>
  17. </tr>
  18. <tr>
  19. <td colspan="2">
  20. <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">
  21. <input type="hidden" name="dopost" value="edit">
  22. <input type="hidden" name="id" value="<?php echo $row['id'];?>">
  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'><i class='fa fa-picture-o'></i> 浏览原图</a> <a href='diy_list.php?action=delete&diyid=$diy->diyid&id=$row[id]&do=1&name=$field'>删除原图</a>";
  32. } else if ($fielddata[1]=='addon') {
  33. $row[$field] = "<input type='file' name='file'> <a href='{$row[$field]}' target='_blank'><i class='fa fa-file-text-o'></i> 浏览附件</a> <a href='diy_list.php?action=delete&diyid=$diy->diyid&id=$row[id]&do=1&name=$field'>删除附件</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. </form>
  53. </td>
  54. </tr>
  55. </table>
  56. </body>
  57. </html>