-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.html
More file actions
107 lines (96 loc) · 4.05 KB
/
admin.html
File metadata and controls
107 lines (96 loc) · 4.05 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>CADGrader: Automatically Grade CAD</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/admin.css" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<!-- Custom Fonts -->
<link href="https://fonts.googleapis.com/css?family=Cabin" rel="stylesheet">
<!--<script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script>-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<?php
if(isset($_SESSION['username']) && isset($_SESSION['password']) && isset($_SESSION['attemptUsername']) && isset($_SESSION['attemptPassword']) && isset($_SESSION['Version'])){
//must change this to take password from server
$version = $_SESSION['Version'];
$usernameLog = $_SESSION['username'];
if($_SESSION['username']!=$_SESSION['attemptUsername'] || $_SESSION['password']!=$_SESSION['attemptPassword'] || $_SESSION['Version']!="admin"){
header("Location: accessCheck.php"); /* Redirect browser */
exit();
}
else{
//dunno if i need this
//$_SESSION['username']="";
//$_SESSION['password']="";
}
}
else{
header("Location: accessCheck.php"); /* Redirect browser */
exit();
}
?>
<!-- Page Content -->
<section id="main3" class="main">
<div class="container">
<br>
<div class="row">
<div class="col-lg-12 text-center"><br>
<button id="backBut" type="button" class="btn btn-danger main3But"><h4><b>BACK</b></h4></button>
<button id="marksBut" type="button" class="btn btn-danger main3But"><h4><b>STUDENT MARKS</b></h4></button>
<button id="assMarksBut" type="button" class="btn btn-danger main3But"><h4><b>ASSIGNMENT MARKS</b></h4></button>
<button id="newAssBut" type="button" class="btn btn-danger main3But"><h4><b>NEW AST</b></h4></button>
<!-- <h1 id="dateTitle" style='float:right;'>Jane 18/17</h1> -->
</div>
</div><br>
<div class='row text-center' id="uploadPage" style="display:none;">
<iframe src="electronApp/index.html" frameborder="0"; width="375" height="500">
</iframe>
</div>
<!-- <div class="row justify-content-center">
<div class="col-lg-12 text-center">
<h1 class="h1Size">Upload Assignments</h1><br>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<h1 class=" text-left">Upload Assignments</h1><br>
</div>
<div class="col-lg-6 text-xs-right">
<h1 class=" text-right">Upload Assignments</h1><br>
</div>
</div> -->
</div>
</section>
</div>
<!-- jQuery Version 1.11.1 after uploading to server change this
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!--<script src="js/three.js"></script>
<script src="js/stats.js"></script>
<script src="js/detector.js"></script>-->
<script>
var version = <?php echo json_encode($version); ?>;
var usernameLog = <?php echo json_encode($usernameLog); ?>;
</script>
<script type="text/javascript" src="js/admin.js"></script>
</body>
</html>