manto07m пре 3 година
родитељ
комит
bceb215f9d
5 измењених фајлова са 1966 додато и 1 уклоњено
  1. 276 0
      R03/Index.php
  2. 409 0
      R03/IndexOLD.php
  3. 1 0
      script/js/c3.js
  4. 1279 0
      script/js/r03.js
  5. 1 1
      script/js/unity-loader.js

+ 276 - 0
R03/Index.php

@@ -0,0 +1,276 @@
+<?php
+include($_SERVER['DOCUMENT_ROOT'] . "/Authorization/script/php/permission/check_right.php");
+?>
+<!doctype html>
+<html class="fixed">
+
+<head>
+	<!-- Basic -->
+	<meta charset="UTF-8">
+	<title>儀表板 | R03監測儀器</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="/BIM-Monitor/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" />
+	<!-- Unity CSS -->
+	<link rel="stylesheet" href="/BIM-Monitor/C3/C3Dev/TemplateData/style.css">
+	<!-- 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="/BIM-Monitor/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 = 'R03儀表板';
+		var test;
+	</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">
+						<section class="panel">
+							<header class="panel-heading">
+								<div class="panel-actions">
+									<label id="displayCompareChart" style="display:block"><input type="checkbox" id="compareCheck" onclick="CheckCompare()">顯示全部比較</label>
+									<a style="display:none" href="#" class="fa fa-caret-down"></a>
+									<a style="display:none" href="#" class="fa fa-times"></a>
+								</div>
+								<h2 id="tableName" class="panel-title">資料表</h2>
+							</header>
+							<div class="tabs tabs-bottom tabs-primary">
+								<div class="panel-body">
+									<div class="tab-content">
+										<div id="popular" class="chart chart-unity tab-pane active">
+											<canvas id="myChart" height="100%"></canvas>
+										</div>
+										<div id="recent" class="tab-pane">
+											<div id="tabData">
+												<table id="dataTable" class="display"></table>
+											</div>
+										</div>
+									</div>
+									<ul class="nav nav-tabs nav-justified">
+										<li class="active"> <a href="#popular" data-toggle="tab" class="text-center"><i class="fa fa-bar-chart-o"></i> 折線圖</a> </li>
+										<li> <a href="#recent" data-toggle="tab" class="text-center"><i class="fa fa-table"></i>資料表</a> </li>
+									</ul>
+								</div>
+							</div>
+						</section>
+					</div>
+					<div class="col-md-6">
+						<section class="panel">
+							<header class="panel-heading">
+								<div class="panel-actions">
+									<a style="display:none" href="#" class="fa fa-caret-down"></a>
+									<a style="display:none" href="#" class="fa fa-times"></a>
+								</div>
+								<h2 class="panel-title">R03觀測模型</h2>
+								<div class="panel-subtitle">
+									<button id='monitorName' type="button" class="mb-xs mt-xs mr-xs btn btn-info" data-toggle="tooltip" data-placement="top" title="顯示目前監測儀器類別">OW監測儀器</button>
+									<button type="button" class="mb-xs mt-xs mr-xs btn btn-default" onclick="ResetCamera()">重置鏡頭</button>
+
+									<div class="btn-group" style="display:none">
+										<button type="button" class="mb-xs mt-xs mr-xs btn btn-default dropdown-toggle" data-toggle="dropdown">選擇觀測儀器 <span class="caret"></span></button>
+										<ul id="monitorSelect" class="dropdown-menu" role="menu"> </ul>
+									</div>
+
+									<a id="monitorSelect2" class="mb-xs mt-xs mr-xs modal-basic modal-with-zoom-anim btn btn-primary" href="#modalHeaderColorPrimary" data-toggle="tooltip" data-placement="top" title="選擇觀測儀器">選擇觀測儀器</a>
+
+									<div id="modalHeaderColorPrimary" class="zoom-anim-dialog modal-block modal-header-color modal-block-primary mfp-hide">
+										<section class="panel">
+											<header class="panel-heading">
+												<h2 class="panel-title">請選擇觀測儀器</h2>
+												<label style="color: #FFF"><input type="checkbox" id="errorCheck" onclick="CheckError()">僅顯示錯誤儀器</label>
+											</header>
+											<div class="panel-body">
+												<div class="modal-wrapper">
+													<div class="modal-icon"> <i class="fa fa-desktop"></i> </div>
+													<div id="monitorButton" class="modal-text">綠色為正常|紅色為異常</div>
+												</div>
+											</div>
+											<footer class="panel-footer">
+												<div class="row">
+													<div class="col-md-12 text-right">
+														<button class="btn btn-default modal-dismiss">取消</button>
+													</div>
+												</div>
+											</footer>
+										</section>
+									</div>
+
+									<div id="selectPhase" class="btn-group">
+										<select id="phase" class="mb-xs mt-xs mr-xs btn btn-default dropdown-toggle" onChange="LoadPage();">
+											<option value="2">選擇開挖階段</option>
+											<option value="2">第二挖至7.12m</option>
+											<option value="3">第三挖至11.62m</option>
+											<option value="4">第四挖至15.02m</option>
+											<option value="5">第五挖至18.42m</option>
+											<option value="6">第六挖至23.32m</option>
+											<option value="7">末段扶壁敲除</option>
+										</select>
+									</div>
+
+
+
+								</div>
+							</header>
+
+							<div class="panel-body">
+								<div class="chart chart-unity">
+									<div id="unity-container" class="unity-desktop">
+										<div id="unity-loading-bar"> <img src="/Common/assets/images/loading-logo.gif" height="100%" />
+											<div class="progress-striped m-md">
+												<div id="unity-progress-bar-full" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"> 0% </div>
+											</div>
+										</div>
+										<canvas id="unity-canvas"></canvas>
+										<div id="unity-warning"> </div>
+									</div>
+								</div>
+							</div>
+
+						</section>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-md-3">
+						<section class="panel panel-featured-left panel-featured-primary">
+							<div class="panel-body">
+								<div class="widget-summary widget-summary-md">
+									<div class="widget-summary-col widget-summary-col-icon">
+										<div class="summary-icon bg-primary" id="sparklinePie"> </div>
+									</div>
+									<div class="widget-summary-col">
+										<div class="summary">
+											<h2 class="panel-title">異常比例</h2>
+											<div class="info"> <strong id="percent" class="amount"></strong> </div>
+										</div>
+									</div>
+								</div>
+							</div>
+						</section>
+					</div>
+					<div class="col-md-3">
+						<section class="panel panel-featured-left panel-featured-primary">
+							<div class="panel-body">
+								<div class="widget-summary widget-summary-md">
+									<div class="widget-summary-col widget-summary-col-icon">
+										<div class="summary-icon bg-primary"> <i class="fa fa-database"></i> </div>
+									</div>
+									<div class="widget-summary-col">
+										<div class="summary">
+											<h2 class="panel-title">資料庫最後更新時間</h2>
+											<div class="info"> <strong class="amount"><?php include($_SERVER['DOCUMENT_ROOT'] . '/BIM-Monitor/script/php/dbUpdateTime.php'); ?></strong> </div>
+										</div>
+									</div>
+								</div>
+							</div>
+						</section>
+					</div>
+				</div>
+			</section>
+		</div>
+		<!-- Main-->
+		
+		<script src="/BIM-Monitor/script/js/r03.js"></script>
+		
+		<script>
+			vm.mount('.body');
+			addUserImage(userName.charAt(0), role);
+			
+		</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="/BIM-Monitor/assets/javascripts/theme.js"></script>
+		<!-- Theme Custom -->
+		<script src="/BIM-Monitor/assets/javascripts/theme.custom.js"></script>
+		<!-- Theme Initialization Files -->
+		<script src="/BIM-Monitor/assets/javascripts/theme.init.js"></script>
+		<!-- Examples -->
+		<script src="/BIM-Monitor/assets/javascripts/ui-elements/examples.modals.js"></script>
+
+		<!-- <script src='/BIM-Monitor/script/js/warning.js'></script> -->
+		<!-- Unity loader -->
+		<script src="/BIM-Monitor/script/js/unity-loader.js"></script>
+		
+
+	</section>
+</body>
+
+</html>

