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

60 lines
2.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. </head>
  13. <body>
  14. <table width="98%" cellpadding="1" cellspacing="1" align="center" class="table maintable mt-3 mb-3">
  15. <tr>
  16. <td width="100%" bgcolor="#f8f8f8" colspan="2"><a href="<?php echo $ENV_GOBACK_URL;?>">表单管理</a> &gt; 编辑评论</td>
  17. </tr>
  18. <tr>
  19. <td colspan="2" align="center">
  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. {
  32. $row[$field] = "<input name='photo' type='file'> <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>";
  33. }
  34. else if ($fielddata[1]=='addon')
  35. {
  36. $row[$field] = "<input name='file' type='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>";
  37. } else {
  38. if (!in_array($fielddata[1],$allowhtml)){
  39. $row[$field] = dede_htmlspecialchars($row[$field]);
  40. $row[$field] = "<input type='text' name='".$field."' value='".$row[$field]."'>";
  41. }
  42. }
  43. echo '<tr><td width="260">'.$fielddata[0].':'.'</td><td>'.$row[$field].'</td></tr>';
  44. $formfields .= $formfields == ''? $field.','.$fielddata[1] : ';'.$field.','.$fielddata[1];
  45. }
  46. echo "<input type='hidden' name='dede_fields' value='".$formfields."'>";
  47. ?>
  48. <tr>
  49. <td colspan="2" align="center" class="py-2">
  50. <button type="submit" name="Submit1" class="btn btn-success btn-sm">保存</button>
  51. <button type="button" name="Submit2" class="btn btn-success btn-sm" onClick="location='<?php echo $ENV_GOBACK_URL;?>';">返回</button>
  52. </td>
  53. </tr>
  54. </table>
  55. </form>
  56. </td>
  57. </tr>
  58. </table>
  59. </body>
  60. </html>