예제 #1
0
 public static function Load()
 {
     if (defined('CLASS_SBB')) {
         return false;
     }
     define('CLASS_SBB', '');
     Autoloader::Register();
     self::$Database = Database::GetDatabase();
     self::SQL()->Connect();
     Config::CreateConstants();
     self::$Template = new Template();
     self::$Page = Page::GetPage();
     Menu::Render();
     self::TemplateAssign();
     // Compile
     self::Template()->Display('case.tpl');
 }
예제 #2
0
 public function __construct()
 {
     $this->Infos['Title'] = Language::Get('com.sbb.page.user');
     if (isset($_GET['userID'])) {
         $UserInfos = array();
         SBB::SQL()->Select('users', '*', 'ID = \'' . $_GET['userID'] . '\'', 1);
         $Row = SBB::SQL()->FetchArray();
         $UserInfos[] = $Row;
         $Avatar = new Avatar($Row['Email'], 100);
         SBB::Template()->Assign(array('Page' => 'userPage', 'UserInfos' => $UserInfos, 'Avatar' => $Avatar));
     } else {
         $Users = array();
         SBB::SQL()->Select('users', '*');
         while ($Row = SBB::SQL()->FetchObject) {
             $Users[] = $Row;
         }
         SBB::Template()->Assign(array('Page' => 'userList', 'Users' => $Users));
     }
 }
예제 #3
0
 public static function Render()
 {
     $Active = SBB::Page()->GetInfo('Menu');
     if (isset(self::$ReservedLinks['menu.' . strtolower($Active)])) {
         $Active = 'menu.' . strtolower($Active);
     }
     $MenuList = array();
     $Entries = SBB::SQL()->GetObjects()->Select('menu', '*', NULL, 'Position');
     foreach ($Entries as $Row) {
         if (isset(self::$ReservedLinks[$Row->Target])) {
             $MenuList[] = array('Link' => self::$ReservedLinks[$Row->Target], 'Name' => Language::Get($Row->MenuName), 'Active' => $Active == $Row->Target ? true : false);
         } else {
             $Target = str_replace('?page=', '', $Row - Target);
             $Target = strpos($Target, '&') !== false ? strstr($Target, '&', true) : $Target;
             $MenuList[] = array('Link' => $Row->Target, 'Name' => Language::Get($Row->MenuName), 'Active' => $Active == $Target ? true : false);
         }
     }
     SBB::Template()->Assign(array('Menu' => $MenuList));
 }
예제 #4
0
 public function __construct()
 {
     $this->Infos['Title'] = Language::Get('com.sbb.page.profile');
     // If logged in, redirect to start page
     if (!User::LoggedIn()) {
         header("Location: index.php");
     }
     $Message = '';
     if (isset($_POST['Submit'])) {
         if (User::CheckUpdate($_POST)) {
             User::Update(array('Homepage' => $_POST['Homepage'], 'Signatur' => $_POST['Signature']));
             $Message = Language::Get('com.sbb.profile.success');
         } else {
             $Message = '<b>' . Language::Get('com.sbb.error') . ':</b><ul><li>' . implode('</li><li>', Register::GetError()) . '</li></ul>';
         }
     }
     // Füllt die Variablen im TPL
     SBB::Template()->Assign(array('Homepage' => User::Get('Homepage'), 'Signature' => User::Get('Signatur'), 'Message' => $Message, 'Page' => 'Profile'));
 }
예제 #5
0
 public function __construct()
 {
     $this->Infos['Title'] = Language::Get('com.sbb.page.login');
     // If logged in, redirect to start page
     if (isset($_COOKIE['sbb_Token']) || session::Read('UserID')) {
         header("Location: index.php");
     }
     $Message = '';
     if (isset($_POST['Login'])) {
         if (Login::Check($_POST)) {
             SBB::SQL()->Select('users', 'ID', 'Username = \'' . mysql_real_escape_string($_POST['Username']) . '\'', '', 1);
             $UserID = SBB::SQL()->FetchObject()->ID;
             User::Login($UserID, $_POST['StayLoggedIn']);
             $Message = Language::Get('com.sbb.login.success');
             header('Location: index.php');
         } else {
             $Message = '<b>' . Language::Get('com.sbb.error') . ':</b><ul><li>' . implode('</li><li>', Login::GetError()) . '</li></ul>';
         }
     }
     SBB::Template()->Assign(array('Page' => 'Login', 'Message' => $Message));
 }
