if( !defined("DB_PATH") ){
while( basename(dirname(getcwd())) != "www" ){
chdir("..");
}
if( !file_exists( "init.php") ){
echo "no INIT..make...
";
$s_INITPHP = "<".chr(63);
$aDIR = array();
exec("find ".getcwd()." -iname *_PATH.dir.php",$aDIR);
if( count( $aDIR ) == 0 ){
echo "DB_PATH";
die();
}
$s_INITPHP .= "\n\tdefine(\"DB_PATH\",\"".dirname($aDIR[0])."\");";
for($i=0;$i";
$s_out = "init.php" ;
file_put_contents( $s_out , $s_INITPHP );
chmod( $s_out , 0700 );
echo "try restarting...";
eval( $s_INITPHP );
die();
}
include( "init.php" );
}
else {
chdir( dirname( DB_PATH ) );
}
?>
include("init.php");
$GLOBALS["PAGEs"]="\n\n\n";
function get_html_from_php( $URL , $sPARENTs="" ){
$FILENAME = rtrim( $URL , ".php" ).".php";
if( !file_exists( $FILENAME ) || strpos("\n".$GLOBALS["PAGEs"]."\n",$FILENAME)>0 ){
return "error\nget_html_from_php($FILENAME)";
}
ob_start();
ob_clean();
include( $FILENAME );
$HTML = ob_get_contents();
ob_clean();
ob_end_flush();
$GLOBALS["PAGEs"] .= $FILENAME."\n";
return $HTML;
}
if( $_GET["l"] < "/A" ){
$s_FILE = DB_PATH.substr($_GET["l"],0,2).".php";
if( !file_exists( $s_FILE )){
$s_FILE = DB_PATH."/#".substr( "00".ord( substr($_GET["l"],1) ),-3).".php";
}
if( !file_exists( $s_FILE )){
$s_FILE = DB_PATH."/%".substr( "00".strtolower( dechex( ord( substr($_GET["l"],1) ))),-2).".php";
}
if( file_exists( $s_FILE )){
include( $s_FILE );
}
else "cms.roamy.de: no (".$s_FILE.")";
die();
}
if( substr($_GET["l"],0,2)=="/~" ){
include( DB_PATH."/I_O_I___.php" );
die();
}
if( $_GET["l"] > "" ){
$a_GET = array();
$sURL = trim( str_replace( getcwd() ,"", $_GET["l"]) ,"/~\t |\n");
$a_URL = explode( "/", $sURL );
$GLOBALS["MODUL"] = array_shift( $a_URL );
$sMODUL = DB_PATH."/".$GLOBALS["MODUL"];
if( file_exists( DB_PATH."/".$a_URL[0].".dir.php" )){
$aFILE = file( DB_PATH."/".$a_URL[0].".dir.php" ,6 );
$a_URL[0] = trim( $aFILE[1] , "/\t |~" );
}
$GLOBALS["URL"] = implode("/",$a_URL);
$s_DB64 = array_pop( $a_URL );
if( $s_DB64 == "b64" ){
$s_DB64 = base64_decode( chunk_split( strtr( implode( "/", $a_URL ) , "_-." , "/+=" ) ));
header( "Content-Type: application/unzip" );
header( "Content-Length: ".strlen($s_DB64) );
header("Content-Disposition: attachment; filename=".trim(file_get_contents("http://id.roamy.de").".zip") );
echo $s_DB64;
die();
}
$GLOBALS["VARs"]=array();
exec( "find ".DB_PATH." -iname \"".basename(DB_PATH)."/*.id.php\"" , $aDIR );
$iLAST = time() - intval( exp( 31 - fileperms(DB_PATH )%32 ) );
for($i=0;$i1){
$sVAR = array_shift($a_ITEM);
array_push( $a_GET , $sVAR );
$GLOBALS[ $sVAR ] = implode( "=" , $a_ITEM );
}
}
}
if( !isset($GLOBALS["MODUL"]))
$GLOBALS["MODUL"] = $a_TAGS[0];
else $GLOBALS[ $GLOBALS[ "pid" ]."MODUL" ] = $a_TAGS[0];
$a_TAGS = explode( "/" , substr($_GET["l"],1));
$sFILE = rtrim(str_replace( getcwd()."/" , "" , DB_PATH."/".$a_TAGS[0] ),".php");
if( !file_exists( $sMODUL.".php" )){
echo "cms.roamy.de: no (".$sMODUL.")";
die();
}
$a_TAGS = explode( "<~" , get_html_from_php( $sMODUL ) );
$HTML = $a_TAGS[0];
for($i=1;$i" , $a_TAGS[$i] );
$sFILE = DB_PATH."/".array_shift( $a ).".php";
if( file_exists( $sFILE ) ){
$HTML .= get_html_from_php( $sFILE );
}
$HTML .= implode( "~>" , $a );
}
$a_TAGS = explode( "~(" , $HTML );
$HTML = $a_TAGS[0];
for($i=1;$i $VAL )
$GLOBALS[ $ID ] = $VAL;
for($i=0;$i