-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparents.php
91 lines (86 loc) · 2.93 KB
/
parents.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
<?php
require("dbase.php");
$sqlsn ="select * from nop";
$resultsn = $conn->query($sqlsn);
if(isset($_POST['submit']))
{
$sql="update nop set parents ='".$_POST['parents']."', parentsr ='".$_POST['parentsr']."' where nid=".$_POST['nid'];
if($conn->query($sql)=== TRUE)
{
$sql1="update noph set parents ='".$_POST['parents']."' where nid=".$_POST['nid'];
if($conn->query($sql1)=== TRUE)
{
echo '<p class="row col s12 green white-text center">Submitted</p>';
}
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
<title>DOS - Digitizing DIT</title>
<!-- CSS -->
<style>
.student{}
.teacher{}
.security{}
</style>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
</head>
<body style="background:rgb(7,171,140);">
<div class="container" style="background:rgba(0,0,0,0.3);margin-top:5vh;">
<div class="row">
<div class="col s1"></div>
<div class="col s10 center white-text">
<h1>Digital Outpass System</h1>
</div>
<div class="col s1"></div>
</div>
<div class="section"></div>
<div class="row">
<form action="" method="POST">
<?php
if ($resultsn->num_rows > 0)
{
while($rowsn = $resultsn->fetch_assoc())
{
if($rowsn['name']==$_GET['name']&&$rowsn['sem']==$_GET['sem'])
{
echo'<div class="col s10 center offset-s1" style="background:rgba(0,0,0,0.3);margin-bottom:2em;padding:1em;">
<h5 class="col s4 white-text">Name</h5>
<h5 class="col s2 white-text">:</h5>
<h5 class="col s6 white-text">'.$rowsn['name'].'</h5>';
echo'<h5 class="col s4 white-text">Date</h5>
<h5 class="col s2 white-text">:</h5>
<h5 class="col s6 white-text">'.$rowsn['dateout']." : ".$rowsn['datein'].'</h5>';
echo'<div class="row">
<h5>
<input name="parents" type="radio" id="NotAllowed" value="Not Allowed" required/>
<label for="NotAllowed">Not Allowed</label>
<input name="parents" type="radio" id="Allowed" value="Allow" required/>
<label for="Allowed">Allowed</label>
<input type="hidden" value="'.$rowsn['nid'].'" name="nid" />
</h5>
</div>
<h5 class="col s3 white-text">Review</h5>
<input class="col s9 white-text" name="parentsr" /><br>
<input type="submit" class="btn" name="submit" Value="Submit" />
</div>';
}
}
}
?>
</form>
</div>
<div class="section"></div>
</div>
<!-- Scripts-->
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="js/materialize.js"></script>
<script src="js/init.js"></script>
</body>
</html>