-
Notifications
You must be signed in to change notification settings - Fork 1
/
locam_profs.php
111 lines (90 loc) · 3.18 KB
/
locam_profs.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
<?php
session_start();
//session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>My Profile</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous">
</script>
<script>
function back(){
window.location="coordinator_profile1.php";
}
</script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body style="background-color:#7a5230">
<br><br>
<div class="first" style="background-image:url('subback.jpg'); background-repeat: no-repeat; background-position: center; background-size: '20%'; padding-bottom: 50px;">
<br>
<div class="second" style="float:right"><button class="btn btn-primary" onclick="back()" type="button">Back</button></div>
<br>
<br>
<span class="firstsub_a" style="float:center; " align="center">
<h1 style="color: white; font-family: arial;font-size: 30px">Locam Teachers</h1>
</span>
<br>
<br>
<br><br>
</div>
<br><br><br><br>
<form method="POST">
<table align="center" cellpadding=20px style="background-color: white;" border="0" width="90%">
<tr style="background-color: #4c4c4c;" height="50px">
<td width="5%" style="color: white;"><b>cluster no.</b></td>
<td width="30%" style="color: white;"><b>Employee Name</b></td>
<td width="30%" style="color: white;"><b>E-mail</b></td>
<td width="10%" style="color: white;"><b>Phone Number</b></td>
<td width="10%" style="color: white;"><b>Empid</b></td>
<td width="5%" ></td>
</tr>
<?php
include('connsp.php');
$sq="select * from locam";
$res = $connsp->query($sq);
while($fe=$res->fetch_object())
{
?>
<tr height="50px">
<td><?php echo $fe->tmid;?></td>
<td><?php echo $fe->user;?></td>
<td><?php echo $fe->email;?></td>
<td><?php echo $fe->phone_no;?></td>
<td><?php echo $fe->empid;?></td>
<td><input type="checkbox" name="checkbox[]" value="<?php echo $fe->empid; ?>" ></td>
</tr>
<?php
}
?>
</table>
<br>
<center><input type="submit" name="delete" value="Delete" class="btn btn-primary"></center>
</form>
</body>
</html>
<?php
include('connsp.php');
if(isset($_REQUEST['delete']))
{
$checkbox = $_REQUEST['checkbox'];
for($i=0;$i<count($checkbox);$i++){
$del_id = $checkbox[$i];
$sql = "DELETE FROM locam WHERE empid='".$_REQUEST["checkbox"][$i]."'";
$result = $connsp->query($sql);
}
if($result){
?>
<script type="text/javascript">
alert('Deleted successfully!')
window.location = "coordinator_profile1.php";
</script>
<?php
}
}
?>