Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
ltms.eemo.co.kr
/
public_html
/
super
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/ltms.eemo.co.kr/public_html/super/iotsetting.php
<?php include_once("inc_header.php"); $mac = $_REQUEST['mac']; $query = "SELECT `no` , temp, humi, mac , ip , regdate FROM tmp_nodemcu WHERE 1 AND mac LIKE '%$mac%' ORDER BY `no` DESC LIMIT 10"; $sql = mysql_query($query) or die(mysql_error()); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <META HTTP-EQUIV="refresh" CONTENT="<?=600?>; URL=notice.php?cntFeed=<?=$cntFeed?>"> <title><?=$_TITLE?></title> <link href="css/bootstrap.min.css" rel="stylesheet"> </head> <body> <div class="row"> <div class="col-12"> <label for="inf-ddns">ddns 입력</label> <input type="text" id="inf-ddns" class="text-center w-100" value="<?php echo $mac?>" placeholder="ddns 입력"> <!-- <button onclick="searchIotSensor();" >찾기</button> --> <table class="table table-striped table-inverse table-responsive"> <thead class="thead-inverse"> <tr> <th>순번</th> <th>온도</th> <th>습도</th> <th>MAC</th> <th>IP</th> <th>전송시간</th> </tr> </thead> <tbody id="datas"> <?php while ($res = mysql_fetch_object($sql)) { ?> <tr> <td scope="row"><?php echo $res->no ?></td> <td><?php echo $res->temp ?></td> <td><?php echo $res->humi ?></td> <td><?php echo $res->mac ?></td> <td><?php echo $res->ip ?></td> <td><?php echo $res->regdate ?></td> </tr> <?php }?> </tbody> </table> </div> </body> <script src="/super/js/jquery-3.1.1.min.js"></script> <script> var ddns = $('#inf-ddns').val(); var datas = $('#datas'); var contents = ""; setTimeout(() => { var ddns = $('#inf-ddns').val(); location.href="iotsetting.php?mac="+ddns }, 5000); function dataIot() { $.ajax({ url: "iotsetting_do.php", data: {mac:ddns}, type: "GET", dataType: "json" }).done(function(json) { contents =""; datas.html(""); json.forEach(element => { contents +=` <tr> <td scope="row">${element.no}</td> <td>${element.temp}</td> <td>${element.humi}</td> <td>${element.mac}</td> <td>${element.ip}</td> <td>${element.regdate}</td> </tr> `; }); datas.html(contents); clearTimeout(timeout); }); } </script>