file.php 2.7 KB

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