123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <?
- session_start();
- echo "<meta charset=utf8>";
- if ($_SESSION['id'] == '' || $_SESSION['id'] == null) {
- echo '您尚未登入';
- exit;
- }
- include "connect.php";
- $userid = $_SESSION['name'];
- $sql = "SELECT User_ID,p313 FROM coursepagecount WHERE User_ID = '" . $userid . "'";
- $result = mysql_query($sql) or die('MySQL query error');
- $row = mysql_fetch_array($result);
- $num = $row[1] + 1;
- if ($num < 10) {
- $count = "0" . (string) ($num);
- } else {
- $count = "" . (string) ($num);
- }
- $sql = "UPDATE coursepagecount SET p313= '" . $num . "' WHERE User_ID='" . $userid . "'";
- $result = mysql_query($sql) or die('MySQL query error');
- mysql_close($link);
- ?>
- <html>
- <head>
- <title>Exam</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
- <META http-equiv="Cache-Control" content="no-cache">
- <META http-equiv="Pragma" content="no-cache">
- <META http-equiv="Expires" content="0">
- <link rel="stylesheet" type="text/css" media="all" href="style.css" />
- <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
- <script src="http://code.jquery.com/ui/1.8.21/jquery-ui.min.js"></script>
- <script src="./fingers.js"></script>
- <script src="./function.js"></script>
- <script src="./function2.js"></script>
- <script src="../public/js/layui/layui.js"></script>
- <script src="layer.js"></script>
- <script type="text/javascript">
- saveRecord("33111<?echo $count ?>");
- rotateX = 0;
- rotateY = 0;
- rotateZ = 0;
- scale = 1;
- picwidth = 195;
- error = 0;
- isStop = false;
- showTooltipPhoto = false;
- function tooltipPhoto(){
- showTooltipPhoto = !showTooltipPhoto;
- if(showTooltipPhoto){
- document.getElementById("stockGraph").style.display="block";
- }else{
- document.getElementById("stockGraph").style.display="none";
- }
- }
- </script>
- <style type="text/css">
- #stockGraph{
- width:800px;
- height:35vh;
- /*background:rgba(100,100,100,0.4);*/
- display:none;
- }
- </style>
- <body>
- <div class="contentDiv">
- <div class="defaultPage" id="contentDiv">
- <canvas id="stockGraph" width="800" height="600">
- current stock price: $3.15 +0.15
- </canvas>
- <img class="defaultPic" id="contentPic" src="image/314q.png"/>
- <img class="picItem" id="picA" src="image/314pic.png" style="top:350px;left:140px;"/>
- <img class="picItem" id="picB" src="image/314pic.png" style="top:45px;left:548px;z-index:-50;"/>
- <img class="picItem" id="pic1" src="image/pic1.png" style="top:550px;left:350px;" onclick="rotatePic(1,0.5,0.25,1)"/>
- <img class="picItem" id="pic2" src="image/pic2.png" style="top:550px;left:420px;" onclick="rotatePic(360,-360,10,2)"/>
- <img class="picItem" id="pic3" src="image/pic3.png" style="top:550px;left:490px;" onclick="rotatePic(1,0.5,0.25,3)"/>
- <img class="picItem" id="pic4" src="image/pic4.png" style="top:480px;left:350px;" onclick="rotatePic(360,-360,10,4)"/>
- <img class="picItem" id="pic6" src="image/pic6.png" style="top:480px;left:490px;" onclick="rotatePic(360,-360,10,6)"/>
- <img class="picItem" id="pic7" src="image/pic7.png" style="top:410px;left:350px;" onclick="rotatePic(360,-360,10,7)"/>
- <img class="picItem" id="pic8" src="image/pic8.png" style="top:410px;left:420px;" onclick="rotatePic(360,-360,10,8)"/>
- <img class="picItem" id="pic9" src="image/pic9.png" style="top:410px;left:490px;" onclick="rotatePic(360,-360,10,9)"/>
- <button class="checkbutton" id="tooltip1" style="top:420px;left:580px;" onclick="tooltipPhoto()">圖形提示</button>
- <br/>
- <button class="checkbutton" id="tooltip2" style="top:480px;left:580px;" onclick="tooltip('314a_2.jpg',2)">文字提示</button>
- <br>
- <button class="checkbutton" id="chkButton" onclick="checkAns(314)" style="top:540px;left:580px;" >確認答案</button>
- <img class="defaultStatus" id="status" src=""/>
- <img class="defaultHideBtn" id="buttonPrev" src="image/prevButton.jpg" onclick="nextPage(33419<?echo $count ?>,312)"/>
- <img class="defaultHideBtn" id="buttonNext" src="image/nextButton.jpg" onclick="nextPage(33419<?echo $count ?>,'313A')"/>
- </div>
- </div>
- <script>
- var canvas = document.getElementById('stockGraph');
- if (canvas.getContext){
- //上线
- var ctx = canvas.getContext('2d');
- ctx.strokeStyle = '#ec6c09';
- ctx.lineWidth = 4;
- //实线1
- //30, 20 2.65 4.1
- ctx.moveTo(79, 77);
- ctx.lineTo(397, 120);
- ctx.stroke();
- //实线2
- ctx.moveTo(397, 120);
- ctx.lineTo(159, 184);
- ctx.stroke();
- //虚线
- ctx.beginPath();
- ctx.setLineDash([10, 10]);
- ctx.moveTo(397, 120);
- ctx.lineTo(715, 76);
- ctx.stroke();
- //下线
- ctx.beginPath();
- ctx.strokeStyle = '#04ab53';
- ctx.lineWidth = 4;
- ctx.setLineDash([]);
- //实线1
- ctx.moveTo(159, 184);
- ctx.lineTo(397, 267);
- ctx.stroke();
- //实线2
- ctx.moveTo(397, 267);
- ctx.lineTo(79, 362);
- ctx.stroke();
- //虚线
- ctx.beginPath();
- ctx.setLineDash([10, 10]);
- ctx.moveTo(397, 267);
- ctx.lineTo(715, 389);
- ctx.stroke();
- } else {
- // canvas-unsupported code here
- }
- </script>
- </body>
- </html>
|