-
Notifications
You must be signed in to change notification settings - Fork 0
/
_aprovar_usuarios.php
46 lines (28 loc) · 1.09 KB
/
_aprovar_usuarios.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
<?php
include 'conexao.php';
$id = $_GET['id'];
$nivel = $_GET['nivel'];
if($nivel == 1){
$sql = "UPDATE usuarios set status = 'Ativo', `user_level` = 1 WHERE id_usuario = $id";
$update = mysqli_query($con,$sql);
?>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<div class="container" style="width: 400px;">
<center>
<h3> virou Administrador </h3>
</center>
</div>
<?php } else if($nivel == 2){
$sql = "UPDATE usuarios set status = 'Ativo', `user_level` = 2 WHERE id_usuario = $id";
$update = mysqli_query($con,$sql);
?>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<div class="container" style="width: 400px;">
<center>
<h3> virou funcionário </h3>
</center>
</div>
<?php } ?>
<?php header("location: aprovar_usuarios.php"); ?>
<!--
} -->