-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuncoes.php
59 lines (51 loc) · 1.33 KB
/
funcoes.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
<?php
require_once('lang.php');
require_once('i18n.php');
function protecao()
{
if(isset($_SESSION['session_token'])) { }
else
{
echo "<script>window.location='login.php'</script>";
}
}
function checkInstall()
{
if (!file_exists('inc/config.php')) {
echo "<script>window.location='_instalar/'</script>";
}
}
function convertDataView($data)
{
$dthr = explode(" ",$data);
$dt = explode("-",$dthr[0]);
return $dt[2] ."/". $dt[1] ."/". $dt[0] ." ". $dthr[1];
}
function casesStatus($status)
{
switch ($status) {
case '1':
$ticket = "<span class='label label-primary'>Novo</span>";
break;
case '2':
$ticket = "<span class='label label-warning'>" . __('Processando (atribuído)') ."</span>";
break;
case '3':
$ticket = "<span class='label label-warning'>" . __('Processando (planejado)') ."</span>";
break;
case '4':
$ticket = "<span class='label label-danger'>" . __('Pendente') ."</span>";
break;
case '5':
$ticket = "<span class='label label-success'>" . __('Solucionado') ."</span>";
break;
case '6':
$ticket = "<span class='label label-default'>" . __('Fechado') ."</span>";
break;
default:
$ticket = "<span class='label label-primary'>---</span>";
break;
}
return $ticket;
}
?>