00001 <?php
00031 include("include/classes/config.php");
00032
00033
00034 include("include/classes/database.php");
00035 $db = new Database();
00036 if (!$db->isConnected()) {
00037 echo $db->errorMsg();
00038 exit;
00039 }
00040
00041
00042 $cfg = new Config();
00043
00045
00046
00047
00048
00049 include("include/classes/session.php");
00050 $session = new Session();
00051
00052
00053 include("include/classes/eventlog.php");
00054 $log = new EventLog();
00055
00056
00057 include("include/classes/cmskey.php");
00058 $action = CMSkey::postOrGet("a");
00059 if ($action == "logout") {
00060
00061
00062
00063 $log->write("USERLOGOUT");
00064 $session->destroy();
00065 header("Location: " . $cfg->getConfig("DEFAULT_PAGE"));
00066 exit;
00067 }
00068
00070 include("include/classes/auth.php");
00071 $auth = new Auth();
00072
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00088
00089
00090 include("include/classes/lang.php");
00091 $lang = new Lang();
00092
00093
00094 if ($_GET['lang']) {
00095 $lang->setLanguage($_GET['lang']);
00096 header("Location: " . $cfg->getConfig("DEFAULT_PAGE") . CMSkey::getQueryString("lang"));
00097 exit;
00098 }
00099
00100
00101 include("include/lang/" . $lang->getCurrentLanguage() . ".php");
00102
00103
00104
00105
00106 $cms = new CMSkey();
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00122
00123
00124
00125
00126
00127
00128 if ($action) {
00129 header("Location: " . $cfg->getConfig("DEFAULT_PAGE") . $cms->doAction($action));
00130 exit;
00131 }
00132
00133
00134 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
00135 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
00136 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
00137 <head>
00138 <title><?php echo $cms->getPageTitle(); ?></title>
00139 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
00140 <meta name="robots" content="all" />
00141 <meta name="author" content="CMSkey" />
00142 <meta name="keywords" content="" />
00143 <meta name="description" content="" />
00144 <style type="text/css" media="all">@import "css/default.css";></style>
00145 <link rel="alternate" type="application/rss+xml" title="CMSkey RSS 2.0" href="<?php echo $cfg->getBaseURL(); ?>?rss=xml" />
00146 <link rel="icon" href="/images/favicon.ico" type="image/ico" />
00147 </head>
00148 <?php
00149 echo $cms->getHTML();
00150 $db->disconnect();
00151 ?>
00152 </html>