-
Notifications
You must be signed in to change notification settings - Fork 4
/
profile.php
64 lines (56 loc) · 2.21 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
<?php
session_start();
require_once 'backend/class.user.php';
$user_login = new User();
if(!$user_login->is_logged_in())
{
$user_login->redirect('index.php');
}
$stmt = $user_login->runQuery("SELECT * FROM tbl_users WHERE userID=:uid");
$stmt->execute(array(":uid"=>$_SESSION['userSession']));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
?>
<!-- top html header -->
<?php include('includes/top-header.php'); ?>
<!-- //top html header -->
<!-- header -->
<?php include('includes/header.php'); ?>
<!-- //header -->
<div style="min-height: calc(100vh - 190px); margin-top: 1em; margin-bottom:3em;">
<div class="container" ><div style =" border-bottom:2px solid #14a1ff;"><h1>Profile</h1></div><br>
<div class="row" >
<!-- left panel -->
<?php include('includes/left-panel.php'); ?>
<!-- //left panel -->
<!-- right panel -->
<div class="col-md-9">
<img src="<?php echo SCRIPT_ROOT; ?>/images/defaultBoy.png" class="center-block" alt="Profile Picture">
<div>
<form>
<div class='form-group'>
<label for='disabledInputEmail'>Email address</label>
<input class='form-control' id='disabledInputEmail' type='email' value='<?php echo $row['userEmail']; ?>' disabled>
</div>
<div class='form-group'>
<label for='disabledInputUserRole'>User Role</label>
<input class='form-control' id='disabledInputUserRole' type='email' value='<?php echo $row['userRole']; ?>' disabled>
</div>
</form>
<?php
if($row['userRole']=="Parent"){
echo '<br>';
echo '<form action="backend/parentinfo.php">';
echo '<button type=\'submit\' name="submit" class=\'btn btn-primary\' style="width:50%; display:block ; margin:auto" onclick="sentAlert(\'classid\',\'announcement\');"> Enter Parent Information </button>';
echo '</form>';
}
?>
</div>
</div>
<!-- right panel -->
</div>
</div>
</div>
<!-- footer -->
<?php include('includes/footer.php'); ?>
<!-- //footer -->
<?php include('includes/bottom-footer.php'); ?>