-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinclude.php
More file actions
89 lines (67 loc) · 2.67 KB
/
include.php
File metadata and controls
89 lines (67 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
use Symfony\Component\HttpFoundation\Request;
error_reporting(E_ALL ^ E_NOTICE);
session_start();
require_once __DIR__ . '/vendor/autoload.php';
/*
$whoops = new \Whoops\Run;
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
$whoops->register();
*/
$request = Request::createFromGlobals();
$requestGet = $request->query;
$requestPost = $request->request;
#require 'inc/php-gettext/gettext.inc';
require_once __DIR__ . '/config.php';
require_once __DIR__ . '/inc/db_functions.php';
// Include common libs
require_once __DIR__ . "/inc/lib/SqlObject.php";
require_once __DIR__ . "/inc/lib/EventSqlObject.php";
require_once __DIR__ . "/inc/lib/User.php";
require_once __DIR__ . "/inc/lib/UserGroup.php";
require_once __DIR__ . "/inc/lib/UserGroupMember.php";
require_once __DIR__ . "/inc/lib/UserGroupManager.php";
require_once __DIR__ . "/inc/lib/UserManager.php";
require_once __DIR__ . "/inc/lib/TicketManager.php";
require_once __DIR__ . "/inc/lib/NewsArticleManager.php";
require_once __DIR__ . "/inc/lib/wannabe/Manager.php";
# Start DB-connection
db_connect();
## Includes etc.
require __DIR__ . '/inc/shared_functions.php';
require __DIR__ . '/inc/shared_session.php';
## Include and set up i18n
if($language == 'norwegian') $lang = 'nb_NO.utf8';
putenv("LANGUAGE=$lang");
putenv("LANG=$lang");
setlocale (LC_ALL, $lang);
bindtextdomain("messages", __DIR__ . "/i18n");
bind_textdomain_codeset("messages", "UTF-8");
textdomain("messages");
require __DIR__ . '/inc/shared_config.php';
if($hide_smarty != 1 && $enableSmarty == true) {
## Set up Smarty-stuff
require __DIR__ . '/inc/smarty/libs/Smarty.class.php';
$smarty = new Smarty();
$smarty->template_dir = __DIR__ . '/html/templates/';
$smarty->compile_dir = __DIR__ . '/tmp/templates_compile';
$smarty->config_dir = __DIR__ . '/inc/smarty/';
$smarty->cache_dir = __DIR__ . '/tmp/templates_cache/';
## This should be fixed to something... dynamic
#$smarty_display = 'simple/simple.tpl';
#$smarty_display = 'GlobeLAN11/GlobeLAN11.tpl';
if(file_exists($smarty->template_dir.$eventinfo->eventDesign."/".$eventinfo->eventDesign.".tpl")) {
$smarty_display = $eventinfo->eventDesign."/".$eventinfo->eventDesign.".tpl";
}
else $smarty_display = 'Alfa1/Alfa1.tpl';
#else $smarty_display = 'LarvikLAN/LarvikLAN.tpl';
# else die("Design doesn't exists");
} // End $hide_smarty != 1
#if($cron_type != 'cron') {
// If remote addr is set, include cron-stuff
if(isset($_SERVER['REMOTE_ADDR'])) {
if(isset($use_SMS_system) && $use_SMS_system == "SMS4you.no" && !empty($SMS_from) && !empty($SMS_user) && !empty($SMS_pass)) {
include_once __DIR__ . '/inc/SMS/SMS4you.no.php';
}
include_once __DIR__ . '/inc/EMail/sendmail.php';
}