file.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <html>
  2. <meta name="viewport" content="width=device-width, initial-scale=1">
  3. <head>
  4. <title>Quick Send</title>
  5. <link rel="stylesheet" href="tocas.css">
  6. <script type="text/javascript" src="urlfix.js"></script>
  7. </head>
  8. <body>
  9. <?php
  10. if (isset($_GET['rx']) && $_GET['rx'] != ""){
  11. header("Location: display.php?id=" . $_GET['rx']);
  12. die();
  13. }
  14. ?>
  15. <div class="ts inverted heading fluid slate" style="background-color:#2c2835;color:white;">
  16. <span class="large header">Quick Send System</span>
  17. <span class="description">Send data between mobile and laptops.<br> Powered by IMUS Laboratory</span>
  18. <div class="ts bottom attached tabbed menu" style="color:white;">
  19. <a class="item" href="index.php" style="color:#9d9ca3;">Send</a>
  20. <a class="item" href="rx.php" style="color:#9d9ca3;">Receive</a>
  21. <a class="item" href="img.php" style="color:#9d9ca3;">Image</a>
  22. <a class="active item" href="file.php">Files</a>
  23. </div>
  24. </div>
  25. <div class="ts container">
  26. <br><br>
  27. <div class="ts stackable grid">
  28. <div class="four wide column" align="center">
  29. <div id="output"></div>
  30. <div class="ts small statistic">
  31. <div class="label">QuickSend ID</div>
  32. <div class="value" id="sid"><?php
  33. $max = 0;
  34. foreach (new DirectoryIterator('Memo/') as $fileInfo) {
  35. if ($fileInfo->isDot()) continue;
  36. $current = pathinfo($fileInfo->getFilename())['filename'];
  37. if (!is_numeric($current)) continue;
  38. if ($current > $max) $max = $current;
  39. }
  40. echo $max+1;
  41. ?></div>
  42. </div>
  43. </div>
  44. <div class="twelve wide column">
  45. <form action="upload.php" method="post" enctype="multipart/form-data">
  46. <input class="ts basic fluid button" type="file" name="fileToUpload" id="fileToUpload"><br><br>
  47. <input class="ts basic fluid button" type="submit" value="Generate QR-Code" name="submit">
  48. </form>
  49. <br>
  50. </div>
  51. </div>
  52. <br><br><br><br><br><br>
  53. <div style="position: fixed;
  54. z-index: 100;
  55. bottom: 0;
  56. left: 0;
  57. width: 100%;
  58. background-color:#2c2835;
  59. color:white;">
  60. <div class="ts container">
  61. <img class="ts tiny right floated image" src="img/cube.png"></img>
  62. </div>
  63. <div align="left" class="ts container">
  64. <br>
  65. CopyRight IMUS Laboratory 2018, All right reserved.
  66. </div>
  67. </div>
  68. </div>
  69. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
  70. <script type="text/javascript" src="jquery.qrcode.min.js"></script>
  71. <script>
  72. jQuery(function(){
  73. jQuery('#output').qrcode("Hello World");
  74. })
  75. function senddata(){
  76. textarea = $('#textholder').val();
  77. $.ajax({
  78. type: "POST",
  79. url: "StickMemo.php",
  80. data:{ content: textarea },
  81. success: function(data){
  82. //alert(data);
  83. $("#output").empty();
  84. jQuery('#output').qrcode("http://imuslab.com/qs/display.php?id=" + data);
  85. $("#sid").html(data);
  86. }
  87. })
  88. }
  89. </script>
  90. </body>
  91. </html>