*   Lynxpress is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with Lynxpress.  If not, see http://www.gnu.org/licenses/.
 */
namespace Site;

use Library\Variable\Server as VServer;
use Library\Mail\Mail;
use Exception;
try {
    define('PATH', '');
    define('INC', 'includes/');
    define('ADMIN', 'admin/');
    require_once 'config.php';
    require_once INC . 'class.loader.inc.php';
    Loader::load();
    new Session();
    $title = '404 Page Not Found';
    $menu = array('Sorry but the Lynx didn\'t show up');
    require_once Html::header();
    Html::_404();
    require_once Html::footer();
    $mail = new Mail(WS_EMAIL, '"404 not found reached', str_replace('",', "\",\n", json_encode(VServer::all())));
    $mail->send();
} catch (Exception $e) {
    die('<h1>' . $e->getMessage() . '</h1>');
}