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