30 header(
'Cache-control: private');
31 error_reporting(E_ALL ^ E_STRICT);
32 ini_set(
'display_errors', 1);
35 require_once(
'system/classes/db.php');
36 require_once(
'system/classes/settings.php');
37 require_once
'system/classes/language.php';
38 require_once(
'system/classes/alert.php');
39 require_once(
'system/classes/email.php');
40 require_once(
'system/classes/user.php');
41 require_once(
'system/classes/page.php');
42 require_once(
'system/classes/menu.php');
43 require_once(
'system/classes/widget.php');
44 require_once(
'system/classes/template.php');
45 require_once(
'system/classes/sys.php');
46 require_once(
'system/classes/controller.php');
47 require_once(
'system/classes/stats.php');
58 $language->init(
$db,
"frontend");
60 $lang = (array) $language->lang;
64 if (!isset($template)) {
65 $template = new \YAWK\template();
69 $user = new \YAWK\user(
$db);
73 $page = new \YAWK\page();
77 if (!isset($controller)) {
78 $controller = new \YAWK\controller();
82 $stats = new \YAWK\stats();
83 $stats->setStats(
$db);
88 if (\
YAWK\sys::isOffline(
$db)) {
90 \YAWK\sys::drawOfflineMessage(
$db);
94 if (isset(
$_GET[
'signup']) && (
$_GET[
'signup']) == 1) {
95 include(
'system/plugins/signup/classes/signup.php');
96 $signup = new \YAWK\PLUGINS\SIGNUP\signup();
101 if (isset(
$_GET[
'include']) && (!empty(
$_GET[
'include'])))
104 if (
$_GET[
'include'] ===
"logout")
106 if ($user->logout(
$db) ===
true)
113 if (isset($_POST[
'login']))
115 if (isset($_POST[
'user']) && (isset($_POST[
'password'])))
117 if ($user->login(
$db, $_POST[
'user'], $_POST[
'password']) ===
true)
119 if (isset($_POST[
'loginboxRedirect']) && (!empty($_POST[
'loginboxRedirect'])))
121 if (isset($_POST[
'loginboxRedirectTime']) && (!empty($_POST[
'loginboxRedirectTime']) && (is_numeric($_POST[
'loginboxRedirectTime']))))
132 $_GET[
'include'] =
"index";
145 $_GET[
'include'] =
"index";
152 $template->selectedTemplate = $template->id;
154 if (\
YAWK\user::isAnybodyThere(
$db))
157 $user->loadProperties(
$db, $_SESSION[
'username']);
159 if ($user->overrideTemplate ==
true)
161 $_SESSION[
'userTemplateID'] = $user->templateID;
163 $template->name = \YAWK\template::getTemplateNameById(
$db, $user->templateID);
165 if(!include(
"system/templates/$template->name/index.php"))
167 $templateName = \YAWK\template::getTemplateNameById(
$db, $template->selectedTemplate);
168 include(
"system/templates/$template->name/index.php");
173 $template->name = \YAWK\template::getTemplateNameById(
$db, $user->templateID);
174 if(!include(
"system/templates/$template->name/index.php"))
176 die(
"Unable to include template. Either database config is faulty or YaWK is not correctly installed.");
182 $template->name = \YAWK\template::getTemplateNameById(
$db, $user->templateID);
183 if(!include(
"system/templates/$template->name/index.php"))
185 die(
"Unable to include template. Either database config is faulty or YaWK is not correctly installed.");
print $lang['FILEMAN_UPLOAD']
The language class - support multilingual backend.
static getSetting($db, $property)
Get and return value for property from settings database.
static setTimeout($location, $wait)
set a timeout and force page reload via JS
This class serves methods to create backup from files.