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

59 lines
3.0KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  5. <title>编辑评论</title>
  6. <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  7. <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="../static/web/css/admin.css">
  9. <script language="javascript" src="../static/web/js/jquery.min.js"></script>
  10. <script src="../static/web/js/bootstrap.bundle.min.js"></script>
  11. </head>
  12. <body>
  13. <table class="table maintable mt-3" width="98%" align="center" cellpadding="1" cellspacing="1">
  14. <tr>
  15. <td width="100%" height="26" colspan="2" background="../static/web/img/tbg.gif"><a href="<?php echo $ENV_GOBACK_URL; ?>">表单管理</a> &gt; 编辑评论</td>
  16. </tr>
  17. <tr>
  18. <td height="167" colspan="2" align="center">
  19. <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">
  20. <input type="hidden" name="dopost" value="edit">
  21. <input type="hidden" name="id" value="<?php echo $row['id']; ?>">
  22. <table width="100%" cellpadding="3" cellspacing="1" style="text-align:left">
  23. <?php
  24. $formfields = '';
  25. foreach($fieldlist as $field=>$fielddata)
  26. {
  27. $allowhtml = array('htmltext');
  28. if($row[$field]=='') continue;
  29. if($fielddata[1]=='img')
  30. {
  31. $row[$field] = "<input name='photo' type='file'> <a href='{$row[$field]}' target='_blank'><img src='../static/web/img/channeladd.gif' border='0'> 浏览原图</a> <a href='diy_list.php?action=delete&diyid=$diy->diyid&id=$row[id]&do=1&name=$field'>删除原图</a>";
  32. }
  33. else if($fielddata[1]=='addon')
  34. {
  35. $row[$field] = "<input name='file' type='file'> <a href='{$row[$field]}' target='_blank'><img src='../static/web/img/channeladd.gif' border='0'> 浏览原附件</a> <a href='diy_list.php?action=delete&diyid=$diy->diyid&id=$row[id]&do=1&name=$field'>删除原附件</a>";
  36. } else {
  37. if(!in_array($fielddata[1],$allowhtml)){
  38. $row[$field] = dede_htmlspecialchars($row[$field]);
  39. $row[$field] = "<input type='text' name='".$field."' value='".$row[$field]."'/>";
  40. }
  41. }
  42. echo '<tr><td width="20%" height="26">'.$fielddata[0].':'.'</td><td width="80%">'.$row[$field].'</td></tr>';
  43. $formfields .= $formfields == ''? $field.','.$fielddata[1] : ';'.$field.','.$fielddata[1];
  44. }
  45. echo "<input type='hidden' name='dede_fields' value='".$formfields."'>";
  46. ?>
  47. <tr>
  48. <td align="center" class="py-3">
  49. <button type="submit" name="Submit1" class='btn btn-success btn-sm'>保存</button>
  50. <button type="button" name="Submit2" class='btn btn-success btn-sm' onClick="location='<?php echo $ENV_GOBACK_URL; ?>';">返回</button>
  51. </td>
  52. </tr>
  53. </table>
  54. </form>
  55. </td>
  56. </tr>
  57. </table>
  58. </body>
  59. </html>