-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremovecustomer.php
More file actions
95 lines (90 loc) · 2.58 KB
/
Copy pathremovecustomer.php
File metadata and controls
95 lines (90 loc) · 2.58 KB
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
<?php
/**
* User: Jonnadula Prithvi
* DBMS Project
* Relief Estates
*/
require 'connect.inc.php';
session_start();
if(!$_SESSION['username'])
{
header("Location: adminlogin.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Remove Customer:Relief Estates</title>
<link href="style/main.css" rel='stylesheet' type='text/css'/>
<link rel="shortcut icon" type="image/x-icon" href="img/logo.png"/>
<script>
function redirectremoveseller(){
window.open('removecustomer.php','_self')
}
function redirectaddseller()
{
window.open('addacustomer.php','_self')
}
</script>
</head>
<body id="sellerdetailspage" style="background-image:url(img/bgall.jpg)">
<a href="adminhome.php"><img src="img/logo.png" id="logo"></a>
<a href=""> <img src="img/title.png" id="title2" ></a>
<div class="logindetails4">
<a href="adminprofile.php"> <?php
echo $_SESSION['name'];
?></a>
</div>
<a href="logout.php"><img src="img/logout.png" class="logoutpic4"></a>
<div class="sellerdetialsdiv">
<table class="sellerdetailstable">
<thead>
<tr>
<th colspan="2"><h1>Customer Details</h1></th>
</tr>
<tr>
<th>Username</th>
<th>Delete Customer</th>
</tr>
</thead>
<tbody>
<?php
$query="SELECT cusername FROM customers";
if($query_run=mysql_query($query))
{
if (mysql_num_rows($query_run) == 0)
{
echo '<tr><td colspan="2">No Information Available</td></tr>';
}
else
{
while ($row = mysql_fetch_assoc($query_run))
{
$name = $row['cusername'];
?>
<tr>
<td><?php echo $name; ?></td>
<td><a href="deletecustomer.php?del=<?php echo $name; ?>"><input type="button" class="removebutton" value="Delete"></a></td>
</tr>
<?php
}
}
}
?>
</tbody>
</table>
</div>
<!--<table>-->
<!-- <tr>-->
<!-- <td> <input type="submit" class="addsellerlink" value="Add seller" onclick="redirectaddseller()"></td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td> <input type="submit" class="removesellerlink" value="Remove seller" onclick="redirectremoveseller()"></td>-->
<!-- </tr>-->
<!--</table>-->
<footer>
<h4>All rights reserved.</h4>
<a href="developers.php"><p>© Relief Estates</p><a>
</footer>
</body>
</html>