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

108 lines
4.6KB

  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. <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 width="98%" align="center" cellpadding="3" cellspacing="1" class="table maintable my-3">
  25. <tr>
  26. <td bgcolor="#f5f5f5">
  27. <table width="98%" cellpadding="0" cellspacing="0" class="table table-borderless">
  28. <tr>
  29. <td width="30%">修改媒体</td>
  30. <td width="70%" align="right"><a href="media_main.php" class="btn btn-success btn-sm">附件媒体数据管理</a></td>
  31. </tr>
  32. </table>
  33. </td>
  34. </tr>
  35. <tr>
  36. <td><div class="alert alert-info mb-0">图片类型仅支持jpg、png、gif、wbmp格式,flash为.swf格式,视音频和附件为限定扩展名的类型(可在系统参数中修改)</div></td>
  37. </tr>
  38. <tr>
  39. <td align="center">
  40. <table width="100%" cellpadding="0" cellspacing="0">
  41. <form enctype="multipart/form-data" name="form1" action="media_edit.php" method="POST" onSubmit="return CheckSubmit();">
  42. <input type="hidden" name="dopost" value="save">
  43. <input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
  44. <input type="hidden" name="aid" value="<?php echo $aid?>">
  45. <tr>
  46. <td width="15%" align="left" class="biz-td">媒体类型:</td>
  47. <td width="85%" align="left" class="biz-td">
  48. <label><input type="radio" name="mediatype" value="1" <?php if ($myrow['mediatype']==1) echo "checked";?>> 图片</label>
  49. <label><input type="radio" name="mediatype" value="2" <?php if ($myrow['mediatype']==2) echo "checked";?>> FLASH</label>
  50. <label><input type="radio" name="mediatype" value="3" <?php if ($myrow['mediatype']==3) echo "checked";?>> 视频音频</label>
  51. <label><input type="radio" name="mediatype" value="4" <?php if ($myrow['mediatype']==4) echo "checked";?>> 附件其它</label>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td class="biz-td">说明标题:</td>
  56. <td class="biz-td"><input type="text" name="title" id="title" value="<?php echo $myrow['title']?>" class="biz-input-md"></td>
  57. </tr>
  58. <tr>
  59. <td class="biz-td">参数说明:</td>
  60. <td class="biz-td" colspan="2">图片不需要指定“宽”、“高”,其它附加参数仅方便多媒体文件管理,没其它含义</td>
  61. </tr>
  62. <tr>
  63. <td class="biz-td">附加参数:</td>
  64. <td class="biz-td">
  65. 宽:<input type="text" name="mediawidth" id="mediawidth" value="<?php echo $myrow['width']?>" class="biz-input-sm">(像素)
  66. 高:<input type="text" name="mediaheight" id="mediaheight" value="<?php echo $myrow['height']?>" class="biz-input-sm">(像素)
  67. 播放时间:<input type="text" name="playtime" id="playtime" value="<?php echo $myrow['playtime']?>" class="biz-input-sm">(分钟)
  68. </td>
  69. </tr>
  70. <tr>
  71. <td class="biz-td">原文件:</td>
  72. <td class="biz-td">
  73. <input type="text" name="filename" id="filename" value="<?php echo $myrow['url']?>" class="biz-input-md">
  74. <a href="<?php echo $myrow['url']?>" target="_blank">[查看]</a>
  75. </td>
  76. </tr>
  77. <?php
  78. if ($myrow['mediatype']==1)
  79. {
  80. $fullfilename = $cfg_basedir.$myrow['url'];
  81. if (file_exists($fullfilename)){
  82. $info = "";
  83. $sizes = getimagesize($fullfilename,$info);
  84. if (is_array($sizes)){
  85. if ($sizes[0]>200) $w=200;
  86. else $w = $sizes[0];
  87. ?>
  88. <tr>
  89. <td class="biz-td">预览:</td>
  90. <td class="biz-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>
  91. </tr>
  92. <?php }}}?>
  93. <tr>
  94. <td class="biz-td">修改文件:</td>
  95. <td class="biz-td">
  96. <input name="upfile" type="file" id="upfile" class="biz-input-md">
  97. </td>
  98. </tr>
  99. <tr>
  100. <td colspan="2" align="center" class="py-2"><button type="submit" class="btn btn-success btn-sm">保存</button></td>
  101. </tr>
  102. </form>
  103. </table>
  104. </td>
  105. </tr>
  106. </table>
  107. </body>
  108. </html>