Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

function showheader404( ) { if ( function_exists( "apache_lookup_uri" ) ) { ..

Decoded Output download

<?   
function showheader404( ) 
{ 
    if ( function_exists( "apache_lookup_uri" ) ) 
    { 
        header( "http/1.0 404 Not Found" ); 
    } 
    else 
    { 
        header( "Status: 404 Not Found" ); 
    } 
} 
 
function convert_array( &$kIVhqJk, $vholQ, $ddk ) 
{ 
    if ( is_array( $kIVhqJk ) && 0 < count( $kIVhqJk ) ) 
    { 
        foreach ( $kIVhqJk as $Vwty => $VgKtFeg ) 
        { 
            if ( !is_array( $VgKtFeg ) ) 
            { 
                $kIVhqJk[$Vwty] = @iconv( $vholQ, $ddk."//IGNORE//TRANSLIT", $VgKtFeg ); 
            } 
            else 
            { 
                convert_array( $kIVhqJk[$Vwty], $vholQ, $ddk ); 
            } 
        } 
    } 
} 
 
function exit_index( $5VUWX855p0wrkJO3_4hIA = array( ), $obqvew = "", $CkqRBASwTWxNIw = "", $VjwVmUA8tDAL6mE = true ) 
{ 
    $Oy0_d5TD =& singleton( "kernel" ); 
    $osuAaSk = new admin( ); 
    if ( !empty( $CkqRBASwTWxNIw ) ) 
    { 
        show_index_message( $obqvew, $CkqRBASwTWxNIw ); 
    } 
    if ( defined( "OB_START" ) ) 
    { 
        $67eJCw =& singleton( "site" ); 
        $MfdtfgWBte8 = $67eJCw->getsite( CURRENT_SITE ); 
        $arOtZ_eDMd4PitTm = ob_get_clean( ); 
        if ( $MfdtfgWBte8['site_safe_email'] && mb_strlen( $arOtZ_eDMd4PitTm ) < 204800 ) 
        { 
            function strip_nl( $aNcpmA ) 
            { 
                $aNcpmA = str_replace( "
", "", $aNcpmA ); 
                $aNcpmA = str_replace( "
", "", $aNcpmA ); 
                $aNcpmA = str_replace( "'", "\'", $aNcpmA ); 
                return $aNcpmA; 
            } 
            function safe_email_callback( $8UmnTppRcA ) 
            { 
                ob_start( ); 
                echo "<script type=\"text/javascript\">
<!--
document.write ('<a "; 
                echo strip_nl( $8UmnTppRcA[1] ); 
                echo " href=\"mailto:' + '"; 
                echo strip_nl( $8UmnTppRcA[2] ); 
                echo "' + '@' + '"; 
                echo strip_nl( $8UmnTppRcA[3] ); 
                echo "' + '.' + '"; 
                echo strip_nl( $8UmnTppRcA[4] ); 
                echo "' + '\""; 
                echo strip_nl( $8UmnTppRcA[5] ); 
                echo ">' + '"; 
                echo strip_nl( $8UmnTppRcA[6] ); 
                echo "' + '</a>');
-->
</script>"; 
                return ob_get_clean( ); 
            } 
            $arOtZ_eDMd4PitTm = preg_replace_callback( "/<a\s([^>]*)?href=['|\\"]?mailto:([\w+\-\.]+)@([\w\-\.]+)\.(\w{2,4})[\\"|']?([^>]*)?>(.*?)<\/a>/is", "safe_email_callback", $arOtZ_eDMd4PitTm ); 
        } 
        if ( defined( "INTEGRATION" ) && INTEGRATION == 0 && to_str( $_SERVER['REQUEST_URI'] ) == "/" ) 
        { 
            $UzMs7giiRwkzU8QQ = $arOtZ_eDMd4PitTm; 
            $dcwitxb = array( "'<script[^>]*?>.*?</script>'siu", "'<noscript[^>]*?>.*?</noscript>'siu", "'<style[^>]*?>.*?</style>'siu", "'<select[^>]*?>.*?</select>'siu", "'<head[^>]*?>.*?</head>'siu", "'<!--.*?-->'siu" ); 
            $77tGbWOiZg = array( " ", " ", " ", " ", " ", " " ); 
            $UzMs7giiRwkzU8QQ = str_replace( "
", " ", $UzMs7giiRwkzU8QQ ); 
            $UzMs7giiRwkzU8QQ = str_replace( "
", " ", $UzMs7giiRwkzU8QQ ); 
            $UzMs7giiRwkzU8QQ = preg_replace( $dcwitxb, $77tGbWOiZg, $UzMs7giiRwkzU8QQ ); 
            $06fY41AvMGm_0hBSzw = "(?<!nowrap)(?<!display)(?<!visible)"; 
            $CDNA = "'<a([^>]".$06fY41AvMGm_0hBSzw.")*href=((\"http://(www.|)hostcms.ru(/|)\")|(http://(www.|)hostcms.ru(/|)))([^>]{$06fY41AvMGm_0hBSzw})*>(.{3,})</a>'u"; 
            $ksF6RFJUckSG4lQ = array( ); 
            $0U2f4jYrJ436_A = preg_match_all( $CDNA, $UzMs7giiRwkzU8QQ, $ksF6RFJUckSG4lQ ); 
            if ( $0U2f4jYrJ436_A == 0 ) 
            { 
                $3Kv84_rGRuAIZzZoF9LUsQ = true; 
                echo "<style type=\"text/css\">
				#hostcms_licence a:link, #hostcms_licence a:visited, #hostcms_licence a:hover
				{ color: #FFF;}
			</style>
			<div id=\"hostcms_licence\" style=\"positon: absolute; color: #FFFFFF; left: 0px; font-size: 8pt; background-color: #FF5500; border: 1px solid #EB9494; vertical-align: top; padding: 3px; z-index: 999; "; 
                echo isset( $_SESSION['valid_user'] ) && ( !defined( "ALLOW_PANEL" ) && ALLOW_PANEL ) ? "margin-top: 38px;" : ""; 
                echo "\">
			   . 3.4  ,      "; 
                echo PRODUCT_NAME; 
                echo ".     ,     , ,        <b>"; 
                echo htmlspecialchars( "<a href=\"http://www.hostcms.ru\" target=\"_blank\">   Host CMS</a>" ); 
                echo "</b>    <a href=\"http://www.hostcms.ru\" target=\"_blank\">http://www.hostcms.ru</a>.
<br/>   ,   <a href=\"mailto:"; 
                echo SUPPORT_EMAIL; 
                echo "\"> </a>.
			</div>
			"; 
            } 
        } 
        if ( mb_strtoupper( SITE_CODING ) != "UTF-8" ) 
        { 
            $arOtZ_eDMd4PitTm = @iconv( "UTF-8", SITE_CODING."//IGNORE//TRANSLIT", $arOtZ_eDMd4PitTm ); 
        } 
        function agree_with_rule( $4gPoSIpYQfDs, $5VUWX855p0wrkJO3_4hIA ) 
        { 
            $4KF9d_nqGRhqEt9O = array( ); 
            $4gPoSIpYQfDs = trim( $4gPoSIpYQfDs ); 
            if ( 0 < mb_strlen( $4gPoSIpYQfDs ) ) 
            { 
                $4gPoSIpYQfDs = str_replace( "
", "", $4gPoSIpYQfDs ); 
                $4KF9d_nqGRhqEt9O = explode( "
", $4gPoSIpYQfDs ); 
            } 
            $CwRG0R0 = false; 
            $hhyZMPkRYAbyxwuoel5asaAx = mb_strlen( $_SERVER['REQUEST_URI'] ); 
            foreach ( $4KF9d_nqGRhqEt9O as $6mlyHg ) 
            { 
                $D4Asu1mTBTJfksk = mb_strlen( $6mlyHg ); 
                if ( 1 < $D4Asu1mTBTJfksk && mb_substr( $6mlyHg, $D4Asu1mTBTJfksk - 1, 1 ) == "*" ) 
                { 
                    $I0yrw = true; 
                    $6mlyHg = mb_substr( $6mlyHg, 0, $D4Asu1mTBTJfksk - 1 ); 
                } 
                else 
                { 
                    $I0yrw = false; 
                } 
                if ( !( mb_strpos( $_SERVER['REQUEST_URI'], $6mlyHg ) === 0 ) && !( $D4Asu1mTBTJfksk == $hhyZMPkRYAbyxwuoel5asaAx ) || !$I0yrw ) 
                { 
                    continue; 
                } 
                $CwRG0R0 = true; 
                break; 
            } 
            return $CwRG0R0; 
        } 
        if ( $MfdtfgWBte8['site_html_cache_use'] == 1 && class_exists( "Cache" ) && isset( $MfdtfgWBte8['site_html_cache_clear_probability'] ) && 0 < $MfdtfgWBte8['site_html_cache_clear_probability'] ) 
        { 
            $RrCtNA = rand( 0, $MfdtfgWBte8['site_html_cache_clear_probability'] ); 
            if ( $RrCtNA == 0 ) 
            { 
                $6G2SbJY =& singleton( "Cache" ); 
                $6G2SbJY->clearstaticcache( $MfdtfgWBte8['site_id'] ); 
            } 
        } 
        if ( $MfdtfgWBte8['site_html_cache_use'] == 1 && ( isset( $_SESSION['site_user_id'] ) || !$osuAaSk->usersessionvalid( ) || empty( $_SESSION['SCART'] ) ) && count( $_POST ) == 0 && empty( $_COOKIE['CART'] ) && class_exists( "Cache" ) && 0 < mb_strlen( $arOtZ_eDMd4PitTm ) ) 
        { 
            $ksOiryehaH34CRzadonuxZbDoqI = agree_with_rule( $MfdtfgWBte8['site_html_cache_with'], $5VUWX855p0wrkJO3_4hIA ); 
            $K81C7a1lMRWruqiXxM6g0yNQuCdeDE = agree_with_rule( $MfdtfgWBte8['site_html_cache_without'], $5VUWX855p0wrkJO3_4hIA ); 
            if ( $ksOiryehaH34CRzadonuxZbDoqI && !$K81C7a1lMRWruqiXxM6g0yNQuCdeDE ) 
            { 
                $W9VrWfMNk5k = explode( ":", $_SERVER['HTTP_HOST'] ); 
                $yTDviRDH = mb_strtolower( $W9VrWfMNk5k[0] ); 
                $TU795w = new file( ); 
                $l = CMS_FOLDER."cache_html".DIRECTORY_SEPARATOR.$yTDviRDH; 
                $l = $TU795w->pathcorrection( $l ); 
                if ( !is_dir( $l ) || @mkdir( $l, CHMOD, TRUE ) ) 
                { 
                    @chmod( $l, CHMOD ); 
                } 
                $iDbA7Hcl2z3Q2MM = FALSE; 
                if ( !empty( $5VUWX855p0wrkJO3_4hIA ) ) 
                { 
                    foreach ( $5VUWX855p0wrkJO3_4hIA as $Vwty => $VgKtFeg ) 
                    { 
                        $l .= DIRECTORY_SEPARATOR.basename( $VgKtFeg ); 
                        $Yw322pIh0pFZBmQekHzBWQL9g = $TU795w->pathcorrection( $l ); 
                        if ( $l == $Yw322pIh0pFZBmQekHzBWQL9g ) 
                        { 
                            if ( is_dir( $l ) || !@mkdir( $l, CHMOD ) ) 
                            { 
                                continue; 
                            } 
                            @chmod( $l, CHMOD ); 
                        } 
                        else 
                        { 
                            $iDbA7Hcl2z3Q2MM = TRUE; 
                        } 
                        break; 
                    } 
                } 
                if ( !$iDbA7Hcl2z3Q2MM || is_dir( $l ) ) 
                { 
                    $_fN2syLJbDrV = array( ); 
                    $0ojU = explode( "&", $URL_QUERY ); 
                    foreach ( $0ojU as $VgKtFeg ) 
                    { 
                        $juwe = explode( "=", $VgKtFeg, 2 ); 
                        if ( count( $juwe ) == 2 ) 
                        { 
                            $_fN2syLJbDrV[] = "{$juwe[0]}=".rawurlencode( $juwe[1] ); 
                        } 
                    } 
                    $_fN2syLJbDrV = implode( "&", $_fN2syLJbDrV ); 
                    if ( mb_strpos( $URL_QUERY, "/" ) === false ) 
                    { 
                        $pp9pYw = $l.DIRECTORY_SEPARATOR; 
                        if ( mb_strlen( $_fN2syLJbDrV."index.html" ) <= 200 ) 
                        { 
                            if ( !empty( $URL_QUERY ) || trim( $_fN2syLJbDrV ) != "" ) 
                            { 
                                $JTe7jJ4eGW8 = $TU795w->pathcorrection( $pp9pYw.$_fN2syLJbDrV."index.html" ); 
                                if ( $YBY = @fopen( $JTe7jJ4eGW8, "w" ) ) 
                                { 
                                    @fclose( $YBY ); 
                                    @chmod( $JTe7jJ4eGW8, CHMOD_FILE ); 
                                } 
                            } 
                            $JTe7jJ4eGW8 = $TU795w->pathcorrection( $pp9pYw.$URL_QUERY."index.html" ); 
                            if ( $YBY = @fopen( $JTe7jJ4eGW8, "w" ) ) 
                            { 
                                if ( @flock( $YBY, LOCK_EX ) ) 
                                { 
                                    fwrite( $YBY, $arOtZ_eDMd4PitTm ); 
                                    @flock( $YBY, LOCK_UN ); 
                                } 
                                @fclose( $YBY ); 
                                @chmod( $JTe7jJ4eGW8, CHMOD_FILE ); 
                            } 
                        } 
                    } 
                } 
            } 
        } 
        echo $arOtZ_eDMd4PitTm; 
    } 
    ob_start( ); 
    if ( $osuAaSk->usersessionvalid( ) && ( !defined( "ALLOW_PANEL" ) && ALLOW_PANEL || isset( $_SESSION['HOSTCMS_SHOW_XML'] ) && $_SESSION['HOSTCMS_SHOW_XML'] ) && empty( $CkqRBASwTWxNIw ) ) 
    { 
        do 
        { 
            if ( !$VjwVmUA8tDAL6mE ) 
            { 
                break; 
            } 
            else 
            { 
                echo "<div class=\"hostcms_float_block\" id=\"hostcms_layer\" style=\"top: 13px;\">
		<div class=\"hostcms_float_block_t\"></div>
		<div class=\"hostcms_float_block_tr\"></div>
		<div class=\"hostcms_float_block_r\" name=\"hostcms_float_block_r\"></div>
		<div class=\"hostcms_float_block_br\"></div>
		<div class=\"hostcms_float_block_b\"></div>
		<div class=\"hostcms_float_block_bl\"></div>
		<div class=\"hostcms_float_block_l\" name=\"hostcms_float_block_l\"></div>
		<div class=\"hostcms_float_block_tl\"></div>
		<div class=\"hostcms_float_block_content\">
		"; 
                if ( defined( "CURRENT_STRUCTURE_ID" ) && $Oy0_d5TD->allowshowpanel( ) ) 
                { 
                    $5nfe = "/admin/structure/structure.php?admin_forms_id=82&operation=edit_node&check_0_".CURRENT_STRUCTURE_ID."=1"; 
                    echo "<a href=\""; 
                    echo $5nfe; 
                    echo "\" onclick=\"ShowEditWindow('"; 
                    echo $MSG_kernel['structure_edit']; 
                    echo "', '"; 
                    echo $5nfe; 
                    echo "', 'structure_"; 
                    echo CURRENT_STRUCTURE_ID; 
                    echo "'); return false;\"><img src=\"/hostcmsfiles/images/structure_edit.gif\" border=\"0\" alt=\""; 
                    echo $MSG_kernel['structure_edit']; 
                    echo "\" title=\""; 
                    echo $MSG_kernel['structure_edit']; 
                    echo "\" /></a>&nbsp;"; 
                    $jzgDI1jvtug =& singleton( "Structure" ); 
                    if ( $aXj2RtsIN00eGmtuNA = $jzgDI1jvtug->getstructureitem( CURRENT_STRUCTURE_ID ) ) 
                    { 
                        if ( 0 < $aXj2RtsIN00eGmtuNA['templates_id'] ) 
                        { 
                            $ = $aXj2RtsIN00eGmtuNA['templates_id']; 
                        } 
                        else 
                        { 
                            $RZku1IgcQvbm =& singleton( "documents" ); 
                            $vJhJxPF4bhJhmFzXpoa7l4eFRcY = $RZku1IgcQvbm->getcurrentdocumentversion( $aXj2RtsIN00eGmtuNA['documents_id'] ); 
                            if ( $vJhJxPF4bhJhmFzXpoa7l4eFRcY ) 
                            { 
                                $ = $vJhJxPF4bhJhmFzXpoa7l4eFRcY['templates_id']; 
                            } 
                            else 
                            { 
                                $ = 0; 
                            } 
                        } 
                        if ( $ ) 
                        { 
                            $5nfe = "/admin/templates/templates/templates.php?admin_forms_id=6&operation=edit_template&check_1_".$."=1"; 
                            echo "<a href=\""; 
                            echo $5nfe; 
                            echo "\" onclick=\"ShowEditWindow('"; 
                            echo $MSG_kernel['template_edit']; 
                            echo "', '"; 
                            echo $5nfe; 
                            echo "', 'template_"; 
                            echo $; 
                            echo "'); return false;\"><img src=\"/hostcmsfiles/images/template_edit.gif\" border=\"0\" alt=\""; 
                            echo $MSG_kernel['template_edit']; 
                            echo "\" title=\""; 
                            echo $MSG_kernel['template_edit']; 
                            echo "\" /></a>&nbsp;"; 
                        } 
                        if ( 0 < $aXj2RtsIN00eGmtuNA['data_templates_id'] ) 
                        { 
                            $5nfe = "/admin/templates/data_templates/data_templates.php?admin_forms_id=5&operation=edit_data_template&check_1_".$aXj2RtsIN00eGmtuNA['data_templates_id']."=1"; 
                            echo "<a href=\""; 
                            echo $5nfe; 
                            echo "\" onclick=\"ShowEditWindow('"; 
                            echo $MSG_kernel['data_template_edit']; 
                            echo "', '"; 
                            echo $5nfe; 
                            echo "', 'template_"; 
                            echo $aXj2RtsIN00eGmtuNA['data_templates_id']; 
                            echo "'); return false;\"><img src=\"/hostcmsfiles/images/datatemplate_edit.gif\" border=\"0\" alt=\""; 
                            echo $MSG_kernel['data_template_edit']; 
                            echo "\" title=\""; 
                            echo $MSG_kernel['data_template_edit']; 
                            echo "\" /></a>&nbsp;"; 
                        } 
                        if ( $aXj2RtsIN00eGmtuNA['structure_type'] == 0 ) 
                        { 
                            $5nfe = "/admin/documents/documents.php?admin_forms_id=9&operation=edit_document&check_1_".$aXj2RtsIN00eGmtuNA['documents_id']."=1"; 
                            echo "<a href=\""; 
                            echo $5nfe; 
                            echo "\" onclick=\"ShowEditWindow('"; 
                            echo $MSG_kernel['document_edit']; 
                            echo "', '"; 
                            echo $5nfe; 
                            echo "', 'document_"; 
                            echo $aXj2RtsIN00eGmtuNA['documents_id']; 
                            echo "'); return false;\"><img src=\"/hostcmsfiles/images/page_edit.gif\" border=\"0\" alt=\""; 
                            echo $MSG_kernel['document_edit']; 
                            echo "\" title=\""; 
                            echo $MSG_kernel['document_edit']; 
                            echo "\" /></a>&nbsp;"; 
                        } 
                        if ( class_exists( "InformationSystem" ) ) 
                        { 
                            $9vegn2T2Hmjvkdw7TIUNI = new informationsystem( ); 
                            if ( $HIfty5I8VlnytKbrd0U = $9vegn2T2Hmjvkdw7TIUNI->getinformationsystembystructureid( CURRENT_STRUCTURE_ID ) ) 
                            { 
                                $5nfe = "/admin/InformationSystems/InformationSystems.php?admin_forms_id=11&operation=edit_information_system&check_1_".$HIfty5I8VlnytKbrd0U."=1"; 
                                echo "<a href=\""; 
                                echo $5nfe; 
                                echo "\" onclick=\"ShowEditWindow('"; 
                                echo $MSG_kernel['information_system_edit']; 
                                echo "', '"; 
                                echo $5nfe; 
                                echo "', 'information_system_"; 
                                echo $HIfty5I8VlnytKbrd0U; 
                                echo "'); return false;\"><img src=\"/hostcmsfiles/images/folder_page_edit.gif\" border=\"0\" alt=\""; 
                                echo $MSG_kernel['information_system_edit']; 
                                echo "\" title=\""; 
                                echo $MSG_kernel['information_system_edit']; 
                                echo "\" /></a>&nbsp;"; 
                            } 
                        } 
                        if ( class_exists( "shop" ) ) 
                        { 
                            $iDyctQ = new shop( ); 
                            if ( $CtvBJrM8LQ = $iDyctQ->getshopwhithstructureid( CURRENT_STRUCTURE_ID, CURRENT_SITE ) ) 
                            { 
                                $5nfe = "/admin/shop/shop.php?admin_forms_id=54&operation=edit_shop&check_1_".$CtvBJrM8LQ['shop_shops_id']."=1"; 
                                echo "<a href=\""; 
                                echo $5nfe; 
                                echo "\" onclick=\"ShowEditWindow('"; 
                                echo $MSG_kernel['shop_edit']; 
                                echo "', '"; 
                                echo $5nfe; 
                                echo "', 'shop_"; 
                                echo $CtvBJrM8LQ['shop_shops_id']; 
                                echo "'); return false;\"><img src=\"/hostcmsfiles/images/shop_edit.gif\" border=\"0\" alt=\""; 
                                echo $MSG_kernel['shop_edit']; 
                                echo "\" title=\""; 
                                echo $MSG_kernel['shop_edit']; 
                                echo "\" /></a>&nbsp;"; 
                            } 
                        } 
                    } 
                    echo "<span style=\"padding-left: 10px\"></span>"; 
                } 
                echo "<a href=\"/admin/\" target=\"_blank\"><img src=\"/hostcmsfiles/images/system.gif\" border=\"0\" alt=\""; 
                echo $MSG_kernel['administration_center']; 
                echo "\" title=\""; 
                echo $MSG_kernel['administration_center']; 
                echo "\" /></a>
	
		<img onclick=\"SlideWindow('div_hostcms_debug')\" style=\"cursor:pointer\" src=\"/hostcmsfiles/images/chart_bar.gif\" border=\"0\" width=\"16\" height=\"16\" title=\""; 
                echo $MSG_kernel['debug_information']; 
                echo "\" alt=\""; 
                echo $MSG_kernel['debug_information']; 
                echo "\" />
		
		"; 
                if ( defined( "ALLOW_SHOW_SQL" ) && ALLOW_SHOW_SQL ) 
                { 
                    echo "<img onclick=\"SlideWindow('div_hostcms_sql')\" style=\"cursor:pointer\" src=\"/hostcmsfiles/images/sql.gif\" border=\"0\" width=\"16\" height=\"16\" title=\""; 
                    echo $MSG_kernel['sql_queries']; 
                    echo "\" alt=\""; 
                    echo $MSG_kernel['sql_queries']; 
                    echo "\" />"; 
                } 
                if ( defined( "ALLOW_SHOW_XML" ) && ALLOW_SHOW_XML ) 
                { 
                    if ( to_bool( $_SESSION['HOSTCMS_SHOW_XML'] ) ) 
                    { 
                        $RQlRcP3pGL0 = "xsl.gif"; 
                        $obqvew = $MSG_kernel['hide_xml']; 
                        $IO8hYI15 = "?hostcms_action=HIDE_XML"; 
                    } 
                    else 
                    { 
                        $RQlRcP3pGL0 = "xsl.gif"; 
                        $obqvew = $MSG_kernel['show_xml']; 
                        $IO8hYI15 = "?hostcms_action=SHOW_XML"; 
                    } 
                    echo "<a href=\""; 
                    echo $IO8hYI15; 
                    echo "\" title=\""; 
                    echo $obqvew; 
                    echo "\"><img src=\"/hostcmsfiles/images/"; 
                    echo $RQlRcP3pGL0; 
                    echo "\" border=\"0\" width=\"16\" height=\"16\" /></a>"; 
                } 
                echo "		<span style=\"padding-left: 10px\"></span>
		
		<a href=\"/admin/logout.php\"><img src=\"/admin/images/exit.gif\" title=\""; 
                echo $MSG_kernel['logout']; 
                echo "\" alt=\""; 
                echo $MSG_kernel['logout']; 
                echo "\" border=\"0\" width=\"16\" height=\"16\" /></a>
		
		</div>
		<div class=\"hostcms_float_block_drag_block\" name=\"hostcms_float_block_drag_block\" onMouseDown=\"new Draggable(this.parentNode);\"></div>
	</div>
	
	<script type=\"text/javascript\">
	if(!window.jQuery)
	{
		document.write('<scri'+'pt type=\"text/javascript\" src=\"/admin/js/jquery/jquery.js\"></scr'+'ipt>');
	}
	</script>
	
	"; 
                $5_RF = $Oy0_d5TD->getcurrentlng( ); 
                $o4_4PtANwFB4 = $Oy0_d5TD->getversiontimestamp( ); 
                $Oy0_d5TD->addjs( "/admin/js/lng/".$5_RF."/{$5_RF}.js" ); 
                $1aQH = $Oy0_d5TD->getalljs( ); 
                if ( is_array( $1aQH ) && 0 < count( $1aQH ) ) 
                { 
                    foreach ( $1aQH as $2IwOvlE ) 
                    { 
                        echo "<script type=\"text/javascript\" src=\""; 
                        echo $2IwOvlE."?".$o4_4PtANwFB4; 
                        echo "\"></script>
"; 
                    } 
                } 
                echo "	<script type=\"text/javascript\" src=\"/admin/js/JsHttpRequest.js\"></script>
	"; 
                if ( defined( "DENY_GZIP_WYSIWYG" ) && DENY_GZIP_WYSIWYG ) 
                { 
                    echo "<script type=\"text/javascript\" src=\"/admin/wysiwyg/tiny_mce_src.js\"></script>"; 
                } 
                else 
                { 
                    echo "<script type=\"text/javascript\" src=\"/admin/wysiwyg/tiny_mce_gzip.js\"></script>
		
	<script type=\"text/javascript\">
	tinyMCE_GZ.init({
		plugins : 'safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups',
		themes : 'advanced',
		languages : 'ru',
		disk_cache : true,
		compress : true,
		suffix : '_src',
		debug : false
	});
	</script>
	
	<script type=\"text/javascript\">
	//   
	cmslocation = '';
	
	//   
	sended_request = false;
	
	function saveLocation(location)
	{
		cmslocation = location;
	}
	
	//   #cmsurl=
	function getCmsUrl()
	{
		return new String(document.location.hash).replace('#cmsurl=', '').replace('%3F','?');
	}
	
	//   
	saveLocation(getCmsUrl());
	
	//  #
	function setLocation(location)
	{
		if (location.indexOf('?') >= 0)
		{
			location = location.substring(0, location.indexOf('?'))
			+ '%3F'
			+ HostcmsEscape(location.substring(location.indexOf('?') + 1));
		}
		
		document.location.hash = 'cmsurl=' + location;
	}
	
	//     -
	function checkLocation()
	{
		var curr_location = getCmsUrl();
	
		if (curr_location != cmslocation && sended_request == false)
		{
			sended_request = true;
			//document.location = curr_location;
			cmsrequest = '';
			sendRequest(unescape(curr_location), 'get', callbackfunction_DoLoadAjax);
		}
	}
	
	setInterval(checkLocation, 500);
	</script>
	"; 
                } 
                echo "	<script type=\"text/javascript\">
	"; 
                if ( $osuAaSk->usersessionvalid( ) ) 
                { 
                    $SGk_5H5uyuYCQw = new user_access( ); 
                    $z286Vllsoa4 = $SGk_5H5uyuYCQw->getuserbyname( $_SESSION['valid_user'] ); 
                    if ( $z286Vllsoa4 ) 
                    { 
                        $6VwVQ3qlDSlXVm3Mn8o = $SGk_5H5uyuYCQw->getusertype( $z286Vllsoa4['users_type_id'] ); 
                        $Tqh_vFM9LF5UxowI1iCAC1_yaQ = $6VwVQ3qlDSlXVm3Mn8o['users_type_root_dir']; 
                    } 
                    else 
                    { 
                        $Tqh_vFM9LF5UxowI1iCAC1_yaQ = ""; 
                    } 
                    echo "		var FM = new FM('"; 
                    echo htmlspecialchars( $Tqh_vFM9LF5UxowI1iCAC1_yaQ ); 
                    echo "');
		"; 
                } 
                echo "	</script>
	
	<!-- Calendar -->
	<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"/admin/calendar/calendar.css\" title=\"win2k-cold-1\" />
	<script type=\"text/javascript\" src=\"/admin/calendar/calendar.js\"></script>
	<script type=\"text/javascript\" src=\"/admin/calendar/lang/calendar-ru.js\"></script>
	<script type=\"text/javascript\" src=\"/admin/calendar/calendar-setup.js\"></script>

	"; 
                if ( !defined( "DISABLE_SYNTAX_HIGHTLIGHTING" ) && !DISABLE_SYNTAX_HIGHTLIGHTING ) 
                { 
                    echo "<script type=\"text/javascript\" src=\"/admin/js/codepress/codepress.js\"></script>"; 
                } 
                $FiEx145NuQ = $Oy0_d5TD->getmicrotime( ); 
                $c6UELg = $FiEx145NuQ - $BeginTime; 
                echo "	<div id=\"div_hostcms_debug\">
		<div id=\"subdiv\">
		"; 
                echo sprintf( $MSG_kernel['total_time'], $c6UELg ); 
                echo "		<ul>
		<li>"; 
                echo sprintf( $MSG_kernel['time_load_modules'], to_str( $MTime ) ); 
                echo ";
		"; 
                if ( isset( $PTime ) ) 
                { 
                    echo "		<li>"; 
                    echo sprintf( $MSG_kernel['time_page_generation'], to_str( $PTime ) ); 
                    echo ";
		"; 
                } 
                echo "		<li>"; 
                echo sprintf( $MSG_kernel['time_database_connection'], to_str( $DB_CONNECT_TIME ) ); 
                echo ";
		<li>"; 
                echo sprintf( $MSG_kernel['time_database_select'], to_str( $DB_SELECT_TIME ) ); 
                echo ";
		<li>"; 
                echo sprintf( $MSG_kernel['time_sql_execution'], to_str( $SQL_time ) ); 
                echo ";
		<li>"; 
                echo sprintf( $MSG_kernel['time_xml_execution'], to_str( $xml_time ) ); 
                echo ".
		</ul>
		"; 
                if ( function_exists( "memory_get_usage" ) && substr( PHP_OS, 0, 3 ) != "WIN" ) 
                { 
                    echo sprintf( $MSG_kernel['memory_usage'], memory_get_usage( ) / 1048576 ); 
                    echo "<br />"; 
                } 
                echo "		"; 
                echo sprintf( $MSG_kernel['number_of_queries'], to_int( $total_query ) ); 
                echo ".
		<br />
		"; 
                echo sprintf( $MSG_kernel['compression'], defined( "COMPRESSION_BEGIN" ) ? $MSG_kernel['enabled'] : $MSG_kernel['disabled'] ); 
                echo ".
		<br />
		"; 
                echo sprintf( $MSG_kernel['cache'], defined( "CACHE_INSTALL" ) ? $MSG_kernel['enabled'] : $MSG_kernel['disabled'] ); 
                echo ".
		"; 
                if ( defined( "CACHE_INSTALL" ) ) 
                { 
                    echo "		<ul>
		<li>
		"; 
                    echo sprintf( $MSG_kernel['cache_insert_time'], to_str( $CACHE_INSERT_TIME ) ); 
                    echo ";
		<li>
		"; 
                    echo sprintf( $MSG_kernel['cache_write_requests'], to_int( $CACHE_INSERT_COUNT ) ); 
                    echo ";
		<li>
		"; 
                    echo sprintf( $MSG_kernel['cache_read_time'], to_str( $CACHE_GET_TIME ) ); 
                    echo ";
		<li>
		"; 
                    echo sprintf( $MSG_kernel['cache_read_requests'], to_int( $CACHE_GET_COUNT ) ); 
                    echo ".
		</ul>
		"; 
                } 
                echo "		</div>
	</div>
	
	"; 
                echo $Oy0_d5TD->getxmlcontent( ); 
                if ( defined( "ALLOW_SHOW_SQL" ) && ALLOW_SHOW_SQL ) 
                { 
                    echo "<div id=\"div_hostcms_sql\">
		<div id=\"subdiv\">
		"; 
                    if ( isset( $HOSTCMS_SQL_LOG ) && is_array( $HOSTCMS_SQL_LOG ) && 0 < count( $HOSTCMS_SQL_LOG ) ) 
                    { 
                        $gTqe_BXhMWc =& singleton( "DataBase" ); 
                        $goDugQ = array( ); 
                        $7w = 0; 
                        foreach ( $GLOBALS['HOSTCMS_SQL_LOG'] as $qGJ7FNoYNA ) 
                        { 
                            $4zURVL8Y = crc32( $qGJ7FNoYNA['trimquery'] ); 
                            if ( in_array( $4zURVL8Y, $goDugQ ) ) 
                            { 
                                $3bfDHedrrD2M4Q = "sql_qd"; 
                            } 
                            else 
                            { 
                                $3bfDHedrrD2M4Q = "sql_q"; 
                            } 
                            $goDugQ[] = $4zURVL8Y; 
                            echo "<div class=\""; 
                            echo $3bfDHedrrD2M4Q; 
                            echo "\">"; 
                            echo $gTqe_BXhMWc->highlightsql( htmlspecialchars( $qGJ7FNoYNA['query'] ) ); 
                            echo "</div><div class=\"sql_db\" id=\"sql_h"; 
                            echo $7w; 
                            echo "\">"; 
                            if ( isset( $qGJ7FNoYNA['debug_backtrace'] ) && 0 < count( $qGJ7FNoYNA['debug_backtrace'] ) ) 
                            { 
                                foreach ( $qGJ7FNoYNA['debug_backtrace'] as $VLgs_0Yy1g ) 
                                { 
                                    echo to_str( $VLgs_0Yy1g['file'] ); 
                                    echo ",  "; 
                                    echo to_str( $VLgs_0Yy1g['line'] ); 
                                    echo "
"; 
                                } 
                            } 
                            echo "</div><div class=\"sql_t\">"; 
                            if ( isset( $qGJ7FNoYNA['explain'] ) && 0 < count( $qGJ7FNoYNA['explain'] ) ) 
                            { 
                                echo "Explain:<br />
						<table class=\"sql_explain\"><tr>"; 
                                foreach ( $qGJ7FNoYNA['explain'][0] as $ErtiyQFp_X1Xz00 => $XBiwS7KLuDeZCVc ) 
                                { 
                                    echo "<td><b>"; 
                                    echo $ErtiyQFp_X1Xz00; 
                                    echo "</b></td>"; 
                                } 
                                echo "</tr>"; 
                                foreach ( $qGJ7FNoYNA['explain'] as $XBiwS7KLuDeZCVc ) 
                                { 
                                    echo "<tr>"; 
                                    foreach ( $XBiwS7KLuDeZCVc as $sN8OfJvKDVgoQw5RTBtW => $7gFvho1YyWWG2QJRnseZPu4 ) 
                                    { 
                                        if ( $sN8OfJvKDVgoQw5RTBtW == "type" ) 
                                        { 
                                            switch ( mb_strtolower( $7gFvho1YyWWG2QJRnseZPu4 ) ) 
                                            { 
                                            case "system" : 
                                                $E7LJsMo = "#008000"; 
                                                break; 
                                            case "const" : 
                                                $E7LJsMo = "#008000"; 
                                                break; 
                                            case "eq_ref" : 
                                                $E7LJsMo = "#D9E700"; 
                                                break; 
                                            case "ref" : 
                                                $E7LJsMo = "#E7B300"; 
                                                break; 
                                            case "range" : 
                                                $E7LJsMo = "#E78200"; 
                                                break; 
                                            case "index" : 
                                                $E7LJsMo = "#E76200"; 
                                                break; 
                                            case "all" : 
                                                $E7LJsMo = "#E70B00"; 
                                                break; 
                                            default : 
                                                $E7LJsMo = "#777777"; 
                                            } 
                                            $bLTOzyihvN7ou4Se2w = " style=\"color: ".$E7LJsMo."\""; 
                                        } 
                                        else 
                                        { 
                                            $bLTOzyihvN7ou4Se2w = ""; 
                                        } 
                                        echo "<td"; 
                                        echo $bLTOzyihvN7ou4Se2w; 
                                        echo ">"; 
                                        echo str_replace( ",", ", ", $7gFvho1YyWWG2QJRnseZPu4 ); 
                                        echo "</td>"; 
                                    } 
                                    echo "</tr>"; 
                                } 
                                echo "</table>"; 
                            } 
                            echo ": "; 
                            echo round( $qGJ7FNoYNA['time'], 4 ); 
                            echo " . <a onclick=\"ShowHide('sql_h"; 
                            echo $7w; 
                            echo "')\" style=\"cursor:pointer\"></a></div>"; 
                            ++$7w; 
                        } 
                        unset( $goDugQ ); 
                    } 
                    echo "		</div>
	</div>"; 
                } 
                echo "	<script type=\"text/javascript\">
	CreateWindow(\"div_hostcms_debug\", \""; 
                echo $MSG_kernel['debug_information']; 
                echo "\", '400px', '220px');
	"; 
                if ( defined( "ALLOW_SHOW_SQL" ) && ALLOW_SHOW_SQL ) 
                { 
                    echo "CreateWindow(\"div_hostcms_sql\", \""; 
                    echo $MSG_kernel['sql_queries']; 
                    echo "\", '90%', '90%');"; 
                } 
                echo "	</script>
	
	<link rel=\"stylesheet\" type=\"text/css\" href=\"/hostcmsfiles/style.css\" />
	
	<!--      -->
	<script type=\"text/javascript\">
	//  
	elements = getElementsByName_iefix('DIV', 'hostcms_float_block_l');
	if (elements.length > 0)
	{
		changeHeightFloatBlockBorder (elements, -20, 10);
	}

	//  
	elements = getElementsByName_iefix('DIV', 'hostcms_float_block_r');
	if (elements.length > 0)
	{
		changeHeightFloatBlockBorder (elements, -20, 10);
	}

	//  
	elements = getElementsByName_iefix('DIV', 'hostcms_float_block_drag_block');
	if (elements.length > 0)
	{
		changeHeightFloatBlockBorder (elements, -10, 5);
	}
	</script>
	"; 
            } 
        } 
        if ( !$VjwVmUA8tDAL6mE && $osuAaSk->usersessionvalid( ) && ( defined( "ALLOW_PANEL" ) && !ALLOW_PANEL ) || ( !defined( "INTEGRATION" ) && !( INTEGRATION == 0 ) && !( to_str( $_SERVER['REQUEST_URI'] ) == "/" ) && !isset( $3Kv84_rGRuAIZzZoF9LUsQ ) ) ) 
        { 
            break; 
        } 
        echo "<script language=\"javascript\" type=\"text/javascript\">
		if (document.all && !window.opera)
		{
			if (document.getElementById('hostcms_licence'))
			{
				document.getElementById('hostcms_licence').style.position=\"absolute\";
			}
			window.onscroll=function()
			{
				if (document.getElementById('hostcms_licence'))
				{
					document.getElementById('hostcms_licence').style.top = document.documentElement.scrollTop;
				}
			};
			window.onscroll();
		}
		else
		{
			if (document.getElementById('hostcms_licence'))
			{
				document.getElementById('hostcms_licence').style.position=\"fixed\";
				document.getElementById('hostcms_licence').style.top=0;
			}
		}
		</script>
		"; 
    } while ( 0 ); 
    $arOtZ_eDMd4PitTm = ob_get_clean( ); 
    if ( mb_strtoupper( SITE_CODING ) != "UTF-8" ) 
    { 
        $arOtZ_eDMd4PitTm = @iconv( "UTF-8", SITE_CODING."//IGNORE//TRANSLIT", $arOtZ_eDMd4PitTm ); 
    } 
    echo $arOtZ_eDMd4PitTm; 
    if ( defined( "COMPRESSION_BEGIN" ) ) 
    { 
        $ZJqpSKw5W50vY =& singleton( "compression" ); 
        $ZJqpSKw5W50vY->pagecompressionend( ); 
    } 
    session_write_close( ); 
    exit( ); 
} 
 
list( $usec, $sec ) = explode( " ", microtime( ) ); 
$GLOBALS['BeginTime'] = ( double )$usec + ( double )$sec; 
if ( is_dir( "install/" ) && is_file( "install/index.php" ) ) 
{ 
    header( "Location: /install/" ); 
    exit( ); 
} 
require_once( "main_classes.php" ); 
if ( !defined( "DENY_INI_SET" ) && defined( "DENY_INI_SET" ) && !DENY_INI_SET ) 
{ 
    ini_set( "display_errors", 1 ); 
} 
if ( !defined( "INTEGRATION" ) ) 
{ 
    define( "INTEGRATION", 0 ); 
} 
$kernel =& singleton( "kernel" ); 
header( "X-Powered-By: HostCMS ".$kernel->crc32( CMS_FOLDER )." ".$kernel->crc32( INTEGRATION )." ".$kernel->crc32( CURRENT_VERSION ) ); 
if ( isset( $_SERVER['REMOTE_ADDR'] ) ) 
{ 
    $user_ip = to_str( $_SERVER['REMOTE_ADDR'] ); 
} 
else 
{ 
    $user_ip = " "; 
} 
define( "USER_IP", $user_ip ); 
$SYSTEM_URL_ARRAY = array( ); 
$MBeginTime = $kernel->getmicrotime( ); 
$kernel->loadmodules( false ); 
$GLOBALS['MTime'] = $kernel->getmicrotime( ) - $MBeginTime; 
if ( class_exists( "compression" ) ) 
{ 
    $compression =& singleton( "compression" ); 
    $compression->pagecompressionbegin( ); 
} 
if ( !function_exists( "xslt_create" ) || !function_exists( "domxml_xslt_stylesheet" ) || !class_exists( "DomDocument" ) || !class_exists( "XsltProcessor" ) ) 
{ 
    header( "HTTP/1.0 503 Service Unavailable" ); 
    header( "Content-type: text/html; charset=UTF-8" ); 
    exit_index( $SYSTEM_URL_ARRAY, "   !", "<p>     ".PRODUCT_NAME."   PHP 5    <a href=\"http://".PRODUCT_HTTP."/documentation/libxslt/\" target=\"_blank\">Libxslt</a>.</p><p>     <a href=\"http://".PRODUCT_HTTP."/hosting/\" target=\"_blank\">  </a>,    ".PRODUCT_NAME.".</p>" ); 
} 
if ( !defined( "SUPPORT_EMAIL" ) ) 
{ 
    define( "SUPPORT_EMAIL", "[email protected]" ); 
} 
if ( !isset( $_SERVER['HTTP_HOST'] ) ) 
{ 
    $GLOBALS['_SERVER']['HTTP_HOST'] = ""; 
} 
$domain = $_SERVER['HTTP_HOST']; 
$key2 = loadkeys( ); 
$a_domain = explode( ":", $domain ); 
$domain = $a_domain[0]; 
$key1 = sitecreate( $domain, INTEGRATION ); 
if ( !eqkeys( $key1, $key2, $domain ) ) 
{ 
    header( "HTTP/1.0 503 Service Unavailable" ); 
    header( "Content-type: text/html; charset=UTF-8" ); 
    exit_index( $SYSTEM_URL_ARRAY, "   !", "<h2> </h2><p>           <a href=\"http://".PRODUCT_HTTP."/users/\" target=\"_blank\"> </a></p><p>        ,       :<br/><img src=\"http://".PRODUCT_HTTP."/images/news/user-orders/img1.gif\" class=\"screen\" /></p><p>        PIN-       ,  HostCMS.    .</p><p>    PIN-    <a href=\"/admin/\" target=\"_blank\"> </a>            .</p><p>     <a href=\"/admin/\" target=\"_blank\"> </a>   (   5.1.1),      :<br/><img src=\"http://www.hostcms.ru/images/keys/domain_list.gif\" class=\"screen\" /></p><p>                    .<h2>   </h2><p>  <a href=\"/admin/\" target=\"_blank\"> </a>,    .</p>" ); 
} 
if ( INTEGRATION == 0 || INTEGRATION == 1 ) 
{ 
    $DataBase =& singleton( "DataBase" ); 
    $DataBase->select( "SELECT `site_id` FROM `site_table` WHERE `site_is_active` = 1" ); 
    if ( !( 2 < $DataBase->get_count_row( ) ) && INTEGRATION == 0 || 1 < $DataBase->get_count_row( ) && INTEGRATION == 1 ) 
    { 
        header( "HTTP/1.0 503 Service Unavailable" ); 
        header( "Content-type: text/html; charset=UTF-8" ); 
        exit_index( $SYSTEM_URL_ARRAY, "     !", "         HostCMS!<p>     (<b>\" \" &#8594; \"\"</b>)      ." ); 
    } 
} 
if ( !empty( $_SERVER['HTTP_X_ORIGINAL_URL'] ) ) 
{ 
    $current_url = "http://".$domain.$_SERVER['HTTP_X_ORIGINAL_URL']; 
} 
else if ( !empty( $_SERVER['HTTP_X_REWRITE_URL'] ) ) 
{ 
    $current_url = "http://".$domain.$_SERVER['HTTP_X_REWRITE_URL']; 
} 
else 
{ 
    $current_url = "http://".$domain.$_SERVER['REQUEST_URI']; 
} 
$current_url_decode = urldecode( $current_url ); 
$is_utf8 = strtoupper( mb_detect_encoding( $current_url_decode, "UTF-8", true ) ) == "UTF-8"; 
if ( !$is_utf8 ) 
{ 
    $current_url_decode = trim( mb_convert_encoding( $current_url_decode, "UTF-8", "windows-1251" ) ); 
} 
$url = parse_url( $current_url_decode ); 
if ( mb_strtolower( $url['path'] ) == "/index.php" ) 
{ 
    $url['path'] = "/"; 
} 
$url_path = $url['path']; 
if ( isset( $url['query'] ) ) 
{ 
    $GLOBALS['URL_QUERY'] = $url['query']; 
    if ( !$is_utf8 || function_exists( "mb_parse_str" ) ) 
    { 
        mb_parse_str( $url['query'], $_GET ); 
        $GLOBALS['_REQUEST'] = $_GET + $_REQUEST; 
    } 
} 
else 
{ 
    $GLOBALS['URL_QUERY'] = ""; 
} 
$last_slash = mb_strrpos( $url['path'], "/" ); 
if ( defined( "OPTIONAL_LAST_SLASH" ) && OPTIONAL_LAST_SLASH ) 
{ 
    $GLOBALS['URL_ARRAY'] = explode( "/", mb_substr( $url_path, 1 ) ); 
} 
else 
{ 
    $GLOBALS['URL_ARRAY'] = explode( "/", mb_substr( $url_path, 1, $last_slash ) ); 
} 
$count = count( $URL_ARRAY ); 
$last_str = mb_substr( $url_path, $last_slash ); 
$GLOBALS['URL_LAST_STR'] = $last_str; 
if ( !defined( "NOT_EXISTS_FILE_404_ERROR" ) && defined( "NOT_EXISTS_FILE_404_ERROR" ) && NOT_EXISTS_FILE_404_ERROR ) 
{ 
    $not_exists_file = @ereg( "^/[--a-zA-Z0-9_\.\-]+\.([a-zA-Z0-9\-\.]{2,})+\$", $last_str ); 
} 
else 
{ 
    $not_exists_file = false; 
} 
if ( $last_str != "/" && $last_str != "/robots.txt" && $last_str != "/index.php" && $last_str != "/favicon.ico" && $not_exists_file ) 
{ 
    showheader404( ); 
    exit( ); 
} 
if ( empty( $URL_ARRAY[$count - 1] ) && $count != 1 ) 
{ 
    unset( $URL_ARRAY[$count - 1] ); 
} 
if ( $count == 1 && ( empty( $URL_ARRAY[0] ) || mb_strtolower( $URL_ARRAY[0] ) == "index.php" ) ) 
{ 
    $GLOBALS['URL_ARRAY'][0] = "/"; 
} 
$SYSTEM_URL_ARRAY = $URL_ARRAY; 
$param = $URL_ARRAY; 
$GLOBALS['param'] = $URL_ARRAY; 
define( "CURRENT_URL_PATH", $url['path'] ); 
$is_not_complectation = false; 
if ( 0 == INTEGRATION && ( class_exists( "Search" ) || class_exists( "Support" ) || class_exists( "Cache" ) || class_exists( "compression" ) || class_exists( "counter" ) || class_exists( "FileManager" ) || class_exists( "Backup" ) || class_exists( "lists" ) || class_exists( "EventsJournalAdmin" ) || class_exists( "polls" ) || class_exists( "Forum" ) || class_exists( "Forms" ) || class_exists( "SiteUsers" ) || class_exists( "Maillist" ) || class_exists( "Advertisement" ) ) ) 
{ 
    $is_not_complectation = true; 
} 
if ( 1 == INTEGRATION && ( class_exists( "Cache" ) || class_exists( "compression" ) || class_exists( "counter" ) || class_exists( "FileManager" ) || class_exists( "Backup" ) || class_exists( "lists" ) || class_exists( "EventsJournalAdmin" ) || class_exists( "polls" ) || class_exists( "Forum" ) || class_exists( "Forms" ) || class_exists( "SiteUsers" ) || class_exists( "Maillist" ) || class_exists( "Advertisement" ) ) ) 
{ 
    $is_not_complectation = true; 
} 
if ( 3 == INTEGRATION && ( class_exists( "counter" ) || class_exists( "Cache" ) || class_exists( "FileManager" ) || class_exists( "EventsJournalAdmin" ) || class_exists( "polls" ) || class_exists( "Forum" ) || class_exists( "SiteUsers" ) || class_exists( "Maillist" ) || class_exists( "Advertisement" ) ) ) 
{ 
    $is_not_complectation = true; 
} 
if ( 5 == INTEGRATION && ( class_exists( "FileManager" ) || class_exists( "polls" ) || class_exists( "Forum" ) || class_exists( "Maillist" ) ) ) 
{ 
    $is_not_complectation = true; 
} 
if ( 7 == INTEGRATION ) 
{ 
    $is_not_complectation = false; 
} 
if ( $is_not_complectation ) 
{ 
    header( "HTTP/1.0 503 Service Unavailable" ); 
    header( "Content-type: text/html; charset=UTF-8" ); 
    exit_index( $SYSTEM_URL_ARRAY, "  .", "<p><b>    !</b>
	<p>      !" ); 
} 
set_error_handler( "cms_error_handler" ); 
$site =& singleton( "site" ); 
$alias_row = $site->getalias( $domain ); 
if ( !$alias_row ) 
{ 
    header( "HTTP/1.0 503 Service Unavailable" ); 
    header( "Content-type: text/html; charset=UTF-8" ); 
    exit_index( $SYSTEM_URL_ARRAY, "   ".$domain."       HostCMS!", " <b>".$domain."</b>         <b>HostCMS</b>!<p>     <b><a href=\"/admin/site/site.php\" target=\"_blank\">\" \" &#8594; \"\"</a></b>.   <b>\"\"</b>   .       <b>\"\"</b> &#8594; <b>\"\"</b>." ); 
} 
define( "CURRENT_SITE", $alias_row['site_id'] ); 
if ( !$kernel->initconstants( ) ) 
{ 
    header( "HTTP/1.0 503 Service Unavailable" ); 
    header( "Content-type: text/html; charset=UTF-8" ); 
    exit_index( $SYSTEM_URL_ARRAY, " #2  !", "  , ..          . <a href=\"/admin/site/site.php\">  </a>        HostCMS." ); 
} 
if ( mb_strtoupper( SITE_CODING ) != "UTF-8" ) 
{ 
    convert_array( &$GLOBALS['_POST'], SITE_CODING, "UTF-8" ); 
    convert_array( &$GLOBALS['_REQUEST'], SITE_CODING, "UTF-8" ); 
    convert_array( &$_COOKIES, SITE_CODING, "UTF-8" ); 
    convert_array( &$GLOBALS['_FILES'], SITE_CODING, "UTF-8" ); 
} 
error_reporting( SITE_ERROR ); 
$ip = new ip( ); 
$ip_row = $ip->getipinfo( USER_IP ); 
$structure_class =& singleton( "Structure" ); 
if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) && USER_IP != $_SERVER['HTTP_X_FORWARDED_FOR'] ) 
{ 
    $ip_row_HTTP_X_FORWARDED_FOR = $ip->getipinfo( $_SERVER['HTTP_X_FORWARDED_FOR'] ); 
} 
else 
{ 
    $ip_row_HTTP_X_FORWARDED_FOR = false; 
} 
if ( ( $ip_row || $ip_row_HTTP_X_FORWARDED_FOR ) && ( !is_array( $ip_row ) && $ip_row['ip_deny_access'] || is_array( $ip_row_HTTP_X_FORWARDED_FOR ) && $ip_row_HTTP_X_FORWARDED_FOR['ip_deny_access'] ) ) 
{ 
    header( "HTTP/1.0 503 Service Unavailable" ); 
    header( "Content-type: text/html; charset=UTF-8" ); 
    if ( defined( "ERROR403_STRUCTURE_ID" ) && ERROR403_STRUCTURE_ID ) 
    { 
        $structure_id = ERROR403_STRUCTURE_ID; 
        $structure = $structure_class->gerstructureitem( $structure_id ); 
    } 
    else 
    { 
        exit_index( $SYSTEM_URL_ARRAY, "   !", "   .   !" ); 
    } 
} 
if ( !defined( "LC_TIME_DEFAULT_LOCALE" ) ) 
{ 
    define( "LC_TIME_DEFAULT_LOCALE", "en_US" ); 
} 
$site_row = $site->getsite( CURRENT_SITE ); 
$Admin = new admin( ); 
if ( $site_row && $site_row['site_is_active'] != 1 && !$Admin->usersessionvalid( ) ) 
{ 
    if ( $site_row['site_is_close'] == 0 ) 
    { 
        header( "HTTP/1.0 503 Service Unavailable" ); 
        header( "Content-type: text/html; charset=UTF-8" ); 
        exit_index( $SYSTEM_URL_ARRAY, " ".$_SERVER['HTTP_HOST']."       !", "      \"\"    \"\"  ." ); 
    } 
    else 
    { 
        define( "SITE_IS_CLOSE", true ); 
        showheader404( ); 
        $structure_id = $site_row['site_is_close']; 
    } 
} 
if ( $last_str == "/robots.txt" ) 
{ 
    header( "Last-Modified: ".gmdate( "D, d M Y H:i:s", time( ) )." GMT" ); 
    if ( to_str( $_SERVER['SERVER_PROTOCOL'] ) == "HTTP/1.1" && function_exists( "apache_lookup_uri" ) ) 
    { 
        header( "HTTP/1.1 200 OK" ); 
    } 
    else 
    { 
        header( "Status: 200 OK" ); 
    } 
    header( "Content-Type: text/plain; charset=".SITE_CODING ); 
    echo $site_row['site_robots']; 
    exit( ); 
} 
if ( $last_str == "/favicon.ico" ) 
{ 
    $ico_path = CMS_FOLDER.UPLOADDIR.( "favicon/site_".$site_row['site_id'].".ico" ); 
    if ( file_exists( $ico_path ) ) 
    { 
        header( "Last-Modified: ".gmdate( "D, d M Y H:i:s", time( ) )." GMT" ); 
        header( "Content-Type: image/x-icon" ); 
        if ( to_str( $_SERVER['SERVER_PROTOCOL'] ) == "HTTP/1.1" && function_exists( "apache_lookup_uri" ) ) 
        { 
            header( "HTTP/1.1 200 OK" ); 
        } 
        else 
        { 
            header( "Status: 200 OK" ); 
        } 
        echo file_get_contents( $ico_path ); 
        exit( ); 
    } 
    showheader404( ); 
    exit( ); 
} 
header( "Content-type: text/html; charset=".SITE_CODING ); 
if ( !isset( $structure_id ) ) 
{ 
    do 
    { 
        if ( $last_str == "/" || mb_strpos( $last_str, "/?" ) === 0 || defined( "DENY_LOCATION_302_LAST_SLASH" ) ) 
        { 
            $structure_id = $kernel->get_current_page( $SYSTEM_URL_ARRAY, CURRENT_SITE ); 
            if ( !$structure_id ) 
            { 
                if ( !( $SYSTEM_URL_ARRAY[0] == "/" ) && !( count( $SYSTEM_URL_ARRAY ) == 1 ) ) 
                { 
                    break; 
                } 
                else 
                { 
                    header( "HTTP/1.0 503 Service Unavailable" ); 
                    header( "Content-type: text/html; charset=UTF-8" ); 
                    exit_index( $SYSTEM_URL_ARRAY, "    !", "!     !<p>      <b>\" \" &#8594; \" \"</b>. <br /><b>\" \"</b>      \"<b>/</b>\"." ); 
                } 
            } 
        } 
        else 
        { 
            header( "HTTP/1.1 301 Moved Permanently" ); 
            header( "Location: ".$url_path."/" ); 
            $structure_id = false; 
            exit( ); 
        } 
    } while ( 0 ); 
} 
$structure = $structure_class->getstructureitem( $structure_id ); 
if ( isset( $_SESSION['site_user_id'] ) && class_exists( "SiteUsers" ) ) 
{ 
    $SiteUsers =& singleton( "SiteUsers" ); 
    $usergroups = $SiteUsers->getgroupsforuser( $_SESSION['site_user_id'] ); 
} 
else 
{ 
    $usergroups[] = 0; 
} 
if ( !$structure ) 
{ 
    define( "IS_ERROR_404", true ); 
    showheader404( ); 
    if ( defined( "ERROR404_STRUCTURE_ID" ) && ERROR404_STRUCTURE_ID ) 
    { 
        $structure_id = ERROR404_STRUCTURE_ID; 
        $structure = $structure_class->getstructureitem( $structure_id ); 
        if ( !$structure ) 
        { 
            exit_index( $SYSTEM_URL_ARRAY ); 
        } 
    } 
    else 
    { 
        if ( $SYSTEM_URL_ARRAY[0] != "/" ) 
        { 
            header( "Location: /" ); 
        } 
        exit_index( $SYSTEM_URL_ARRAY ); 
    } 
} 
if ( $structure['structure_access_protocol'] == 1 && !$kernel->usehttps( ) ) 
{ 
    $url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; 
    $url = str_replace( "
", "", $url ); 
    $url = str_replace( "
", "", $url ); 
    header( "HTTP/1.1 302 Found" ); 
    header( "Location: https://".$url ); 
    exit( ); 
} 
define( "CURRENT_STRUCTURE_ID", $structure_id ); 
$structure_access = $structure_class->getstructureaccess( $structure_id ); 
if ( !in_array( $structure_access, $usergroups ) ) 
{ 
    define( "IS_ERROR_403", true ); 
    if ( function_exists( "apache_lookup_uri" ) ) 
    { 
        header( "HTTP/1.0 403 Forbidden" ); 
    } 
    else 
    { 
        header( "HTTP/1.1 403 Forbidden" ); 
    } 
    if ( defined( "ERROR403_STRUCTURE_ID" ) && ERROR403_STRUCTURE_ID ) 
    { 
        $structure_id = ERROR403_STRUCTURE_ID; 
        $structure = $structure_class->gerstructureitem( $structure_id ); 
    } 
    else 
    { 
        exit_index( $SYSTEM_URL_ARRAY, "       !", "<p><b>       !</b><p>       !" ); 
    } 
} 
if ( !defined( "INTEGRATION" ) && !( INTEGRATION == 0 ) && to_str( $_SERVER['REQUEST_URI'] ) == "/" || mb_strtoupper( SITE_CODING ) != "UTF-8" || !class_exists( "Cache" ) && $site_row['site_html_cache_use'] == 1 || $site_row['site_safe_email'] ) 
{ 
    ob_start( ); 
    ob_implicit_flush( 0 ); 
    define( "OB_START", true ); 
} 
$documents_id = to_int( $structure['documents_id'] ); 
if ( 0 < mb_strlen( trim( $structure['structure_title'] ) ) ) 
{ 
    $page_title = $structure['structure_title']; 
} 
else 
{ 
    $page_title = $structure['structure_menu_name']; 
} 
if ( 0 < mb_strlen( trim( $structure['structure_description'] ) ) ) 
{ 
    $page_description = $structure['structure_description']; 
} 
else 
{ 
    $page_description = $structure['structure_menu_name']; 
} 
if ( 0 < mb_strlen( trim( $structure['structure_keywords'] ) ) ) 
{ 
    $page_keywords = $structure['structure_keywords']; 
} 
else 
{ 
    $page_keywords = $structure['structure_menu_name']; 
} 
$structure_type = to_int( $structure['structure_type'] ); 
$page_name = $structure['structure_path_name']; 
$structure_external_link = trim( $structure['structure_external_link'] ); 
$is_extrernal_link = 0 < mb_strlen( $structure_external_link ); 
$data_templates_id = intval( $structure['data_templates_id'] ); 
if ( defined( "EXPIRES_TIME" ) ) 
{ 
    $kernel->setexpires( time( ) + EXPIRES_TIME ); 
} 
else 
{ 
    $kernel->setexpires( time( ) + 300 ); 
} 
if ( defined( "LAST_MODIFIED_TIME" ) ) 
{ 
    $kernel->setlastmodified( time( ) + LAST_MODIFIED_TIME ); 
} 
else 
{ 
    $kernel->setlastmodified( time( ) ); 
} 
if ( $structure_type == 0 && !$is_extrernal_link ) 
{ 
    $documents_class =& singleton( "documents" ); 
    $documents_version_row = $documents_class->getcurrentdocumentversion( $documents_id ); 
    if ( !$documents_version_row ) 
    { 
        header( "HTTP/1.0 503 Service Unavailable" ); 
        header( "Content-type: text/html; charset=UTF-8" ); 
        exit_index( $SYSTEM_URL_ARRAY, "   !", "!            .   ,    ,   <b>\" \" &#8594; \" \"</b>.       \" \" &#8594; \"  \"." ); 
    } 
    $templates_id = intval( $documents_version_row['templates_id'] ); 
    $documents_version_id = $documents_version_row['documents_version_id']; 
} 
else if ( $structure_type == 1 || $structure_type == 2 ) 
{ 
    $templates_id = intval( $structure['templates_id'] ); 
} 
if ( !$is_extrernal_link ) 
{ 
    $kernel->set_title( $page_title ); 
    $kernel->set_description( $page_description ); 
    $kernel->set_keywords( $page_keywords ); 
    if ( $structure_type == 0 ) 
    { 
        $documents =& singleton( "documents" ); 
        $kernel->set_current_page( $documents->getdocumentversionpath( $documents_version_id ) ); 
    } 
    else if ( $structure_type == 1 ) 
    { 
        $kernel->set_current_page( $structure_class->getstructurefilespath( ).( "/Structure".$structure_id.".php" ) ); 
    } 
    else 
    { 
        $lib_id = $structure['lib_id']; 
        $lib =& singleton( "lib" ); 
        $kernel->set_current_page( $lib->getlibpath( $lib_id ).( "/lib_".$lib_id.".php" ) ); 
    } 
    $kernel->set_current_page_data_template( $data_templates_id ); 
    if ( class_exists( "counter" ) && ( !defined( "COUNTER_BOT_COUNT" ) && defined( "COUNTER_BOT_COUNT" ) && COUNTER_BOT_COUNT ) && isset( $_SERVER['HTTP_USER_AGENT'] ) ) 
    { 
        $counter = new counter( ); 
        if ( $counter->checkbot( $_SERVER['HTTP_USER_AGENT'] ) ) 
        { 
            $counter->build_counter( CURRENT_SITE, "", "", $_SERVER['REMOTE_ADDR'], "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], "", "", $_SERVER['HTTP_USER_AGENT'], "N", "", 0 ); 
        } 
    } 
    $kernel->settemplate( $templates_id ); 
    if ( $Tmp_0 ) 
    { 
        if ( isset( $_SESSION['valid_user'], $_GET['hostcms_action'] ) ) 
        { 
            if ( $_GET['hostcms_action'] == "SHOW_XML" ) 
            { 
                $GLOBALS['_SESSION']['HOSTCMS_SHOW_XML'] = true; 
            } 
            else 
            { 
                $GLOBALS['_SESSION']['HOSTCMS_SHOW_XML'] = false; 
            } 
        } 
        if ( isset( $_REQUEST['show_xml'] ) ) 
        { 
            $GLOBALS['_SESSION']['HOSTCMS_SHOW_XML'] = true; 
        } 
    } 
    $PBeginTime = $kernel->getmicrotime( ); 
    if ( $structure_type == 1 ) 
    { 
        $StructureConfig = $structure_class->getstructurefilespath( ).( "/StructureConfig".$structure_id.".php" ); 
        if ( is_file( $StructureConfig ) && is_readable( $StructureConfig ) ) 
        { 
            include( $StructureConfig ); 
        } 
    } 
    else if ( $structure_type == 2 ) 
    { 
        $lib =& singleton( "lib" ); 
        $GLOBALS['LA'] = $lib->loadlibpropertiesvalue( $lib_id, CURRENT_STRUCTURE_ID ); 
        $LibConfig = $lib->getlibpath( $lib_id ).( "/lib_config_".$lib_id.".php" ); 
        if ( is_file( $LibConfig ) && is_readable( $LibConfig ) ) 
        { 
            include( $LibConfig ); 
        } 
    } 
    if ( !defined( "IS_ERROR_404" ) || !defined( "IS_ERROR_403" ) || !defined( "SITE_IS_CLOSE" ) ) 
    { 
        if ( to_str( $_SERVER['SERVER_PROTOCOL'] ) == "HTTP/1.1" && function_exists( "apache_lookup_uri" ) ) 
        { 
            header( "HTTP/1.1 200 OK" ); 
        } 
        else 
        { 
            header( "Status: 200 OK" ); 
        } 
        if ( !defined( "SET_EXPIRES" ) && defined( "SET_EXPIRES" ) && SET_EXPIRES ) 
        { 
            header( "Expires: ".gmdate( "D, d M Y H:i:s", $kernel->getexpires( ) )." GMT" ); 
        } 
        if ( !defined( "SET_LAST_MODIFIED" ) && defined( "SET_LAST_MODIFIED" ) && SET_LAST_MODIFIED ) 
        { 
            header( "Last-Modified: ".gmdate( "D, d M Y H:i:s", $kernel->getlastmodified( ) )." GMT" ); 
        } 
        if ( !defined( "SET_CACHE_CONTROL" ) && defined( "SET_CACHE_CONTROL" ) && SET_CACHE_CONTROL ) 
        { 
            if ( $structure_access == 0 ) 
            { 
                $cache_control_type = "public"; 
            } 
            else 
            { 
                $cache_control_type = "private"; 
            } 
            $current_time = time( ); 
            if ( $current_time < $kernel->getexpires( ) ) 
            { 
                $max_age = $kernel->getexpires( ) - $current_time; 
            } 
            else 
            { 
                $max_age = 0; 
            } 
            header( "Cache-control: ".$cache_control_type.", max-age={$max_age}" ); 
        } 
    } 
    $templates = new templates( ); 
    $row_templates = $templates->gettemplate( $kernel->gettemplate( ) ); 
    if ( !$row_templates ) 
    { 
        header( "HTTP/1.0 503 Service Unavailable" ); 
        header( "Content-type: text/html; charset=UTF-8" ); 
        exit_index( $SYSTEM_URL_ARRAY, "   !", "!      .
		<p>        <b>\" \" &#8594; \" \"</b>.
		       <b>\" \" &#8594; \"  \".</p>
		" ); 
    } 
    $kernel->set_css( "templates/template".$row_templates['templates_id']."/style.css" ); 
    $kernel->settimestamp( $row_templates['templates_timestamp'] ); 
    $path_template = CMS_FOLDER.( "templates/template".$row_templates['templates_id']."/template.htm" ); 
    if ( is_readable( $path_template ) ) 
    { 
        include( $path_template ); 
    } 
    else 
    { 
        header( "HTTP/1.0 503 Service Unavailable" ); 
        header( "Content-type: text/html; charset=UTF-8" ); 
        exit_index( $SYSTEM_URL_ARRAY, " #4 -    ", "   : <b>".$path_template."</b>,    ,   !" ); 
    } 
    $GLOBALS['PTime'] = $kernel->getmicrotime( ) - $PBeginTime; 
    if ( !defined( "CURRENT_VERSION" ) ) 
    { 
        define( "CURRENT_VERSION", "5.2" ); 
    } 
} 
else if ( !( mb_strpos( CURRENT_URL_PATH, $structure_external_link ) === 0 ) ) 
{ 
    header( "Location: ".$structure_external_link ); 
} 
else 
{ 
    echo "<p>   <a href=\""; 
    echo $structure_external_link; 
    echo "\">"; 
    echo $structure_external_link; 
    echo "</a></p>"; 
} 
exit_index( $SYSTEM_URL_ARRAY ); 

Did this file decode correctly?

Original Code


function showheader404( )
{
    if ( function_exists( "apache_lookup_uri" ) )
    {
        header( "http/1.0 404 Not Found" );
    }
    else
    {
        header( "Status: 404 Not Found" );
    }
}

function convert_array( &$kIVhqJk, $vholQ, $ddk )
{
    if ( is_array( $kIVhqJk ) && 0 < count( $kIVhqJk ) )
    {
        foreach ( $kIVhqJk as $Vwty => $VgKtFeg )
        {
            if ( !is_array( $VgKtFeg ) )
            {
                $kIVhqJk[$Vwty] = @iconv( $vholQ, $ddk."//IGNORE//TRANSLIT", $VgKtFeg );
            }
            else
            {
                convert_array( $kIVhqJk[$Vwty], $vholQ, $ddk );
            }
        }
    }
}

function exit_index( $5VUWX855p0wrkJO3_4hIA = array( ), $obqvew = "", $CkqRBASwTWxNIw = "", $VjwVmUA8tDAL6mE = true )
{
    $Oy0_d5TD =& singleton( "kernel" );
    $osuAaSk = new admin( );
    if ( !empty( $CkqRBASwTWxNIw ) )
    {
        show_index_message( $obqvew, $CkqRBASwTWxNIw );
    }
    if ( defined( "OB_START" ) )
    {
        $67eJCw =& singleton( "site" );
        $MfdtfgWBte8 = $67eJCw->getsite( CURRENT_SITE );
        $arOtZ_eDMd4PitTm = ob_get_clean( );
        if ( $MfdtfgWBte8['site_safe_email'] && mb_strlen( $arOtZ_eDMd4PitTm ) < 204800 )
        {
            function strip_nl( $aNcpmA )
            {
                $aNcpmA = str_replace( "\n", "", $aNcpmA );
                $aNcpmA = str_replace( "\r", "", $aNcpmA );
                $aNcpmA = str_replace( "'", "\\'", $aNcpmA );
                return $aNcpmA;
            }
            function safe_email_callback( $8UmnTppRcA )
            {
                ob_start( );
                echo "<script type=\"text/javascript\">\r\n<!--\r\ndocument.write ('<a ";
                echo strip_nl( $8UmnTppRcA[1] );
                echo " href=\"mailto:' + '";
                echo strip_nl( $8UmnTppRcA[2] );
                echo "' + '@' + '";
                echo strip_nl( $8UmnTppRcA[3] );
                echo "' + '.' + '";
                echo strip_nl( $8UmnTppRcA[4] );
                echo "' + '\"";
                echo strip_nl( $8UmnTppRcA[5] );
                echo ">' + '";
                echo strip_nl( $8UmnTppRcA[6] );
                echo "' + '</a>');\r\n-->\r\n</script>";
                return ob_get_clean( );
            }
            $arOtZ_eDMd4PitTm = preg_replace_callback( "/<a\\s([^>]*)?href=['|\\\"]?mailto:([\\w+\\-\\.]+)@([\\w\\-\\.]+)\\.(\\w{2,4})[\\\"|']?([^>]*)?>(.*?)<\\/a>/is", "safe_email_callback", $arOtZ_eDMd4PitTm );
        }
        if ( defined( "INTEGRATION" ) && INTEGRATION == 0 && to_str( $_SERVER['REQUEST_URI'] ) == "/" )
        {
            $UzMs7giiRwkzU8QQ = $arOtZ_eDMd4PitTm;
            $dcwitxb = array( "'<script[^>]*?>.*?</script>'siu", "'<noscript[^>]*?>.*?</noscript>'siu", "'<style[^>]*?>.*?</style>'siu", "'<select[^>]*?>.*?</select>'siu", "'<head[^>]*?>.*?</head>'siu", "'<!--.*?-->'siu" );
            $77tGbWOiZg = array( " ", " ", " ", " ", " ", " " );
            $UzMs7giiRwkzU8QQ = str_replace( "\n", " ", $UzMs7giiRwkzU8QQ );
            $UzMs7giiRwkzU8QQ = str_replace( "\r", " ", $UzMs7giiRwkzU8QQ );
            $UzMs7giiRwkzU8QQ = preg_replace( $dcwitxb, $77tGbWOiZg, $UzMs7giiRwkzU8QQ );
            $06fY41AvMGm_0hBSzw = "(?<!nowrap)(?<!display)(?<!visible)";
            $CDNA = "'<a([^>]".$06fY41AvMGm_0hBSzw.")*href=((\"http://(www.|)hostcms.ru(/|)\")|(http://(www.|)hostcms.ru(/|)))([^>]{$06fY41AvMGm_0hBSzw})*>(.{3,})</a>'u";
            $ksF6RFJUckSG4lQ = array( );
            $0U2f4jYrJ436_A = preg_match_all( $CDNA, $UzMs7giiRwkzU8QQ, $ksF6RFJUckSG4lQ );
            if ( $0U2f4jYrJ436_A == 0 )
            {
                $3Kv84_rGRuAIZzZoF9LUsQ = true;
                echo "<style type=\"text/css\">\r\n\t\t\t\t#hostcms_licence a:link, #hostcms_licence a:visited, #hostcms_licence a:hover\r\n\t\t\t\t{ color: #FFF;}\r\n\t\t\t</style>\r\n\t\t\t<div id=\"hostcms_licence\" style=\"positon: absolute; color: #FFFFFF; left: 0px; font-size: 8pt; background-color: #FF5500; border: 1px solid #EB9494; vertical-align: top; padding: 3px; z-index: 999; ";
                echo isset( $_SESSION['valid_user'] ) && ( !defined( "ALLOW_PANEL" ) && ALLOW_PANEL ) ? "margin-top: 38px;" : "";
                echo "\">\r\n\t\t\t   . 3.4  ,      ";
                echo PRODUCT_NAME;
                echo ".     ,     , ,        <b>";
                echo htmlspecialchars( "<a href=\"http://www.hostcms.ru\" target=\"_blank\">   Host CMS</a>" );
                echo "</b>    <a href=\"http://www.hostcms.ru\" target=\"_blank\">http://www.hostcms.ru</a>.\r\n<br/>   ,   <a href=\"mailto:";
                echo SUPPORT_EMAIL;
                echo "\"> </a>.\r\n\t\t\t</div>\r\n\t\t\t";
            }
        }
        if ( mb_strtoupper( SITE_CODING ) != "UTF-8" )
        {
            $arOtZ_eDMd4PitTm = @iconv( "UTF-8", SITE_CODING."//IGNORE//TRANSLIT", $arOtZ_eDMd4PitTm );
        }
        function agree_with_rule( $4gPoSIpYQfDs, $5VUWX855p0wrkJO3_4hIA )
        {
            $4KF9d_nqGRhqEt9O = array( );
            $4gPoSIpYQfDs = trim( $4gPoSIpYQfDs );
            if ( 0 < mb_strlen( $4gPoSIpYQfDs ) )
            {
                $4gPoSIpYQfDs = str_replace( "\r", "", $4gPoSIpYQfDs );
                $4KF9d_nqGRhqEt9O = explode( "\n", $4gPoSIpYQfDs );
            }
            $CwRG0R0 = false;
            $hhyZMPkRYAbyxwuoel5asaAx = mb_strlen( $_SERVER['REQUEST_URI'] );
            foreach ( $4KF9d_nqGRhqEt9O as $6mlyHg )
            {
                $D4Asu1mTBTJfksk = mb_strlen( $6mlyHg );
                if ( 1 < $D4Asu1mTBTJfksk && mb_substr( $6mlyHg, $D4Asu1mTBTJfksk - 1, 1 ) == "*" )
                {
                    $I0yrw = true;
                    $6mlyHg = mb_substr( $6mlyHg, 0, $D4Asu1mTBTJfksk - 1 );
                }
                else
                {
                    $I0yrw = false;
                }
                if ( !( mb_strpos( $_SERVER['REQUEST_URI'], $6mlyHg ) === 0 ) && !( $D4Asu1mTBTJfksk == $hhyZMPkRYAbyxwuoel5asaAx ) || !$I0yrw )
                {
                    continue;
                }
                $CwRG0R0 = true;
                break;
            }
            return $CwRG0R0;
        }
        if ( $MfdtfgWBte8['site_html_cache_use'] == 1 && class_exists( "Cache" ) && isset( $MfdtfgWBte8['site_html_cache_clear_probability'] ) && 0 < $MfdtfgWBte8['site_html_cache_clear_probability'] )
        {
            $RrCtNA = rand( 0, $MfdtfgWBte8['site_html_cache_clear_probability'] );
            if ( $RrCtNA == 0 )
            {
                $6G2SbJY =& singleton( "Cache" );
                $6G2SbJY->clearstaticcache( $MfdtfgWBte8['site_id'] );
            }
        }
        if ( $MfdtfgWBte8['site_html_cache_use'] == 1 && ( isset( $_SESSION['site_user_id'] ) || !$osuAaSk->usersessionvalid( ) || empty( $_SESSION['SCART'] ) ) && count( $_POST ) == 0 && empty( $_COOKIE['CART'] ) && class_exists( "Cache" ) && 0 < mb_strlen( $arOtZ_eDMd4PitTm ) )
        {
            $ksOiryehaH34CRzadonuxZbDoqI = agree_with_rule( $MfdtfgWBte8['site_html_cache_with'], $5VUWX855p0wrkJO3_4hIA );
            $K81C7a1lMRWruqiXxM6g0yNQuCdeDE = agree_with_rule( $MfdtfgWBte8['site_html_cache_without'], $5VUWX855p0wrkJO3_4hIA );
            if ( $ksOiryehaH34CRzadonuxZbDoqI && !$K81C7a1lMRWruqiXxM6g0yNQuCdeDE )
            {
                $W9VrWfMNk5k = explode( ":", $_SERVER['HTTP_HOST'] );
                $yTDviRDH = mb_strtolower( $W9VrWfMNk5k[0] );
                $TU795w = new file( );
                $l = CMS_FOLDER."cache_html".DIRECTORY_SEPARATOR.$yTDviRDH;
                $l = $TU795w->pathcorrection( $l );
                if ( !is_dir( $l ) || @mkdir( $l, CHMOD, TRUE ) )
                {
                    @chmod( $l, CHMOD );
                }
                $iDbA7Hcl2z3Q2MM = FALSE;
                if ( !empty( $5VUWX855p0wrkJO3_4hIA ) )
                {
                    foreach ( $5VUWX855p0wrkJO3_4hIA as $Vwty => $VgKtFeg )
                    {
                        $l .= DIRECTORY_SEPARATOR.basename( $VgKtFeg );
                        $Yw322pIh0pFZBmQekHzBWQL9g = $TU795w->pathcorrection( $l );
                        if ( $l == $Yw322pIh0pFZBmQekHzBWQL9g )
                        {
                            if ( is_dir( $l ) || !@mkdir( $l, CHMOD ) )
                            {
                                continue;
                            }
                            @chmod( $l, CHMOD );
                        }
                        else
                        {
                            $iDbA7Hcl2z3Q2MM = TRUE;
                        }
                        break;
                    }
                }
                if ( !$iDbA7Hcl2z3Q2MM || is_dir( $l ) )
                {
                    $_fN2syLJbDrV = array( );
                    $0ojU = explode( "&", $URL_QUERY );
                    foreach ( $0ojU as $VgKtFeg )
                    {
                        $juwe = explode( "=", $VgKtFeg, 2 );
                        if ( count( $juwe ) == 2 )
                        {
                            $_fN2syLJbDrV[] = "{$juwe[0]}=".rawurlencode( $juwe[1] );
                        }
                    }
                    $_fN2syLJbDrV = implode( "&", $_fN2syLJbDrV );
                    if ( mb_strpos( $URL_QUERY, "/" ) === false )
                    {
                        $pp9pYw = $l.DIRECTORY_SEPARATOR;
                        if ( mb_strlen( $_fN2syLJbDrV."index.html" ) <= 200 )
                        {
                            if ( !empty( $URL_QUERY ) || trim( $_fN2syLJbDrV ) != "" )
                            {
                                $JTe7jJ4eGW8 = $TU795w->pathcorrection( $pp9pYw.$_fN2syLJbDrV."index.html" );
                                if ( $YBY = @fopen( $JTe7jJ4eGW8, "w" ) )
                                {
                                    @fclose( $YBY );
                                    @chmod( $JTe7jJ4eGW8, CHMOD_FILE );
                                }
                            }
                            $JTe7jJ4eGW8 = $TU795w->pathcorrection( $pp9pYw.$URL_QUERY."index.html" );
                            if ( $YBY = @fopen( $JTe7jJ4eGW8, "w" ) )
                            {
                                if ( @flock( $YBY, LOCK_EX ) )
                                {
                                    fwrite( $YBY, $arOtZ_eDMd4PitTm );
                                    @flock( $YBY, LOCK_UN );
                                }
                                @fclose( $YBY );
                                @chmod( $JTe7jJ4eGW8, CHMOD_FILE );
                            }
                        }
                    }
                }
            }
        }
        echo $arOtZ_eDMd4PitTm;
    }
    ob_start( );
    if ( $osuAaSk->usersessionvalid( ) && ( !defined( "ALLOW_PANEL" ) && ALLOW_PANEL || isset( $_SESSION['HOSTCMS_SHOW_XML'] ) && $_SESSION['HOSTCMS_SHOW_XML'] ) && empty( $CkqRBASwTWxNIw ) )
    {
        do
        {
            if ( !$VjwVmUA8tDAL6mE )
            {
                break;
            }
            else
            {
                echo "<div class=\"hostcms_float_block\" id=\"hostcms_layer\" style=\"top: 13px;\">\r\n\t\t<div class=\"hostcms_float_block_t\"></div>\r\n\t\t<div class=\"hostcms_float_block_tr\"></div>\r\n\t\t<div class=\"hostcms_float_block_r\" name=\"hostcms_float_block_r\"></div>\r\n\t\t<div class=\"hostcms_float_block_br\"></div>\r\n\t\t<div class=\"hostcms_float_block_b\"></div>\r\n\t\t<div class=\"hostcms_float_block_bl\"></div>\r\n\t\t<div class=\"hostcms_float_block_l\" name=\"hostcms_float_block_l\"></div>\r\n\t\t<div class=\"hostcms_float_block_tl\"></div>\r\n\t\t<div class=\"hostcms_float_block_content\">\r\n\t\t";
                if ( defined( "CURRENT_STRUCTURE_ID" ) && $Oy0_d5TD->allowshowpanel( ) )
                {
                    $5nfe = "/admin/structure/structure.php?admin_forms_id=82&operation=edit_node&check_0_".CURRENT_STRUCTURE_ID."=1";
                    echo "<a href=\"";
                    echo $5nfe;
                    echo "\" onclick=\"ShowEditWindow('";
                    echo $MSG_kernel['structure_edit'];
                    echo "', '";
                    echo $5nfe;
                    echo "', 'structure_";
                    echo CURRENT_STRUCTURE_ID;
                    echo "'); return false;\"><img src=\"/hostcmsfiles/images/structure_edit.gif\" border=\"0\" alt=\"";
                    echo $MSG_kernel['structure_edit'];
                    echo "\" title=\"";
                    echo $MSG_kernel['structure_edit'];
                    echo "\" /></a>&nbsp;";
                    $jzgDI1jvtug =& singleton( "Structure" );
                    if ( $aXj2RtsIN00eGmtuNA = $jzgDI1jvtug->getstructureitem( CURRENT_STRUCTURE_ID ) )
                    {
                        if ( 0 < $aXj2RtsIN00eGmtuNA['templates_id'] )
                        {
                            $ = $aXj2RtsIN00eGmtuNA['templates_id'];
                        }
                        else
                        {
                            $RZku1IgcQvbm =& singleton( "documents" );
                            $vJhJxPF4bhJhmFzXpoa7l4eFRcY = $RZku1IgcQvbm->getcurrentdocumentversion( $aXj2RtsIN00eGmtuNA['documents_id'] );
                            if ( $vJhJxPF4bhJhmFzXpoa7l4eFRcY )
                            {
                                $ = $vJhJxPF4bhJhmFzXpoa7l4eFRcY['templates_id'];
                            }
                            else
                            {
                                $ = 0;
                            }
                        }
                        if ( $ )
                        {
                            $5nfe = "/admin/templates/templates/templates.php?admin_forms_id=6&operation=edit_template&check_1_".$."=1";
                            echo "<a href=\"";
                            echo $5nfe;
                            echo "\" onclick=\"ShowEditWindow('";
                            echo $MSG_kernel['template_edit'];
                            echo "', '";
                            echo $5nfe;
                            echo "', 'template_";
                            echo $;
                            echo "'); return false;\"><img src=\"/hostcmsfiles/images/template_edit.gif\" border=\"0\" alt=\"";
                            echo $MSG_kernel['template_edit'];
                            echo "\" title=\"";
                            echo $MSG_kernel['template_edit'];
                            echo "\" /></a>&nbsp;";
                        }
                        if ( 0 < $aXj2RtsIN00eGmtuNA['data_templates_id'] )
                        {
                            $5nfe = "/admin/templates/data_templates/data_templates.php?admin_forms_id=5&operation=edit_data_template&check_1_".$aXj2RtsIN00eGmtuNA['data_templates_id']."=1";
                            echo "<a href=\"";
                            echo $5nfe;
                            echo "\" onclick=\"ShowEditWindow('";
                            echo $MSG_kernel['data_template_edit'];
                            echo "', '";
                            echo $5nfe;
                            echo "', 'template_";
                            echo $aXj2RtsIN00eGmtuNA['data_templates_id'];
                            echo "'); return false;\"><img src=\"/hostcmsfiles/images/datatemplate_edit.gif\" border=\"0\" alt=\"";
                            echo $MSG_kernel['data_template_edit'];
                            echo "\" title=\"";
                            echo $MSG_kernel['data_template_edit'];
                            echo "\" /></a>&nbsp;";
                        }
                        if ( $aXj2RtsIN00eGmtuNA['structure_type'] == 0 )
                        {
                            $5nfe = "/admin/documents/documents.php?admin_forms_id=9&operation=edit_document&check_1_".$aXj2RtsIN00eGmtuNA['documents_id']."=1";
                            echo "<a href=\"";
                            echo $5nfe;
                            echo "\" onclick=\"ShowEditWindow('";
                            echo $MSG_kernel['document_edit'];
                            echo "', '";
                            echo $5nfe;
                            echo "', 'document_";
                            echo $aXj2RtsIN00eGmtuNA['documents_id'];
                            echo "'); return false;\"><img src=\"/hostcmsfiles/images/page_edit.gif\" border=\"0\" alt=\"";
                            echo $MSG_kernel['document_edit'];
                            echo "\" title=\"";
                            echo $MSG_kernel['document_edit'];
                            echo "\" /></a>&nbsp;";
                        }
                        if ( class_exists( "InformationSystem" ) )
                        {
                            $9vegn2T2Hmjvkdw7TIUNI = new informationsystem( );
                            if ( $HIfty5I8VlnytKbrd0U = $9vegn2T2Hmjvkdw7TIUNI->getinformationsystembystructureid( CURRENT_STRUCTURE_ID ) )
                            {
                                $5nfe = "/admin/InformationSystems/InformationSystems.php?admin_forms_id=11&operation=edit_information_system&check_1_".$HIfty5I8VlnytKbrd0U."=1";
                                echo "<a href=\"";
                                echo $5nfe;
                                echo "\" onclick=\"ShowEditWindow('";
                                echo $MSG_kernel['information_system_edit'];
                                echo "', '";
                                echo $5nfe;
                                echo "', 'information_system_";
                                echo $HIfty5I8VlnytKbrd0U;
                                echo "'); return false;\"><img src=\"/hostcmsfiles/images/folder_page_edit.gif\" border=\"0\" alt=\"";
                                echo $MSG_kernel['information_system_edit'];
                                echo "\" title=\"";
                                echo $MSG_kernel['information_system_edit'];
                                echo "\" /></a>&nbsp;";
                            }
                        }
                        if ( class_exists( "shop" ) )
                        {
                            $iDyctQ = new shop( );
                            if ( $CtvBJrM8LQ = $iDyctQ->getshopwhithstructureid( CURRENT_STRUCTURE_ID, CURRENT_SITE ) )
                            {
                                $5nfe = "/admin/shop/shop.php?admin_forms_id=54&operation=edit_shop&check_1_".$CtvBJrM8LQ['shop_shops_id']."=1";
                                echo "<a href=\"";
                                echo $5nfe;
                                echo "\" onclick=\"ShowEditWindow('";
                                echo $MSG_kernel['shop_edit'];
                                echo "', '";
                                echo $5nfe;
                                echo "', 'shop_";
                                echo $CtvBJrM8LQ['shop_shops_id'];
                                echo "'); return false;\"><img src=\"/hostcmsfiles/images/shop_edit.gif\" border=\"0\" alt=\"";
                                echo $MSG_kernel['shop_edit'];
                                echo "\" title=\"";
                                echo $MSG_kernel['shop_edit'];
                                echo "\" /></a>&nbsp;";
                            }
                        }
                    }
                    echo "<span style=\"padding-left: 10px\"></span>";
                }
                echo "<a href=\"/admin/\" target=\"_blank\"><img src=\"/hostcmsfiles/images/system.gif\" border=\"0\" alt=\"";
                echo $MSG_kernel['administration_center'];
                echo "\" title=\"";
                echo $MSG_kernel['administration_center'];
                echo "\" /></a>\r\n\t\r\n\t\t<img onclick=\"SlideWindow('div_hostcms_debug')\" style=\"cursor:pointer\" src=\"/hostcmsfiles/images/chart_bar.gif\" border=\"0\" width=\"16\" height=\"16\" title=\"";
                echo $MSG_kernel['debug_information'];
                echo "\" alt=\"";
                echo $MSG_kernel['debug_information'];
                echo "\" />\r\n\t\t\r\n\t\t";
                if ( defined( "ALLOW_SHOW_SQL" ) && ALLOW_SHOW_SQL )
                {
                    echo "<img onclick=\"SlideWindow('div_hostcms_sql')\" style=\"cursor:pointer\" src=\"/hostcmsfiles/images/sql.gif\" border=\"0\" width=\"16\" height=\"16\" title=\"";
                    echo $MSG_kernel['sql_queries'];
                    echo "\" alt=\"";
                    echo $MSG_kernel['sql_queries'];
                    echo "\" />";
                }
                if ( defined( "ALLOW_SHOW_XML" ) && ALLOW_SHOW_XML )
                {
                    if ( to_bool( $_SESSION['HOSTCMS_SHOW_XML'] ) )
                    {
                        $RQlRcP3pGL0 = "xsl.gif";
                        $obqvew = $MSG_kernel['hide_xml'];
                        $IO8hYI15 = "?hostcms_action=HIDE_XML";
                    }
                    else
                    {
                        $RQlRcP3pGL0 = "xsl.gif";
                        $obqvew = $MSG_kernel['show_xml'];
                        $IO8hYI15 = "?hostcms_action=SHOW_XML";
                    }
                    echo "<a href=\"";
                    echo $IO8hYI15;
                    echo "\" title=\"";
                    echo $obqvew;
                    echo "\"><img src=\"/hostcmsfiles/images/";
                    echo $RQlRcP3pGL0;
                    echo "\" border=\"0\" width=\"16\" height=\"16\" /></a>";
                }
                echo "\t\t<span style=\"padding-left: 10px\"></span>\r\n\t\t\r\n\t\t<a href=\"/admin/logout.php\"><img src=\"/admin/images/exit.gif\" title=\"";
                echo $MSG_kernel['logout'];
                echo "\" alt=\"";
                echo $MSG_kernel['logout'];
                echo "\" border=\"0\" width=\"16\" height=\"16\" /></a>\r\n\t\t\r\n\t\t</div>\r\n\t\t<div class=\"hostcms_float_block_drag_block\" name=\"hostcms_float_block_drag_block\" onMouseDown=\"new Draggable(this.parentNode);\"></div>\r\n\t</div>\r\n\t\r\n\t<script type=\"text/javascript\">\r\n\tif(!window.jQuery)\r\n\t{\r\n\t\tdocument.write('<scri'+'pt type=\"text/javascript\" src=\"/admin/js/jquery/jquery.js\"></scr'+'ipt>');\r\n\t}\r\n\t</script>\r\n\t\r\n\t";
                $5_RF = $Oy0_d5TD->getcurrentlng( );
                $o4_4PtANwFB4 = $Oy0_d5TD->getversiontimestamp( );
                $Oy0_d5TD->addjs( "/admin/js/lng/".$5_RF."/{$5_RF}.js" );
                $1aQH = $Oy0_d5TD->getalljs( );
                if ( is_array( $1aQH ) && 0 < count( $1aQH ) )
                {
                    foreach ( $1aQH as $2IwOvlE )
                    {
                        echo "<script type=\"text/javascript\" src=\"";
                        echo $2IwOvlE."?".$o4_4PtANwFB4;
                        echo "\"></script>\r\n";
                    }
                }
                echo "\t<script type=\"text/javascript\" src=\"/admin/js/JsHttpRequest.js\"></script>\r\n\t";
                if ( defined( "DENY_GZIP_WYSIWYG" ) && DENY_GZIP_WYSIWYG )
                {
                    echo "<script type=\"text/javascript\" src=\"/admin/wysiwyg/tiny_mce_src.js\"></script>";
                }
                else
                {
                    echo "<script type=\"text/javascript\" src=\"/admin/wysiwyg/tiny_mce_gzip.js\"></script>\r\n\t\t\r\n\t<script type=\"text/javascript\">\r\n\ttinyMCE_GZ.init({\r\n\t\tplugins : 'safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups',\r\n\t\tthemes : 'advanced',\r\n\t\tlanguages : 'ru',\r\n\t\tdisk_cache : true,\r\n\t\tcompress : true,\r\n\t\tsuffix : '_src',\r\n\t\tdebug : false\r\n\t});\r\n\t</script>\r\n\t\r\n\t<script type=\"text/javascript\">\r\n\t//   \r\n\tcmslocation = '';\r\n\t\r\n\t//   \r\n\tsended_request = false;\r\n\t\r\n\tfunction saveLocation(location)\r\n\t{\r\n\t\tcmslocation = location;\r\n\t}\r\n\t\r\n\t//   #cmsurl=\r\n\tfunction getCmsUrl()\r\n\t{\r\n\t\treturn new String(document.location.hash).replace('#cmsurl=', '').replace('%3F','?');\r\n\t}\r\n\t\r\n\t//   \r\n\tsaveLocation(getCmsUrl());\r\n\t\r\n\t//  #\r\n\tfunction setLocation(location)\r\n\t{\r\n\t\tif (location.indexOf('?') >= 0)\r\n\t\t{\r\n\t\t\tlocation = location.substring(0, location.indexOf('?'))\r\n\t\t\t+ '%3F'\r\n\t\t\t+ HostcmsEscape(location.substring(location.indexOf('?') + 1));\r\n\t\t}\r\n\t\t\r\n\t\tdocument.location.hash = 'cmsurl=' + location;\r\n\t}\r\n\t\r\n\t//     -\r\n\tfunction checkLocation()\r\n\t{\r\n\t\tvar curr_location = getCmsUrl();\r\n\t\r\n\t\tif (curr_location != cmslocation && sended_request == false)\r\n\t\t{\r\n\t\t\tsended_request = true;\r\n\t\t\t//document.location = curr_location;\r\n\t\t\tcmsrequest = '';\r\n\t\t\tsendRequest(unescape(curr_location), 'get', callbackfunction_DoLoadAjax);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetInterval(checkLocation, 500);\r\n\t</script>\r\n\t";
                }
                echo "\t<script type=\"text/javascript\">\r\n\t";
                if ( $osuAaSk->usersessionvalid( ) )
                {
                    $SGk_5H5uyuYCQw = new user_access( );
                    $z286Vllsoa4 = $SGk_5H5uyuYCQw->getuserbyname( $_SESSION['valid_user'] );
                    if ( $z286Vllsoa4 )
                    {
                        $6VwVQ3qlDSlXVm3Mn8o = $SGk_5H5uyuYCQw->getusertype( $z286Vllsoa4['users_type_id'] );
                        $Tqh_vFM9LF5UxowI1iCAC1_yaQ = $6VwVQ3qlDSlXVm3Mn8o['users_type_root_dir'];
                    }
                    else
                    {
                        $Tqh_vFM9LF5UxowI1iCAC1_yaQ = "";
                    }
                    echo "\t\tvar FM = new FM('";
                    echo htmlspecialchars( $Tqh_vFM9LF5UxowI1iCAC1_yaQ );
                    echo "');\r\n\t\t";
                }
                echo "\t</script>\r\n\t\r\n\t<!-- Calendar -->\r\n\t<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"/admin/calendar/calendar.css\" title=\"win2k-cold-1\" />\r\n\t<script type=\"text/javascript\" src=\"/admin/calendar/calendar.js\"></script>\r\n\t<script type=\"text/javascript\" src=\"/admin/calendar/lang/calendar-ru.js\"></script>\r\n\t<script type=\"text/javascript\" src=\"/admin/calendar/calendar-setup.js\"></script>\r\n\r\n\t";
                if ( !defined( "DISABLE_SYNTAX_HIGHTLIGHTING" ) && !DISABLE_SYNTAX_HIGHTLIGHTING )
                {
                    echo "<script type=\"text/javascript\" src=\"/admin/js/codepress/codepress.js\"></script>";
                }
                $FiEx145NuQ = $Oy0_d5TD->getmicrotime( );
                $c6UELg = $FiEx145NuQ - $BeginTime;
                echo "\t<div id=\"div_hostcms_debug\">\r\n\t\t<div id=\"subdiv\">\r\n\t\t";
                echo sprintf( $MSG_kernel['total_time'], $c6UELg );
                echo "\t\t<ul>\r\n\t\t<li>";
                echo sprintf( $MSG_kernel['time_load_modules'], to_str( $MTime ) );
                echo ";\r\n\t\t";
                if ( isset( $PTime ) )
                {
                    echo "\t\t<li>";
                    echo sprintf( $MSG_kernel['time_page_generation'], to_str( $PTime ) );
                    echo ";\r\n\t\t";
                }
                echo "\t\t<li>";
                echo sprintf( $MSG_kernel['time_database_connection'], to_str( $DB_CONNECT_TIME ) );
                echo ";\r\n\t\t<li>";
                echo sprintf( $MSG_kernel['time_database_select'], to_str( $DB_SELECT_TIME ) );
                echo ";\r\n\t\t<li>";
                echo sprintf( $MSG_kernel['time_sql_execution'], to_str( $SQL_time ) );
                echo ";\r\n\t\t<li>";
                echo sprintf( $MSG_kernel['time_xml_execution'], to_str( $xml_time ) );
                echo ".\r\n\t\t</ul>\r\n\t\t";
                if ( function_exists( "memory_get_usage" ) && substr( PHP_OS, 0, 3 ) != "WIN" )
                {
                    echo sprintf( $MSG_kernel['memory_usage'], memory_get_usage( ) / 1048576 );
                    echo "<br />";
                }
                echo "\t\t";
                echo sprintf( $MSG_kernel['number_of_queries'], to_int( $total_query ) );
                echo ".\r\n\t\t<br />\r\n\t\t";
                echo sprintf( $MSG_kernel['compression'], defined( "COMPRESSION_BEGIN" ) ? $MSG_kernel['enabled'] : $MSG_kernel['disabled'] );
                echo ".\r\n\t\t<br />\r\n\t\t";
                echo sprintf( $MSG_kernel['cache'], defined( "CACHE_INSTALL" ) ? $MSG_kernel['enabled'] : $MSG_kernel['disabled'] );
                echo ".\r\n\t\t";
                if ( defined( "CACHE_INSTALL" ) )
                {
                    echo "\t\t<ul>\r\n\t\t<li>\r\n\t\t";
                    echo sprintf( $MSG_kernel['cache_insert_time'], to_str( $CACHE_INSERT_TIME ) );
                    echo ";\r\n\t\t<li>\r\n\t\t";
                    echo sprintf( $MSG_kernel['cache_write_requests'], to_int( $CACHE_INSERT_COUNT ) );
                    echo ";\r\n\t\t<li>\r\n\t\t";
                    echo sprintf( $MSG_kernel['cache_read_time'], to_str( $CACHE_GET_TIME ) );
                    echo ";\r\n\t\t<li>\r\n\t\t";
                    echo sprintf( $MSG_kernel['cache_read_requests'], to_int( $CACHE_GET_COUNT ) );
                    echo ".\r\n\t\t</ul>\r\n\t\t";
                }
                echo "\t\t</div>\r\n\t</div>\r\n\t\r\n\t";
                echo $Oy0_d5TD->getxmlcontent( );
                if ( defined( "ALLOW_SHOW_SQL" ) && ALLOW_SHOW_SQL )
                {
                    echo "<div id=\"div_hostcms_sql\">\r\n\t\t<div id=\"subdiv\">\r\n\t\t";
                    if ( isset( $HOSTCMS_SQL_LOG ) && is_array( $HOSTCMS_SQL_LOG ) && 0 < count( $HOSTCMS_SQL_LOG ) )
                    {
                        $gTqe_BXhMWc =& singleton( "DataBase" );
                        $goDugQ = array( );
                        $7w = 0;
                        foreach ( $GLOBALS['HOSTCMS_SQL_LOG'] as $qGJ7FNoYNA )
                        {
                            $4zURVL8Y = crc32( $qGJ7FNoYNA['trimquery'] );
                            if ( in_array( $4zURVL8Y, $goDugQ ) )
                            {
                                $3bfDHedrrD2M4Q = "sql_qd";
                            }
                            else
                            {
                                $3bfDHedrrD2M4Q = "sql_q";
                            }
                            $goDugQ[] = $4zURVL8Y;
                            echo "<div class=\"";
                            echo $3bfDHedrrD2M4Q;
                            echo "\">";
                            echo $gTqe_BXhMWc->highlightsql( htmlspecialchars( $qGJ7FNoYNA['query'] ) );
                            echo "</div><div class=\"sql_db\" id=\"sql_h";
                            echo $7w;
                            echo "\">";
                            if ( isset( $qGJ7FNoYNA['debug_backtrace'] ) && 0 < count( $qGJ7FNoYNA['debug_backtrace'] ) )
                            {
                                foreach ( $qGJ7FNoYNA['debug_backtrace'] as $VLgs_0Yy1g )
                                {
                                    echo to_str( $VLgs_0Yy1g['file'] );
                                    echo ",  ";
                                    echo to_str( $VLgs_0Yy1g['line'] );
                                    echo "\n";
                                }
                            }
                            echo "</div><div class=\"sql_t\">";
                            if ( isset( $qGJ7FNoYNA['explain'] ) && 0 < count( $qGJ7FNoYNA['explain'] ) )
                            {
                                echo "Explain:<br />\r\n\t\t\t\t\t\t<table class=\"sql_explain\"><tr>";
                                foreach ( $qGJ7FNoYNA['explain'][0] as $ErtiyQFp_X1Xz00 => $XBiwS7KLuDeZCVc )
                                {
                                    echo "<td><b>";
                                    echo $ErtiyQFp_X1Xz00;
                                    echo "</b></td>";
                                }
                                echo "</tr>";
                                foreach ( $qGJ7FNoYNA['explain'] as $XBiwS7KLuDeZCVc )
                                {
                                    echo "<tr>";
                                    foreach ( $XBiwS7KLuDeZCVc as $sN8OfJvKDVgoQw5RTBtW => $7gFvho1YyWWG2QJRnseZPu4 )
                                    {
                                        if ( $sN8OfJvKDVgoQw5RTBtW == "type" )
                                        {
                                            switch ( mb_strtolower( $7gFvho1YyWWG2QJRnseZPu4 ) )
                                            {
                                            case "system" :
                                                $E7LJsMo = "#008000";
                                                break;
                                            case "const" :
                                                $E7LJsMo = "#008000";
                                                break;
                                            case "eq_ref" :
                                                $E7LJsMo = "#D9E700";
                                                break;
                                            case "ref" :
                                                $E7LJsMo = "#E7B300";
                                                break;
                                            case "range" :
                                                $E7LJsMo = "#E78200";
                                                break;
                                            case "index" :
                                                $E7LJsMo = "#E76200";
                                                break;
                                            case "all" :
                                                $E7LJsMo = "#E70B00";
                                                break;
                                            default :
                                                $E7LJsMo = "#777777";
                                            }
                                            $bLTOzyihvN7ou4Se2w = " style=\"color: ".$E7LJsMo."\"";
                                        }
                                        else
                                        {
                                            $bLTOzyihvN7ou4Se2w = "";
                                        }
                                        echo "<td";
                                        echo $bLTOzyihvN7ou4Se2w;
                                        echo ">";
                                        echo str_replace( ",", ", ", $7gFvho1YyWWG2QJRnseZPu4 );
                                        echo "</td>";
                                    }
                                    echo "</tr>";
                                }
                                echo "</table>";
                            }
                            echo ": ";
                            echo round( $qGJ7FNoYNA['time'], 4 );
                            echo " . <a onclick=\"ShowHide('sql_h";
                            echo $7w;
                            echo "')\" style=\"cursor:pointer\"></a></div>";
                            ++$7w;
                        }
                        unset( $goDugQ );
                    }
                    echo "\t\t</div>\r\n\t</div>";
                }
                echo "\t<script type=\"text/javascript\">\r\n\tCreateWindow(\"div_hostcms_debug\", \"";
                echo $MSG_kernel['debug_information'];
                echo "\", '400px', '220px');\r\n\t";
                if ( defined( "ALLOW_SHOW_SQL" ) && ALLOW_SHOW_SQL )
                {
                    echo "CreateWindow(\"div_hostcms_sql\", \"";
                    echo $MSG_kernel['sql_queries'];
                    echo "\", '90%', '90%');";
                }
                echo "\t</script>\r\n\t\r\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"/hostcmsfiles/style.css\" />\r\n\t\r\n\t<!--      -->\r\n\t<script type=\"text/javascript\">\r\n\t//  \r\n\telements = getElementsByName_iefix('DIV', 'hostcms_float_block_l');\r\n\tif (elements.length > 0)\r\n\t{\r\n\t\tchangeHeightFloatBlockBorder (elements, -20, 10);\r\n\t}\r\n\r\n\t//  \r\n\telements = getElementsByName_iefix('DIV', 'hostcms_float_block_r');\r\n\tif (elements.length > 0)\r\n\t{\r\n\t\tchangeHeightFloatBlockBorder (elements, -20, 10);\r\n\t}\r\n\r\n\t//  \r\n\telements = getElementsByName_iefix('DIV', 'hostcms_float_block_drag_block');\r\n\tif (elements.length > 0)\r\n\t{\r\n\t\tchangeHeightFloatBlockBorder (elements, -10, 5);\r\n\t}\r\n\t</script>\r\n\t";
            }
        }
        if ( !$VjwVmUA8tDAL6mE && $osuAaSk->usersessionvalid( ) && ( defined( "ALLOW_PANEL" ) && !ALLOW_PANEL ) || ( !defined( "INTEGRATION" ) && !( INTEGRATION == 0 ) && !( to_str( $_SERVER['REQUEST_URI'] ) == "/" ) && !isset( $3Kv84_rGRuAIZzZoF9LUsQ ) ) )
        {
            break;
        }
        echo "<script language=\"javascript\" type=\"text/javascript\">\r\n\t\tif (document.all && !window.opera)\r\n\t\t{\r\n\t\t\tif (document.getElementById('hostcms_licence'))\r\n\t\t\t{\r\n\t\t\t\tdocument.getElementById('hostcms_licence').style.position=\"absolute\";\r\n\t\t\t}\r\n\t\t\twindow.onscroll=function()\r\n\t\t\t{\r\n\t\t\t\tif (document.getElementById('hostcms_licence'))\r\n\t\t\t\t{\r\n\t\t\t\t\tdocument.getElementById('hostcms_licence').style.top = document.documentElement.scrollTop;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\twindow.onscroll();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (document.getElementById('hostcms_licence'))\r\n\t\t\t{\r\n\t\t\t\tdocument.getElementById('hostcms_licence').style.position=\"fixed\";\r\n\t\t\t\tdocument.getElementById('hostcms_licence').style.top=0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t</script>\r\n\t\t";
    } while ( 0 );
    $arOtZ_eDMd4PitTm = ob_get_clean( );
    if ( mb_strtoupper( SITE_CODING ) != "UTF-8" )
    {
        $arOtZ_eDMd4PitTm = @iconv( "UTF-8", SITE_CODING."//IGNORE//TRANSLIT", $arOtZ_eDMd4PitTm );
    }
    echo $arOtZ_eDMd4PitTm;
    if ( defined( "COMPRESSION_BEGIN" ) )
    {
        $ZJqpSKw5W50vY =& singleton( "compression" );
        $ZJqpSKw5W50vY->pagecompressionend( );
    }
    session_write_close( );
    exit( );
}

list( $usec, $sec ) = explode( " ", microtime( ) );
$GLOBALS['BeginTime'] = ( double )$usec + ( double )$sec;
if ( is_dir( "install/" ) && is_file( "install/index.php" ) )
{
    header( "Location: /install/" );
    exit( );
}
require_once( "main_classes.php" );
if ( !defined( "DENY_INI_SET" ) && defined( "DENY_INI_SET" ) && !DENY_INI_SET )
{
    ini_set( "display_errors", 1 );
}
if ( !defined( "INTEGRATION" ) )
{
    define( "INTEGRATION", 0 );
}
$kernel =& singleton( "kernel" );
header( "X-Powered-By: HostCMS ".$kernel->crc32( CMS_FOLDER )." ".$kernel->crc32( INTEGRATION )." ".$kernel->crc32( CURRENT_VERSION ) );
if ( isset( $_SERVER['REMOTE_ADDR'] ) )
{
    $user_ip = to_str( $_SERVER['REMOTE_ADDR'] );
}
else
{
    $user_ip = " ";
}
define( "USER_IP", $user_ip );
$SYSTEM_URL_ARRAY = array( );
$MBeginTime = $kernel->getmicrotime( );
$kernel->loadmodules( false );
$GLOBALS['MTime'] = $kernel->getmicrotime( ) - $MBeginTime;
if ( class_exists( "compression" ) )
{
    $compression =& singleton( "compression" );
    $compression->pagecompressionbegin( );
}
if ( !function_exists( "xslt_create" ) || !function_exists( "domxml_xslt_stylesheet" ) || !class_exists( "DomDocument" ) || !class_exists( "XsltProcessor" ) )
{
    header( "HTTP/1.0 503 Service Unavailable" );
    header( "Content-type: text/html; charset=UTF-8" );
    exit_index( $SYSTEM_URL_ARRAY, "   !", "<p>     ".PRODUCT_NAME."   PHP 5    <a href=\"http://".PRODUCT_HTTP."/documentation/libxslt/\" target=\"_blank\">Libxslt</a>.</p><p>     <a href=\"http://".PRODUCT_HTTP."/hosting/\" target=\"_blank\">  </a>,    ".PRODUCT_NAME.".</p>" );
}
if ( !defined( "SUPPORT_EMAIL" ) )
{
    define( "SUPPORT_EMAIL", "[email protected]" );
}
if ( !isset( $_SERVER['HTTP_HOST'] ) )
{
    $GLOBALS['_SERVER']['HTTP_HOST'] = "";
}
$domain = $_SERVER['HTTP_HOST'];
$key2 = loadkeys( );
$a_domain = explode( ":", $domain );
$domain = $a_domain[0];
$key1 = sitecreate( $domain, INTEGRATION );
if ( !eqkeys( $key1, $key2, $domain ) )
{
    header( "HTTP/1.0 503 Service Unavailable" );
    header( "Content-type: text/html; charset=UTF-8" );
    exit_index( $SYSTEM_URL_ARRAY, "   !", "<h2> </h2><p>           <a href=\"http://".PRODUCT_HTTP."/users/\" target=\"_blank\"> </a></p><p>        ,       :<br/><img src=\"http://".PRODUCT_HTTP."/images/news/user-orders/img1.gif\" class=\"screen\" /></p><p>        PIN-       ,  HostCMS.    .</p><p>    PIN-    <a href=\"/admin/\" target=\"_blank\"> </a>            .</p><p>     <a href=\"/admin/\" target=\"_blank\"> </a>   (   5.1.1),      :<br/><img src=\"http://www.hostcms.ru/images/keys/domain_list.gif\" class=\"screen\" /></p><p>                    .<h2>   </h2><p>  <a href=\"/admin/\" target=\"_blank\"> </a>,    .</p>" );
}
if ( INTEGRATION == 0 || INTEGRATION == 1 )
{
    $DataBase =& singleton( "DataBase" );
    $DataBase->select( "SELECT `site_id` FROM `site_table` WHERE `site_is_active` = 1" );
    if ( !( 2 < $DataBase->get_count_row( ) ) && INTEGRATION == 0 || 1 < $DataBase->get_count_row( ) && INTEGRATION == 1 )
    {
        header( "HTTP/1.0 503 Service Unavailable" );
        header( "Content-type: text/html; charset=UTF-8" );
        exit_index( $SYSTEM_URL_ARRAY, "     !", "         HostCMS!<p>     (<b>\" \" &#8594; \"\"</b>)      ." );
    }
}
if ( !empty( $_SERVER['HTTP_X_ORIGINAL_URL'] ) )
{
    $current_url = "http://".$domain.$_SERVER['HTTP_X_ORIGINAL_URL'];
}
else if ( !empty( $_SERVER['HTTP_X_REWRITE_URL'] ) )
{
    $current_url = "http://".$domain.$_SERVER['HTTP_X_REWRITE_URL'];
}
else
{
    $current_url = "http://".$domain.$_SERVER['REQUEST_URI'];
}
$current_url_decode = urldecode( $current_url );
$is_utf8 = strtoupper( mb_detect_encoding( $current_url_decode, "UTF-8", true ) ) == "UTF-8";
if ( !$is_utf8 )
{
    $current_url_decode = trim( mb_convert_encoding( $current_url_decode, "UTF-8", "windows-1251" ) );
}
$url = parse_url( $current_url_decode );
if ( mb_strtolower( $url['path'] ) == "/index.php" )
{
    $url['path'] = "/";
}
$url_path = $url['path'];
if ( isset( $url['query'] ) )
{
    $GLOBALS['URL_QUERY'] = $url['query'];
    if ( !$is_utf8 || function_exists( "mb_parse_str" ) )
    {
        mb_parse_str( $url['query'], $_GET );
        $GLOBALS['_REQUEST'] = $_GET + $_REQUEST;
    }
}
else
{
    $GLOBALS['URL_QUERY'] = "";
}
$last_slash = mb_strrpos( $url['path'], "/" );
if ( defined( "OPTIONAL_LAST_SLASH" ) && OPTIONAL_LAST_SLASH )
{
    $GLOBALS['URL_ARRAY'] = explode( "/", mb_substr( $url_path, 1 ) );
}
else
{
    $GLOBALS['URL_ARRAY'] = explode( "/", mb_substr( $url_path, 1, $last_slash ) );
}
$count = count( $URL_ARRAY );
$last_str = mb_substr( $url_path, $last_slash );
$GLOBALS['URL_LAST_STR'] = $last_str;
if ( !defined( "NOT_EXISTS_FILE_404_ERROR" ) && defined( "NOT_EXISTS_FILE_404_ERROR" ) && NOT_EXISTS_FILE_404_ERROR )
{
    $not_exists_file = @ereg( "^/[--a-zA-Z0-9_\\.\\-]+\\.([a-zA-Z0-9\\-\\.]{2,})+\$", $last_str );
}
else
{
    $not_exists_file = false;
}
if ( $last_str != "/" && $last_str != "/robots.txt" && $last_str != "/index.php" && $last_str != "/favicon.ico" && $not_exists_file )
{
    showheader404( );
    exit( );
}
if ( empty( $URL_ARRAY[$count - 1] ) && $count != 1 )
{
    unset( $URL_ARRAY[$count - 1] );
}
if ( $count == 1 && ( empty( $URL_ARRAY[0] ) || mb_strtolower( $URL_ARRAY[0] ) == "index.php" ) )
{
    $GLOBALS['URL_ARRAY'][0] = "/";
}
$SYSTEM_URL_ARRAY = $URL_ARRAY;
$param = $URL_ARRAY;
$GLOBALS['param'] = $URL_ARRAY;
define( "CURRENT_URL_PATH", $url['path'] );
$is_not_complectation = false;
if ( 0 == INTEGRATION && ( class_exists( "Search" ) || class_exists( "Support" ) || class_exists( "Cache" ) || class_exists( "compression" ) || class_exists( "counter" ) || class_exists( "FileManager" ) || class_exists( "Backup" ) || class_exists( "lists" ) || class_exists( "EventsJournalAdmin" ) || class_exists( "polls" ) || class_exists( "Forum" ) || class_exists( "Forms" ) || class_exists( "SiteUsers" ) || class_exists( "Maillist" ) || class_exists( "Advertisement" ) ) )
{
    $is_not_complectation = true;
}
if ( 1 == INTEGRATION && ( class_exists( "Cache" ) || class_exists( "compression" ) || class_exists( "counter" ) || class_exists( "FileManager" ) || class_exists( "Backup" ) || class_exists( "lists" ) || class_exists( "EventsJournalAdmin" ) || class_exists( "polls" ) || class_exists( "Forum" ) || class_exists( "Forms" ) || class_exists( "SiteUsers" ) || class_exists( "Maillist" ) || class_exists( "Advertisement" ) ) )
{
    $is_not_complectation = true;
}
if ( 3 == INTEGRATION && ( class_exists( "counter" ) || class_exists( "Cache" ) || class_exists( "FileManager" ) || class_exists( "EventsJournalAdmin" ) || class_exists( "polls" ) || class_exists( "Forum" ) || class_exists( "SiteUsers" ) || class_exists( "Maillist" ) || class_exists( "Advertisement" ) ) )
{
    $is_not_complectation = true;
}
if ( 5 == INTEGRATION && ( class_exists( "FileManager" ) || class_exists( "polls" ) || class_exists( "Forum" ) || class_exists( "Maillist" ) ) )
{
    $is_not_complectation = true;
}
if ( 7 == INTEGRATION )
{
    $is_not_complectation = false;
}
if ( $is_not_complectation )
{
    header( "HTTP/1.0 503 Service Unavailable" );
    header( "Content-type: text/html; charset=UTF-8" );
    exit_index( $SYSTEM_URL_ARRAY, "  .", "<p><b>    !</b>\r\n\t<p>      !" );
}
set_error_handler( "cms_error_handler" );
$site =& singleton( "site" );
$alias_row = $site->getalias( $domain );
if ( !$alias_row )
{
    header( "HTTP/1.0 503 Service Unavailable" );
    header( "Content-type: text/html; charset=UTF-8" );
    exit_index( $SYSTEM_URL_ARRAY, "   ".$domain."       HostCMS!", " <b>".$domain."</b>         <b>HostCMS</b>!<p>     <b><a href=\"/admin/site/site.php\" target=\"_blank\">\" \" &#8594; \"\"</a></b>.   <b>\"\"</b>   .       <b>\"\"</b> &#8594; <b>\"\"</b>." );
}
define( "CURRENT_SITE", $alias_row['site_id'] );
if ( !$kernel->initconstants( ) )
{
    header( "HTTP/1.0 503 Service Unavailable" );
    header( "Content-type: text/html; charset=UTF-8" );
    exit_index( $SYSTEM_URL_ARRAY, " #2  !", "  , ..          . <a href=\"/admin/site/site.php\">  </a>        HostCMS." );
}
if ( mb_strtoupper( SITE_CODING ) != "UTF-8" )
{
    convert_array( &$GLOBALS['_POST'], SITE_CODING, "UTF-8" );
    convert_array( &$GLOBALS['_REQUEST'], SITE_CODING, "UTF-8" );
    convert_array( &$_COOKIES, SITE_CODING, "UTF-8" );
    convert_array( &$GLOBALS['_FILES'], SITE_CODING, "UTF-8" );
}
error_reporting( SITE_ERROR );
$ip = new ip( );
$ip_row = $ip->getipinfo( USER_IP );
$structure_class =& singleton( "Structure" );
if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) && USER_IP != $_SERVER['HTTP_X_FORWARDED_FOR'] )
{
    $ip_row_HTTP_X_FORWARDED_FOR = $ip->getipinfo( $_SERVER['HTTP_X_FORWARDED_FOR'] );
}
else
{
    $ip_row_HTTP_X_FORWARDED_FOR = false;
}
if ( ( $ip_row || $ip_row_HTTP_X_FORWARDED_FOR ) && ( !is_array( $ip_row ) && $ip_row['ip_deny_access'] || is_array( $ip_row_HTTP_X_FORWARDED_FOR ) && $ip_row_HTTP_X_FORWARDED_FOR['ip_deny_access'] ) )
{
    header( "HTTP/1.0 503 Service Unavailable" );
    header( "Content-type: text/html; charset=UTF-8" );
    if ( defined( "ERROR403_STRUCTURE_ID" ) && ERROR403_STRUCTURE_ID )
    {
        $structure_id = ERROR403_STRUCTURE_ID;
        $structure = $structure_class->gerstructureitem( $structure_id );
    }
    else
    {
        exit_index( $SYSTEM_URL_ARRAY, "   !", "   .   !" );
    }
}
if ( !defined( "LC_TIME_DEFAULT_LOCALE" ) )
{
    define( "LC_TIME_DEFAULT_LOCALE", "en_US" );
}
$site_row = $site->getsite( CURRENT_SITE );
$Admin = new admin( );
if ( $site_row && $site_row['site_is_active'] != 1 && !$Admin->usersessionvalid( ) )
{
    if ( $site_row['site_is_close'] == 0 )
    {
        header( "HTTP/1.0 503 Service Unavailable" );
        header( "Content-type: text/html; charset=UTF-8" );
        exit_index( $SYSTEM_URL_ARRAY, " ".$_SERVER['HTTP_HOST']."       !", "      \"\"    \"\"  ." );
    }
    else
    {
        define( "SITE_IS_CLOSE", true );
        showheader404( );
        $structure_id = $site_row['site_is_close'];
    }
}
if ( $last_str == "/robots.txt" )
{
    header( "Last-Modified: ".gmdate( "D, d M Y H:i:s", time( ) )." GMT" );
    if ( to_str( $_SERVER['SERVER_PROTOCOL'] ) == "HTTP/1.1" && function_exists( "apache_lookup_uri" ) )
    {
        header( "HTTP/1.1 200 OK" );
    }
    else
    {
        header( "Status: 200 OK" );
    }
    header( "Content-Type: text/plain; charset=".SITE_CODING );
    echo $site_row['site_robots'];
    exit( );
}
if ( $last_str == "/favicon.ico" )
{
    $ico_path = CMS_FOLDER.UPLOADDIR.( "favicon/site_".$site_row['site_id'].".ico" );
    if ( file_exists( $ico_path ) )
    {
        header( "Last-Modified: ".gmdate( "D, d M Y H:i:s", time( ) )." GMT" );
        header( "Content-Type: image/x-icon" );
        if ( to_str( $_SERVER['SERVER_PROTOCOL'] ) == "HTTP/1.1" && function_exists( "apache_lookup_uri" ) )
        {
            header( "HTTP/1.1 200 OK" );
        }
        else
        {
            header( "Status: 200 OK" );
        }
        echo file_get_contents( $ico_path );
        exit( );
    }
    showheader404( );
    exit( );
}
header( "Content-type: text/html; charset=".SITE_CODING );
if ( !isset( $structure_id ) )
{
    do
    {
        if ( $last_str == "/" || mb_strpos( $last_str, "/?" ) === 0 || defined( "DENY_LOCATION_302_LAST_SLASH" ) )
        {
            $structure_id = $kernel->get_current_page( $SYSTEM_URL_ARRAY, CURRENT_SITE );
            if ( !$structure_id )
            {
                if ( !( $SYSTEM_URL_ARRAY[0] == "/" ) && !( count( $SYSTEM_URL_ARRAY ) == 1 ) )
                {
                    break;
                }
                else
                {
                    header( "HTTP/1.0 503 Service Unavailable" );
                    header( "Content-type: text/html; charset=UTF-8" );
                    exit_index( $SYSTEM_URL_ARRAY, "    !", "!     !<p>      <b>\" \" &#8594; \" \"</b>. <br /><b>\" \"</b>      \"<b>/</b>\"." );
                }
            }
        }
        else
        {
            header( "HTTP/1.1 301 Moved Permanently" );
            header( "Location: ".$url_path."/" );
            $structure_id = false;
            exit( );
        }
    } while ( 0 );
}
$structure = $structure_class->getstructureitem( $structure_id );
if ( isset( $_SESSION['site_user_id'] ) && class_exists( "SiteUsers" ) )
{
    $SiteUsers =& singleton( "SiteUsers" );
    $usergroups = $SiteUsers->getgroupsforuser( $_SESSION['site_user_id'] );
}
else
{
    $usergroups[] = 0;
}
if ( !$structure )
{
    define( "IS_ERROR_404", true );
    showheader404( );
    if ( defined( "ERROR404_STRUCTURE_ID" ) && ERROR404_STRUCTURE_ID )
    {
        $structure_id = ERROR404_STRUCTURE_ID;
        $structure = $structure_class->getstructureitem( $structure_id );
        if ( !$structure )
        {
            exit_index( $SYSTEM_URL_ARRAY );
        }
    }
    else
    {
        if ( $SYSTEM_URL_ARRAY[0] != "/" )
        {
            header( "Location: /" );
        }
        exit_index( $SYSTEM_URL_ARRAY );
    }
}
if ( $structure['structure_access_protocol'] == 1 && !$kernel->usehttps( ) )
{
    $url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    $url = str_replace( "\r", "", $url );
    $url = str_replace( "\n", "", $url );
    header( "HTTP/1.1 302 Found" );
    header( "Location: https://".$url );
    exit( );
}
define( "CURRENT_STRUCTURE_ID", $structure_id );
$structure_access = $structure_class->getstructureaccess( $structure_id );
if ( !in_array( $structure_access, $usergroups ) )
{
    define( "IS_ERROR_403", true );
    if ( function_exists( "apache_lookup_uri" ) )
    {
        header( "HTTP/1.0 403 Forbidden" );
    }
    else
    {
        header( "HTTP/1.1 403 Forbidden" );
    }
    if ( defined( "ERROR403_STRUCTURE_ID" ) && ERROR403_STRUCTURE_ID )
    {
        $structure_id = ERROR403_STRUCTURE_ID;
        $structure = $structure_class->gerstructureitem( $structure_id );
    }
    else
    {
        exit_index( $SYSTEM_URL_ARRAY, "       !", "<p><b>       !</b><p>       !" );
    }
}
if ( !defined( "INTEGRATION" ) && !( INTEGRATION == 0 ) && to_str( $_SERVER['REQUEST_URI'] ) == "/" || mb_strtoupper( SITE_CODING ) != "UTF-8" || !class_exists( "Cache" ) && $site_row['site_html_cache_use'] == 1 || $site_row['site_safe_email'] )
{
    ob_start( );
    ob_implicit_flush( 0 );
    define( "OB_START", true );
}
$documents_id = to_int( $structure['documents_id'] );
if ( 0 < mb_strlen( trim( $structure['structure_title'] ) ) )
{
    $page_title = $structure['structure_title'];
}
else
{
    $page_title = $structure['structure_menu_name'];
}
if ( 0 < mb_strlen( trim( $structure['structure_description'] ) ) )
{
    $page_description = $structure['structure_description'];
}
else
{
    $page_description = $structure['structure_menu_name'];
}
if ( 0 < mb_strlen( trim( $structure['structure_keywords'] ) ) )
{
    $page_keywords = $structure['structure_keywords'];
}
else
{
    $page_keywords = $structure['structure_menu_name'];
}
$structure_type = to_int( $structure['structure_type'] );
$page_name = $structure['structure_path_name'];
$structure_external_link = trim( $structure['structure_external_link'] );
$is_extrernal_link = 0 < mb_strlen( $structure_external_link );
$data_templates_id = intval( $structure['data_templates_id'] );
if ( defined( "EXPIRES_TIME" ) )
{
    $kernel->setexpires( time( ) + EXPIRES_TIME );
}
else
{
    $kernel->setexpires( time( ) + 300 );
}
if ( defined( "LAST_MODIFIED_TIME" ) )
{
    $kernel->setlastmodified( time( ) + LAST_MODIFIED_TIME );
}
else
{
    $kernel->setlastmodified( time( ) );
}
if ( $structure_type == 0 && !$is_extrernal_link )
{
    $documents_class =& singleton( "documents" );
    $documents_version_row = $documents_class->getcurrentdocumentversion( $documents_id );
    if ( !$documents_version_row )
    {
        header( "HTTP/1.0 503 Service Unavailable" );
        header( "Content-type: text/html; charset=UTF-8" );
        exit_index( $SYSTEM_URL_ARRAY, "   !", "!            .   ,    ,   <b>\" \" &#8594; \" \"</b>.       \" \" &#8594; \"  \"." );
    }
    $templates_id = intval( $documents_version_row['templates_id'] );
    $documents_version_id = $documents_version_row['documents_version_id'];
}
else if ( $structure_type == 1 || $structure_type == 2 )
{
    $templates_id = intval( $structure['templates_id'] );
}
if ( !$is_extrernal_link )
{
    $kernel->set_title( $page_title );
    $kernel->set_description( $page_description );
    $kernel->set_keywords( $page_keywords );
    if ( $structure_type == 0 )
    {
        $documents =& singleton( "documents" );
        $kernel->set_current_page( $documents->getdocumentversionpath( $documents_version_id ) );
    }
    else if ( $structure_type == 1 )
    {
        $kernel->set_current_page( $structure_class->getstructurefilespath( ).( "/Structure".$structure_id.".php" ) );
    }
    else
    {
        $lib_id = $structure['lib_id'];
        $lib =& singleton( "lib" );
        $kernel->set_current_page( $lib->getlibpath( $lib_id ).( "/lib_".$lib_id.".php" ) );
    }
    $kernel->set_current_page_data_template( $data_templates_id );
    if ( class_exists( "counter" ) && ( !defined( "COUNTER_BOT_COUNT" ) && defined( "COUNTER_BOT_COUNT" ) && COUNTER_BOT_COUNT ) && isset( $_SERVER['HTTP_USER_AGENT'] ) )
    {
        $counter = new counter( );
        if ( $counter->checkbot( $_SERVER['HTTP_USER_AGENT'] ) )
        {
            $counter->build_counter( CURRENT_SITE, "", "", $_SERVER['REMOTE_ADDR'], "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], "", "", $_SERVER['HTTP_USER_AGENT'], "N", "", 0 );
        }
    }
    $kernel->settemplate( $templates_id );
    if ( $Tmp_0 )
    {
        if ( isset( $_SESSION['valid_user'], $_GET['hostcms_action'] ) )
        {
            if ( $_GET['hostcms_action'] == "SHOW_XML" )
            {
                $GLOBALS['_SESSION']['HOSTCMS_SHOW_XML'] = true;
            }
            else
            {
                $GLOBALS['_SESSION']['HOSTCMS_SHOW_XML'] = false;
            }
        }
        if ( isset( $_REQUEST['show_xml'] ) )
        {
            $GLOBALS['_SESSION']['HOSTCMS_SHOW_XML'] = true;
        }
    }
    $PBeginTime = $kernel->getmicrotime( );
    if ( $structure_type == 1 )
    {
        $StructureConfig = $structure_class->getstructurefilespath( ).( "/StructureConfig".$structure_id.".php" );
        if ( is_file( $StructureConfig ) && is_readable( $StructureConfig ) )
        {
            include( $StructureConfig );
        }
    }
    else if ( $structure_type == 2 )
    {
        $lib =& singleton( "lib" );
        $GLOBALS['LA'] = $lib->loadlibpropertiesvalue( $lib_id, CURRENT_STRUCTURE_ID );
        $LibConfig = $lib->getlibpath( $lib_id ).( "/lib_config_".$lib_id.".php" );
        if ( is_file( $LibConfig ) && is_readable( $LibConfig ) )
        {
            include( $LibConfig );
        }
    }
    if ( !defined( "IS_ERROR_404" ) || !defined( "IS_ERROR_403" ) || !defined( "SITE_IS_CLOSE" ) )
    {
        if ( to_str( $_SERVER['SERVER_PROTOCOL'] ) == "HTTP/1.1" && function_exists( "apache_lookup_uri" ) )
        {
            header( "HTTP/1.1 200 OK" );
        }
        else
        {
            header( "Status: 200 OK" );
        }
        if ( !defined( "SET_EXPIRES" ) && defined( "SET_EXPIRES" ) && SET_EXPIRES )
        {
            header( "Expires: ".gmdate( "D, d M Y H:i:s", $kernel->getexpires( ) )." GMT" );
        }
        if ( !defined( "SET_LAST_MODIFIED" ) && defined( "SET_LAST_MODIFIED" ) && SET_LAST_MODIFIED )
        {
            header( "Last-Modified: ".gmdate( "D, d M Y H:i:s", $kernel->getlastmodified( ) )." GMT" );
        }
        if ( !defined( "SET_CACHE_CONTROL" ) && defined( "SET_CACHE_CONTROL" ) && SET_CACHE_CONTROL )
        {
            if ( $structure_access == 0 )
            {
                $cache_control_type = "public";
            }
            else
            {
                $cache_control_type = "private";
            }
            $current_time = time( );
            if ( $current_time < $kernel->getexpires( ) )
            {
                $max_age = $kernel->getexpires( ) - $current_time;
            }
            else
            {
                $max_age = 0;
            }
            header( "Cache-control: ".$cache_control_type.", max-age={$max_age}" );
        }
    }
    $templates = new templates( );
    $row_templates = $templates->gettemplate( $kernel->gettemplate( ) );
    if ( !$row_templates )
    {
        header( "HTTP/1.0 503 Service Unavailable" );
        header( "Content-type: text/html; charset=UTF-8" );
        exit_index( $SYSTEM_URL_ARRAY, "   !", "!      .\r\n\t\t<p>        <b>\" \" &#8594; \" \"</b>.\r\n\t\t       <b>\" \" &#8594; \"  \".</p>\r\n\t\t" );
    }
    $kernel->set_css( "templates/template".$row_templates['templates_id']."/style.css" );
    $kernel->settimestamp( $row_templates['templates_timestamp'] );
    $path_template = CMS_FOLDER.( "templates/template".$row_templates['templates_id']."/template.htm" );
    if ( is_readable( $path_template ) )
    {
        include( $path_template );
    }
    else
    {
        header( "HTTP/1.0 503 Service Unavailable" );
        header( "Content-type: text/html; charset=UTF-8" );
        exit_index( $SYSTEM_URL_ARRAY, " #4 -    ", "   : <b>".$path_template."</b>,    ,   !" );
    }
    $GLOBALS['PTime'] = $kernel->getmicrotime( ) - $PBeginTime;
    if ( !defined( "CURRENT_VERSION" ) )
    {
        define( "CURRENT_VERSION", "5.2" );
    }
}
else if ( !( mb_strpos( CURRENT_URL_PATH, $structure_external_link ) === 0 ) )
{
    header( "Location: ".$structure_external_link );
}
else
{
    echo "<p>   <a href=\"";
    echo $structure_external_link;
    echo "\">";
    echo $structure_external_link;
    echo "</a></p>";
}
exit_index( $SYSTEM_URL_ARRAY );

Function Calls

None

Variables

None

Stats

MD5 93ead713ea579d8a11ae60ef358ef2da
Eval Count 0
Decode Time 102 ms