-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ans_Barshear.php
88 lines (88 loc) · 3.08 KB
/
Ans_Barshear.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
session_start();
ini_set("display_errors","Off");
?>
<!DOCTYPE HTML public "-w3c//dtd//xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Virtual Lab-Dayalbagh Educational Institute</title>
<link rel="shortcut icon" type="image/x-icon" href="images/icon.ico">
<link href="css/main.css" rel="stylesheet" type="text/css">
<link href="css/dropdown.css" media="all" rel="stylesheet" type="text/css" />
<link href="css/advanced.css" media="all" rel="stylesheet" type="text/css" />
<style type="text/css">
th{
font-family:Arial;
font-size:1.8em;
color:#FF00FF;
}
</style>
</head>
<body id="draggingDisabled" bgcolor="#FFFFFF">
<div id="header_main">
<img src="images/header_01.jpg"></div>
<div id="header">
<ul class="dropdown dropdown-horizontal">
<?php
ini_set("display_errors","Off");
echo <<<EOQ
<li><a href="home.php">Home</a></li>
<li><a href="Barshear.php">Bar Shearing</a></li>
<li class="dir"><a href="#">Simulations</a>
<ul>
<li><a href="BarshearSimulation.php?https://www.youtube.com/embed/a1RYCKkFBAA">Bar Shearing</a></li>
<li><a href="BarshearSimulation.php?https://www.youtube.com/embed/6vM_LKZpjbY">Bar Shearing with forging force</a></li>
</ul>
</li>
<li><a href="MCQ_Barshear.php">Self Check Quiz</a></li>
EOQ;
$answers = $_SESSION['answer'];
$Curr_answers = array('4','Hydraulic Press','Green color die','8 tonnes','5 tonnes');
?>
</ul></div>
<div style="background-image:url(images/content_bg.jpg); position: relative; margin:auto; width: 1024px; min-height:550px;">
<div style="padding-left:35px;">
<center><u style="font-size:1.7em; font-weight:bold; color:#ff0000; padding-top:10px;">RESULT SHEET</u><br><br>
<table border=2 cellspacing=5 cellpadding=5>
<tr><th>Question No.</th><th>Your Answers</th><th>Correct Answers</th></tr>
<?php
$score=0;
for($i=0;$i<5;$i++) {
if($answers[$i]==$Curr_answers[$i]){
$score++;
}
if($answers[$i] != '')
{
$var =$i+1;
?>
<tr>
<td><center> <?php echo($var); ?></center></td>
<td> <?php echo $answers[$i];?></td>
<td> <?php echo $Curr_answers[$i];?></td>
</tr>
<?php } } ?>
</table><br><br>
<u style="font-size:1.3em; color:#0000FF; font-weight:bold;">Your Score</u>
= <b style="font-size:1.4em; color:#FF0000;"><?php echo $score ?></b>
<a href="javascript: window.print()"><abbr title="Print">
<img src="images/Print.jpg"></abbr> <u style="font-size:1.2em; color:#FF0000; font-weight:bold;">Print</u></a>
</center>
</div>
<?php
//Opening file to get counter value
$fp = fopen ("counter.txt", "r");
$count_number = fread ($fp, filesize ("counter.txt"));
fclose($fp);
$counter = (int)($count_number) + 1;
$count_number = (string)($counter);
$fp = fopen ("counter.txt", "w");
fwrite ($fp, $count_number);
fclose($fp);
?>
</div>
<div id="footer">
© Metal Forming Virtual Simulation Lab - Dayalbagh Educational Institute (www.dei.ac.in)
</div>
</body>
</html>