music.php 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE html>
  2. <html>
  3. <link rel="stylesheet" href="script/css/font-awesome.min.css">
  4. <link rel="stylesheet" href="script/tocas.min.css">
  5. <head>
  6. <script src="script/jquery.min.js"></script>
  7. <meta charset="UTF-8">
  8. <title>Meow</title>
  9. <!--Written by Rub-->
  10. <!-- Rewritten by TC@IMUS Lab in 2016 -->
  11. <script>
  12. $(document).ready(function(){
  13. if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
  14. //Mobile
  15. }else{
  16. //Viewing on PC
  17. }
  18. });
  19. </script>
  20. </head>
  21. <body>
  22. <script type="text/javascript">
  23. $(document).ready(function(){
  24. $("div").click(function(){
  25. if ($(this).attr('id') != null && $(this).attr('id')!= "headbar"){
  26. //alert($(this).attr('id'));
  27. $("#headbar").load("play.php?song=" + $(this).attr('id'));
  28. }
  29. });
  30. });
  31. </script>
  32. <div class="ts container">
  33. <br>
  34. <h1>IMUS Laboratory </h1><br>
  35. <h2>ArOZ Music Bank</h2>
  36. <div class="ts pointing secondary big menu">
  37. <a class="item" href="index.php">Index</a>
  38. <a class="active item" href="music.php">Music</a>
  39. <a class="item" href="video.php">Video</a>
  40. <a class="item" href="photo.php">Photo</a>
  41. <a class="item" href="upload/">Upload</a>
  42. <a class="item" href="upload/uploads/">Upload Dir</a>
  43. </div>
  44. <div id="headbar" class="ts segment">
  45. <p><br></p>
  46. <p>On this page,
  47. <br>you can loop one of your favourite music by clicking the "Play" button on the right.
  48. <br>You can also adjust the global volume by using the Vol+ and Vol- Buttons, or adjust local volume by player's volume button.
  49. <br>Design for single person and local network use ONLY.</p>
  50. <p></p>
  51. <div class="ts top left attached label">Information</div>
  52. </div>
  53. <div class="ts horizontal divider">Music Bank</div>
  54. <?php
  55. //Change this to your upload dir if you are not using ArOZ build in upload system
  56. $uploaddir = 'upload/uploads/music/';
  57. //List out all the files in the upload dir first.
  58. $files = scandir($uploaddir);
  59. $linenumber = 0;
  60. foreach($files as $file) {
  61. if(strpos($file,"inith") !== False){
  62. $filename = substr($file,0,strripos($file,"."));//mp4 acceptable playing method
  63. //$filename = str_replace(".mp3","",$file); //mp3 only method
  64. $filename = str_replace("inith","",$filename);
  65. $filename = hex2bin($filename);
  66. echo '<div class="ts text container">
  67. <div class="ts two column narrow container grid">
  68. <div align="left" class="column">
  69. <div class="ts text container">
  70. <i class="fa fa-music" style="font-size:18px"></i>&nbsp'.$filename.'
  71. </div>
  72. </div>
  73. <div align="right" class="column">
  74. <div class="ts buttons">
  75. <div id="'.$uploaddir.$file.'"class="ts mini basic button" href="#">Play</div>
  76. <a class="ts mini secondary basic button" href="'.$uploaddir.$file.'" download>Download</a>
  77. </div>
  78. </div>
  79. </div>
  80. </div>';
  81. }
  82. $linenumber += 1;
  83. }
  84. ?>
  85. <br>
  86. <p align="right"><img class="ts small image" src="logo.png""></p>
  87. </div>
  88. </body>
  89. </html>