-
Notifications
You must be signed in to change notification settings - Fork 0
/
adminenter.php
193 lines (149 loc) · 6.4 KB
/
adminenter.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!DOCTYPE html>
<html lang="en">
<?php ?>
<?php
//session checking
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "srp";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "select name from adminsession";
$result = $conn->query($sql);
$count=mysqli_num_rows($result);
if ($count==0) {
header("Location: admin_login.php");
} else {
echo "0 results";
}
mysqli_close($conn);
?>
<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>Student Profile System</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/sb-admin.css" rel="stylesheet">
<link href="css/table.css" rel="stylesheet">
<link href="css/plugins/morris.css" rel="stylesheet">
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="css/style.css" rel="stylesheet">
</head>
<script>
function session_checking()
{
$.post( "session.php", function( data ) {
if(data == "-1")
{
alert("Your session has been expired!");
header("Location: home.php");
}
});
}
</script>
<body>
<div id="wrapper">
<?php session_start();?>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button><br>
<p style="color:white;font-size:17px; font-weight:100;">        Welcome  <?php echo $_SESSION["aname"]; ?></p>
</div>
<!-- Top Menu Items -->
<ul class="nav navbar-right top-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <?php echo " ".$_SESSION["aname"]; ?><b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="divider"></li>
<li>
<a href="adminlogout.php" ><i class="fa fa-fw fa-power-off"></i> Log Out</a>
</li>
</ul>
</li>
</ul>
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav side-nav">
<li >
<a href="adminhome.php"><i class="fa fa-fw fa-file"></i> Student Profile</a>
</li>
<li >
<a href="javascript:;" data-toggle="collapse" data-target="#demo"><i class="fa fa-fw fa-arrows-v"></i> Timetable <i class="fa fa-fw fa-caret-down"></i></a>
<ul id="demo" class="collapse">
<li>
<a href="generate.php">Generate</a>
</li>
<li>
<a href="adminenterview.php">View</a>
</li>
</ul>
</li>
<li class="active">
<a href="javascript:;" data-toggle="collapse" data-target="#demo1"><i class="fa fa-fw fa-arrows-v"></i> Assessment <i class="fa fa-fw fa-caret-down"></i></a>
<ul id="demo1" class="collapse">
<li>
<a href="adminview.php">View Marks</a>
</li>
<li>
<a href="adminenter.php">Enter Marks</a>
</li>
</ul>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</nav>
<div id="page-wrapper">
<div class="container-fluid">
<!-- Page Heading -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
Marks Updation<br><br>
<form name="assess_enter" action="adminentermark.php" method="post" >
<h3><b>Year</b></h3>
<input id='inp' type="text" name="year" placeholder=" Year" onfocus="this.placeholder = ''" onfocusout="this.placeholder = ' Year'">
<h3><b>Semester</b></h3>
<input id='inp' type="text" name="semester" placeholder=" Semester" onfocus="this.placeholder = ''" onfocusout="this.placeholder = ' Semester'">
<h3><b>Batch</b></h3>
<input id='inp' type="text" name="batch" placeholder=" Batch" onfocus="this.placeholder = ''" onfocusout="this.placeholder = ' Batch'">
<h3><b>Subject Code</b></h3>
<input id='inp' type="text" name="subcode" placeholder=" Sub Code" onfocus="this.placeholder = ''" onfocusout="this.placeholder = ' Sub Code'"><br><br>
<h3><b>Assessment :</b></h3>
<input id='inp' type="text" name="assessment" placeholder=" Assessment" onfocus="this.placeholder = ''" onfocusout="this.placeholder = ' Assessment'"><br><br>
<input type="submit" onclick="check(this.form)" value="Go" id='i'/><br>
</form>
</h1>
</div>
</div>
<!-- -->
<div class="row">
</div>
<!-- /.container-fluid -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Morris Charts JavaScript -->
<script src="js/plugins/morris/raphael.min.js"></script>
<script src="js/plugins/morris/morris.min.js"></script>
<script src="js/plugins/morris/morris-data.js"></script>
</body>
</html>