You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
4.1 KiB
149 lines
4.1 KiB
<!doctype html>
|
|
<html lang="en">
|
|
|
|
<!-- 主頁header -->
|
|
<?php
|
|
/*--- 處理session ----*/
|
|
include "include-session-security.php"; #確認session
|
|
|
|
include "include-header.php";
|
|
|
|
?>
|
|
<!-- * 主頁header -->
|
|
|
|
<body>
|
|
|
|
<!-- loader -->
|
|
<div id="loader">
|
|
<div class="spinner-border text-primary" role="status"></div>
|
|
</div>
|
|
<!-- * loader -->
|
|
|
|
<!-- App Header -->
|
|
<div class="appHeader bg-primary text-light">
|
|
<!--
|
|
<div class="left">
|
|
<a href="javascript:;" class="headerButton goBack">
|
|
<ion-icon name="chevron-back-outline"></ion-icon>
|
|
</a>
|
|
</div>
|
|
-->
|
|
<div class="pageTitle">目前所在經緯度</div>
|
|
<!--
|
|
<div class="right">
|
|
<a href="tel:+886 12345678901" class="headerButton">
|
|
<ion-icon name="call-outline"></ion-icon>
|
|
</a>
|
|
</div>
|
|
-->
|
|
</div>
|
|
<!-- * App Header -->
|
|
|
|
<!-- App Capsule -->
|
|
<div id="appCapsule">
|
|
|
|
<div class="section full mt-2">
|
|
<!-- <div class="section-title">請輸入帳號、密碼!</div> -->
|
|
<p id="msg"></p>
|
|
<div class="wide-block pt-2 pb-2">
|
|
|
|
<form action="app-browser_gpslocation-save1.php" method="post" enctype="multipart/form-data">
|
|
|
|
<!-- 以下是要傳遞的資料 -->
|
|
<input type="hidden" value="<?php echo $token; ?>" name="token" />
|
|
<!-- <input type="hidden" name="pid" value="pid12345" /> -->
|
|
<!-- <input type="hidden" name="source_flag" value="web" /> -->
|
|
<!-- 以上是要傳遞的資料 -->
|
|
|
|
<div class="section-title">緯度</div>
|
|
<div class="form-group boxed">
|
|
<div class="input-wrapper">
|
|
<input type="text" class="form-control" name="latitude-input" id="latitude-input" readonly >
|
|
<i class="clear-input">
|
|
<ion-icon name="close-circle"></ion-icon>
|
|
</i>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section-title">經度</div>
|
|
<div class="form-group boxed">
|
|
<div class="input-wrapper">
|
|
<input type="text" class="form-control" name="longitude-input" id="longitude-input" readonly >
|
|
<i class="clear-input">
|
|
<ion-icon name="close-circle"></ion-icon>
|
|
</i>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-1">
|
|
<button type="submit" class="btn btn-primary btn-lg btn-block">
|
|
上傳打卡
|
|
</button>
|
|
</div>
|
|
|
|
</form>
|
|
<?php
|
|
if(!empty($_GET['errno'])){
|
|
if($_GET['errno']==1){
|
|
echo "帳號或密碼錯誤";
|
|
}else if($_GET['errno']==2){
|
|
echo "請輸入帳號密碼";
|
|
}else if($_GET['errno']==3){
|
|
echo "非法訪問,請輸入帳號和密碼";
|
|
}else if($_GET['errno']==4){
|
|
echo "無使用權限";
|
|
}
|
|
}
|
|
?>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<!-- * App Capsule -->
|
|
|
|
<script>
|
|
var m = document.getElementById("msg");
|
|
var a = document.getElementById("latitude-input");
|
|
var b = document.getElementById("longitude-input");
|
|
|
|
if (navigator.geolocation) {//
|
|
navigator.geolocation.getCurrentPosition(showPosition);//有拿到位置就呼叫 showPosition 函式
|
|
} else {
|
|
m.innerHTML = "您的瀏覽器不支援 顯示地理位置 API ,請使用其它瀏覽器開啟 這個網址";
|
|
}
|
|
|
|
function showPosition(position) {
|
|
//m.innerHTML = " 緯度 (Latitude): " + position.coords.latitude +
|
|
//"<br>經度 (Longitude): " + position.coords.longitude;
|
|
a.value=position.coords.latitude;
|
|
b.value=position.coords.longitude;
|
|
}
|
|
</script>
|
|
|
|
|
|
|
|
<!-- 主頁頁尾 -->
|
|
<?php
|
|
include "include-footer.php";
|
|
mysqli_close($link); #代表結束連線
|
|
?>
|
|
<!-- * 主頁頁尾 -->
|
|
|
|
<!-- 主頁頁尾按鈕 -->
|
|
<?php
|
|
# include "include-bottom-menu.php";
|
|
?>
|
|
<!-- * 主頁頁尾按鈕 -->
|
|
|
|
<!-- ///////////// Js Files //////////////////// -->
|
|
<!-- Jquery -->
|
|
<?php
|
|
include "include-jsfiles.php";
|
|
?>
|
|
|
|
</body>
|
|
|
|
</html>
|