00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 class aliroOffline {
00043 private $live_site = '';
00044 private $sitename = '';
00045 private $offline = 0;
00046 private $offline_message = '';
00047 private $error_message = '';
00048 private $install_warn = '';
00049 private $iso = '';
00050
00051 private $error_text = '';
00052
00053 public function __construct ($mosSystemError=0) {
00054 $config = aliroCore::getInstance();
00055 $config->fixlanguage();
00056 $this->live_site = $config->getCfg('live_site');
00057 $this->sitename = $config->getCfg('sitename');
00058 $this->offline = $config->getCfg('offline');
00059 $this->offline_message = $config->getCfg('offline_message');
00060 $this->error_message = $config->getCfg('error_message');
00061 $this->iso = _ISO;
00062 $this->install_warn = 'For your security please completely remove the installation directory including all files and sub-folders - then refresh this page';
00063 $this->setError($mosSystemError);
00064 $this->show();
00065 }
00066
00067 private function setError ($mosSystemError) {
00068 if ($this->offline) $this->error_text = <<<OFFLINE_BY_ADMIN
00069
00070 <tr>
00071 <td width="39%" align="center">
00072 <h2>
00073 $this->offline_message
00074 </h2>
00075 </td>
00076 </tr>
00077
00078 OFFLINE_BY_ADMIN;
00079
00080 elseif ($mosSystemError) $this->error_text = <<<OFFLINE_BY_DATABASE
00081
00082 <tr>
00083 <td width="39%" align="center">
00084 <h2>
00085 $this->error_message
00086 </h2>
00087 $mosSystemError
00088 </td>
00089 </tr>
00090
00091 OFFLINE_BY_DATABASE;
00092
00093 else $this->error_text = <<<OFFLINE_DEFAULT
00094
00095 <tr>
00096 <td width="39%" align="center">
00097 <h2>
00098 $this->install_warn
00099 </h2>
00100 </td>
00101 </tr>
00102
00103 OFFLINE_DEFAULT;
00104
00105 }
00106
00107 private function show () {
00108
00109
00110
00111
00112
00113 $offline = <<<OFFLINE_HTML
00114
00115 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
00116 <html xmlns="http://www.w3.org/1999/xhtml">
00117 <head>
00118 <title>$this->sitename - Offline</title>
00119 <meta http-equiv="Content-Type" content="text/html; $this->iso" />
00120 </head>
00121 <body>
00122
00123 <p> </p>
00124 <table width="550" align="center" style="background-color: #ffffff; border: 1px solid">
00125 <tr>
00126 <td width="60%" height="50" align="center">
00127 <img src="$this->live_site/images/logo.png" alt="Aliro Logo" align="middle" />
00128 </td>
00129 </tr>
00130 <tr>
00131 <td align="center">
00132 <h1>
00133 $this->sitename
00134 </h1>
00135 </td>
00136 </tr>
00137 $this->error_text
00138 </table>
00139
00140 </body>
00141 </html>
00142
00143 OFFLINE_HTML;
00144
00145 echo $offline;
00146 }
00147
00148 }