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

85 lines
3.6KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
  6. <title>修改附件</title>
  7. <link rel="stylesheet" href="/static/web/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="/static/web/js/admin.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 class="table shadow-sm my-3">
  20. <tr>
  21. <td colspan="2">修改附件</td>
  22. </tr>
  23. <tr>
  24. <td width="260">附件类型:</td>
  25. <td>
  26. <label><input type="radio" name="mediatype" value="1" <?php if ($myrow['mediatype']==1) echo 'checked';?>> 图片</label>
  27. <label><input type="radio" name="mediatype" value="2" <?php if ($myrow['mediatype']==2) echo 'checked';?>> FLASH</label>
  28. <label><input type="radio" name="mediatype" value="3" <?php if ($myrow['mediatype']==3) echo 'checked';?>> 视频音频</label>
  29. <label><input type="radio" name="mediatype" value="4" <?php if ($myrow['mediatype']==4) echo 'checked';?>> 附件其它</label>
  30. </td>
  31. </tr>
  32. <tr>
  33. <td>附件标题:</td>
  34. <td><input type="text" name="title" id="title" value="<?php echo $myrow['title']?>" class="admin-input-lg"></td>
  35. </tr>
  36. <tr>
  37. <td>附加参数:</td>
  38. <td>
  39. <label>宽:<input type="text" name="mediawidth" id="mediawidth" value="<?php echo $myrow['width']?>" class="admin-input-sm" placeholder="附件像素宽度"></label>
  40. <label>高:<input type="text" name="mediaheight" id="mediaheight" value="<?php echo $myrow['height']?>" class="admin-input-sm" placeholder="附件像高宽度"></label>
  41. <label>播放时间:<input type="text" name="playtime" id="playtime" value="<?php echo $myrow['playtime']?>" class="admin-input-sm" placeholder="附件播放分钟"></label>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td>源文件:</td>
  46. <td>
  47. <input type="text" name="filename" id="filename" value="<?php echo $myrow['url']?>" class="admin-input-lg">
  48. <a href="<?php echo $myrow['url']?>" target="_blank" class="btn btn-success btn-sm">查看</a>
  49. </td>
  50. </tr>
  51. <?php
  52. if ($myrow['mediatype'] == 1) {
  53. $fullfilename = $cfg_basedir.$myrow['url'];
  54. if (file_exists($fullfilename)) {
  55. $info = '';
  56. $sizes = getimagesize($fullfilename,$info);
  57. if (is_array($sizes)) {
  58. if ($sizes[0]>200) $w=200;
  59. else $w = $sizes[0];
  60. ?>
  61. <tr>
  62. <td>预览:</td>
  63. <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>
  64. </tr>
  65. <?php }}}?>
  66. <tr>
  67. <td>修改附件:</td>
  68. <td><input type="file" name="upfile" id="upfile" class="admin-input-lg"></td>
  69. </tr>
  70. <tr>
  71. <td colspan="2" align="center"><button type="submit" class="btn btn-success btn-sm">保存</button></td>
  72. </tr>
  73. </table>
  74. </form>
  75. <script>
  76. function CheckSubmit() {
  77. if (document.form1.title.value == "") {
  78. ShowMsg("附件标题不能为空");
  79. document.form1.title.focus();
  80. return false;
  81. }
  82. }
  83. </script>
  84. </body>
  85. </html>