+ 409 - 0
R03/IndexOLD.php

@@ -0,0 +1,409 @@
+<?php
+include($_SERVER['DOCUMENT_ROOT'] . "/Authorization/script/php/permission/check_right.php");
+?>
+<!doctype html>
+<html class="fixed">
+
+<head>
+	<!-- Basic -->
+	<meta charset="UTF-8">
+	<title>儀表板 | C3監測儀器</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="/BIM-Monitor/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" />
+	<!-- Unity CSS -->
+	<link rel="stylesheet" href="/BIM-Monitor/C3/C3Dev/TemplateData/style.css">
+	<!-- 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" />
+</head>
+
+<body>
+	<section class="body">
+		<!-- start: header -->
+		<header class="header">
+			<div class="logo-container">
+				<div class="banner-txt">BIM監測查詢網</div>
+				<div class="visible-xs toggle-sidebar-left" data-toggle-class="sidebar-left-opened" data-target="html" data-fire-event="sidebar-left-opened">
+					<i class="fa fa-bars" aria-label="Toggle sidebar"></i>
+				</div>
+			</div>
+			<!-- start: search & user box -->
+			<div class="header-right">
+				<span class="separator"></span>
+				<ul class="notifications">
+					<li>
+						<a href="#" class="dropdown-toggle notification-icon" data-toggle="dropdown">
+							<i class="fa fa-bell"></i>
+							<span id="warning-count" class="badge">0</span>
+						</a>
+						<div class="dropdown-menu notification-menu">
+							<div class="notification-title">
+								<span id="warning-count2" class="pull-right label label-default">0</span>
+								警告
+							</div>
+							<div class="content">
+								<ul>
+									<li id="warning-style" style="display: none;">
+										<a href="warning.php" class="clearfix">
+											<div class="image">
+												<i class="fa fa-warning bg-danger"></i>
+											</div>
+											<span class="title">人員進入危險區域</span>
+											<span class="message">現在</span>
+										</a>
+									</li>
+									<div id="warning-none">No warning</div>
+								</ul>
+							</div>
+						</div>
+					</li>
+					<li><a href="/Front-Page/home.php" class="notification-icon" data-toggle="tooltip" title="" data-placement="bottom" data-original-title="綜合登入入口"><i class="fa fa-home"></i></a></li>
+				</ul>
+				<span class="separator"></span>
+				<div id="userbox" class="userbox">
+					<a href="#" data-toggle="dropdown">
+						<figure class="profile-picture"> <img src="/Common/assets/images/!logged-user.jpg" alt="Joseph Doe" class="img-circle" data-lock-picture="/Common/assets/images/!logged-user.jpg" /> </figure>
+						<div class="profile-info" data-lock-name="John Doe" data-lock-email="johndoe@JSOFT.com"> <span class="name"><?php echo $_SESSION['name'] ?></span> <span class="role">administrator</span> </div> <i class="fa custom-caret"></i>
+					</a>
+					<div class="dropdown-menu">
+						<ul class="list-unstyled">
+							<li class="divider"></li>
+							<li> <a role="menuitem" tabindex="-1" href="/Common//BIM-Monitor/script/php/Logout.php"><i class="fa fa-power-off"></i> Logout</a> </li>
+						</ul>
+					</div>
+				</div>
+			</div>
+			<!-- end: search & user box -->
+		</header>
+		<!-- end: header -->
+		<div class="inner-wrapper">
+			<!-- start: sidebar -->
+			<aside id="sidebar-left" class="sidebar-left">
+				<div class="sidebar-header">
+					<div class="sidebar-title"> 導覽 </div>
+					<div class="sidebar-toggle hidden-xs" data-toggle-class="sidebar-left-collapsed" data-target="html" data-fire-event="sidebar-left-toggle"> <i class="fa fa-bars" aria-label="Toggle sidebar"></i> </div>
+				</div>
+				<div class="nano">
+					<div class="nano-content">
+						<nav id="menu" class="nav-main" role="navigation">
+							<ul class="nav nav-main">
+								<li>
+									<a href="../home.php"> <i class="fa fa-home" aria-hidden="true"></i> <span>首頁</span> </a>
+								</li>
+
+								<li class="nav-parent nav-active nav-expanded">
+									<a>
+										<i class="fa fa-desktop" aria-hidden="true"></i>
+										<span>BIM監測查詢網</span>
+									</a>
+									<ul class="nav nav-children">
+										<li>
+											<a href="#modalForm" class="modal-with-form"> <i class="fa fa-upload" aria-hidden="true"></i> <span>上傳CSV</span> </a>
+											<!-- Modal Form -->
+											<div id="modalForm" 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">
+														<form id="CSVform" class="form-horizontal mb-lg" action="/BIM-Monitor/script/php/upload.php" method="post" enctype="multipart/form-data">
+															<div class="form-group">
+																<label class="col-md-3 control-label">檔案上傳</label>
+																<div class="col-md-6">
+																	<div class="fileupload fileupload-new" data-provides="fileupload">
+																		<div class="input-append">
+																			<div class="uneditable-input"> <i class="fa fa-file fileupload-exists"></i> <span class="fileupload-preview"></span> </div> <span class="btn btn-default btn-file">
+																				<span class="fileupload-exists">變更檔案</span> <span class="fileupload-new">選擇檔案</span>
+																				<input type="file" name="fileToUpload" id="fileToUpload" /> </span> <a href="#" class="btn btn-default fileupload-exists" data-dismiss="fileupload">移除檔案</a>
+																		</div>
+																	</div>
+																</div>
+															</div>
+														</form>
+													</div>
+													<footer class="panel-footer">
+														<div class="row">
+															<div class="col-md-12 text-right">
+																<button class="btn btn-primary modal-confirm" onclick="uploadCSV()">Submit</button>
+																<button class="btn btn-default modal-dismiss">Cancel</button>
+															</div>
+														</div>
+													</footer>
+												</section>
+											</div>
+										</li>
+										<li class="nav-parent nav-active nav-expanded">
+											<a>
+												<span>C3工地監測儀器</span>
+											</a>
+											<ul class="nav nav-children">
+												<li> <a href="#" onclick="switchMonitor('ELP')">
+														水壓計<span id="ELP" class="pull-right" data-toggle="tooltip" data-placement="right" title="(異常儀器數量/所有儀器數量)">0</span>
+													</a> </li>
+												<li><a href="#" onclick="switchMonitor('OW')">
+														水位觀測井<span id="OW" class="pull-right" data-toggle="tooltip" data-placement="right" title="(異常儀器數量/所有儀器數量)">0</span>
+													</a> </li>
+												<li><a href="#" onclick="switchMonitor('TI')">
+														建物傾斜計<span id="TI" class="pull-right" data-toggle="tooltip" data-placement="right" title="(異常儀器數量/所有儀器數量)">0</span>
+													</a> </li>
+												<li><a href="#" onclick="switchMonitor('RS')">
+														鋼筋應力計<span id="RS" class="pull-right" data-toggle="tooltip" data-placement="right" title="(異常儀器數量/所有儀器數量)">0</span>
+													</a> </li>
+												<li><a href="#" onclick="switchMonitor('SM')">
+														地表沉陷觀測釘<span id="SM" class="pull-right" data-toggle="tooltip" data-placement="right" title="(異常儀器數量/所有儀器數量)">0</span>
+													</a> </li>
+												<li><a href="#" onclick="switchMonitor('SB')">
+														建物沉陷點<span id="SB" class="pull-right" data-toggle="tooltip" data-placement="right" title="(異常儀器數量/所有儀器數量)">0</span>
+													</a> </li>
+												<li><a href="#" onclick="switchMonitor('SBM')">
+														墩柱水平位移點<span id="SBM" class="pull-right" data-toggle="tooltip" data-placement="right" title="(異常儀器數量/所有儀器數量)">0</span>
+													</a> </li>
+												<li><a href="#" onclick="switchMonitor('HM')">
+														逆打鋼柱沉陷隆起點<span id="HM" class="pull-right" data-toggle="tooltip" data-placement="right" title="(異常儀器數量/所有儀器數量)">0</span>
+													</a> </li>
+												<li><a href="#" onclick="switchMonitor('VG')">
+														支撐應變計<span id="VG" class="pull-right" data-toggle="tooltip" data-placement="right" title="(異常儀器數量/所有儀器數量)">0</span>
+													</a> </li>
+												<li><a href="#" onclick="switchMonitor('SIS')">
+														傾度管(壁外)<span id="SIS" class="pull-right" data-toggle="tooltip" data-placement="right" title="(異常儀器數量/所有儀器數量)">
+															<!--(<font color='#FF0000'>0</font>/7)-->0
+														</span>
+													</a> </li>
+												<li><a href="#" onclick="switchMonitor('SID')">
+														傾度管(壁中)<span id="SID" class="pull-right" data-toggle="tooltip" data-placement="right" title="(異常儀器數量/所有儀器數量)">
+															<!--(<font color='#FF0000'>0</font>/7)-->0
+														</span>
+													</a> </li>
+											</ul>
+										</li>
+									</ul>
+								</li>
+							</ul>
+						</nav>
+					</div>
+				</div>
+			</aside>
+			<!-- end: sidebar -->
+			<section role="main" class="content-body">
+				<header class="page-header">
+					<h2>C3儀表板</h2>
+				</header>
+				<div class="row">
+					<div class="col-md-6">
+						<section class="panel">
+							<header class="panel-heading">
+								<div class="panel-actions">
+									<label id="displayCompareChart" style="display:block"><input type="checkbox" id="compareCheck" onclick="CheckCompare()">顯示全部比較</label>
+									<a style="display:none" href="#" class="fa fa-caret-down"></a>
+									<a style="display:none" href="#" class="fa fa-times"></a>
+								</div>
+								<h2 id="tableName" class="panel-title">資料表</h2>
+							</header>
+							<div class="tabs tabs-bottom tabs-primary">
+								<div class="panel-body">
+									<div class="tab-content">
+										<div id="popular" class="chart chart-unity tab-pane active">
+											<canvas id="myChart" height="100%"></canvas>
+										</div>
+										<div id="recent" class="tab-pane">
+											<div id="tabData">
+												<table id="dataTable" class="display"></table>
+											</div>
+										</div>
+									</div>
+									<ul class="nav nav-tabs nav-justified">
+										<li class="active"> <a href="#popular" data-toggle="tab" class="text-center"><i class="fa fa-bar-chart-o"></i> 折線圖</a> </li>
+										<li> <a href="#recent" data-toggle="tab" class="text-center"><i class="fa fa-table"></i>資料表</a> </li>
+									</ul>
+								</div>
+							</div>
+						</section>
+					</div>
+					<div class="col-md-6">
+						<section class="panel">
+							<header class="panel-heading">
+								<div class="panel-actions">
+									<a style="display:none" href="#" class="fa fa-caret-down"></a>
+									<a style="display:none" href="#" class="fa fa-times"></a>
+								</div>
+								<h2 class="panel-title">C3觀測模型</h2>
+								<div class="panel-subtitle">
+									<button id='monitorName' type="button" class="mb-xs mt-xs mr-xs btn btn-info" data-toggle="tooltip" data-placement="top" title="顯示目前監測儀器類別">OW監測儀器</button>
+									<button type="button" class="mb-xs mt-xs mr-xs btn btn-default" onclick="ResetCamera()">重置鏡頭</button>
+
+									<div class="btn-group" style="display:none">
+										<button type="button" class="mb-xs mt-xs mr-xs btn btn-default dropdown-toggle" data-toggle="dropdown">選擇觀測儀器 <span class="caret"></span></button>
+										<ul id="monitorSelect" class="dropdown-menu" role="menu"> </ul>
+									</div>
+
+									<a id="monitorSelect2" class="mb-xs mt-xs mr-xs modal-basic modal-with-zoom-anim btn btn-primary" href="#modalHeaderColorPrimary" data-toggle="tooltip" data-placement="top" title="選擇觀測儀器">選擇觀測儀器</a>
+
+									<div id="modalHeaderColorPrimary" class="zoom-anim-dialog modal-block modal-header-color modal-block-primary mfp-hide">
+										<section class="panel">
+											<header class="panel-heading">
+												<h2 class="panel-title">請選擇觀測儀器</h2>
+												<label style="color: #FFF"><input type="checkbox" id="errorCheck" onclick="CheckError()">僅顯示錯誤儀器</label>
+											</header>
+											<div class="panel-body">
+												<div class="modal-wrapper">
+													<div class="modal-icon"> <i class="fa fa-desktop"></i> </div>
+													<div id="monitorButton" class="modal-text">綠色為正常|紅色為異常</div>
+												</div>
+											</div>
+											<footer class="panel-footer">
+												<div class="row">
+													<div class="col-md-12 text-right">
+														<button class="btn btn-default modal-dismiss">取消</button>
+													</div>
+												</div>
+											</footer>
+										</section>
+									</div>
+
+									<div id="selectPhase" class="btn-group">
+										<select id="phase" class="mb-xs mt-xs mr-xs btn btn-default dropdown-toggle" onChange="LoadPage();">
+											<option value="2">選擇開挖階段</option>
+											<option value="2">第二挖至7.12m</option>
+											<option value="3">第三挖至11.62m</option>
+											<option value="4">第四挖至15.02m</option>
+											<option value="5">第五挖至18.42m</option>
+											<option value="6">第六挖至23.32m</option>
+											<option value="7">末段扶壁敲除</option>
+										</select>
+									</div>
+
+
+
+								</div>
+							</header>
+							<div class="panel-body">
+								<div class="chart chart-unity">
+									<div id="unity-container" class="unity-desktop">
+										<div id="unity-loading-bar"> <img src="/Common/assets/images/loading-logo.gif" height="100%" />
+											<div class="progress-striped m-md">
+												<div id="unity-progress-bar-full" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"> 0% </div>
+											</div>
+										</div>
+										<canvas id="unity-canvas"></canvas>
+										<div id="unity-warning"> </div>
+									</div>
+								</div>
+							</div>
+						</section>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-md-3">
+						<section class="panel panel-featured-left panel-featured-primary">
+							<div class="panel-body">
+								<div class="widget-summary widget-summary-md">
+									<div class="widget-summary-col widget-summary-col-icon">
+										<div class="summary-icon bg-primary" id="sparklinePie"> </div>
+									</div>
+									<div class="widget-summary-col">
+										<div class="summary">
+											<h2 class="panel-title">異常比例</h2>
+											<div class="info"> <strong id="percent" class="amount"></strong> </div>
+										</div>
+									</div>
+								</div>
+							</div>
+						</section>
+					</div>
+					<div class="col-md-3">
+						<section class="panel panel-featured-left panel-featured-primary">
+							<div class="panel-body">
+								<div class="widget-summary widget-summary-md">
+									<div class="widget-summary-col widget-summary-col-icon">
+										<div class="summary-icon bg-primary"> <i class="fa fa-database"></i> </div>
+									</div>
+									<div class="widget-summary-col">
+										<div class="summary">
+											<h2 class="panel-title">資料庫最後更新時間</h2>
+											<div class="info"> <strong class="amount"><?php include($_SERVER['DOCUMENT_ROOT'] .'/BIM-Monitor/script/php/dbUpdateTime.php'); ?></strong> </div>
+										</div>
+									</div>
+								</div>
+							</div>
+						</section>
+					</div>
+				</div>
+			</section>
+		</div>
+		<!-- 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="/BIM-Monitor/assets/javascripts/theme.js"></script>
+		<!-- Theme Custom -->
+		<script src="/BIM-Monitor/assets/javascripts/theme.custom.js"></script>
+		<!-- Theme Initialization Files -->
+		<script src="/BIM-Monitor/assets/javascripts/theme.init.js"></script>
+		<!-- Examples -->
+		<script src="/BIM-Monitor/assets/javascripts/ui-elements/examples.modals.js"></script>
+		<!-- Main-->
+		<script src="/BIM-Monitor/script/js/main.js"></script>
+		<!-- <script src='/BIM-Monitor/script/js/warning.js'></script> -->
+		<!-- Unity loader -->
+		<script src="/BIM-Monitor/script/js/unity-loader.js"></script>
+
+	</section>
+</body>
+
+</html>

