-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
88 lines (84 loc) · 3.14 KB
/
profile.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();
$isIndex = 0;
if(!(array_key_exists('teacher_id',$_SESSION) && isset($_SESSION['teacher_id']))) {
session_destroy();
if(!$isIndex) header('Location: index.php');
}
?>
<?php include 'php/node_class.php'; ?>
<html>
<head>
<link rel="stylesheet" href="css/style.css"/>
<title>Profile</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/profile.js"></script>
<!-- Custom styles for this template -->
<link href="navbar-fixed-top.css" rel="stylesheet">
</head>
<body>
<!-- Fixed navbar -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">Online Attendance</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="teacher.php">Dashboard</a></li>
<li class="active"><a href="profile.php">Profile</a></li>
<li><a href="statistics.php">Statistics</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav></br></br></br></br>
<div class="container">
<?php
$name = $_SESSION['name'];
$phone = $_SESSION['phone'];
$email = $_SESSION['email'];
$classes = $_SESSION['classes'];
$teacher_id = $_SESSION['teacher_id'];
echo '<h2>Welcome , '.$name.'. Edit your profile here.</h2><br>';
?>
<div class="wrapper">
<dl class="dl-horizontal">
<dt>Name : </dt>
<dd>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
<input class="form-control" name="name" placeholder="Enter your name" value="<?php echo $name; ?>">
</div>
</dd>
<dt>Phone : </dt>
<dd>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-phone"></span></span>
<input class="form-control" name="phone" placeholder="Enter your phone" value="<?php echo $phone; ?>">
</div>
</dd>
<dt>Email : </dt>
<dd>
<div class="input-group">
<span class="input-group-addon">@</span>
<input class="form-control" name="email" placeholder="Enter your email" value="<?php echo $email; ?>">
</div>
</dd>
<dt>Classes : </dt>
<dd><?php echo $classes == 0? 0 : count($classes); ?></dd>
</dl>
<button class="btn btn-success update-profile">Save</button>
</div>
</div>
</body>
</html>