예제 #6
0
 public function __construct()
 {
     $this->Infos['Title'] = Language::Get('com.sbb.page.register');
     // If logged in, redirect to start page
     if (isset($_COOKIE['sbb_Token']) || Session::Read('UserID')) {
         header("Location: index.php");
     }
     $Message = '';
     if (isset($_POST['Register'])) {
         // Captcha doesn't work
         /*if($_POST['Captcha'] != $_SESSION['Captcha']) {
         			$message = '{lang=com.sbb.captcha.wrong}';
         		}
         		else*/
         if (Register::Check($_POST)) {
             User::Create($_POST['Username'], $_POST['Password'], $_POST['Email']);
             $Message = Language::Get('com.sbb.register.success');
         } else {
             $Message = '<b>' . Language::Get('com.sbb.error') . ':</b><ul><li>' . implode('</li><li>', Register::GetError()) . '</li></ul>';
         }
     }
     // Füllt die Variablen im TPL
     SBB::Template()->Assign(array('Message' => $Message, 'Page' => 'Register'));
 }
예제 #7
0
 public function __construct()
 {
     $this->Infos['Title'] = Language::Get('com.sbb.page.error');
     $Type = isset($_GET['type']) ? $_GET['type'] : 404;
     SBB::Template()->Assign(array('Page' => 'Error', 'ErrorType' => $Type));
 }
예제 #8
0
 public function __construct()
 {
     $this->Infos['Title'] = Language::Get('com.sbb.page.board');
     SBB::Template()->Assign(array('Page' => 'Board'));
 }
예제 #9
0
파일: Core.php 프로젝트: nicocode/Board
<?php

/**
 * @author 		Nox Nebula
 * @copyright	© 2011 Silex Bulletin Board - Team
 * @license		GNU GENERAL PUBLIC LICENSE - Version 3
 * @package		SilexBoard
 */
/* Langfile:	English */
self::$Items = array_merge(self::$Items, array('com.sbb.error' => 'Error', 'com.sbb.copyright' => 'Forum software: Silex Bulletin Board ' . SILEX_VERSION . ' &ndash; &copy; 2011 silexboard.org', 'com.sbb.language.info' => 'English', 'com.sbb.language.changed' => 'Your Language was changed to ' . SBB::Template()->Get('LangChangedTo') . '.', 'com.sbb.header.welcome' => 'Welcome', 'com.sbb.header.welcome_text' => 'Welcome on ' . SBB::Template()->Get('PageTitle') . ' - ' . SBB::Template()->Get('PageSlogan'), 'com.sbb.header.logo_title' => 'Frontpage', 'com.sbb.header.slogan' => 'The modern Bulletin Board Software', 'com.sbb.menu.home' => 'Home', 'com.sbb.menu.forum' => 'Forum', 'com.sbb.menu.userlist' => 'Memberlist', 'com.sbb.crumbs.home' => 'Home', 'com.sbb.crumbs.forum' => 'Forum', 'com.sbb.crumbs.user' => 'Memberlist', 'com.sbb.register.register' => 'Sign up', 'com.sbb.register.username' => 'Username', 'com.sbb.register.email' => 'E-mail address', 'com.sbb.register.email_repeat' => 'Repeat E-mail address', 'com.sbb.register.password' => 'Password', 'com.sbb.register.password_repeat' => 'Repeat password', 'com.sbb.register.invalid_username' => 'Invalid username', 'com.sbb.register.invalid_email' => 'Invalid e-mail adress', 'com.sbb.register.incorrect_password' => 'The passwords don\'t match', 'com.sbb.register.incorrect_email' => 'The e-mail adresses don\'t match', 'com.sbb.register.username_exist' => 'This username already exists!', 'com.sbb.register.email_exist' => 'This e-mail adress already exists!', 'com.sbb.register.success' => 'You are successfully registered!', 'com.sbb.login.login' => 'Log in', 'com.sbb.login.stay' => 'Stay logged in', 'com.sbb.login.bar_handle' => 'Log in/Sign up', 'com.sbb.login.username' => 'Username', 'com.sbb.login.password' => 'Password', 'com.sbb.login.wrong_password' => 'The password is wrong!', 'com.sbb.login.notexist_username' => 'This user doesn\'t exist!', 'com.sbb.login.success' => 'You are successfully logged in!', 'com.sbb.form.submit' => 'Submit', 'com.sbb.logout.logout' => 'Logout', 'com.sbb.logout.logged_out' => 'You are logged out now.', 'com.sbb.logout.main_menu' => 'Main Menu', 'com.sbb.logout.never_logged_in' => 'You are never logged in.', 'com.sbb.profile.homepage' => 'Homepage', 'com.sbb.profile.signature' => 'Signature', 'com.sbb.board.empty' => 'Currently the Board is empty.', 'com.sbb.board.not_categorized' => 'Not categorized', 'com.sbb.board.error.no_board' => 'This forum doesn\'t exists', 'com.sbb.topics.error.no_topics' => 'There are no topics.', 'com.sbb.captcha' => 'Captcha', 'com.sbb.captcha_wrong' => 'Captcha is wrong!', 'com.sbb.email.activation.title' => 'Your registration will be completed if you follow this link: ', 'com.sbb.config.style.default' => 'Default style', 'com.sbb.config.page.title' => 'Page title'));
예제 #10
0
파일: Core.php 프로젝트: nicocode/Board
<?php