+ 1 - 0
script/js/c3.js

@@ -1,3 +1,4 @@
+var unityName = "C3Dev";
 var errorTable;
 var sites = {};
 $.ajaxSettings.async = false;

+ 1279 - 0
script/js/r03.js

@@ -0,0 +1,1279 @@
+var unityName = "R03Monitor";
+var errorTable;
+var sites = {};
+$.ajaxSettings.async = false;
+var jqxhr = $.getJSON("/BIM-Monitor/assets/errorTable.json", function (json) {
+    errorTable = json;
+});
+var C3Json = $.getJSON("/BIM-Monitor/assets/json/c3-monitorList.json", function (json) {
+    sites["c3"] = json;
+});
+var R03Json = $.getJSON("/BIM-Monitor/assets/json/r03-monitorList.json", function (json) {
+    sites["r03"] = json;
+});
+
+$.ajaxSettings.async = true;
+var lastNode;
+var errorArray = [];
+var switchNumber = 0;
+passString('OW');
+var wellTBA = [];
+var wellNameLists = [];
+var isAll = true;
+var isCompare = false;
+var saveCheckCompare = "";
+
+
+$(document).ready(function () {
+
+    GetCheckAllAJAXValue();
+    LoadPage();
+
+    $(".monitor").on('click', function () {
+        let site = $(this).parent().parent().parent().attr("monitor");
+        if (site != 'r03') {
+            location.href = `../${site}/Index.php`;
+        } else {
+            let option = $(this).attr("monitor");
+            isAll = true;
+            isCompare = false;
+            passString(option);
+            document.getElementById("monitorName").innerHTML = option + "監測儀器";
+            if (lastNode != null) {
+                lastNode.style = "color:#abb4be;";
+            }
+            document.getElementById("errorCheck").checked = false;
+            document.getElementById("compareCheck").checked = false;
+
+            lastNode = document.getElementById(option).parentNode;
+            lastNode.style = "color:#0088cc;";
+
+            LoadPage();
+        }
+    });
+})
+
+//Pass monitor equipment's name to index.php select form
+function passString(option) {
+    window.localStorage.setItem("option", option);
+}
+
+//unity給一個wellname(string)
+function GetWellName(wellName) {
+    showWell(wellName, true);
+}
+
+function submitForm() {
+    document.getElementById("CSVform").submit();
+}
+
+function GetWellNameList(wellNameList) {
+    window.localStorage.setItem("wellNameList", wellNameList);
+}
+
+
+
+//display well name and send its name to showWell function
+function displayWellInfo2(equipment) {
+    $.ajaxSettings.async = false;
+    $.ajax({
+        url: '/BIM-Monitor/script/php/getEquipmentName.php',
+        type: "GET",
+        data: {
+            equipment: equipment,
+        }
+    }).success(function (data) {
+        GetWellNameList(data);
+    }).error(function (error) {
+        console.log("錯誤");
+    });
+    $.ajaxSettings.async = true;
+}
+var sparklinePieData = [];
+
+function LoadPage() {
+
+    var option = window.localStorage.getItem("option");
+    displayWellInfo2(option);
+
+    $('#' + window.localStorage.getItem("option")).removeClass('hidden').removeAttr('disabled');
+
+    document.getElementById("monitorSelect2").innerHTML = "選擇觀測儀器";
+
+    if (option == "ELP" || option == "OW")
+        document.getElementById("displayCompareChart").style.display = 'block';
+    else
+        document.getElementById("displayCompareChart").style.display = 'none';
+
+    if(isLoad){
+        if (option == "HM" || option == "SIS" || option == "RS" || option == "VG" || option == "SID") {
+            myGameInstance.SendMessage("Monitor", "ChangeTransparent");
+            myGameInstance.SendMessage("Monitor", "RemoveModel", "true");
+        } else {
+            myGameInstance.SendMessage("Monitor", "ChangeWhite");
+            myGameInstance.SendMessage("Monitor", "RemoveModel", "false");
+        }
+    }
+    
+
+    if (option != "ELP" && option != "SIS" && option != "SID") {
+        document.getElementById("phase").style.display = "none";
+    } else {
+        document.getElementById("phase").style.display = "block";
+    }
+
+    var wellTBALocal = getCheckValue();
+    var dataValue = option;
+    for (i = 0; i < wellTBALocal.length; i++) {
+        dataValue = dataValue.concat(',', wellTBALocal[i]);
+
+    }
+    if(isLoad){
+        myGameInstance.SendMessage("Monitor", "AddDataTable", dataValue);
+        myGameInstance.SendMessage("Monitor", "Initialization");
+    }
+    
+    var wellNameList = window.localStorage.getItem("wellNameList");
+    var wellNameListsLocal = wellNameList.split(",");
+
+    var order = new Array(wellNameListsLocal.length);
+    for (i = 0; i < wellNameListsLocal.length; i++) {
+        order[i] = wellNameListsLocal[i].match(/\d+/g);
+    }
+    for (i = 0; i < order.length; i++) {
+        for (j = 0; j < order.length; j++) {
+            if (order[j] > order[j + 1]) {
+                let temp = order[j];
+                order[j] = order[j + 1];
+                order[j + 1] = temp;
+                let temp2 = wellNameListsLocal[j];
+                wellNameListsLocal[j] = wellNameListsLocal[j + 1];
+                wellNameListsLocal[j + 1] = temp2;
+            }
+        }
+    }
+    wellNameLists = wellNameListsLocal;
+    wellTBA = wellTBALocal;
+
+    SetList();
+    ResetCamera();
+    showWell(wellNameLists[0], false);
+}
+
+//get well info from sql server
+function showWell(str, changeCamera) {
+    var strLocal = "";
+    var executed = false;
+    var xhttp;
+    isCompare = false;
+    document.getElementById("compareCheck").checked = false;
+    if (str == "") {
+        document.getElementById("dataTable").innerHTML = "";
+        return;
+    }
+    strLocal = str;
+
+    document.getElementById("monitorSelect2").innerHTML = strLocal;
+    xhttp = new XMLHttpRequest();
+    xhttp.onreadystatechange = function () {
+        if (this.readyState == 4 && this.status == 200) {
+
+            document.getElementById("tableName").innerHTML = strLocal + "資料表";
+            saveCheckCompare = strLocal + "資料表";
+            displayChart(str, "myChart");
+            reset();
+            if(isLoad){
+                myGameInstance.SendMessage("MainCamera", "GetDataFromWebGL", str);
+            }
+            
+
+            if (!changeCamera) {
+                ResetCamera();
+            }
+
+            document.getElementById("dataTable").innerHTML = this.responseText;
+            $('#dataTable').DataTable();
+
+        }
+    };
+    xhttp.open("GET", "/BIM-Monitor/script/php/getData2.php?q=" + str, true);
+    xhttp.send();
+
+}
+var sparklinePieData = [];
+
+function getCheckValue() {
+    var dataArray = [];
+    var phase
+    if (document.getElementById("phase") !== null) {
+        phase = document.getElementById("phase").value;
+    } else {
+        phase = 7;
+    }
+
+    var option = window.localStorage.getItem("option");
+    for (i = 0; i < errorTable.length; i++) {
+        if (errorTable[i].table_name == option) {
+            var method = errorTable[i].method;
+            var table_name = errorTable[i].table_name + "data";
+            var warning1 = errorTable[i].warning1;
+            var warning2 = errorTable[i].warning2;
+            var warning_Count = errorTable[i].warning_Count;
+        }
+    }
+
+    $.ajax({
+            url: "/BIM-Monitor/script/php/checkValue2.php",
+            data: {
+                method: method,
+                table_name: table_name,
+                warning1: warning1,
+                warning2: warning2,
+                warning_Count: warning_Count,
+                phase: phase
+            },
+            async: false,
+            contentType: "application/json",
+            dataType: "json"
+        })
+
+        .success(function (response) {
+            console.log(response)
+            dataArray = response['wellTBA'];
+            for (var i = 0; i < dataArray.length; i++) {
+                dataArray[i] = dataArray[i].replace('_', '-');
+            }
+            var normal_count = response['normal_count'];
+            var abnormal_count = response['abnormal_count'];
+            sparklinePieData = [normal_count, abnormal_count];
+            var all = normal_count + abnormal_count;
+            var percent = abnormal_count / all;
+            var url = "/BIM-Monitor/assets/javascripts/ui-elements/pie.charts.js";
+            var script = document.createElement('script');
+            script.setAttribute('type', 'text/javascript');
+            script.setAttribute('src', url);
+            document.getElementsByTagName('head')[0].appendChild(script);
+            document.getElementById("percent").innerHTML = Math.round(percent * 100) + "%";
+
+
+        })
+        .error(function () {
+            //alert("錯誤統計未正常獲取");
+        })
+        .complete(function () {});
+    return dataArray;
+}
+
+function GetCheckAllAJAXValue() {
+
+    errorArray = [];
+    var phase
+    if (document.getElementById("phase") !== null) {
+        phase = document.getElementById("phase").value;
+    } else {
+        phase = 7;
+    }
+    for (i = 0; i < errorTable.length; i++) {
+
+        var method = errorTable[i].method;
+        var option = errorTable[i].table_name;
+        var table_name = errorTable[i].table_name + "data";
+        var warning1 = errorTable[i].warning1;
+        var warning2 = errorTable[i].warning2;
+        var warning_Count = errorTable[i].warning_Count;
+        $.ajax({
+                url: "/BIM-Monitor/script/php/checkValue2.php",
+                data: {
+                    method: method,
+                    table_name: table_name,
+                    warning1: warning1,
+                    warning2: warning2,
+                    warning_Count: warning_Count,
+                    phase: phase
+                },
+                async: false,
+                contentType: "application/json",
+                dataType: "json"
+            })
+
+            .success(function (response) {
+
+                var normal_count = response['normal_count'];
+                var abnormal_count = response['abnormal_count'];
+                var all_count = 0 + normal_count + abnormal_count;
+
+
+                document.getElementById(option).innerHTML = "(<font color='#FF0000'>" + abnormal_count + "</font>/" + all_count + ")";
+                errorArray.push(abnormal_count);
+            })
+            .error(function () {
+                alert("錯誤統計未正常獲取");
+            })
+            .complete(function () {});
+    }
+}
+
+function CheckCompare() {
+    var option = window.localStorage.getItem("option");
+    var text = "";
+    if (option == "ELP" || option == "OW") {
+        if (option == "ELP") {
+            text = "水壓計";
+        } else if (option == "OW") {
+            text = "水位觀測井";
+        }
+        var checkBox = document.getElementById("compareCheck");
+        if (checkBox.checked == true) {
+            document.getElementById("tableName").innerHTML = option + text + '總表';
+            isCompare = true;
+        } else {
+            document.getElementById("tableName").innerHTML = saveCheckCompare;
+            isCompare = false;
+        }
+        if (option == "ELP")
+            displayChart("ELP-1", "myChart");
+        else if (option == "OW")
+            displayChart("OW-1", "myChart");
+    }
+
+
+}
+
+function CheckError() {
+    var checkBox = document.getElementById("errorCheck");
+    if (checkBox.checked == true) {
+        isAll = false;
+    } else {
+        isAll = true;
+    }
+    SetList();
+}
+
+function uploadCSV() {
+
+    var input = $("#fileToUpload");
+    var inputLength = input[0].files.length; //No of files selected
+    var file;
+    var formData = new FormData();
+
+    for (var i = 0; i < inputLength; i++) {
+        file = input[0].files[i];
+        formData.append('fileToUpload[]', file);
+    }
+    $.ajax({
+        url: "/BIM-Monitor/script/php/upload.php",
+        type: "POST",
+        data: formData,
+        processData: false,
+        contentType: false,
+        beforeSend: function () {
+
+        }
+    }).done(function (data) {
+        var stack_bar_top = {
+            "dir1": "down",
+            "dir2": "right",
+            "push": "top",
+            "spacing1": 0,
+            "spacing2": 0
+        };
+
+        if (data.includes("IS")) {
+            var notice = new PNotify({
+                title: '通知',
+                text: '上傳成功!',
+                type: 'success',
+                addclass: 'stack-bar-top',
+                stack: stack_bar_top,
+                width: "100%"
+            });
+        } else {
+            var notice = new PNotify({
+                title: '通知',
+                text: '上傳失敗!',
+                type: 'error',
+                addclass: 'stack-bar-top',
+                stack: stack_bar_top,
+                width: "100%"
+            });
+        }
+
+    }).error(function () {
+
+    });
+
+}
+
+
+//Display chart
+function displayChart(str, elementID) {
+    var xhttp;
+    xhttp = new XMLHttpRequest();
+
+    xhttp.onreadystatechange = function () {
+        if (this.readyState == 4 && this.status == 200) {
+            if (str.includes("ELP") || str.includes("OW") || str.includes("SM") || str.includes("SB") || str.includes("SBM") || str.includes("VG") || str.includes("HM")) {
+                //Split the response text into well name array, date array and value array
+                var v_variables = this.responseText.split("*");
+                var c_wellName = v_variables[0];
+                var c_m_date = v_variables[1].split(" ");
+                var c_m_value = v_variables[2].split(" ");
+
+                //Start to make the chart
+                if (isCompare) {
+                    displayCompareChart();
+                } else {
+                    init(c_wellName, c_m_date, c_m_value, elementID);
+                }
+
+
+            } else if (str.includes("TI")) {
+                var v_variables = this.responseText.split("*");
+                var c_wellName = v_variables[0];
+                var c_m_date = v_variables[1].split(" ");
+                var c_m_value = v_variables[2].split(" ");
+                //Multiple line
+                var c2_wellName = v_variables[3];
+                var c2_m_date = v_variables[4].split(" ");
+                var c2_m_value = v_variables[5].split(" ");
+                if (isCompare) {
+                    displayCompareChart();
+                } else {
+                    init2(c_wellName, c_m_date, c_m_value, c2_wellName, c2_m_date, c2_m_value, elementID);
+                }
+
+
+            } else if (str.includes("SIS") || str.includes("SID")) {
+                var v_variables = this.responseText.split("*");
+                var c_m_date = v_variables[0].split(" ");
+                var c_m_depth = v_variables[1].split(" ");
+                var c_m_valueArray = v_variables[2].split("//");
+                //Abnormal value, don't know why it happened so I brute force it
+                c_m_valueArray[0] = c_m_valueArray[0].replace("0.4770.468", "0.477 0.468");
+                var dateCount = c_m_date.length;
+                let c_m_value = [];
+                for (x = 0; x < dateCount; x++) {
+                    c_m_value[x] = c_m_valueArray[x].split(" ");
+                }
+
+                initSISSID(c_m_date, c_m_depth, c_m_value, elementID, str);
+            } else if (str.includes("RS")) {
+                var v_variables = this.responseText.split("*");
+
+                var c_wellName = v_variables[0];
+                var c_m_date = v_variables[1].split(" ");
+                var c_m_value = v_variables[2].split(" ");
+
+                var c2_wellName = v_variables[3];
+                var c2_m_date = v_variables[4].split(" ");
+                var c2_m_value = v_variables[5].split(" ");
+
+                var c3_wellName = v_variables[6];
+                var c3_m_date = v_variables[7].split(" ");
+                var c3_m_value = v_variables[8].split(" ");
+
+                var c4_wellName = v_variables[9];
+                var c4_m_date = v_variables[10].split(" ");
+                var c4_m_value = v_variables[11].split(" ");
+
+                var c5_wellName = v_variables[12];
+                var c5_m_date = v_variables[13].split(" ");
+                var c5_m_value = v_variables[14].split(" ");
+
+                var c6_wellName = v_variables[15];
+                var c6_m_date = v_variables[16].split(" ");
+                var c6_m_value = v_variables[17].split(" ");
+
+                init6(c_wellName, c_m_date, c_m_value, c2_wellName, c2_m_value, c3_wellName, c3_m_value, c4_wellName, c4_m_value, c5_wellName, c5_m_value, c6_wellName, c6_m_value, elementID);
+            }
+        }
+    };
+    xhttp.open("GET", "/BIM-Monitor/script/php/getChartData2.php?q=" + str, true);
+    xhttp.send();
+
+
+
+
+}
+
+function displayCompareChart() {
+    var option = window.localStorage.getItem("option");
+    var m_date = [];
+    var label = [];
+    var index = 7;
+    if (option == "ELP")
+        index = 14;
+    var chart_data = new Array();
+    for (var i = 0; i < index; i++) {
+        chart_data[i] = new Array();
+        for (var j = 0; j < m_date.length; j++) {
+            chart_data[i][j] = 0;
+        }
+    }
+    $.ajax({
+            url: "/BIM-Monitor/script/php/getCompareChartData.php",
+            async: false,
+            contentType: "application/json",
+            dataType: "json",
+            data: {
+                option: option
+            }
+        })
+
+        .success(function (response) {
+            m_date = response['m_date'];
+            chart_data = response['chart_data'];
+            label = response['label'];
+            initCompare(m_date, chart_data, index, label);
+            console.log("getCompareChartData正常獲取");
+        })
+        .error(function () {
+            console.log("getCompareChartData未正常獲取");
+        })
+        .complete(function () {});
+
+}
+
+//Reset the camera
+function ResetCamera() {
+    if(isLoad){
+        myGameInstance.SendMessage("MainCamera", "ResetCamera");
+    }
+}
+
+
+
+function SetList() {
+    var wellNameListsLocal = "";
+    var isError = false;
+    var monitorSelect = document.getElementById("monitorSelect");
+    var monitorButton = document.getElementById("monitorButton");
+    while (monitorSelect.hasChildNodes()) {
+        monitorSelect.removeChild(monitorSelect.firstChild);
+    }
+
+    while (monitorButton.hasChildNodes()) {
+        monitorButton.removeChild(monitorButton.firstChild);
+    }
+    monitorButton.innerHTML = "綠色為正常|紅色為異常<br>";
+    GetCheckAllAJAXValue();
+    for (i = 0; i < wellNameLists.length; i++) {
+        wellNameListsLocal = wellNameLists[i];
+        var option = document.createElement("li");
+        var createA = document.createElement("a");
+        /*if(wellNameLists[i].includes("ELP")){
+        	if(wellNameLists[i].includes("A")){
+        		wellNameListsLocal = wellNameLists[i] + ',' + wellNameLists[i].replace('A','-1A');
+        	}else{
+        		wellNameListsLocal = wellNameLists[i] + ',' + wellNameLists[i] + '-1';
+        	}
+        }	*/
+        var createAText = document.createTextNode(wellNameListsLocal);
+        var createButton = document.createElement("button");
+        var createButtonText = document.createTextNode(wellNameListsLocal);
+        createButton.setAttribute('class', "mb-xs mt-xs mr-xs modal-with-zoom-anim btn btn-success modal-dismiss");
+
+
+
+        for (j = 0; j < wellTBA.length; j++) {
+
+            if (wellNameLists[i] == (wellTBA[j])) {
+                createA.style = "color:red;";
+                createButton.setAttribute('class', "mb-xs mt-xs mr-xs btn btn-danger modal-dismiss");
+                isError = true;
+            }
+        }
+        createA.setAttribute('onclick', "showWell('" + wellNameLists[i] + "',true)");
+        createButton.setAttribute('onclick', "showWell('" + wellNameLists[i] + "',true)");
+        createButton.setAttribute('type', "button");
+
+        if (isAll || (!isAll && isError)) {
+            createA.appendChild(createAText);
+            createButton.appendChild(createButtonText);
+            option.appendChild(createA);
+            monitorSelect.appendChild(option);
+            monitorButton.appendChild(createButton);
+        }
+        isError = false;
+
+    }
+
+}
+
+function UpdateGPS(GPS) {
+    if(isLoad){
+        myGameInstance.SendMessage("PlayerArmature", "UpdateGPS", GPS);
+    }
+}
+
+
+
+
+function forLoopSMOption() {
+    var elm = document.getElementById('SM'), // get the select
+        df = document.createDocumentFragment(); // create a document fragment to hold the options while we create them
+
+    for (var i = 1; i <= 81; i++) { // loop, i like 42.
+        var option = document.createElement('option'); // create the option element
+        option.value = "SM-" + i; // set the value property
+        option.appendChild(document.createTextNode("SM-" + i)); // set the textContent in a safe way.
+        df.appendChild(option); // append the option to the document fragment
+    }
+    elm.appendChild(df); // append the document fragment to the DOM. this is the better way rather than setting innerHTML a bunch of times (or even once with a long string)
+}
+
+function forLoopHMOption() {
+    var elm = document.getElementById('HM'),
+        df = document.createDocumentFragment();
+
+    for (var i = 1; i <= 15; i++) {
+        var option = document.createElement('option');
+        option.value = "HM-1-" + i;
+        option.appendChild(document.createTextNode("HM1-" + i));
+        df.appendChild(option);
+    }
+    for (var j = 1; j <= 7; j++) {
+        var option = document.createElement('option');
+        option.value = "HM-2-" + j;
+        option.appendChild(document.createTextNode("HM2-" + j));
+        df.appendChild(option);
+    }
+    for (var k = 1; k <= 11; k++) {
+        var option = document.createElement('option');
+        option.value = "HM-3-" + k;
+        option.appendChild(document.createTextNode("HM3-" + k));
+        df.appendChild(option);
+    }
+    for (var l = 1; l <= 7; l++) {
+        var option = document.createElement('option');
+        option.value = "HM-4-" + l;
+        option.appendChild(document.createTextNode("HM4-" + l));
+        df.appendChild(option);
+    }
+    elm.appendChild(df);
+}
+var errorChart = null;
+
+
+
+//Start making the chart
+function init(c_wellName, c_m_date, c_m_value, elementID) {
+
+    var ctx = document.getElementById(elementID).getContext("2d");
+    var phase = document.getElementById("phase").value;
+    var ELPwarning = [0, -4.6, -10, -15.3, -23.2, 0];
+    var ELP_1warning = [0, -7.9, -13.3, 0, 0, 0];
+
+    //Warning value
+    let warning = [];
+    var OWFirstData = {
+        "OW-1": -1.81,
+        "OW-2": -1.59,
+        "OW-3": -6.3,
+        "OW-4": -3.67,
+        "OW-5": -3.16,
+        "OW-6": -1.78,
+        "OW-7": -3.31
+    };
+    var OWwarning1 = 0;
+    var OWwarning2 = 0;
+
+    var yLabel = "";
+    var xLabel = "";
+
+    if (c_wellName.includes("ELP")) {
+        if (c_wellName != "ELP-1" && c_wellName.includes("-1")) {
+            if (ELP_1warning[phase - 2] != 0) {
+                for (i = 0; i < c_m_date.length; i++) {
+                    warning.push(ELP_1warning[phase - 2]);
+                }
+            }
+        } else {
+            if (ELPwarning[phase - 2] != 0) {
+                for (i = 0; i < c_m_date.length; i++) {
+                    warning.push(ELPwarning[phase - 2]);
+                }
+            }
+        }
+
+
+        yLabel = "水位高程GL(m)";
+        xLabel = "日期";
+
+    } else if (c_wellName.includes("OW")) {
+
+        for (const [key, value] of Object.entries(OWFirstData)) {
+            if (c_wellName == key) {
+                OWwarning1 = value + 2;
+                OWwarning2 = value - 2;
+            }
+        }
+
+        for (i = 0; i < c_m_date.length; i++) {
+            warning.push(OWwarning1);
+        }
+
+        yLabel = "水位高程GL(m)";
+        xLabel = "日期";
+
+    } else if (c_wellName.includes("SM")) {
+        for (i = 0; i < c_m_date.length; i++) {
+            warning.push(45);
+        }
+
+        yLabel = "沉陷量(mm)";
+        xLabel = "日期";
+
+    } else if (c_wellName.includes("SBM")) {
+        for (i = 0; i < c_m_date.length; i++) {
+            warning.push(9.5);
+        }
+
+        yLabel = "沉陷量(mm)";
+        xLabel = "日期";
+
+    } else if (c_wellName.includes("SB")) {
+        for (i = 0; i < c_m_date.length; i++) {
+            warning.push(0.0008);
+        }
+
+        yLabel = "沉陷量(mm)";
+        xLabel = "日期";
+
+    } else if (c_wellName.includes("VG")) {
+        for (i = 0; i < c_m_date.length; i++) {
+            warning.push(110);
+        }
+
+        yLabel = "應力值(t)";
+        xLabel = "日期";
+
+    } else if (c_wellName.includes("HM")) {
+        for (i = 0; i < c_m_date.length; i++) {
+            warning.push(25);
+        }
+
+        yLabel = "沉陷量(mm)";
+        xLabel = "日期";
+
+    }
+
+    for (j = 0; j < c_m_value.length; j++) {
+        if (c_m_value[j] == "") {
+            c_m_value[j] = null;
+        }
+    }
+
+    //Destroy chart if it already exists. If not, there'll be multiple charts stack together
+    if (window.chart != undefined) {
+        window.chart.destroy();
+    }
+
+    window.chart = new Chart(ctx, {
+        //Line chart
+        type: 'line',
+        data: {
+            //X-axis displays the date
+            labels: c_m_date,
+            datasets: [{
+                    //Label above the chart to illustrate which color has which purpose
+                    label: c_wellName,
+                    //Data value
+                    data: c_m_value,
+                    //Detemine line's color
+                    borderColor: '#3e95cd'
+                },
+                {
+                    label: "警戒值",
+                    data: warning,
+                    borderColor: "#FF0000",
+                    pointRadius: 0
+                }
+            ]
+        },
+        options: {
+            spanGaps: true,
+            maintainAspectRatio: false,
+            responsive: true,
+            scales: {
+                y: {
+                    title: {
+                        display: true,
+                        text: yLabel
+                    }
+                },
+                x: {
+                    title: {
+                        display: true,
+                        text: xLabel
+                    }
+                }
+            }
+        }
+    });
+
+    if (c_wellName.includes("SBM")) {
+
+        let warning2 = [];
+
+        for (i = 0; i < c_m_date.length; i++) {
+            warning2.push(-9.5);
+        }
+
+        window.chart.data.datasets.push({
+            label: "警戒值2",
+            data: warning2,
+            borderColor: "#FF0000",
+            pointRadius: 0
+
+        });
+
+        window.chart.update();
+    } else if (c_wellName.includes("SB")) {
+
+        let warning2 = [];
+
+        for (i = 0; i < c_m_date.length; i++) {
+            warning2.push(-0.0008);
+        }
+
+        window.chart.data.datasets.push({
+            label: "警戒值2",
+            data: warning2,
+            borderColor: "#FF0000",
+            pointRadius: 0
+        });
+
+        window.chart.update();
+    } else if (c_wellName.includes("OW")) {
+
+        let warning2 = [];
+
+        for (i = 0; i < c_m_date.length; i++) {
+            warning2.push(OWwarning2);
+        }
+
+        window.chart.data.datasets.push({
+            label: "警戒值2",
+            data: warning2,
+            borderColor: "#FF0000",
+            pointRadius: 0
+        });
+
+        window.chart.update();
+    }
+
+}
+
+
+function init2(c_wellName, c_m_date, c_m_value, c2_wellName, c2_m_date, c2_m_value, elementID) {
+
+    var ctx = document.getElementById(elementID).getContext("2d");
+    var yLabel = "";
+    var xLabel = "";
+
+
+    let warning = [];
+    if (c_wellName.includes("TI")) {
+
+        for (i = 0; i < c2_m_date.length; i++) {
+            warning.push(0.00106);
+        }
+
+        yLabel = "徑度量(δ/ L)";
+        xLabel = "日期";
+
+    }
+
+    for (j = 0; j < c_m_value.length; j++) {
+        if (c_m_value[j] == "") {
+            c_m_value[j] = null;
+        }
+    }
+
+    if (window.chart != undefined) {
+        window.chart.destroy();
+    }
+    c_m_value.forEach(function (item, index, array) {
+
+    });
+    window.chart = new Chart(ctx, {
+        type: 'line',
+        data: {
+            labels: c_m_date,
+            datasets: [{
+                    label: c_wellName,
+                    data: c_m_value,
+                    borderColor: '#3e95cd'
+                },
+                {
+                    label: c2_wellName,
+                    data: c2_m_value,
+                    borderColor: '#63fff5'
+                }
+            ]
+        },
+        options: {
+            responsive: true,
+            maintainAspectRatio: false,
+            scales: {
+                y: {
+                    title: {
+                        display: true,
+                        text: yLabel
+                    }
+                },
+                x: {
+                    title: {
+                        display: true,
+                        text: xLabel
+                    }
+                }
+            }
+        }
+    });
+
+    /*if(c_wellName.includes("ELP") && phase != 2 && phase != 7){
+
+        window.chart.data.datasets.push({
+            label: "警戒值",
+            data: warning,
+            borderColor: "#FF0000",
+			pointRadius: 0
+        });
+
+        if(phase == 3 || phase == 4){
+            let warning2 = [];
+
+            for (i = 0; i < c2_m_date.length; i++) {
+                warning2.push(ELP_1warning[phase-2]);
+            }
+
+            window.chart.data.datasets.push({
+                label: "警戒值2",
+                data: warning2,
+                borderColor: "#FF0000",
+                pointRadius: 0
+            });
+        }
+
+        window.chart.update();
+    }*/
+
+    //ELP does not have second warning line, so you need to update it seperately
+    if (c_wellName.includes("TI")) {
+
+        let warning2 = [];
+
+        for (i = 0; i < c2_m_date.length; i++) {
+            warning2.push(-0.00106);
+        }
+
+        window.chart.data.datasets.push({
+            label: "警戒值2",
+            data: warning2,
+            borderColor: "#FF0000",
+            pointRadius: 0
+        });
+
+        window.chart.update();
+    }
+
+}
+
+
+//SIS SID's lines are vertical
+function initSISSID(c_m_date, c_m_depth, c_m_value, elementID, str) {
+
+    var ctx = document.getElementById(elementID).getContext("2d");
+    var datasetValue = [];
+    let warning = [];
+    var phase = document.getElementById("phase").value;
+    var SID_data = [];
+    var SIS_data = [];
+    var SIS_array = ['SIS-1', 'SIS-2-1', 'SIS-2-2', 'SIS-3', 'SIS-4', 'SIS-6', 'SIS-7'];
+    var SID_array = ['SID-1', 'SID-2-1', 'SID-2-2', 'SID-3-1', 'SID-3-2', 'SID-4', 'SID-5-1', 'SID-5-2', 'SID-6', 'SID-7'];
+    var index = 0;
+    var num = 0;
+
+    if (phase == 2) {
+        SID_data = [1.85, 1.128, 1.128, 1.128, 1.698, 1.698, 1.698, 1.186, 1.186, 1.032];
+        SIS_data = [1.85, 1.128, 1.128, 1.128, 1.698, 1.186, 1.032];
+    } else if (phase == 3) {
+        SID_data = [2.39, 1.434, 1.434, 1.434, 2.304, 2.304, 2.304, 1.7, 1.7, 1.569];
+        SIS_data = [2.39, 1.434, 1.434, 1.434, 2.304, 1.7, 1.569];
+    } else if (phase == 4) {
+        SID_data = [2.89, 1.856, 1.856, 1.856, 2.968, 2.968, 2.968, 2.267, 2.267, 2.176];
+        SIS_data = [2.89, 1.856, 1.856, 1.856, 2.968, 2.267, 2.176];
+    } else if (phase == 5) {
+        SID_data = [3.36, 2.626, 2.626, 2.626, 4.531, 4.531, 4.531, 3.727, 3.727, 3.285];
+        SIS_data = [3.36, 2.626, 2.626, 2.626, 4.531, 3.727, 3.285];
+    } else if (phase == 6) {
+        SID_data = [4.015, 3.832, 3.832, 3.832, 7.966, 7.966, 7.966, 5.049, 5.049, 5.208];
+        SIS_data = [4.015, 3.832, 3.832, 3.832, 7.966, 5.049, 5.208];
+    } else if (phase == 7) {
+        SID_data = [4.918, 4.458, 4.458, 4.458, 8.909, 8.909, 8.909, 5.797, 5.797, 5.988];
+        SIS_data = [4.918, 4.458, 4.458, 4.458, 8.909, 5.797, 5.988];
+    }
+
+    if (str.includes("SIS")) {
+        index = SIS_array.indexOf(str);
+        num = SIS_data[index];
+    } else if (str.includes("SID")) {
+        index = SID_array.indexOf(str);
+        num = SID_data[index];
+    }
+
+    for (i = 0; i < c_m_value[0].length; i++) {
+        warning.push(num);
+    }
+
+    yLabel = "觀測深度GL(m)";
+    xLabel = "變位量(cm)";
+
+    for (j = 0; j < c_m_value.length; j++) {
+        if (c_m_value[j] == "") {
+            c_m_value[j] = null;
+        }
+    }
+
+    if (window.chart != undefined) {
+        window.chart.destroy();
+    }
+
+    for (j = 0; j <= c_m_date.length; j++) {
+        if (j == c_m_date.length) {
+            datasetValue[j] = {
+                axis: 'y',
+                fill: false,
+                label: "警戒值",
+                data: warning,
+                borderColor: "#FF0000",
+                pointRadius: 0
+            }
+        } else {
+            datasetValue[j] = {
+                axis: 'y',
+                label: c_m_date[j],
+                data: c_m_value[j],
+                borderColor: randomColor()
+            }
+        }
+
+    }
+
+    window.chart = new Chart(ctx, {
+        type: 'line',
+        data: {
+            labels: c_m_depth,
+            datasets: datasetValue
+        },
+        options: {
+            //Turns line to vertical
+            maintainAspectRatio: false,
+            responsive: true,
+            indexAxis: 'y',
+            scales: {
+                y: {
+                    title: {
+                        display: true,
+                        text: yLabel
+                    }
+                },
+                x: {
+                    beginAtZero: true,
+                    title: {
+                        display: true,
+                        text: xLabel
+                    }
+                }
+            }
+        }
+    });
+
+}
+
+function init6(c_wellName, c_m_date, c_m_value, c2_wellName, c2_m_value, c3_wellName, c3_m_value, c4_wellName, c4_m_value, c5_wellName, c5_m_value, c6_wellName, c6_m_value, elementID) {
+    var ctx = document.getElementById(elementID).getContext("2d");
+    let warning = [];
+    if (c_wellName.includes("RS")) {
+        for (i = 0; i < c_m_date.length; i++) {
+            warning.push(2000);
+        }
+
+        yLabel = "應力值(kg/cm²)";
+        xLabel = "日期";
+
+    }
+
+    if (window.chart != undefined) {
+        window.chart.destroy();
+    }
+
+    window.chart = new Chart(ctx, {
+        type: 'line',
+        data: {
+            labels: c_m_date,
+            datasets: [{
+                    label: c_wellName,
+                    data: c_m_value,
+                    borderColor: randomColor()
+                },
+                {
+                    label: c2_wellName,
+                    data: c2_m_value,
+                    borderColor: randomColor()
+                },
+                {
+                    label: c3_wellName,
+                    data: c3_m_value,
+                    borderColor: randomColor()
+                },
+                {
+                    label: c4_wellName,
+                    data: c4_m_value,
+                    borderColor: randomColor()
+                },
+                {
+                    label: c5_wellName,
+                    data: c5_m_value,
+                    borderColor: randomColor()
+                },
+                {
+                    label: c6_wellName,
+                    data: c6_m_value,
+                    borderColor: randomColor()
+                },
+                {
+                    label: "警戒值",
+                    data: warning,
+                    borderColor: "#FF0000",
+                    pointRadius: 0
+                }
+            ]
+        },
+        options: {
+            responsive: true,
+            maintainAspectRatio: false,
+            scales: {
+                y: {
+                    title: {
+                        display: true,
+                        text: yLabel
+                    }
+                },
+                x: {
+                    title: {
+                        display: true,
+                        text: xLabel
+                    }
+                }
+            }
+        }
+    });
+
+    //ELP does not have second warning line, so you need to update it seperately
+    if (c_wellName.includes("RS")) {
+
+        let warning2 = [];
+
+        for (i = 0; i < c_m_date.length; i++) {
+            warning2.push(-2000);
+        }
+
+        window.chart.data.datasets.push({
+            label: "警戒值2",
+            data: warning2,
+            borderColor: "#FF0000",
+            pointRadius: 0
+        });
+
+        window.chart.update();
+    }
+}
+
+function initCompare(m_date, chart_data, index, label) {
+    var ctx = document.getElementById("myChart").getContext("2d");
+    var value = -7.9;
+    let warning = [];
+    var phase = document.getElementById("phase").value;
+
+
+    yLabel = "水位高程GL(m)";
+    xLabel = "日期";
+
+    for (i = 0; i < m_date.length; i++) {
+        warning.push(value);
+    }
+
+    if (window.chart != undefined) {
+        window.chart.destroy();
+    }
+    window.chart = new Chart(ctx, {
+        type: 'line',
+        data: {
+            labels: m_date
+        },
+        options: {
+            responsive: true,
+            maintainAspectRatio: false,
+            scales: {
+                y: {
+                    title: {
+                        display: true,
+                        text: yLabel
+                    }
+                },
+                x: {
+                    title: {
+                        display: true,
+                        text: xLabel
+                    }
+                }
+            }
+        }
+    });
+
+    for (i = 1; i < index + 1; i++) {
+        window.chart.data.datasets.push({
+            label: label[i].replaceAll("_", "-"),
+            data: chart_data[i],
+            borderColor: randomColorBlue()
+        });
+    }
+    /*
+    	if(label[1].includes("ELP") && phase != 2 && phase != 7){
+    		window.chart.data.datasets.push({
+                label: "警戒值",
+                data: warning,
+                borderColor: "#FF0000",
+    			pointRadius: 0
+            });		
+    	}
+    */
+    window.chart.update();
+
+}
+
+//Chart has multiple lines that need different color
+function randomColor() {
+    return "#" + ((1 << 24) * Math.random() | 0).toString(16);
+}
+
+function randomColorBlue() {
+    var mid = Math.floor(Math.random() * 255);
+    return "#30" + mid.toString(16) + "ff";
+}
+
+//Need to display multiple epuiment's data table and can't find the function to reset it. So I kill all the nodes.
+function reset() {
+    const myNode = document.getElementById("tabData");
+    while (myNode.firstChild) {
+        myNode.removeChild(myNode.lastChild);
+    }
+    var table = document.createElement("table");
+    table.id = "dataTable";
+    table.className = "display";
+    //table.style.width = "100%";
+    myNode.appendChild(table);
+}

+ 1 - 1
script/js/unity-loader.js

@@ -3,7 +3,7 @@ var canvas = document.querySelector("#unity-canvas");
 var loadingBar = document.querySelector("#unity-loading-bar");
 var progressBarFull = document.querySelector("#unity-progress-bar-full");
 var warningBanner = document.querySelector("#unity-warning");
-var unityName = "C3Dev";
+
 function unityShowBanner(msg, type) {
     function updateBannerVisibility() {
         warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';