-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoload.php
More file actions
113 lines (94 loc) · 3.27 KB
/
autoload.php
File metadata and controls
113 lines (94 loc) · 3.27 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
<?php
include_once 'class_config.php';
/*-----------------------------------------------------------------------------------------------*/
/*FUNCOES GERAIS*/
/*Faz o carregamento automatico de classes
* com o comando "new nome_da_class()"
*/
spl_autoload_register(function ($class_name) {
include_once 'class_'.$class_name . '.php';
});
function data_hoje(){
date_default_timezone_set("America/Sao_Paulo");
$data = date('d/m/Y');
return $data;
}
function hora_hoje(){
date_default_timezone_set("America/Sao_Paulo");
$hora = date('H:m:s');
return $hora;
}
function data_hora_hoje(){
date_default_timezone_set("America/Sao_Paulo");
$data_hora = date('d/m/Y H:m:s');
return $data_hora;
}
function data($epoch){
date_default_timezone_set("America/Sao_Paulo");
$data = date('d/m/Y', $epoch / 1000);
return $data;
}
function hora($epoch){
date_default_timezone_set("America/Sao_Paulo");
$hora = date('H:m:s', $epoch / 1000);
return $hora;
}
function data_hora($epoch){
date_default_timezone_set("America/Sao_Paulo");
$data_hora = date('d/m/Y H:m:s', $epoch / 1000);
return $data_hora;
}
/*-----------------------------------------------------------------------------------------------*/
/*Layout*/
function layout_(){
?>
<?php
}
function layout_header(){
include_once 'layout_header.php';
}
function layout_footer(){
include_once 'layout_footer.php';
}
function layout_menu(){
include_once 'layout_menu.php';
}
function layout_loading(){
?>
<div class="d-flex justify-content-center">
<div class="spinner-border text-primary" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<?php
}
function layout_toast_header(){
?>
<!-- <div aria-live="polite" aria-atomic="true" style="position: relative; min-height: 200px; min-width: 500px;"> -->
<div aria-live="polite" aria-atomic="true" style="position: absolute; top: 80px; min-height: 200px; min-width: 500px;">
<div style="position: absolute; top: 10px; left: 10px;">
<?php
}
function layout_toast_footer(){
?>
</div>
</div>
<?php
}
function layout_toast($titulo, $mensagem){
?>
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true" data-autohide="false" data-delay="2000">
<div class="toast-header">
<svg class=" rounded mr-2" width="20" height="20" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img">
<rect fill="#007aff" width="100%" height="100%" /></svg>
<strong class="mr-auto"><?php echo $titulo;?></strong>
<small class="text-muted"><?php echo date("d/m/Y");?></small>
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="toast-body"><?php echo $mensagem;?></div>
</div>
<?php
}
?>