410.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <?
  2. session_start();
  3. echo "<meta charset=utf8>";
  4. if ($_SESSION['id'] == '' || $_SESSION['id'] == NULL){
  5. echo '您尚未登入';
  6. exit;
  7. }
  8. include("connect.php");
  9. $userid = $_SESSION['name'];
  10. $sql = "SELECT User_ID,p410 FROM coursepagecount WHERE User_ID = '".$userid."'";
  11. $result = mysql_query($sql) or die('MySQL query error');
  12. $row = mysql_fetch_array($result);
  13. $num = $row[1]+1;
  14. if($num<10){
  15. $count = "0".(string)($num);
  16. }
  17. else{
  18. $count = "".(string)($num);
  19. }
  20. $sql ="UPDATE coursepagecount SET p410 = '".$num."' WHERE User_ID='".$userid."'";
  21. $result = mysql_query($sql) or die('MySQL query error');
  22. mysql_close($link);
  23. ?>
  24. <! DOCTYPE HTML>
  25. <html>
  26. <head>
  27. <title>Exam</title>
  28. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  29. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  30. <meta name="mobile-web-app-capable" content="yes">
  31. <meta name="apple-mobile-web-app-capable" content="yes" />
  32. <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
  33. <META http-equiv="Cache-Control" content="no-cache">
  34. <META http-equiv="Pragma" content="no-cache">
  35. <META http-equiv="Expires" content="0">
  36. <script src="./function.js"></script>
  37. <script type="text/javascript">
  38. saveRecord("43811<?echo $count?>");
  39. rotateZ = 0;
  40. error = 0;
  41. isStop = false;
  42. </script>
  43. <style type="text/css" media="screen">
  44. * {
  45. margin: 0;
  46. padding: 0;
  47. }
  48. body {
  49. -moz-user-select : none;
  50. -webkit-user-select: none;
  51. }
  52. .contentDiv{
  53. position:relative;
  54. margin: 0px auto;
  55. width: 800px;
  56. height: 720px;
  57. }
  58. .defaultCanvas{
  59. position:absolute;
  60. top:0px;
  61. lef:0px;
  62. display: inline;
  63. z-index: 1;
  64. }
  65. .option{
  66. float: left;
  67. width: 20px;
  68. height: 20px;
  69. border: 2px solid #cccccc;
  70. margin-right: 12px;
  71. margin-bottom: 12px;
  72. }
  73. .defaultPage{
  74. position:absolute;
  75. display: inline;
  76. left: 0px;
  77. top: 0px;
  78. }
  79. .defaultFlash{
  80. position:absolute;
  81. display: inline;
  82. left: 110px;
  83. width: 580px;
  84. height: 435px;
  85. z-index: 10;
  86. }
  87. .defaultPic{
  88. position:absolute;
  89. display: inline;
  90. left: 0px;
  91. top: 0px;
  92. z-index: -10;
  93. }
  94. .defaultArrow{
  95. position:absolute;
  96. display: inline;
  97. z-index: -5;
  98. }
  99. .defaultCar{
  100. position:absolute;
  101. display: inline;
  102. z-index: 100;
  103. }
  104. .defaultLine{
  105. position:absolute;
  106. display: inline;
  107. z-index: 5;
  108. }
  109. .defaultStatus{
  110. position:absolute;
  111. display: none;
  112. left: 30px;
  113. top: 620px;
  114. z-index: -5;
  115. }
  116. .defaultBtn{
  117. position:absolute;
  118. display: inline;
  119. z-index: 10;
  120. }
  121. .defaultHideBtn{
  122. position:absolute;
  123. display: none;
  124. z-index: 10;
  125. }
  126. #buttonPrev{
  127. left: 540px;
  128. top: 620px;
  129. }
  130. #buttonNext{
  131. left: 660px;
  132. top: 620px;
  133. }
  134. .selectItem1{
  135. position:absolute;
  136. display: inline;
  137. left: 0px;
  138. top: 503px;
  139. z-index: 10;
  140. width: 30px;
  141. height: 30px;
  142. }
  143. .selectItem2{
  144. position:absolute;
  145. display: inline;
  146. left: 250px;
  147. top: 503px;
  148. z-index: 10;
  149. width: 30px;
  150. height: 30px;
  151. }
  152. .selectItem3{
  153. position:absolute;
  154. display: inline;
  155. left: 495px;
  156. top: 503px;
  157. z-index: 10;
  158. width: 30px;
  159. height: 30px;
  160. }
  161. .selectItem4{
  162. position:absolute;
  163. display: inline;
  164. left: 495px;
  165. top: 503px;
  166. z-index: 10;
  167. width: 30px;
  168. height: 30px;
  169. }
  170. .picItem{
  171. position: absolute;
  172. display: inline;
  173. z-index: 5;
  174. }
  175. .checkbutton{
  176. position:absolute;
  177. display: inline;
  178. top: 395px;
  179. left: 562px;
  180. width: 100px;
  181. z-index: 10;
  182. }
  183. </style>
  184. </head>
  185. <body>
  186. <div class="contentDiv">
  187. <div class="defaultPage" id="contentDiv">
  188. <img class="defaultPic" id="contentPic" src="image/410pq.jpg"/>
  189. <img class="defaultArrow" id="picA" style="top: 271px; left:293px;" src="image/410arrow.png"/>
  190. <img class="defaultStatus" id="status" src=""/>
  191. <img class="picItem" id="pic7" src="image/pic7.png" style="top:580px;left:250px;" onclick="rotateArrow(75,0,15,7)"/>
  192. <img class="picItem" id="pic9" src="image/pic9.png" style="top:580px;left:350px;" onclick="rotateArrow(75,0,15,9)"/>
  193. <button class="checkbutton" id="chkButton" onclick="checkAns(410)" style="top:595px;left:450px;" >確認答案</button>
  194. <img class="defaultHideBtn" id="buttonPrev" src="image/prevButton.jpg" onclick="nextPage(4381923,'409A')"/>
  195. <img class="defaultHideBtn" id="buttonNext" src="image/nextButton.jpg" onclick="nextPage(4381923,'410A')"/>
  196. </div>
  197. </div>
  198. </body>
  199. </html>