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

91 lines
3.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. <script src="js/main.js"></script>
  13. </head>
  14. <body>
  15. <form name="form1" action="media_edit.php" method="post" enctype="multipart/form-data" onSubmit="return CheckSubmit();">
  16. <input type="hidden" name="dopost" value="save">
  17. <input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
  18. <input type="hidden" name="aid" value="<?php echo $aid?>">
  19. <table align="center" class="table maintable my-3">
  20. <tr>
  21. <td bgcolor="#f5f5f5" colspan="2">修改附件</td>
  22. </tr>
  23. <tr>
  24. <td colspan="2">
  25. <div class="alert alert-info mb-0">图片类型仅支持jpg、png、gif、wbmp格式,视音频和附件为限定扩展名类型,在系统变量中修改</div>
  26. </td>
  27. </tr>
  28. <tr>
  29. <td width="260">媒体类型:</td>
  30. <td>
  31. <label><input type="radio" name="mediatype" value="1" <?php if ($myrow['mediatype']==1) echo "checked";?>> 图片</label>
  32. <label><input type="radio" name="mediatype" value="2" <?php if ($myrow['mediatype']==2) echo "checked";?>> FLASH</label>
  33. <label><input type="radio" name="mediatype" value="3" <?php if ($myrow['mediatype']==3) echo "checked";?>> 视频音频</label>
  34. <label><input type="radio" name="mediatype" value="4" <?php if ($myrow['mediatype']==4) echo "checked";?>> 附件其它</label>
  35. </td>
  36. </tr>
  37. <tr>
  38. <td>说明标题:</td>
  39. <td><input type="text" name="title" id="title" value="<?php echo $myrow['title']?>" class="admin-input-lg"></td>
  40. </tr>
  41. <tr>
  42. <td>附加参数:</td>
  43. <td>
  44. <label>宽:<input type="text" name="mediawidth" id="mediawidth" value="<?php echo $myrow['width']?>" class="admin-input-sm">(像素)</label>
  45. <label>高:<input type="text" name="mediaheight" id="mediaheight" value="<?php echo $myrow['height']?>" class="admin-input-sm">(像素)</label>
  46. <label>播放时间:<input type="text" name="playtime" id="playtime" value="<?php echo $myrow['playtime']?>" class="admin-input-sm">(分钟)</label>
  47. </td>
  48. </tr>
  49. <tr>
  50. <td>源文件:</td>
  51. <td>
  52. <input type="text" name="filename" id="filename" value="<?php echo $myrow['url']?>" class="admin-input-lg">
  53. <a href="<?php echo $myrow['url']?>" target="_blank" class="btn btn-success btn-sm">查看</a>
  54. </td>
  55. </tr>
  56. <?php
  57. if ($myrow['mediatype']==1)
  58. {
  59. $fullfilename = $cfg_basedir.$myrow['url'];
  60. if (file_exists($fullfilename)){
  61. $info = "";
  62. $sizes = getimagesize($fullfilename,$info);
  63. if (is_array($sizes)){
  64. if ($sizes[0]>200) $w=200;
  65. else $w = $sizes[0];
  66. ?>
  67. <tr>
  68. <td>预览:</td>
  69. <td><a href="<?php echo $myrow['url']?>" target="_blank"><img src="<?php echo $myrow['url'].'?q='.time()?>" width="<?php echo $w?>" id="picview"></a></td>
  70. </tr>
  71. <?php }}}?>
  72. <tr>
  73. <td>修改文件:</td>
  74. <td><input type="file" name="upfile" id="upfile" class="admin-input-lg"></td>
  75. </tr>
  76. <tr>
  77. <td bgcolor="#f5f5f5" colspan="2" align="center"><button type="submit" class="btn btn-success btn-sm">保存</button></td>
  78. </tr>
  79. </table>
  80. </form>
  81. <script>
  82. function CheckSubmit() {
  83. if (document.form1.title.value == '') {
  84. ShowMsg("附件标题不能为空");
  85. document.form1.title.focus();
  86. return false;
  87. }
  88. }
  89. </script>
  90. </body>
  91. </html>