<?php
if ( !isset( $_GET['filename'] ) || !preg_match( "/^\\w*$/", $_GET['filename'] ) || !isset( $_GET['classname'] ) || !preg_match( "/^\\w+$/", $_GET['classname'] ) || isset( $_GET['template'] ) && !preg_match( "/^[\\w\\.]*$/", $_GET['template'] ) ) {
		exit( "error parameter" );
} 
if ( isset( $_GET['ismobile'] ) ) {
		define( 'SAXUE_IN_MOBILE', true );
} 
include "../core.php";
if ( !isset( $_GET['bid'] ) || !is_numeric( $_GET['bid'] ) ) {
		$_GET['bid'] = 0;
} 
if ( !isset( $_GET['custom'] ) ) {
		$_GET['custom'] = 0;
} 
if ( !isset( $_GET['filename'] ) ) {
		$_GET['filename'] = "block_custom";
		$_GET['custom'] = 1;
} 
if ( !isset( $_GET['hasvars'] ) ) {
		$_GET['hasvars'] = 0;
} 
if ( !isset( $_GET['vars'] ) ) {
		$_GET['vars'] = "";
} 
if ( !isset( $_GET['contenttype'] ) ) {
		$_GET['contenttype'] = SAXUE_CONTENT_PHP;
} 
if ( !isset( $saxueTpl ) ) {
		include SAXUE_ROOT_PATH . "/lib/template/template.php";
		$saxueTpl = &saxuetpl :: getinstance();
}
$blockdata = saxue_get_block( $_GET, 1 );
saxue_freeresource();
if ( $_GET['showtype'] == "html" ) {
		header( "Content-Type:text/html; charset=utf-8" );
		header( "Cache-Control:no-cache" );
		echo $blockdata;
} else {
		echo "document.write('" . saxue_setslashes( str_replace( array( "\r", "\n" ), "", $blockdata ), "\"" ) . "');";
} 
