MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
merror.class
Ir para a documentação deste ficheiro.
1<?php
6class MError extends MControl
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 if (!$this->msg)
41 $this->msg = "Erro";
42
43 // if ( ! $this->info )
44 // $this->info = "Causa desconhecida";
45
46 if (!$this->href)
47 {
48 $this->href = getenv("HTTP_REFERER");
49
50 if (!$this->href)
51 $this->href = "/index.php";
52 }
53 }
54
62 function Generate()
63 {
64 echo "<html>";
65 echo "<body>";
66 echo "<form action=\"{$this->href}\">";
67 echo "<table width=\"50%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\" align=\"center\">\n";
68 echo " <tr>\n";
69 echo " <td class=\"boxTitle\" bgcolor=\"#990000\" colspan=\"2\"><font color=\"#FFFFFF\"><b>Fatal Error</b></font></td>\n";
70 echo " </tr>\n";
71 echo " <tr>\n";
72 echo " <td valign=\"top\" width=\"60\"><img src=\"images/error.gif\" hspace=\"20\"></td>\n";
73 echo " <td class=\"errorText\">";
74
75 echo $this->msg;
76
77 if (is_array($this->info))
78 {
79 echo "<ul>\n";
80
81 foreach ($this->info as $i)
82 echo "<li>$i</li>";
83
84 echo "</ul>\n";
85 }
86 else
87 echo $this->info;
88
89 echo "</td>\n";
90 echo " </tr>\n";
91 echo " <tr>\n";
92 echo " <td colspan=\"2\" bgcolor=\"#AAAAAA\" align=\"center\">\n";
93 echo " <input type=\"button\" value=\"Voltar\">\n";
94 echo " </td>\n";
95 echo " </tr>\n";
96 echo "</table>\n";
97 echo "</form>";
98 echo "</body></html>";
99 }
100}
101?>
Generate()
Definição merror.class:62
__construct($msg=null, $info=null, $href=null)
Definição merror.class:34