国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

92 行
4.1KB

  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. <div class="container-fluid">
  16. <ol class="breadcrumb">
  17. <li class="breadcrumb-item"><a href="index_body.php">后台面板</a></li>
  18. <li class="breadcrumb-item"><a href="media_main.php">附件管理</a></li>
  19. <li class="breadcrumb-item active">修改附件</li>
  20. </ol>
  21. <div class="card shadow-sm">
  22. <div class="card-header">修改附件</div>
  23. <div class="card-body">
  24. <form name="form1" action="media_edit.php" method="post" enctype="multipart/form-data">
  25. <input type="hidden" name="dopost" value="save">
  26. <input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
  27. <input type="hidden" name="aid" value="<?php echo $aid?>">
  28. <div class="table-responsive">
  29. <table class="table table-borderless">
  30. <tbody>
  31. <tr>
  32. <td width="260">附件类型</td>
  33. <td>
  34. <label><input type="radio" name="mediatype" value="1" <?php if ($myrow['mediatype']==1) echo 'checked';?>> 图片</label>
  35. <label><input type="radio" name="mediatype" value="2" <?php if ($myrow['mediatype']==2) echo 'checked';?>> FLASH</label>
  36. <label><input type="radio" name="mediatype" value="3" <?php if ($myrow['mediatype']==3) echo 'checked';?>> 视频音频</label>
  37. <label><input type="radio" name="mediatype" value="4" <?php if ($myrow['mediatype']==4) echo 'checked';?>> 附件其它</label>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td>附件标题</td>
  42. <td><input type="text" name="title" id="title" value="<?php echo $myrow['title']?>" class="admin-input-lg" required></td>
  43. </tr>
  44. <tr>
  45. <td>附加参数</td>
  46. <td>
  47. <label>宽:<input type="text" name="mediawidth" id="mediawidth" value="<?php echo $myrow['width']?>" class="admin-input-sm" placeholder="附件像素宽度"></label>
  48. <label>高:<input type="text" name="mediaheight" id="mediaheight" value="<?php echo $myrow['height']?>" class="admin-input-sm" placeholder="附件像高宽度"></label>
  49. <label>播放时间:<input type="text" name="playtime" id="playtime" value="<?php echo $myrow['playtime']?>" class="admin-input-sm" placeholder="附件播放分钟"></label>
  50. </td>
  51. </tr>
  52. <tr>
  53. <td>源文件</td>
  54. <td>
  55. <input type="text" name="filename" id="filename" value="<?php echo $myrow['url']?>" class="admin-input-lg">
  56. <a href="<?php echo $myrow['url']?>" target="_blank" class="btn btn-success btn-sm">查看</a>
  57. </td>
  58. </tr>
  59. <?php
  60. if ($myrow['mediatype'] == 1) {
  61. $fullfilename = $cfg_basedir.$myrow['url'];
  62. if (file_exists($fullfilename)) {
  63. $info = '';
  64. $sizes = getimagesize($fullfilename,$info);
  65. if (is_array($sizes)) {
  66. if ($sizes[0]>200) $w=200;
  67. else $w = $sizes[0];
  68. ?>
  69. <tr>
  70. <td>预览</td>
  71. <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>
  72. </tr>
  73. <?php }}}?>
  74. <tr>
  75. <td>修改附件</td>
  76. <td><input type="file" name="upfile" id="upfile" class="admin-input-lg"></td>
  77. </tr>
  78. <tr>
  79. <td colspan="2" align="center">
  80. <button type="submit" class="btn btn-success btn-sm">保存</button>
  81. <button type="reset" class="btn btn-outline-success btn-sm">重置</button>
  82. </td>
  83. </tr>
  84. </tbody>
  85. </table>
  86. </div>
  87. </form>
  88. </div>
  89. </div>
  90. </div>
  91. </body>
  92. </html>