-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlert.php
More file actions
42 lines (38 loc) · 879 Bytes
/
Copy pathAlert.php
File metadata and controls
42 lines (38 loc) · 879 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
36
37
38
39
40
41
42
<?php
class Alert
{
/**
* @var array
*/
public $get = [];
/**
* @param $_GET $get
*/
public function __construct($get)
{
$this->get = $get;
}
/**
* Display errors and success
*/
public function getMessage()
{
if (!isset($this->get['m'])) {
return "";
}
switch ($this->get['m']) {
case 'Error':
echo '<div class="alert alert-danger" role="alert">
Error al procesar la informacion
</div>';
break;
case 'Success':
echo '<div class="alert alert-success" role="alert">
Accion realizada correctamente
</div>';
default:
# code...
break;
}
}
}