so sieht zum Beispiel ein link aus: (http://www.habbo-maximal.de/cms/index.php?panel=25)
Jetzt sieht man da das normale Menü es soll aber jeweils nur ein bestimmtest kommen (submenu halt) und der link soll dann z.B. so aussehen:
http://www.habbo-maximal.de/cms/index.p ... &submenu=2
Der link geht natürlich nicht
Mitlerweile weiß ich das man da was im index.php ändern muss! Der code sieht dort so aus:
- Code: Alles auswählen
<?php
// Laden der Wichtigen Funktionen
if( !@include( "config/config.php" )) die( "Config file missing..." );
//if( !@include( "lib/mysql.php" )) die( "Mysql Functions missing..." );
if( !@include( "inc/vars.php" )) die( "Variable Functions missing..." );
if( !@include( "config/groups.php" )) die( "Config file missing..." );
//if( !@include( "lib/filesys.php" )) die( "Filelibrary missing..." );
// Definieren der Konstanten
define( "THIS_SELF", "index.php?" );
define( "PAGE_SELF", THIS_SELF."panel=".$_GET['panel'] );
// Sicherheitsfunktion zu Panel includen
function parse_panel( $panel, $options, $scripts, $link, $prefix, $p ) {
if( !@include( "scripts/".$scripts[$panel['script']]['src'] ))
die( "Script File missing..." );
}
// Für leute die es nicht so haben mit sicherheit...
if( !get_magic_quotes_gpc() ) {
foreach( $_POST as $key => $value) if( is_array( $value )) { $_POST[$key] = array();
foreach( $value as $v ) $_POST[$key][] = addslashes(trim($v)); }
else $_POST[$key] = addslashes(trim($value));
foreach( $_GET as $key => $value) if( is_array( $value )) { $_GET[$key] = array();
foreach( $value as $v ) $_GET[$key][] = addslashes(trim($v)); }
else $_GET[$key] = addslashes(trim($value));
foreach( $_REQUEST as $key => $value) if( is_array( $value )) { $_REQUEST[$key] = array();
foreach( $value as $v ) $_REQUEST[$key][] = addslashes(trim($v)); }
else $_REQUEST[$key] = addslashes(trim($value));
}
// Templatedatei laden
if( $source = @file_get_contents( "templates/".$groups['design'] )) {
// Optionen laden
$res = mysql_query( "SELECT * FROM ".$prefix."options", $link ); $options = array();
while( $opt = mysql_fetch_row( $res )) {
$source = str_replace( "{".strtoupper($opt[0])."}", $opt[1], $source );
$options[$opt[0]] = $opt[1];
}
// Scriptinformationen Preloaden
$scripts = array();
$res = mysql_query( "SELECT * FROM ".$prefix."scripts", $link );
while( $s = mysql_fetch_assoc( $res )) $scripts[$s['id']] = $s;
// Start der Ausgabe
$source = explode( "{PANELGROUP}", $source ); echo $source[0];
$p = (int) $_GET['panel']; if( empty($p) ) $p = $options['defpan'];
for( $i = 1; $i < count($groups); $i++ ) {
$res = mysql_query( "SELECT * FROM ".$prefix."panels WHERE ( `group` = '$i' AND `status` = 1 ) OR ( `group` = '$i' AND `status` = 0 AND `id` = '$p' ) ORDER BY prio ASC", $link );
while( $panel = mysql_fetch_assoc( $res )) {
$temp = 0;
if( !empty( $panel['template'] ))
if( $temp = @file( "templates/panels/".$panel['template'] )) {
$temp = str_replace( "{TITLE}", $panel['name'], implode( $temp ));
$temp = explode( "{BODY}", $temp );
}
if( !empty($temp[0]) ) echo $temp[0];
parse_panel( $panel, $options, $scripts, $link, $prefix, $p );
if( !empty($temp[1]) ) echo $temp[1];
}
echo $source[$i];
}
} else echo '<b>Fatal Runtime-Error: Design "'.$groups['design'].'" nicht gefunden.</b>';
mysql_close( $link );
?>
Kann mir jeamnd helfen?
Lg,
=Max=