123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <html>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <head>
- <title>Quick Send</title>
- <link rel="stylesheet" href="tocas.css">
- <script type="text/javascript" src="urlfix.js"></script>
- </head>
- <body>
- <?php
- if (isset($_GET['rx']) && $_GET['rx'] != ""){
- header("Location: display.php?id=" . $_GET['rx']);
- die();
- }
- ?>
- <div class="ts inverted heading fluid slate" style="background-color:#2c2835;color:white;">
- <span class="large header">Quick Send System</span>
- <span class="description">Send data between mobile and laptops.<br> Powered by IMUS Laboratory</span>
- <div class="ts bottom attached tabbed menu" style="color:white;">
- <a class="active item" href="index.php">Send</a>
- <a class="item" href="rx.php" style="color:#9d9ca3;">Receive</a>
- <a class="item" href="img.php" style="color:#9d9ca3;">Image</a>
- <a class="item" href="file.php" style="color:#9d9ca3;">Files</a>
- </div>
- </div>
- <div class="ts container">
- <br><br>
- <div class="ts stackable grid">
- <div class="four wide column" align="center">
- <div id="output"></div>
- <div class="ts small statistic">
- <div class="label">QuickSend ID</div>
- <div class="value" id="sid"><?php
- $max = 0;
- foreach (new DirectoryIterator('Memo/') as $fileInfo) {
- if ($fileInfo->isDot()) continue;
- $current = pathinfo($fileInfo->getFilename())['filename'];
- if (!is_numeric($current)) continue;
- if ($current > $max) $max = $current;
- }
- echo $max+1;
- ?></div>
- </div>
- </div>
- <div class="twelve wide column">
- <div class="ts fluid input" style="height:250px">
- <textarea id="textholder" placeholder="Text to be sent via QRcode."></textarea>
- </div><br><br>
- <div class="ts container" align="right">
- <button class="ts tiny basic button" onclick="senddata()">Generate QR-Code</button>
- </div>
- </div>
- </div>
- <div class="ts horizontal divider">Latest QuickSend code</div>
- <div class="ts stackable fluid horizontal list">
- <?php
- $max = 0;
- foreach (new DirectoryIterator('Memo/') as $fileInfo) {
- if ($fileInfo->isDot()) continue;
- $current = pathinfo($fileInfo->getFilename())['filename'];
- if (!is_numeric($current)) continue;
- if ($current > $max) $max = $current;
- }
- $number = 10;
- if ($max < 10){
- $number = $max;
- }
- for( $i = 0; $i <= $number; $i++){
- echo "<div class='ts label'><a class='item' onCLick='rx(" . ($max - $i) . ");'>QSCODE#" . ($max - $i) . "</a></div>";
- }
- ?>
- </div>
- <br><br><br><br><br><br>
- <div style="position: fixed;
- z-index: 100;
- bottom: 0;
- left: 0;
- width: 100%;
- background-color:#2c2835;
- color:white;">
- <div class="ts container">
- <img class="ts tiny right floated image" src="img/cube.png"></img>
- </div>
- <div align="left" class="ts container">
- <br>
- CopyRight IMUS Laboratory 2018, All right reserved.
- </div>
- </div>
- </div>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
- <script type="text/javascript" src="jquery.qrcode.min.js"></script>
- <script>
- jQuery(function(){
- jQuery('#output').qrcode("Hello World");
- })
- function senddata(){
- textarea = $('#textholder').val();
- $.ajax({
- type: "POST",
- url: "StickMemo.php",
- data:{ content: textarea },
- success: function(data){
- //alert(data);
- $("#output").empty();
- jQuery('#output').qrcode("http://imuslab.com/qs/display.php?id=" + data);
- $("#sid").html(data);
- }
- })
-
- }
- $(document).ready(function(){
-
- });
- function rx(id){
- top.location.href = "http://imuslab.com/qs/display.php?id=" + id;
- }
- </script>
- </body>
- </html>
|