/
aduserinfo.php
129 lines (115 loc) · 2.57 KB
/
aduserinfo.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<style>
ul{
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li{
float: left;
}
li a{
display: block;
color: white;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #ddd;
}
li a:hover:not(.active) {
background-color: #ddd;
}
.active {
background-color: #CD5C5C;
}
.container {
position: relative;
text-align: center;
color: white;
}
.centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: #333;
color: white;
text-align: center;
}
button a{
display: block;
color: white;
padding: 7px 7px;
text-decoration: none;
}
.button {
background-color: #333;
color: white;
border: 2px solid #555555;
}
.button:hover {
background-color: #ddd;
color: white;
}
</style>
<?php
if((isset($_COOKIE["admin"]))){
if($_REQUEST["usersearch"]==''){
echo "Please Enter A User Id To Search!";
}
else{
include("db_rw_json.php");
$jsonData= getJSONFromDB("select name,uname,dob,gender,utype,phone,email from logs where uname='".$_REQUEST["usersearch"]."'");
$jsn=json_decode($jsonData);
foreach($jsn as $v){
?>
<center><h2>User Information</h2></center></head>
<hr>
<ul>
<li><a href="adminhome.php">Go Back</a></li>
<li><a href="logout.php">Logout</a></li>
</ul></br>
<form><pre>
<h3>Name: </h3>
<input type="text" name="name" value="<?php echo $v->name ?>"></br></br>
<h3>Username: </h3>
<input type="text" name="uname" value="<?php echo $v->uname ?>"></br></br>
<h3>Date Of Birth: </h3>
<input type="text" name="dob" value="<?php echo $v->dob ?>"></br></br>
<h3>Gender: </h3>
<input type="text" name="gender" value="<?php echo $v->gender ?>"></br></br>
<h3>User Type: </h3>
<input type="text" name="utype" value="<?php echo $v->utype ?>"></br></br>
<h3>Phone Number: </h3>
<input type="text" name="phone" value="<?php echo $v->phone ?>"></br></br>
<h3>Email: </h3>
<input type="text" name="email" value="<?php echo $v->email ?>"></br></br>
</pre>
</form>
</br>
<div class="footer">
Website originally developed! E-mail: ourmail@mail.com</br>
Phone: +99123422 Address: Address here</br>
</div>
<?php
}
}
}
else{
header("Location:logout.php");
//echo "<script>alert('Suspicious Login Attempt!');</script>";
}
?>
</br></br>
<div class="footer">
Website originally developed! E-mail: ourmail@mail.com</br>
Phone: +99123422 Address: Address here</br>
</div>