-
Notifications
You must be signed in to change notification settings - Fork 0
/
ir_exec.php
48 lines (25 loc) · 820 Bytes
/
ir_exec.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
<?php
if(!isset($_SESSION)){
session_start();
}else{
session_destroy();
session_start();
}
$usuario = $_SESSION['user_name'];
$id_os = $_GET['id_os'];
if(isset($_SESSION['user_name']) && !is_numeric($_SESSION['user_name'])){
$link = new mysqli('localhost', 'root', 'mericunofoide', 'help_desk_ecos');
$link->set_charset('utf8');
if (!$link){
die('Connect Error (' . mysqli_connecterrno() . ')' .mysqli_connect_error());
}else{
$query_update_os = "UPDATE `ordem_servico` SET `status`='2' WHERE `id_os` = '$id_os'";
$result_update_os = $link->query($query_update_os) or die( mysqli_error( $link ) );
header("location: setor_ver_os.php?id_os=".$id_os);
exit();
}
}else{
header("location: ../index.php");
exit();
}
?>