/**
 * @author 		Nox Nebula
 * @copyright	© 2011 Silex Bulletin Board - Team
 * @license		GNU GENERAL PUBLIC LICENSE - Version 3
 * @package		SilexBoard
 */
/* Langfile:	German */
self::$Items = array_merge(self::$Items, array('com.sbb.error' => 'Fehler', 'com.sbb.copyright' => 'Forensoftware: Silex Bulletin Board ' . SILEX_VERSION . ' &ndash; &copy; 2011 silexboard.org', 'com.sbb.language.info' => 'Deutsch (Informal)', 'com.sbb.language.changed' => 'Deine Sprache wurde nach ' . SBB::Template()->Get('LangChangedTo') . ' geändert', 'com.sbb.header.welcome' => 'Willkommen', 'com.sbb.header.welcome_text' => 'Herzlich willkommen auf ' . SBB::Template()->Get('PageTitle') . ' - ' . SBB::Template()->Get('PageSlogan'), 'com.sbb.header.logo_title' => 'Startseite', 'com.sbb.header.slogan' => 'Die moderne Bulletin-Board-Software', 'com.sbb.menu.home' => 'Startseite', 'com.sbb.menu.forum' => 'Forum', 'com.sbb.menu.userlist' => 'Benutzerliste', 'com.sbb.crumbs.home' => 'Startseite', 'com.sbb.crumbs.forum' => 'Forum', 'com.sbb.crumbs.user' => 'Benutzerliste', 'com.sbb.register.register' => 'Registrieren', 'com.sbb.register.username' => 'Benutzername', 'com.sbb.register.email' => 'E-mail Adresse', 'com.sbb.register.email_repeat' => 'E-mail Adresse wiederholen', 'com.sbb.register.password' => 'Passwort', 'com.sbb.register.password_repeat' => 'Passwort wiederholen', 'com.sbb.register.invalid_username' => 'Ungültiger Benutzername', 'com.sbb.register.invalid_email' => 'Ungültige E-Mail Adresse', 'com.sbb.register.incorrect_password' => 'Die Passwörter stimmen nicht überein', 'com.sbb.register.incorrect_email' => 'Die E-Mail Adressen stimmen nicht überein', 'com.sbb.register.username_exist' => 'Dieser Benutzername existiert bereits!', 'com.sbb.register.email_exist' => 'Diese E-Mail Adresse existiert bereits!', 'com.sbb.register.success' => 'Du hast dich erfolgreich registriert!', 'com.sbb.login.login' => 'Einloggen', 'com.sbb.login.bar_handle' => 'Einloggen/Registrieren', 'com.sbb.login.username' => 'Benutzername', 'com.sbb.login.password' => 'Passwort', 'com.sbb.login.stay' => 'Eingeloggt bleiben', 'com.sbb.login.wrong_password' => 'Das Passwort ist falsch!', 'com.sbb.login.notexist_username' => 'Dieser Benutzer existiert nicht!', 'com.sbb.login.success' => 'Du hast dich erfolgreich angemeldet!', 'com.sbb.form.submit' => 'Absenden', 'com.sbb.logout.logout' => 'Ausloggen', 'com.sbb.logout.logged_out' => 'Sie sind jetzt ausgeloggt.', 'com.sbb.logout.main_menu' => 'Hauptmen&uuml,', 'com.sbb.logout.never_logged_in' => 'Sie waren niemals eingeloggt.', 'com.sbb.profile.homepage' => 'Homepage', 'com.sbb.profile.signature' => 'Signatur', 'com.sbb.board.empty' => 'Zurzeit ist das Board leer.', 'com.sbb.board.not_categorized' => 'Nicht Kategorisiert', 'com.sbb.board.error.no_board' => 'Das Forum existiert nicht', 'com.sbb.topics.error.no_topics' => 'Es gibt keine Themen.', 'com.sbb.captcha' => 'Captcha', 'com.sbb.captcha_wrong' => 'Captcha ist falsch!', 'com.sbb.email.activation.title' => 'Du musst diesen Link klicken um deine Registrierung abzuschließen: ', 'com.sbb.config.style.default' => 'Standardstil', 'com.sbb.config.page.title' => 'Seitentitel'));