|
|
@@ -0,0 +1,261 @@
|
|
|
+<?php
|
|
|
+include($_SERVER['DOCUMENT_ROOT'] . "/Authorization/script/php/permission/check_right.php");
|
|
|
+?>
|
|
|
+<!doctype html>
|
|
|
+<html class="fixed">
|
|
|
+
|
|
|
+<head>
|
|
|
+ <!-- Basic -->
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <title>首頁 | BIM資訊系統</title>
|
|
|
+ <meta name="keywords" content="HTML5 Admin Template" />
|
|
|
+ <meta name="description" content="JSOFT Admin - Responsive HTML5 Template">
|
|
|
+ <meta name="author" content="JSOFT.net">
|
|
|
+ <script src="./script/php/clearData.php"></script>
|
|
|
+ <!-- Mobile Metas -->
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
|
+
|
|
|
+ <!-- Web Fonts -->
|
|
|
+ <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css">
|
|
|
+ <!-- Vendor CSS -->
|
|
|
+ <link rel="stylesheet" href="/Common/assets/vendor/bootstrap/css/bootstrap.css" />
|
|
|
+ <link rel="stylesheet" href="/Common/assets/vendor/font-awesome/css/font-awesome.css" />
|
|
|
+ <link rel="stylesheet" href="/Common/assets/vendor/magnific-popup/magnific-popup.css" />
|
|
|
+ <link rel="stylesheet" href="/Common/assets/vendor/bootstrap-datepicker/css/datepicker3.css" />
|
|
|
+ <link rel="stylesheet" href="/Common/assets/vendor/pnotify/pnotify.custom.css" />
|
|
|
+ <!-- Specific Page Vendor CSS -->
|
|
|
+ <link rel="stylesheet" href="/Common/assets/vendor/jquery-ui/css/ui-lightness/jquery-ui-1.10.4.custom.css" />
|
|
|
+ <link rel="stylesheet" href="/Common/assets/vendor/bootstrap-multiselect/bootstrap-multiselect.css" />
|
|
|
+ <link rel="stylesheet" href="/Common/assets/vendor/morris/morris.css" />
|
|
|
+ <link rel="stylesheet" href="/Common/assets/vendor/bootstrap-fileupload/bootstrap-fileupload.min.css" />
|
|
|
+ <!-- Theme CSS -->
|
|
|
+ <link rel="stylesheet" href="/Common/assets/stylesheets/theme.css" />
|
|
|
+ <!-- Skin CSS -->
|
|
|
+ <link rel="stylesheet" href="/Common/assets/stylesheets/skins/default.css" />
|
|
|
+ <!-- Theme Custom CSS -->
|
|
|
+ <link rel="stylesheet" href="/Common/assets/stylesheets/theme-custom.css">
|
|
|
+ <!-- Head Libs -->
|
|
|
+ <script src="/Common/assets/vendor/modernizr/modernizr.js"></script>
|
|
|
+ <!-- chart.js -->
|
|
|
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
|
+ <!-- DataTable -->
|
|
|
+ <script src="/Common/assets/vendor/jquery/jquery.js"></script>
|
|
|
+ <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.25/css/jquery.dataTables.css">
|
|
|
+ <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.js"></script>
|
|
|
+ <!-- Icon -->
|
|
|
+ <link rel="shortcut icon" href="/Common/assets/images/favicon.ico" />
|
|
|
+
|
|
|
+ <!-- vue3 -->
|
|
|
+ <script src="https://unpkg.com/vue@next"></script>
|
|
|
+ <script src="./script/js/global.js"></script>
|
|
|
+ <script src="/Common/script/js/user-image.js"></script>
|
|
|
+ <script type="application/javascript">
|
|
|
+ var userName = "<?php echo $_SESSION['name'] ?>";
|
|
|
+ var role = "<?php echo ($groupName); ?>";
|
|
|
+ var right = <?php echo ($right); ?>;
|
|
|
+ var pageHeader = '監測資料上傳工具';
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+
|
|
|
+<body>
|
|
|
+ <section class="body">
|
|
|
+ <!-- start: header -->
|
|
|
+ <header-menu></header-menu>
|
|
|
+ <!-- end: header -->
|
|
|
+ <div class="inner-wrapper">
|
|
|
+ <!-- start: sidebar -->
|
|
|
+ <side-bar></side-bar>
|
|
|
+ <!-- end: sidebar -->
|
|
|
+ <section role="main" class="content-body">
|
|
|
+ <header class="page-header">
|
|
|
+ <h2>{{pageHeader}}</h2>
|
|
|
+ </header>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-6 col-md-offset-3">
|
|
|
+ <section class="panel panel-featured-left panel-featured-primary">
|
|
|
+ <div class="panel-body">
|
|
|
+ <div id="upload" class="tab-pane active">
|
|
|
+ <form id="delete" method="post" enctype="multipart/form-data" action="./script/php/delete_data.php">
|
|
|
+
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-md-3 control-label" for="projectName">計畫名稱 </label>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <select class="form-control mb-md" name="projectName" id="projectName" required="required">
|
|
|
+ <option class="c3" value="c3">南港台壽C3專案管理</option>
|
|
|
+ <option class="r03" value="r03">信義線東延段</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-md-3 control-label" for="constructionName">工地模型 </label>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <select class="form-control mb-md" name="constructionName" id="constructionName" required="required">
|
|
|
+ <option class="c3" value="c3">C3</option>
|
|
|
+ <option class="r03" value="r03" style="display: none;">R03</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group" style="border-bottom: 0px;">
|
|
|
+ <label class="col-md-3 control-label">刪除日期</label>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <div class="input-group">
|
|
|
+ <span class="input-group-addon">
|
|
|
+ <i class="fa fa-calendar"></i>
|
|
|
+ </span>
|
|
|
+ <input id="delete-date" name="delete-date" type="text" data-plugin-datepicker class="form-control date" data-plugin-datepicker data-date-format="yyyy/mm/dd">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <br>
|
|
|
+ <footer class="panel-footer">
|
|
|
+ <a class="mb-xs mt-xs mr-xs modal-basic btn btn-primary" href="#modalPrimary">刪除當天所有資料</a>
|
|
|
+ <button id="reset" type="reset" class="btn btn-default">清除表單</button>
|
|
|
+ </footer>
|
|
|
+
|
|
|
+ <div id="modalPrimary" class="modal-block modal-block-primary mfp-hide">
|
|
|
+ <section class="panel">
|
|
|
+ <header class="panel-heading">
|
|
|
+ <h2 class="panel-title">你確定?</h2>
|
|
|
+ </header>
|
|
|
+ <div class="panel-body">
|
|
|
+ <div class="modal-wrapper">
|
|
|
+ <div class="modal-icon">
|
|
|
+ <i class="fa fa-question-circle"></i>
|
|
|
+ </div>
|
|
|
+ <div class="modal-text">
|
|
|
+ <h4>提示</h4>
|
|
|
+ <p>你確定你要刪除</p><p id="modal-date"></p><p> 所有的資料嗎?</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <footer class="panel-footer">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-12 text-right">
|
|
|
+ <button type="submit" id="submit" class="btn btn-primary modal-confirm">確定</button>
|
|
|
+ <button class="btn btn-default modal-dismiss">Cancel</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </footer>
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+
|
|
|
+ <!-- Main-->
|
|
|
+ <script src="script/js/home.js"></script>
|
|
|
+ <script>
|
|
|
+ var sites;
|
|
|
+ vm.mount('.body');
|
|
|
+ addUserImage(userName.charAt(0), role);
|
|
|
+ GetCheckAllAJAXValue()
|
|
|
+
|
|
|
+ $(document).ready(function() {
|
|
|
+ var url_href = window.location.href;
|
|
|
+ var url = new URL(url_href);
|
|
|
+ var status = url.searchParams.get("status");
|
|
|
+ if (status != null) {
|
|
|
+ alert(status);
|
|
|
+ window.location.href = "./delete.php"
|
|
|
+ }
|
|
|
+
|
|
|
+ getSites();
|
|
|
+ $("#projectName").on("change", function() {
|
|
|
+ let id = $(this).val();
|
|
|
+ $("#constructionName").empty();
|
|
|
+ for (i = 0; i < sites[id]["ModelID"].length; i++) {
|
|
|
+ $("#constructionName").append(`<option value="2">${sites[id]["ModelID"][i]}</option>`);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ $("#submit").click(function() {
|
|
|
+ $("#delete").submit();
|
|
|
+ });
|
|
|
+ $("#delete-date").on("change",function() {
|
|
|
+ $("#modal-date").text($(this).val());
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
+ function getSites() {
|
|
|
+ $.ajax({
|
|
|
+ url: '/BIM-Monitor/script/php/get_sites.php',
|
|
|
+ type: "GET",
|
|
|
+ dataType: "JSON"
|
|
|
+ }).success(function(result) {
|
|
|
+ sites = result;
|
|
|
+ let defaultID;
|
|
|
+ let isDefault = true;
|
|
|
+ $("#projectName").empty();
|
|
|
+ $("#constructionName").empty();
|
|
|
+ Object.keys(sites).forEach(element => {
|
|
|
+ $("#projectName").append(`<option value="${element}">${sites[element]["SiteName"]}</option>`);
|
|
|
+ if (isDefault) {
|
|
|
+ defaultID = element;
|
|
|
+ isDefault = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ for (i = 0; i < sites[defaultID]["ModelID"].length; i++) {
|
|
|
+ $("#constructionName").append(`<option value="2">${sites[defaultID]["ModelID"][i]}</option>`);
|
|
|
+ }
|
|
|
+
|
|
|
+ }).error(function(error) {
|
|
|
+ console.log(error);
|
|
|
+ }).complete(function(e) {
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+
|
|
|
+ <!-- Vendor -->
|
|
|
+ <script src="/Common/assets/vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/bootstrap/js/bootstrap.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/nanoscroller/nanoscroller.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/magnific-popup/magnific-popup.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/jquery-placeholder/jquery.placeholder.js"></script>
|
|
|
+ <!-- Specific Page Vendor -->
|
|
|
+ <script src="/Common/assets/vendor/jquery-ui/js/jquery-ui-1.10.4.custom.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/jquery-appear/jquery.appear.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/bootstrap-multiselect/bootstrap-multiselect.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/jquery-easypiechart/jquery.easypiechart.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/flot/jquery.flot.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/flot-tooltip/jquery.flot.tooltip.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/flot/jquery.flot.pie.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/flot/jquery.flot.categories.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/flot/jquery.flot.resize.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/jquery-sparkline/jquery.sparkline.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/raphael/raphael.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/morris/morris.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/gauge/gauge.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/snap-svg/snap.svg.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/liquid-meter/liquid.meter.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/jqvmap/jquery.vmap.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/jqvmap/data/jquery.vmap.sampledata.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/bootstrap-fileupload/bootstrap-fileupload.min.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/jquery-autosize/jquery.autosize.js"></script>
|
|
|
+ <script src="/Common/assets/vendor/pnotify/pnotify.custom.js"></script>
|
|
|
+ <!-- Theme Base, Components and Settings -->
|
|
|
+ <script src="assets/javascripts/theme.js"></script>
|
|
|
+ <!-- Theme Custom -->
|
|
|
+ <script src="assets/javascripts/theme.custom.js"></script>
|
|
|
+ <!-- Theme Initialization Files -->
|
|
|
+ <script src="assets/javascripts/theme.init.js"></script>
|
|
|
+ <!-- Examples -->
|
|
|
+ <script src="assets/javascripts/ui-elements/examples.modals.js"></script>
|
|
|
+ <script src="script/js/notifications.js"></script>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- <script src='script/js/warning.js'></script> -->
|
|
|
+
|
|
|
+ </section>
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|