Ich habe bei mir einen externen phpbb3 Login eingebaut. Das Problem ist nur, das der Irgendwie nicht richtig funktioniert.
Es kommt kein Fehler, ich komme auch nicht zum Loginformular, es kommt einfach die normale Seite, bei diesem Datei-Kopf:
Code: Alles auswählen
<?php
/**
* admin/index.php
* ***************
* Start: Sonntag, 30. Dezember 2007
* Letzte ändereung: xx
* Beschreibung: Index des Admin Panels
*/
error_reporting(E_ALL);
// Includes
if(!@include('../config.php')) die('config.php is missing..'); # config.php
if(!@require_once('../klassen/parser.php')) die('klassen/parser.php is missing..'); # parser.php
// Parser starten
$Pars = new Parser();
//////////////////////////////////////
// phpbb3 Login.
//////////////////////////////////////
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
//Abfragen von ggf. uebermittelten Parametern
$username = request_var('username', '', true);
$password = request_var('password', '', true);
$autologin = (!empty($_POST['autologin'])) ? true : false;
$viewonline = (!empty($_POST['viewonline'])) ? 0 : 1;
$logout = request_var('mode', '');
// Prüfen ob User eingeloggt:
if (!$user->data['is_registered']) {
if (isset($username) && isset($password)) {
// Login formular abgeschickt.
if($auth->login($username, $password, $autologin, $viewonline)) {
header('Location index.'.$phpEx); // Neu laden..
}
} else {
// User ist nicht eingeloggt.
$Pars->tpl('../templates/admin/header_clear.tpl');
$Pars->tpl('../templates/admin/login.tpl');
$Pars->tpl('../templates/admin/footer_clear.tpl');
$Pars->getTpl();
// Loginformular Ausgeben
die($Pars->getContent());
}
}
//////////////////////////////////////
//////////////////////////////////////