This repository has been archived by the owner on Feb 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.inc.php
51 lines (42 loc) · 1.93 KB
/
global.inc.php
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
<?php
/**
* OurBB, a small but effective Burning Board
*
* Copyright (C) 2009 Dustin Steiner
*
* This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Austria License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/at/ or send a letter to
* Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
*/
// first start the session to prevent output problems
session_start();
session_name('OurBB');
// include the most important file
require('config.inc.php');
// include MySQL-class and create an object
require('lib/db/' . strtolower($dbms) . '.class.php');
$db = new $sqlDbms($sqlHost, $sqlUser, $sqlPassword, $sqlDB);
// unset the sql-login-data for safety purposes
unset($sqlHost, $sqlUser, $sqlPassword);
define('DB_PREFIX', $dbPrefix);
// include the options
require('lib/options.inc.php');
// include the Template-class and create an object
require('lib/Template.class.php');
//TODO: create object
// include the global functions that are needed
require("lib/functions.php");
// include the User-class and create an object to manage the users session
require('lib/User.class.php');
//TODO: create class and object
/*
$menu_usercp_link = ($isUser == true ? '<a href="./usercp.php">UserCP</a>' : '<a href="./register.php">Registrieren</a>');
$menu_specialsearch_link = ($isUser == true ? '<a href="./search.php?do=new">Neue Beiträge</a>' : '<a href="./search.php?do=today">Heutige Beiträge</a>');
$menu_logout_link = ($isUser == true ? '<td><a href="./login.php?do=logout">Abmelden</a></td>' : '');
$username = ($isUser == true ? $_SESSION['username'] : 'Gast');
$login_logout_menu = ($isUser == true ? '<a href="./login.php?do=logout">Logout</a>' : '<a href="./login.php">Login</a>');
eval ("\$headinclude = \"".gettemplate("headinclude")."\";");
eval ("\$header = \"".gettemplate("header")."\";");
eval ("\$footer = \"".gettemplate("footer")."\";");
*/
?>