forked from RITct/Decipher-2016
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdateuser.php
More file actions
35 lines (31 loc) · 730 Bytes
/
Copy pathupdateuser.php
File metadata and controls
35 lines (31 loc) · 730 Bytes
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
<style>
p#ack {
color:green;
text-align:center;
}
</style>
<?php
session_start();
if ((!isset($_SESSION["fbuid"]))||(($_SESSION["role"])!=10))
{$output = "<script>
window.location='index.php';
</script>";
echo "hai";
echo $output; }
require_once("database.php");
global $result;
require_once("adtheme.php");
if($_SESSION["role"] == 10)
{
$id = $_GET['id'];
$role = $_GET['role'];
$level = $_GET['level'];
$sql = "UPDATE users SET role = '" . $role . "', level = '" . $level . "' WHERE fbuid = '" . $id ."'";
$ref = $result->query($sql);
$content = "<p id=\"ack\">User updated<p>";
print $content;
header("location:index.php");
}
else
header("location:index.php");
?>