Hallo, RetroTown!
Bei mir ist immer wieder ein Problem wenn ich meine Radio Seite lade:
Parse error: syntax error, unexpected end of file in /users/debbolive/www/index.php on line 63
MEIN INDEX.PHP :
<?php
// Datenbankverbindung herstellen include( "files/mysql.php" ); $db = new dbc( "files/config.php", $prefix ); define( "THIS_SELF", "index.php?" ); // Sitzung starten session_name( "IVSESSID" ); session_start(); if( isset( $_GET['logout'] )) { setcookie( $prefix."id", 0, time() - 1 ); setcookie( $prefix."key", 0, time() - 1 ); $_COOKIE = array(); session_unset(); }
// Konfiguration laden, alte optionsvariable verfügbar machen foreach( $db->get( $prefix."base_conf" ) as $row ) $conf[$row['category']][$row['name']] = $row['value']; $options = $conf['page']; $exchange = array(); // Typen auslesen foreach( $db->get( $prefix."base_type" ) as $row ) $types[$row['category']][$row['name']] = $row['id']; // Einbinden wichtiger Dateien $filetypes = array( "class", "function", "include", "library" ); foreach( $filetypes as $ft ) foreach( $db->get( $prefix."base_file", "`type` = '".$types['filetype'][$ft]."' AND `inc_front` = 1", -1, "`type`, `id`" ) as $file ) eval( $file['source'] );
// Funktionsdeklarationen // Fehlerfunktion function page_error( $msg ) { global $db, $prefix, $types, $conf; $error_template = $db->get( $prefix."content_template", "`type` = '{$types['template']['error']}'", 1 ); $template_source = $db->get( $prefix."content_template_source", "`style` = '{$conf['system']['style']}' AND `template` = '{$error_template['id']}'", 1 ); if( $template_source ) return str_replace( "{REASON}", $msg, $template_source['source'] ); else return "Error: ".$msg; } // Sicherheitsfunktion zu Panel includen function parse_panel( $panel, $options, $db, $prefix, $layer, $types, $conf, $userdata ) { global $exchange; if( !empty( $panel['template'] )) { $panel_template = $db->get( $prefix."content_template", "`id` = '{$panel['template']}' AND `type` = '{$types['template']['panel']}'", 1 ); $template_source = $db->get( $prefix."content_template_source", "`style` = '{$conf['system']['style']}' AND `template` = '{$panel_template['id']}'", 1 ); $template = str_replace( "{TITLE}", $panel['name'], $template_source['source'] ); $template = explode( "{BODY}", $template ); } if( $script = $db->id_get( $prefix."base_script", $panel['script'] )) { if( $script_source = $db->get( $prefix."base_file", "`id` = '{$script['script']}' AND `type` = '{$types['filetype']['script']}'", 1 )) { echo $template[0]; $panelvars = $db->get_assoc( $prefix."content_variable", "panel = {$panel['id']}", "value", "name" ); eval( $script_source['source'] ); echo $template[1];
ODER SO GESEHEN;
Spoiler anzeigen
<?php
// Datenbankverbindung herstellen
include( "files/mysql.php" );
$db = new dbc( "files/config.php", $prefix );
define( "THIS_SELF", "index.php?" );
// Sitzung starten
session_name( "IVSESSID" );
session_start();
if( isset( $_GET['logout'] )) {
setcookie( $prefix."id", 0, time() - 1 );
setcookie( $prefix."key", 0, time() - 1 );
$_COOKIE = array();
session_unset();
}
// Konfiguration laden, alte optionsvariable verfügbar machen
foreach( $db->get( $prefix."base_conf" ) as $row )
$conf[$row['category']][$row['name']] = $row['value'];
$options = $conf['page'];
$exchange = array();
// Typen auslesen
foreach( $db->get( $prefix."base_type" ) as $row )
$types[$row['category']][$row['name']] = $row['id'];
// Einbinden wichtiger Dateien
$filetypes = array( "class", "function", "include", "library" );
foreach( $filetypes as $ft )
foreach( $db->get( $prefix."base_file", "`type` = '".$types['filetype'][$ft]."' AND `inc_front` = 1", -1, "`type`, `id`" ) as $file )
eval( $file['source'] );
// Funktionsdeklarationen
// Fehlerfunktion
function page_error( $msg ) {
global $db, $prefix, $types, $conf;
$error_template = $db->get( $prefix."content_template", "`type` = '{$types['template']['error']}'", 1 );
$template_source = $db->get( $prefix."content_template_source", "`style` = '{$conf['system']['style']}' AND `template` = '{$error_template['id']}'", 1 );
if( $template_source ) return str_replace( "{REASON}", $msg, $template_source['source'] );
else return "Error: ".$msg;
}
// Sicherheitsfunktion zu Panel includen
function parse_panel( $panel, $options, $db, $prefix, $layer, $types, $conf, $userdata ) {
global $exchange;
if( !empty( $panel['template'] )) {
$panel_template = $db->get( $prefix."content_template", "`id` = '{$panel['template']}' AND `type` = '{$types['template']['panel']}'", 1 );
$template_source = $db->get( $prefix."content_template_source", "`style` = '{$conf['system']['style']}' AND `template` = '{$panel_template['id']}'", 1 );
$template = str_replace( "{TITLE}", $panel['name'], $template_source['source'] );
$template = explode( "{BODY}", $template );
}
if( $script = $db->id_get( $prefix."base_script", $panel['script'] )) {
if( $script_source = $db->get( $prefix."base_file", "`id` = '{$script['script']}' AND `type` = '{$types['filetype']['script']}'", 1 )) {
echo $template[0];
$panelvars = $db->get_assoc( $prefix."content_variable", "panel = {$panel['id']}", "value", "name" );
eval( $script_source['source'] );
echo $template[1];