-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathteachermyprofile.php
88 lines (85 loc) · 2.89 KB
/
teachermyprofile.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();
include_once 'dbconnect.php';
if(!isset($_SESSION['user']))
{
header("Location: index.php");
}
$res=mysqli_query($bd,"SELECT * FROM teacher WHERE id=".$_SESSION['user']);
while($userrow=mysqli_fetch_array($res))
{
$_SESSION['login_id']=$userrow['login_id'];
$_SESSION['full_name']=$userrow['full_name'];
$_SESSION['mobile_no']=$userrow['mobile_no'];
$_SESSION['class_tch']=$userrow['class_tch'];
$_SESSION['authority']=$userrow['authority'];
$_SESSION['branch']=$userrow['branch'];
$_SESSION['event_auth']=$userrow['event_auth'];
$_SESSION['profilepic']=$userrow['images_path'];
$_SESSION['gender']=$userrow['gender'];
}
$event_auth=$_SESSION['event_auth'];
if((isset($_POST['btn_remove'])))
{
$sql_query=mysqli_query($bd,"DELETE FROM $event_auth WHERE paid='no'");
if($sql_query)
{
?>
<script>alert('Removed Successfully!');</script>
<?php
}
else
{
?>
<script>alert('Could not remove!');</script>
<?php
}
}
?>
<?php include 'header.php';
include 'validation.php';
include 'teachersidenavbar.php'; ?>
<div class="col-sm-9">
<div class="main" id="myprofile">
<center>
<h1>Welcome To Your Profile!</h1> <br>
<div class="cinfo" >
<a class="fancybox img-responsive" rel="group" href=<?php echo $_SESSION['profilepic']; ?> title="<?php echo $_SESSION['full_name'];?>"><img src="<?php echo $_SESSION['profilepic']?>" width="60%" height="60%" alt="<?php echo $_SESSION['profilepic']; ?>" style="border:5px solid #333333;" /></a><br /><br>
<h3>Name</h3><?php echo $_SESSION['full_name'];?><br /><br>
<h3>Email ID</h3><?php echo $_SESSION['login_id'];?><br /><br>
<h3>Mobile No.</h3><?php echo $_SESSION['mobile_no'];?><br /><br>
<?php
if($_SESSION['class_tch']!=null)
{?>
<h3>Class Teacher</h3>
<font style="text-transform:capitalize;"><?php echo $_SESSION['class_tch'];?></font><br /><br>
<?php
}?>
<?php
if(($_SESSION['authority']!=null && $_SESSION['event_auth']!=null) && $_SESSION['authority']!="activity_head")
{?>
<h3>Authority</h3>
<font style="text-transform:capitalize;"><?php echo $_SESSION['event_auth']." ".$_SESSION['authority'];?>
</font><br /><br>
<?php
}
else if(($_SESSION['authority']!=null && $_SESSION['branch']!=null) || $_SESSION['authority']=="activity_head")
{?>
<h3>Authority</h3>
<font style="text-transform: capitalize;"><?php echo $_SESSION['branch']." Dept ".$_SESSION['authority'];?>
</font><br /><br>
<?php
}
else if($_SESSION['authority']=="admin")
{?>
<h3>Authority</h3>
<font style="text-transform: capitalize;"><?php echo $_SESSION['authority'];?>
</font><br /><br>
<?php
}?>
</div>
</center>
</div>
</div>
</div>
<?php include 'footer.php'; ?>