MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
merror.class
Ir para a documentação deste ficheiro.
1
<?php
6
class
MError
7
{
11
var
$msg
;
12
16
var
$info
;
17
21
var
$href
;
22
34
function
__construct
(
$msg
=
null
,
$info
=
null
,
$href
=
null
)
35
{
36
$this->msg =
$msg
;
37
$this->info =
$info
;
38
$this->href =
$href
;
39
}
40
53
function
Error
(
$msg
=
''
, $goto =
''
,
$caption
=
''
, $event =
''
)
54
{
55
if
(!$this->msg)
56
$this->msg =
"Erro"
;
57
58
if
(!$this->info)
59
$this->info =
"Causa desconhecida"
;
60
61
if
(!$this->href)
62
{
63
$this->href = getenv(
"HTTP_REFERER"
);
64
65
if
(!$this->href)
66
$this->href =
"/index.php"
;
67
}
68
}
69
77
function
Generate
()
78
{
79
echo
"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"8\" align=\"center\" height=\"50%\">\n"
;
80
echo
" <tr>\n"
;
81
echo
" <td class=\"boxTitle\" colspan=\"2\">$this->msg</td>\n"
;
82
echo
" </tr>\n"
;
83
echo
" <tr>\n"
;
84
echo
" <td valign=\"top\" width=\"60\"><img src=\"images/error.gif\" hspace=\"20\"></td>\n"
;
85
echo
" <td class=\"errorText\">"
;
86
87
if
(is_array($this->info))
88
{
89
echo
"<ul>\n"
;
90
91
foreach
($this->info as $i)
92
echo
"<li>$i</li>"
;
93
94
echo
"</ul>\n"
;
95
}
96
else
97
echo
$this->info
;
98
99
echo
"</td>\n"
;
100
echo
" </tr>\n"
;
101
echo
" <tr>\n"
;
102
echo
" <td colspan=\"2\" align=\"center\">\n"
;
103
echo
" <form><input type=\"button\" onClick=\"GotoURL('{$this->href}')\" value=\"Voltar\"></form>\n"
;
104
echo
" </td>\n"
;
105
echo
" </tr>\n"
;
106
echo
"</table>\n"
;
107
}
108
}
109
?>
MControl\$caption
$caption
Definição
mcontrol.class:130
MError
Definição
merror.class:7
MError\Generate
Generate()
Definição
merror.class:77
MError\$msg
$msg
Definição
merror.class:11
MError\Error
Error($msg='', $goto='', $caption='', $event='')
Definição
merror.class:53
MError\$info
$info
Definição
merror.class:16
MError\$href
$href
Definição
merror.class:21
MError\__construct
__construct($msg=null, $info=null, $href=null)
Definição
merror.class:34
classes
flow
merror.class
Gerado por
1.10.0