-
Notifications
You must be signed in to change notification settings - Fork 0
/
Modify_upc_update_data_keylocks.php
executable file
·79 lines (52 loc) · 1.98 KB
/
Modify_upc_update_data_keylocks.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
<?php require_once("includes/session.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php require_once("includes/connection.php"); ?>
<?php require_once("includes/validation_functions.php"); ?>
<?php confirm_logged_in(); ?>
<?php include("includes/header.php"); ?>
<div class = "row2">
<div class ="col1">
</div>
<div class="col2">
<?php echo message(); ?>
<?php echo form_errors($errors); ?>
<h2> Manage Key Interlocks </h2>
<form method="POST">
<p>Search for Building Code:
<input type="text" name="keyword" required/>
<input type="submit" name="submit" value="Search!" />
</p>
</form>
<?php
if (isset($_POST["submit"])) {
$required_fields = array("keyword");
validate_presences($required_fields);
if(empty($errors))
{
$keyword = mysql_prep($_POST["keyword"]);
$disp = Find_Data_By_Search($keyword); ?>
<table style="visibility:visible" border="1px solid black;">
<tr>
<th style="text-align: left; width: 200px;">Building Code</th>
<th style="text-align: left; width: 200px;">Building Name</th>
<th colspan="2" style="text-align: left;">Actions</th>
</tr>
<?php while($display = mysqli_fetch_assoc($disp)){ ?>
<tr>
<td><?php echo htmlentities($display["Building_Code"]); ?></td>
<td><?php echo htmlentities($display["Building_Name"]); ?></td>
<td><a href= "edit_keylocks.php?keylocks=<?php echo urlencode($display["Building_Code"]); ?>">Edit</a></td>
<td><a href= "delete_keylocks.php?keylocks=<?php echo urlencode($display["Building_Code"]); ?>" onclick="return confirm('Are you sure?');">Delete</a></td>
</tr>
<?php } ?>
</table>
<?php
}
}
?>
<a href="new_keylocks.php">Add new KeyInterlocks</a>
<br/>
<a href="Modify_data.php">Main Menu</a>
</div>
</div>
<?php include("includes/footer.php"); ?>