-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.php
More file actions
142 lines (132 loc) · 3.93 KB
/
settings.php
File metadata and controls
142 lines (132 loc) · 3.93 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
session_start();
require_once("sql_connect.php");
if(!isset($_SESSION["user_id"])){
exit("Profile error!");
}
if(!isset($_SESSION["unique"])){
exit("PERMISSION DENIED");
}
?>
<?php
$ses1 = $_SESSION["user_id"];
$updprfle = "SELECT * FROM users WHERE userID='{$ses1}'";
$pfle = $conn->query($updprfle);
$ufle = $pfle->fetch_assoc();
?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>LinkWave</title>
<link rel="stylesheet" href="css/setting.css">
</head>
<body>
<span style="
position: absolute;
top: 0;
right: 0;
width: 10%;
font-size: 30px;
height: auto;
color: red;
cursor:pointer;
" onclick="setclse()">⇥</span>
<h2><?php echo $ufle["username"]?><br><p><?php echo $ufle["userID"]?></h2>
<button class="accordion">Profile</button>
<div class="panel profile">
<div id="error" style="width: 100%;
background-color: lightblue;
color: white;">
<?php if (isset($_GET['error'])){
//echo $_GET['error'];
}
?>
</div>
<div id="imgdisplay">
<?php
if(empty($ufle["profileimage"]) || empty($ufle["imagetype"])){
?>
<img id="imdisp" src="icons\user.png" style="width:40%;height:40%;border-radius:50%;">
<?php
}else{
?>
<img id="imdisp" src="viewimage.php?image_id=<?php echo $ufle["userID"];?>" style="width:40%;height:40%;border-radius:50%;">
<?php
}
?>
</div>
<button id="upld" style="color:white;background-color:black;margin-top:5px;" onclick="showfile()"> Change profile image</button>
<form action="<?php echo htmlspecialchars("homepage.php");?>" method="POST" enctype="multipart/form-data" novalidate>
<div>
<input hidden type="file" name="imgupload" id="file" accept="image/*" onchange="viewprofileimg(this)" >
</div>
<br>
<input type="submit" name="submit" style="background-color: blue;
color: white;
background-image: linear-gradient(45deg, black, transparent);
border-radius: 5px" value="Change">
</form>
</div>
</div>
<button class="accordion">Geolocation</button>
<div class="panel">
<p>Location status:
<?php
if(!empty($ufle["maperror"])){
?>
<span style="color:red;">Location is not working properly </span><br>
<span style="color:red;">ERR:<?php echo $ufle["maperror"]?> </span>
<?php
}else{
?>
<span style="color:green;">Location is perfect </span>
<?php
}
?>
</p>
<form name="locfrm" action="" method="POST" onsubmit="return locationperm()">
<p>
<select id="locopt" name="locperm">
<option value="<?php echo $ufle["all_map_access"]?>"><?php echo $ufle["all_map_access"]?></option>
<option value="allow">allow</option>
<option value="block">block</option>
</select> location access to newly linked users <button style="color: white;
background-color: black;" id="bloc"> Apply</button></p>
</form>
</div>
<button class="accordion">Account</button>
<div class="panel">
<div id="vpwd" style="width: 100%;
background-color: lightblue;
color: white;">
</div>
<form name="pswrd" action="" method="POST" onsubmit="return passwordchange()">
<p><b>Change your password</b></p>
<input type="password" name="pwd" placeholder="Password"><br><br>
<input type="password" name="rpwd" placeholder="Confirm password"><br><br>
<button style="
width: 50%;
color: white;
background-color: black;
font-size: 23px;
border-radius: 10px;" id="pid">Change</button>
</form>
</div>
<button class="accordion">Session</button>
<div class="panel">
<button style="
background-color: blue;
color: white;
background-image: linear-gradient(45deg, black, transparent);
width: 50%;
height: 40px;
font-size: 30px;
border-radius: 10px;
margin-top: 10px;
" id="lo" onclick="logoutuser()">Log out</button>
</div>
</body>
</html>