Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /** * * @ IonCube v6 Decoder By DoraemonPT * * @ Version : 1,0,0,0 * @ A..
Decoded Output download
<?php
/**
*
* @ IonCube v6 Decoder By DoraemonPT
*
* @ Version : 1,0,0,0
* @ Author : DoraemonPT
* @ Release on : 19-08-2013
* @ Website : http://easytoyou.eu
*
**/
function showheader404( )
{
if ( function_exists( "apache_lookup_uri" ) )
{
header( "http/1.0 404 Not Found" );
}
else
{
header( "Status: 404 Not Found" );
}
}
function convert_array( &$_obfuscate_kIVhqJk, $_obfuscate_vholQ, $_obfuscate_ddk )
{
if ( is_array( $_obfuscate_kIVhqJk ) && 0 < count( $_obfuscate_kIVhqJk ) )
{
foreach ( $_obfuscate_kIVhqJk as $_obfuscate_Vwty => $_obfuscate_VgKtFeg )
{
if ( is_array( $_obfuscate_VgKtFeg ) )
{
$_obfuscate_kIVhqJk[$_obfuscate_Vwty] = @iconv( $_obfuscate_vholQ, @$_obfuscate_ddk."//IGNORE//TRANSLIT", $_obfuscate_VgKtFeg );
}
else
{
convert_array( $_obfuscate_kIVhqJk[$_obfuscate_Vwty], $_obfuscate_vholQ, $_obfuscate_ddk );
}
}
}
}
function exit_index( $_obfuscate_5VUWX855p0wrkJO3_4hIA = array( ), $_obfuscate_obqvew = "", $_obfuscate_CkqRBASwTWxNIw = "", $_obfuscate_VjwVmUA8tDAL6mE = true )
{
$_obfuscate_Oy0_d5TD =& singleton( "kernel" );
$_obfuscate_osuAaSk = new admin( );
if ( empty( $_obfuscate_CkqRBASwTWxNIw ) )
{
show_index_message( $_obfuscate_obqvew, $_obfuscate_CkqRBASwTWxNIw );
}
if ( defined( "OB_START" ) )
{
$_obfuscate_67eJCw =& singleton( "site" );
$_obfuscate_MfdtfgWBte8 = $_obfuscate_67eJCw->getsite( CURRENT_SITE );
$_obfuscate_arOtZ_eDMd4PitTm = ob_get_clean( );
if ( $_obfuscate_MfdtfgWBte8['site_safe_email'] && mb_strlen( $_obfuscate_arOtZ_eDMd4PitTm ) < 204800 )
{
function strip_nl( $_obfuscate_aNcpmA )
{
$_obfuscate_aNcpmA = str_replace( "
", "", $_obfuscate_aNcpmA );
$_obfuscate_aNcpmA = str_replace( "
", "", $_obfuscate_aNcpmA );
$_obfuscate_aNcpmA = str_replace( "'", "\'", $_obfuscate_aNcpmA );
return $_obfuscate_aNcpmA;
}
function safe_email_callback( $_obfuscate_8UmnTppRcA )
{
ob_start( );
echo "<script type=\"text/javascript\">
<!--
document.write ('<a ";
echo strip_nl( $_obfuscate_8UmnTppRcA[1] );
echo " href=\"mailto:' + '";
echo strip_nl( $_obfuscate_8UmnTppRcA[2] );
echo "' + '@' + '";
echo strip_nl( $_obfuscate_8UmnTppRcA[3] );
echo "' + '.' + '";
echo strip_nl( $_obfuscate_8UmnTppRcA[4] );
echo "' + '\"";
echo strip_nl( $_obfuscate_8UmnTppRcA[5] );
echo ">' + '";
echo strip_nl( $_obfuscate_8UmnTppRcA[6] );
echo "' + '</a>');
-->
</script>";
return ob_get_clean( );
}
$_obfuscate_arOtZ_eDMd4PitTm = preg_replace_callback( "/<a\s([^>]*)?href=['|\\"]?mailto:([\w+\-\.]+)@([\w\-\.]+)\.(\w{2,4})[\\"|']?([^>]*)?>(.*?)<\/a>/is", "safe_email_callback", $_obfuscate_arOtZ_eDMd4PitTm );
}
if ( defined( "INTEGRATION" ) && INTEGRATION == 0 && to_str( $_SERVER['REQUEST_URI'] ) == "/" )
{
$_obfuscate_UzMs7giiRwkzU8QQ = $_obfuscate_arOtZ_eDMd4PitTm;
$_obfuscate_dcwitxb = array( "'<script[^>]*?>.*?</script>'siu", "'<noscript[^>]*?>.*?</noscript>'siu", "'<style[^>]*?>.*?</style>'siu", "'<select[^>]*?>.*?</select>'siu", "'<head[^>]*?>.*?</head>'siu", "'<!--.*?-->'siu" );
$_obfuscate_77tGbWOiZg = array( " ", " ", " ", " ", " ", " " );
$_obfuscate_UzMs7giiRwkzU8QQ = str_replace( "
", " ", $_obfuscate_UzMs7giiRwkzU8QQ );
$_obfuscate_UzMs7giiRwkzU8QQ = str_replace( "
", " ", $_obfuscate_UzMs7giiRwkzU8QQ );
$_obfuscate_UzMs7giiRwkzU8QQ = preg_replace( $_obfuscate_dcwitxb, $_obfuscate_77tGbWOiZg, $_obfuscate_UzMs7giiRwkzU8QQ );
$_obfuscate_06fY41AvMGm_0hBSzw = "(?<!nowrap)(?<!display)(?<!visible)";
$_obfuscate_CDNA = "'<a([^>]".$_obfuscate_06fY41AvMGm_0hBSzw.")*href=((\"http://(www.|)hostcms.ru(/|)\")|(http://(www.|)hostcms.ru(/|)))([^>]{$_obfuscate_06fY41AvMGm_0hBSzw})*>(.{3,})</a>'u";
$_obfuscate_ksF6RFJUckSG4lQ = array( );
$_obfuscate_0U2f4jYrJ436_A = preg_match_all( $_obfuscate_CDNA, $_obfuscate_UzMs7giiRwkzU8QQ, $_obfuscate_ksF6RFJUckSG4lQ );
if ( $_obfuscate_0U2f4jYrJ436_A == 0 )
{
$_obfuscate_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" )
{
$_obfuscate_arOtZ_eDMd4PitTm = @iconv( "UTF-8", @SITE_CODING."//IGNORE//TRANSLIT", $_obfuscate_arOtZ_eDMd4PitTm );
}
function agree_with_rule( $_obfuscate_4gPoSIpYQfDs, $_obfuscate_5VUWX855p0wrkJO3_4hIA )
{
$_obfuscate_4KF9d_nqGRhqEt9O = array( );
$_obfuscate_4gPoSIpYQfDs = trim( $_obfuscate_4gPoSIpYQfDs );
if ( 0 < mb_strlen( $_obfuscate_4gPoSIpYQfDs ) )
{
$_obfuscate_4gPoSIpYQfDs = str_replace( "
", "", $_obfuscate_4gPoSIpYQfDs );
$_obfuscate_4KF9d_nqGRhqEt9O = explode( "
", $_obfuscate_4gPoSIpYQfDs );
}
$_obfuscate_CwRG0R0 = false;
$_obfuscate_hhyZMPkRYAbyxwuoel5asaAx = mb_strlen( $_SERVER['REQUEST_URI'] );
foreach ( $_obfuscate_4KF9d_nqGRhqEt9O as $_obfuscate_6mlyHg )
{
$_obfuscate_D4Asu1mTBTJfksk = mb_strlen( $_obfuscate_6mlyHg );
if ( 1 < $_obfuscate_D4Asu1mTBTJfksk && mb_substr( $_obfuscate_6mlyHg, $_obfuscate_D4Asu1mTBTJfksk - 1, 1 ) == "*" )
{
$_obfuscate_I0yrw = true;
$_obfuscate_6mlyHg = mb_substr( $_obfuscate_6mlyHg, 0, $_obfuscate_D4Asu1mTBTJfksk - 1 );
}
else
{
$_obfuscate_I0yrw = false;
}
if ( !( mb_strpos( $_SERVER['REQUEST_URI'], $_obfuscate_6mlyHg ) === 0 ) || !( $_obfuscate_D4Asu1mTBTJfksk == $_obfuscate_hhyZMPkRYAbyxwuoel5asaAx ) && !$_obfuscate_I0yrw )
{
$_obfuscate_CwRG0R0 = true;
break;
}
}
return $_obfuscate_CwRG0R0;
}
if ( $_obfuscate_MfdtfgWBte8['site_html_cache_use'] == 1 && class_exists( "Cache" ) && isset( $_obfuscate_MfdtfgWBte8['site_html_cache_clear_probability'] ) && 0 < $_obfuscate_MfdtfgWBte8['site_html_cache_clear_probability'] )
{
$_obfuscate_RrCtNA = rand( 0, $_obfuscate_MfdtfgWBte8['site_html_cache_clear_probability'] );
if ( $_obfuscate_RrCtNA == 0 )
{
$_obfuscate_6G2SbJY =& singleton( "Cache" );
$_obfuscate_6G2SbJY->clearstaticcache( $_obfuscate_MfdtfgWBte8['site_id'] );
}
}
if ( $_obfuscate_MfdtfgWBte8['site_html_cache_use'] == 1 && ( isset( $_SESSION['site_user_id'] ) && !$_obfuscate_osuAaSk->usersessionvalid( ) && empty( $_SESSION['SCART'] ) ) && count( $_POST ) == 0 && empty( $_COOKIE['CART'] ) && class_exists( "Cache" ) && 0 < mb_strlen( $_obfuscate_arOtZ_eDMd4PitTm ) )
{
$_obfuscate_ksOiryehaH34CRzadonuxZbDoqI = agree_with_rule( $_obfuscate_MfdtfgWBte8['site_html_cache_with'], $_obfuscate_5VUWX855p0wrkJO3_4hIA );
$_obfuscate_K81C7a1lMRWruqiXxM6g0yNQuCdeDE = agree_with_rule( $_obfuscate_MfdtfgWBte8['site_html_cache_without'], $_obfuscate_5VUWX855p0wrkJO3_4hIA );
if ( $_obfuscate_ksOiryehaH34CRzadonuxZbDoqI && !$_obfuscate_K81C7a1lMRWruqiXxM6g0yNQuCdeDE )
{
$_obfuscate_W9VrWfMNk5k = explode( ":", $_SERVER['HTTP_HOST'] );
$_obfuscate_yTDviRDH = mb_strtolower( $_obfuscate_W9VrWfMNk5k[0] );
$_obfuscate_TU795w = new file( );
$l = CMS_FOLDER."cache_html".DIRECTORY_SEPARATOR.$_obfuscate_yTDviRDH;
$l = $_obfuscate_TU795w->pathcorrection( $l );
if ( !is_dir( $l ) && mkdir( $l, @CHMOD, @TRUE ) )
{
@chmod( $l, @CHMOD );
}
$_obfuscate_iDbA7Hcl2z3Q2MM = FALSE;
if ( empty( $_obfuscate_5VUWX855p0wrkJO3_4hIA ) )
{
foreach ( $_obfuscate_5VUWX855p0wrkJO3_4hIA as $_obfuscate_Vwty => $_obfuscate_VgKtFeg )
{
if ( trim( $_obfuscate_VgKtFeg ) == "" )
{
$_obfuscate_iDbA7Hcl2z3Q2MM = TRUE;
}
else
{
$l .= DIRECTORY_SEPARATOR.basename( $_obfuscate_VgKtFeg );
$_obfuscate_Yw322pIh0pFZBmQekHzBWQL9g = $_obfuscate_TU795w->pathcorrection( $l );
if ( $l == $_obfuscate_Yw322pIh0pFZBmQekHzBWQL9g )
{
if ( is_dir( $l ) || !mkdir( $l, @CHMOD ) )
{
@chmod( $l, @CHMOD );
}
}
else
{
$_obfuscate_iDbA7Hcl2z3Q2MM = TRUE;
break;
}
}
}
}
if ( !$_obfuscate_iDbA7Hcl2z3Q2MM && is_dir( $l ) )
{
$_obfuscate__fN2syLJbDrV = array( );
$_obfuscate_0ojU = explode( "&", $URL_QUERY );
foreach ( $_obfuscate_0ojU as $_obfuscate_VgKtFeg )
{
$_obfuscate_juwe = explode( "=", $_obfuscate_VgKtFeg, 2 );
if ( count( $_obfuscate_juwe ) == 2 )
{
$_obfuscate__fN2syLJbDrV[] = "{$_obfuscate_juwe[0]}=".rawurlencode( $_obfuscate_juwe[1] );
}
}
$_obfuscate__fN2syLJbDrV = implode( "&", $_obfuscate__fN2syLJbDrV );
if ( mb_strpos( $URL_QUERY, "/" ) === false )
{
$_obfuscate_pp9pYw = $l.DIRECTORY_SEPARATOR;
if ( mb_strlen( $_obfuscate__fN2syLJbDrV."index.html" ) <= 200 )
{
if ( !empty( $URL_QUERY ) && trim( $_obfuscate__fN2syLJbDrV ) != "" )
{
$_obfuscate_JTe7jJ4eGW8 = $_obfuscate_TU795w->pathcorrection( $_obfuscate_pp9pYw.$_obfuscate__fN2syLJbDrV."index.html" );
if ( $_obfuscate_YBY = @fopen( $_obfuscate_JTe7jJ4eGW8, "w" ) )
{
@fclose( $_obfuscate_YBY );
@chmod( $_obfuscate_JTe7jJ4eGW8, @CHMOD_FILE );
}
}
$_obfuscate_JTe7jJ4eGW8 = $_obfuscate_TU795w->pathcorrection( $_obfuscate_pp9pYw.$URL_QUERY."index.html" );
if ( $_obfuscate_YBY = @fopen( $_obfuscate_JTe7jJ4eGW8, "w" ) )
{
if ( @flock( @$_obfuscate_YBY, @LOCK_EX ) )
{
fwrite( $_obfuscate_YBY, $_obfuscate_arOtZ_eDMd4PitTm );
@flock( @$_obfuscate_YBY, @LOCK_UN );
}
@fclose( $_obfuscate_YBY );
@chmod( $_obfuscate_JTe7jJ4eGW8, @CHMOD_FILE );
}
}
}
}
}
}
echo $_obfuscate_arOtZ_eDMd4PitTm;
}
ob_start( );
if ( $_obfuscate_osuAaSk->usersessionvalid( ) && ( !defined( "ALLOW_PANEL" ) || ALLOW_PANEL || isset( $_SESSION['HOSTCMS_SHOW_XML'] ) && $_SESSION['HOSTCMS_SHOW_XML'] ) && empty( $_obfuscate_CkqRBASwTWxNIw ) )
{
if ( $_obfuscate_VjwVmUA8tDAL6mE )
{
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" ) && $_obfuscate_Oy0_d5TD->allowshowpanel( ) )
{
$_obfuscate_5nfe = "/admin/structure/structure.php?admin_forms_id=82&operation=edit_node&check_0_".CURRENT_STRUCTURE_ID."=1";
echo "<a href=\"";
echo $_obfuscate_5nfe;
echo "\" onclick=\"ShowEditWindow('";
echo $MSG_kernel['structure_edit'];
echo "', '";
echo $_obfuscate_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> ";
$_obfuscate_jzgDI1jvtug =& singleton( "Structure" );
if ( $_obfuscate_aXj2RtsIN00eGmtuNA = $_obfuscate_jzgDI1jvtug->getstructureitem( CURRENT_STRUCTURE_ID ) )
{
if ( 0 < $_obfuscate_aXj2RtsIN00eGmtuNA['templates_id'] )
{
$_obfuscate_ = $_obfuscate_aXj2RtsIN00eGmtuNA['templates_id'];
}
else
{
$_obfuscate_RZku1IgcQvbm =& singleton( "documents" );
$_obfuscate_vJhJxPF4bhJhmFzXpoa7l4eFRcY = $_obfuscate_RZku1IgcQvbm->getcurrentdocumentversion( $_obfuscate_aXj2RtsIN00eGmtuNA['documents_id'] );
if ( $_obfuscate_vJhJxPF4bhJhmFzXpoa7l4eFRcY )
{
$_obfuscate_ = $_obfuscate_vJhJxPF4bhJhmFzXpoa7l4eFRcY['templates_id'];
}
else
{
$_obfuscate_ = 0;
}
}
if ( $_obfuscate_ )
{
$_obfuscate_5nfe = "/admin/templates/templates/templates.php?admin_forms_id=6&operation=edit_template&check_1_".$_obfuscate_."=1";
echo "<a href=\"";
echo $_obfuscate_5nfe;
echo "\" onclick=\"ShowEditWindow('";
echo $MSG_kernel['template_edit'];
echo "', '";
echo $_obfuscate_5nfe;
echo "', 'template_";
echo $_obfuscate_;
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> ";
}
if ( 0 < $_obfuscate_aXj2RtsIN00eGmtuNA['data_templates_id'] )
{
$_obfuscate_5nfe = "/admin/templates/data_templates/data_templates.php?admin_forms_id=5&operation=edit_data_template&check_1_".$_obfuscate_aXj2RtsIN00eGmtuNA['data_templates_id']."=1";
echo "<a href=\"";
echo $_obfuscate_5nfe;
echo "\" onclick=\"ShowEditWindow('";
echo $MSG_kernel['data_template_edit'];
echo "', '";
echo $_obfuscate_5nfe;
echo "', 'template_";
echo $_obfuscate_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> ";
}
if ( $_obfuscate_aXj2RtsIN00eGmtuNA['structure_type'] == 0 )
{
$_obfuscate_5nfe = "/admin/documents/documents.php?admin_forms_id=9&operation=edit_document&check_1_".$_obfuscate_aXj2RtsIN00eGmtuNA['documents_id']."=1";
echo "<a href=\"";
echo $_obfuscate_5nfe;
echo "\" onclick=\"ShowEditWindow('";
echo $MSG_kernel['document_edit'];
echo "', '";
echo $_obfuscate_5nfe;
echo "', 'document_";
echo $_obfuscate_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> ";
}
if ( class_exists( "InformationSystem" ) )
{
$_obfuscate_9vegn2T2Hmjvkdw7TIUNI = new informationsystem( );
if ( $_obfuscate_HIfty5I8VlnytKbrd0U = $_obfuscate_9vegn2T2Hmjvkdw7TIUNI->getinformationsystembystructureid( CURRENT_STRUCTURE_ID ) )
{
$_obfuscate_5nfe = "/admin/InformationSystems/InformationSystems.php?admin_forms_id=11&operation=edit_information_system&check_1_".$_obfuscate_HIfty5I8VlnytKbrd0U."=1";
echo "<a href=\"";
echo $_obfuscate_5nfe;
echo "\" onclick=\"ShowEditWindow('";
echo $MSG_kernel['information_system_edit'];
echo "', '";
echo $_obfuscate_5nfe;
echo "', 'information_system_";
echo $_obfuscate_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> ";
}
}
if ( class_exists( "shop" ) )
{
$_obfuscate_iDyctQ = new shop( );
if ( $_obfuscate_CtvBJrM8LQ = $_obfuscate_iDyctQ->getshopwhithstructureid( CURRENT_STRUCTURE_ID, CURRENT_SITE ) )
{
$_obfuscate_5nfe = "/admin/shop/shop.php?admin_forms_id=54&operation=edit_shop&check_1_".$_obfuscate_CtvBJrM8LQ['shop_shops_id']."=1";
echo "<a href=\"";
echo $_obfuscate_5nfe;
echo "\" onclick=\"ShowEditWindow('";
echo $MSG_kernel['shop_edit'];
echo "', '";
echo $_obfuscate_5nfe;
echo "', 'shop_";
echo $_obfuscate_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> ";
}
}
}
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'] ) )
{
$_obfuscate_RQlRcP3pGL0 = "xsl.gif";
$_obfuscate_obqvew = $MSG_kernel['hide_xml'];
$_obfuscate_IO8hYI15 = "?hostcms_action=HIDE_XML";
}
else
{
$_obfuscate_RQlRcP3pGL0 = "xsl.gif";
$_obfuscate_obqvew = $MSG_kernel['show_xml'];
$_obfuscate_IO8hYI15 = "?hostcms_action=SHOW_XML";
}
echo "<a href=\"";
echo $_obfuscate_IO8hYI15;
echo "\" title=\"";
echo $_obfuscate_obqvew;
echo "\"><img src=\"/hostcmsfiles/images/";
echo $_obfuscate_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>
";
$_obfuscate_5_RF = $_obfuscate_Oy0_d5TD->getcurrentlng( );
$_obfuscate_o4_4PtANwFB4 = $_obfuscate_Oy0_d5TD->getversiontimestamp( );
$_obfuscate_Oy0_d5TD->addjs( "/admin/js/lng/".$_obfuscate_5_RF."/{$_obfuscate_5_RF}.js" );
$_obfuscate_1aQH = $_obfuscate_Oy0_d5TD->getalljs( );
if ( is_array( $_obfuscate_1aQH ) && 0 < count( $_obfuscate_1aQH ) )
{
foreach ( $_obfuscate_1aQH as $_obfuscate_2IwOvlE )
{
echo "<script type=\"text/javascript\" src=\"";
echo $_obfuscate_2IwOvlE."?".$_obfuscate_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 ( $_obfuscate_osuAaSk->usersessionvalid( ) )
{
$_obfuscate_SGk_5H5uyuYCQw = new user_access( );
$_obfuscate_z286Vllsoa4 = $_obfuscate_SGk_5H5uyuYCQw->getuserbyname( $_SESSION['valid_user'] );
if ( $_obfuscate_z286Vllsoa4 )
{
$_obfuscate_6VwVQ3qlDSlXVm3Mn8o = $_obfuscate_SGk_5H5uyuYCQw->getusertype( $_obfuscate_z286Vllsoa4['users_type_id'] );
$_obfuscate_Tqh_vFM9LF5UxowI1iCAC1_yaQ = $_obfuscate_6VwVQ3qlDSlXVm3Mn8o['users_type_root_dir'];
}
else
{
$_obfuscate_Tqh_vFM9LF5UxowI1iCAC1_yaQ = "";
}
echo " var FM = new FM('";
echo htmlspecialchars( $_obfuscate_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>";
}
$_obfuscate_FiEx145NuQ = $_obfuscate_Oy0_d5TD->getmicrotime( );
$_obfuscate_c6UELg = $_obfuscate_FiEx145NuQ - $BeginTime;
echo " <div id=\"div_hostcms_debug\">
<div id=\"subdiv\">
";
echo sprintf( $MSG_kernel['total_time'], $_obfuscate_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 $_obfuscate_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 ) )
{
$_obfuscate_gTqe_BXhMWc =& singleton( "DataBase" );
$_obfuscate_goDugQ = array( );
$_obfuscate_7w = 0;
foreach ( $HOSTCMS_SQL_LOG as $_obfuscate_qGJ7FNoYNA )
{
$_obfuscate_4zURVL8Y = crc32( $_obfuscate_qGJ7FNoYNA['trimquery'] );
if ( in_array( $_obfuscate_4zURVL8Y, $_obfuscate_goDugQ ) )
{
$_obfuscate_3bfDHedrrD2M4Q = "sql_qd";
}
else
{
$_obfuscate_3bfDHedrrD2M4Q = "sql_q";
}
$_obfuscate_goDugQ[] = $_obfuscate_4zURVL8Y;
echo "<div class=\"";
echo $_obfuscate_3bfDHedrrD2M4Q;
echo "\">";
echo $_obfuscate_gTqe_BXhMWc->highlightsql( htmlspecialchars( $_obfuscate_qGJ7FNoYNA['query'] ) );
echo "</div><div class=\"sql_db\" id=\"sql_h";
echo $_obfuscate_7w;
echo "\">";
if ( isset( $_obfuscate_qGJ7FNoYNA['debug_backtrace'] ) && 0 < count( $_obfuscate_qGJ7FNoYNA['debug_backtrace'] ) )
{
foreach ( $_obfuscate_qGJ7FNoYNA['debug_backtrace'] as $_obfuscate_VLgs_0Yy1g )
{
echo to_str( $_obfuscate_VLgs_0Yy1g['file'] );
echo ", ";
echo to_str( $_obfuscate_VLgs_0Yy1g['line'] );
echo "
";
}
}
echo "</div><div class=\"sql_t\">";
if ( isset( $_obfuscate_qGJ7FNoYNA['explain'] ) && 0 < count( $_obfuscate_qGJ7FNoYNA['explain'] ) )
{
echo "Explain:<br />
<table class=\"sql_explain\"><tr>";
foreach ( $_obfuscate_qGJ7FNoYNA['explain'][0] as $_obfuscate_ErtiyQFp_X1Xz00 => $_obfuscate_XBiwS7KLuDeZCVc )
{
echo "<td><b>";
echo $_obfuscate_ErtiyQFp_X1Xz00;
echo "</b></td>";
}
echo "</tr>";
foreach ( $_obfuscate_qGJ7FNoYNA['explain'] as $_obfuscate_XBiwS7KLuDeZCVc )
{
echo "<tr>";
foreach ( $_obfuscate_XBiwS7KLuDeZCVc as $_obfuscate_sN8OfJvKDVgoQw5RTBtW => $_obfuscate_7gFvho1YyWWG2QJRnseZPu4 )
{
if ( $_obfuscate_sN8OfJvKDVgoQw5RTBtW == "type" )
{
switch ( mb_strtolower( $_obfuscate_7gFvho1YyWWG2QJRnseZPu4 ) )
{
case "system" :
$_obfuscate_E7LJsMo = "#008000";
break;
case "const" :
$_obfuscate_E7LJsMo = "#008000";
break;
case "eq_ref" :
$_obfuscate_E7LJsMo = "#D9E700";
break;
case "ref" :
$_obfuscate_E7LJsMo = "#E7B300";
break;
case "range" :
$_obfuscate_E7LJsMo = "#E78200";
break;
case "index" :
$_obfuscate_E7LJsMo = "#E76200";
break;
case "all" :
$_obfuscate_E7LJsMo = "#E70B00";
break;
default :
$_obfuscate_E7LJsMo = "#777777";
}
$_obfuscate_bLTOzyihvN7ou4Se2w = " style=\"color: ".$_obfuscate_E7LJsMo."\"";
}
else
{
$_obfuscate_bLTOzyihvN7ou4Se2w = "";
}
echo "<td";
echo $_obfuscate_bLTOzyihvN7ou4Se2w;
echo ">";
echo str_replace( ",", ", ", $_obfuscate_7gFvho1YyWWG2QJRnseZPu4 );
echo "</td>";
}
echo "</tr>";
}
echo "</table>";
}
echo ": ";
echo round( $_obfuscate_qGJ7FNoYNA['time'], 4 );
echo " . <a onclick=\"ShowHide('sql_h";
echo $_obfuscate_7w;
echo "')\" style=\"cursor:pointer\"></a></div>";
++$_obfuscate_7w;
}
unset( $ );
}
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 ( $_obfuscate_VjwVmUA8tDAL6mE && ( !$_obfuscate_osuAaSk->usersessionvalid( ) || !defined( "ALLOW_PANEL" ) || ALLOW_PANEL || defined( "INTEGRATION" ) && INTEGRATION == 0 && to_str( $_SERVER['REQUEST_URI'] ) == "/" && isset( $_obfuscate_3Kv84_rGRuAIZzZoF9LUsQ ) ) )
{
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>
";
}
$_obfuscate_arOtZ_eDMd4PitTm = ob_get_clean( );
if ( mb_strtoupper( SITE_CODING ) != "UTF-8" )
{
$_obfuscate_arOtZ_eDMd4PitTm = @iconv( "UTF-8", @SITE_CODING."//IGNORE//TRANSLIT", $_obfuscate_arOtZ_eDMd4PitTm );
}
echo $_obfuscate_arOtZ_eDMd4PitTm;
if ( defined( "COMPRESSION_BEGIN" ) )
{
$_obfuscate_ZJqpSKw5W50vY =& singleton( "compression" );
$_obfuscate_ZJqpSKw5W50vY->pagecompressionend( );
}
session_write_close( );
exit( );
}
list( $usec, $sec ) = explode( " ", microtime( ) );
$BeginTime = ( double ) + ( double );
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 );
$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'] ) )
{
$_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>\" \" → \"\"</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'] ) )
{
$URL_QUERY = $url['query'];
if ( !$is_utf8 && function_exists( "mb_parse_str" ) )
{
mb_parse_str( $url['query'], $_GET );
$_REQUEST = $_GET + $_REQUEST;
}
}
else
{
$URL_QUERY = "";
}
$last_slash = mb_strrpos( $url['path'], "/" );
if ( defined( "OPTIONAL_LAST_SLASH" ) && OPTIONAL_LAST_SLASH )
{
$URL_ARRAY = explode( "/", mb_substr( $url_path, 1 ) );
}
else
{
$URL_ARRAY = explode( "/", mb_substr( $url_path, 1, $last_slash ) );
}
$count = count( $URL_ARRAY );
$last_str = mb_substr( $url_path, $last_slash );
$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" ) )
{
$URL_ARRAY[0] = "/";
}
$SYSTEM_URL_ARRAY = $URL_ARRAY;
$param = $URL_ARRAY;
$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\">\" \" → \"\"</a></b>. <b>\"\"</b> . <b>\"\"</b> → <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( &$_POST, SITE_CODING, "UTF-8" );
convert_array( &$_REQUEST, SITE_CODING, "UTF-8" );
convert_array( &$_COOKIES, SITE_CODING, "UTF-8" );
convert_array( &$_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 ) )
{
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 )
{
header( "HTTP/1.0 503 Service Unavailable" );
header( "Content-type: text/html; charset=UTF-8" );
exit_index( $SYSTEM_URL_ARRAY, " !", "! !<p> <b>\" \" → \" \"</b>. <br /><b>\" \"</b> \"<b>/</b>\"." );
}
}
}
else
{
header( "HTTP/1.1 301 Moved Permanently" );
header( "Location: ".$url_path."/" );
$structure_id = false;
exit( );
}
}
$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>\" \" → \" \"</b>. \" \" → \" \"." );
}
$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" )
{
$_SESSION['HOSTCMS_SHOW_XML'] = true;
}
else
{
$_SESSION['HOSTCMS_SHOW_XML'] = false;
}
}
if ( isset( $_REQUEST['show_xml'] ) )
{
$_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" );
$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>\" \" → \" \"</b>.
<b>\" \" → \" \".</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>, , !" );
}
$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
<?php
/**
*
* @ IonCube v6 Decoder By DoraemonPT
*
* @ Version : 1,0,0,0
* @ Author : DoraemonPT
* @ Release on : 19-08-2013
* @ Website : http://easytoyou.eu
*
**/
function showheader404( )
{
if ( function_exists( "apache_lookup_uri" ) )
{
header( "http/1.0 404 Not Found" );
}
else
{
header( "Status: 404 Not Found" );
}
}
function convert_array( &$_obfuscate_kIVhqJk, $_obfuscate_vholQ, $_obfuscate_ddk )
{
if ( is_array( $_obfuscate_kIVhqJk ) && 0 < count( $_obfuscate_kIVhqJk ) )
{
foreach ( $_obfuscate_kIVhqJk as $_obfuscate_Vwty => $_obfuscate_VgKtFeg )
{
if ( is_array( $_obfuscate_VgKtFeg ) )
{
$_obfuscate_kIVhqJk[$_obfuscate_Vwty] = @iconv( $_obfuscate_vholQ, @$_obfuscate_ddk."//IGNORE//TRANSLIT", $_obfuscate_VgKtFeg );
}
else
{
convert_array( $_obfuscate_kIVhqJk[$_obfuscate_Vwty], $_obfuscate_vholQ, $_obfuscate_ddk );
}
}
}
}
function exit_index( $_obfuscate_5VUWX855p0wrkJO3_4hIA = array( ), $_obfuscate_obqvew = "", $_obfuscate_CkqRBASwTWxNIw = "", $_obfuscate_VjwVmUA8tDAL6mE = true )
{
$_obfuscate_Oy0_d5TD =& singleton( "kernel" );
$_obfuscate_osuAaSk = new admin( );
if ( empty( $_obfuscate_CkqRBASwTWxNIw ) )
{
show_index_message( $_obfuscate_obqvew, $_obfuscate_CkqRBASwTWxNIw );
}
if ( defined( "OB_START" ) )
{
$_obfuscate_67eJCw =& singleton( "site" );
$_obfuscate_MfdtfgWBte8 = $_obfuscate_67eJCw->getsite( CURRENT_SITE );
$_obfuscate_arOtZ_eDMd4PitTm = ob_get_clean( );
if ( $_obfuscate_MfdtfgWBte8['site_safe_email'] && mb_strlen( $_obfuscate_arOtZ_eDMd4PitTm ) < 204800 )
{
function strip_nl( $_obfuscate_aNcpmA )
{
$_obfuscate_aNcpmA = str_replace( "\n", "", $_obfuscate_aNcpmA );
$_obfuscate_aNcpmA = str_replace( "\r", "", $_obfuscate_aNcpmA );
$_obfuscate_aNcpmA = str_replace( "'", "\\'", $_obfuscate_aNcpmA );
return $_obfuscate_aNcpmA;
}
function safe_email_callback( $_obfuscate_8UmnTppRcA )
{
ob_start( );
echo "<script type=\"text/javascript\">\r\n<!--\r\ndocument.write ('<a ";
echo strip_nl( $_obfuscate_8UmnTppRcA[1] );
echo " href=\"mailto:' + '";
echo strip_nl( $_obfuscate_8UmnTppRcA[2] );
echo "' + '@' + '";
echo strip_nl( $_obfuscate_8UmnTppRcA[3] );
echo "' + '.' + '";
echo strip_nl( $_obfuscate_8UmnTppRcA[4] );
echo "' + '\"";
echo strip_nl( $_obfuscate_8UmnTppRcA[5] );
echo ">' + '";
echo strip_nl( $_obfuscate_8UmnTppRcA[6] );
echo "' + '</a>');\r\n-->\r\n</script>";
return ob_get_clean( );
}
$_obfuscate_arOtZ_eDMd4PitTm = preg_replace_callback( "/<a\\s([^>]*)?href=['|\\\"]?mailto:([\\w+\\-\\.]+)@([\\w\\-\\.]+)\\.(\\w{2,4})[\\\"|']?([^>]*)?>(.*?)<\\/a>/is", "safe_email_callback", $_obfuscate_arOtZ_eDMd4PitTm );
}
if ( defined( "INTEGRATION" ) && INTEGRATION == 0 && to_str( $_SERVER['REQUEST_URI'] ) == "/" )
{
$_obfuscate_UzMs7giiRwkzU8QQ = $_obfuscate_arOtZ_eDMd4PitTm;
$_obfuscate_dcwitxb = array( "'<script[^>]*?>.*?</script>'siu", "'<noscript[^>]*?>.*?</noscript>'siu", "'<style[^>]*?>.*?</style>'siu", "'<select[^>]*?>.*?</select>'siu", "'<head[^>]*?>.*?</head>'siu", "'<!--.*?-->'siu" );
$_obfuscate_77tGbWOiZg = array( " ", " ", " ", " ", " ", " " );
$_obfuscate_UzMs7giiRwkzU8QQ = str_replace( "\n", " ", $_obfuscate_UzMs7giiRwkzU8QQ );
$_obfuscate_UzMs7giiRwkzU8QQ = str_replace( "\r", " ", $_obfuscate_UzMs7giiRwkzU8QQ );
$_obfuscate_UzMs7giiRwkzU8QQ = preg_replace( $_obfuscate_dcwitxb, $_obfuscate_77tGbWOiZg, $_obfuscate_UzMs7giiRwkzU8QQ );
$_obfuscate_06fY41AvMGm_0hBSzw = "(?<!nowrap)(?<!display)(?<!visible)";
$_obfuscate_CDNA = "'<a([^>]".$_obfuscate_06fY41AvMGm_0hBSzw.")*href=((\"http://(www.|)hostcms.ru(/|)\")|(http://(www.|)hostcms.ru(/|)))([^>]{$_obfuscate_06fY41AvMGm_0hBSzw})*>(.{3,})</a>'u";
$_obfuscate_ksF6RFJUckSG4lQ = array( );
$_obfuscate_0U2f4jYrJ436_A = preg_match_all( $_obfuscate_CDNA, $_obfuscate_UzMs7giiRwkzU8QQ, $_obfuscate_ksF6RFJUckSG4lQ );
if ( $_obfuscate_0U2f4jYrJ436_A == 0 )
{
$_obfuscate_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" )
{
$_obfuscate_arOtZ_eDMd4PitTm = @iconv( "UTF-8", @SITE_CODING."//IGNORE//TRANSLIT", $_obfuscate_arOtZ_eDMd4PitTm );
}
function agree_with_rule( $_obfuscate_4gPoSIpYQfDs, $_obfuscate_5VUWX855p0wrkJO3_4hIA )
{
$_obfuscate_4KF9d_nqGRhqEt9O = array( );
$_obfuscate_4gPoSIpYQfDs = trim( $_obfuscate_4gPoSIpYQfDs );
if ( 0 < mb_strlen( $_obfuscate_4gPoSIpYQfDs ) )
{
$_obfuscate_4gPoSIpYQfDs = str_replace( "\r", "", $_obfuscate_4gPoSIpYQfDs );
$_obfuscate_4KF9d_nqGRhqEt9O = explode( "\n", $_obfuscate_4gPoSIpYQfDs );
}
$_obfuscate_CwRG0R0 = false;
$_obfuscate_hhyZMPkRYAbyxwuoel5asaAx = mb_strlen( $_SERVER['REQUEST_URI'] );
foreach ( $_obfuscate_4KF9d_nqGRhqEt9O as $_obfuscate_6mlyHg )
{
$_obfuscate_D4Asu1mTBTJfksk = mb_strlen( $_obfuscate_6mlyHg );
if ( 1 < $_obfuscate_D4Asu1mTBTJfksk && mb_substr( $_obfuscate_6mlyHg, $_obfuscate_D4Asu1mTBTJfksk - 1, 1 ) == "*" )
{
$_obfuscate_I0yrw = true;
$_obfuscate_6mlyHg = mb_substr( $_obfuscate_6mlyHg, 0, $_obfuscate_D4Asu1mTBTJfksk - 1 );
}
else
{
$_obfuscate_I0yrw = false;
}
if ( !( mb_strpos( $_SERVER['REQUEST_URI'], $_obfuscate_6mlyHg ) === 0 ) || !( $_obfuscate_D4Asu1mTBTJfksk == $_obfuscate_hhyZMPkRYAbyxwuoel5asaAx ) && !$_obfuscate_I0yrw )
{
$_obfuscate_CwRG0R0 = true;
break;
}
}
return $_obfuscate_CwRG0R0;
}
if ( $_obfuscate_MfdtfgWBte8['site_html_cache_use'] == 1 && class_exists( "Cache" ) && isset( $_obfuscate_MfdtfgWBte8['site_html_cache_clear_probability'] ) && 0 < $_obfuscate_MfdtfgWBte8['site_html_cache_clear_probability'] )
{
$_obfuscate_RrCtNA = rand( 0, $_obfuscate_MfdtfgWBte8['site_html_cache_clear_probability'] );
if ( $_obfuscate_RrCtNA == 0 )
{
$_obfuscate_6G2SbJY =& singleton( "Cache" );
$_obfuscate_6G2SbJY->clearstaticcache( $_obfuscate_MfdtfgWBte8['site_id'] );
}
}
if ( $_obfuscate_MfdtfgWBte8['site_html_cache_use'] == 1 && ( isset( $_SESSION['site_user_id'] ) && !$_obfuscate_osuAaSk->usersessionvalid( ) && empty( $_SESSION['SCART'] ) ) && count( $_POST ) == 0 && empty( $_COOKIE['CART'] ) && class_exists( "Cache" ) && 0 < mb_strlen( $_obfuscate_arOtZ_eDMd4PitTm ) )
{
$_obfuscate_ksOiryehaH34CRzadonuxZbDoqI = agree_with_rule( $_obfuscate_MfdtfgWBte8['site_html_cache_with'], $_obfuscate_5VUWX855p0wrkJO3_4hIA );
$_obfuscate_K81C7a1lMRWruqiXxM6g0yNQuCdeDE = agree_with_rule( $_obfuscate_MfdtfgWBte8['site_html_cache_without'], $_obfuscate_5VUWX855p0wrkJO3_4hIA );
if ( $_obfuscate_ksOiryehaH34CRzadonuxZbDoqI && !$_obfuscate_K81C7a1lMRWruqiXxM6g0yNQuCdeDE )
{
$_obfuscate_W9VrWfMNk5k = explode( ":", $_SERVER['HTTP_HOST'] );
$_obfuscate_yTDviRDH = mb_strtolower( $_obfuscate_W9VrWfMNk5k[0] );
$_obfuscate_TU795w = new file( );
$l = CMS_FOLDER."cache_html".DIRECTORY_SEPARATOR.$_obfuscate_yTDviRDH;
$l = $_obfuscate_TU795w->pathcorrection( $l );
if ( !is_dir( $l ) && mkdir( $l, @CHMOD, @TRUE ) )
{
@chmod( $l, @CHMOD );
}
$_obfuscate_iDbA7Hcl2z3Q2MM = FALSE;
if ( empty( $_obfuscate_5VUWX855p0wrkJO3_4hIA ) )
{
foreach ( $_obfuscate_5VUWX855p0wrkJO3_4hIA as $_obfuscate_Vwty => $_obfuscate_VgKtFeg )
{
if ( trim( $_obfuscate_VgKtFeg ) == "" )
{
$_obfuscate_iDbA7Hcl2z3Q2MM = TRUE;
}
else
{
$l .= DIRECTORY_SEPARATOR.basename( $_obfuscate_VgKtFeg );
$_obfuscate_Yw322pIh0pFZBmQekHzBWQL9g = $_obfuscate_TU795w->pathcorrection( $l );
if ( $l == $_obfuscate_Yw322pIh0pFZBmQekHzBWQL9g )
{
if ( is_dir( $l ) || !mkdir( $l, @CHMOD ) )
{
@chmod( $l, @CHMOD );
}
}
else
{
$_obfuscate_iDbA7Hcl2z3Q2MM = TRUE;
break;
}
}
}
}
if ( !$_obfuscate_iDbA7Hcl2z3Q2MM && is_dir( $l ) )
{
$_obfuscate__fN2syLJbDrV = array( );
$_obfuscate_0ojU = explode( "&", $URL_QUERY );
foreach ( $_obfuscate_0ojU as $_obfuscate_VgKtFeg )
{
$_obfuscate_juwe = explode( "=", $_obfuscate_VgKtFeg, 2 );
if ( count( $_obfuscate_juwe ) == 2 )
{
$_obfuscate__fN2syLJbDrV[] = "{$_obfuscate_juwe[0]}=".rawurlencode( $_obfuscate_juwe[1] );
}
}
$_obfuscate__fN2syLJbDrV = implode( "&", $_obfuscate__fN2syLJbDrV );
if ( mb_strpos( $URL_QUERY, "/" ) === false )
{
$_obfuscate_pp9pYw = $l.DIRECTORY_SEPARATOR;
if ( mb_strlen( $_obfuscate__fN2syLJbDrV."index.html" ) <= 200 )
{
if ( !empty( $URL_QUERY ) && trim( $_obfuscate__fN2syLJbDrV ) != "" )
{
$_obfuscate_JTe7jJ4eGW8 = $_obfuscate_TU795w->pathcorrection( $_obfuscate_pp9pYw.$_obfuscate__fN2syLJbDrV."index.html" );
if ( $_obfuscate_YBY = @fopen( $_obfuscate_JTe7jJ4eGW8, "w" ) )
{
@fclose( $_obfuscate_YBY );
@chmod( $_obfuscate_JTe7jJ4eGW8, @CHMOD_FILE );
}
}
$_obfuscate_JTe7jJ4eGW8 = $_obfuscate_TU795w->pathcorrection( $_obfuscate_pp9pYw.$URL_QUERY."index.html" );
if ( $_obfuscate_YBY = @fopen( $_obfuscate_JTe7jJ4eGW8, "w" ) )
{
if ( @flock( @$_obfuscate_YBY, @LOCK_EX ) )
{
fwrite( $_obfuscate_YBY, $_obfuscate_arOtZ_eDMd4PitTm );
@flock( @$_obfuscate_YBY, @LOCK_UN );
}
@fclose( $_obfuscate_YBY );
@chmod( $_obfuscate_JTe7jJ4eGW8, @CHMOD_FILE );
}
}
}
}
}
}
echo $_obfuscate_arOtZ_eDMd4PitTm;
}
ob_start( );
if ( $_obfuscate_osuAaSk->usersessionvalid( ) && ( !defined( "ALLOW_PANEL" ) || ALLOW_PANEL || isset( $_SESSION['HOSTCMS_SHOW_XML'] ) && $_SESSION['HOSTCMS_SHOW_XML'] ) && empty( $_obfuscate_CkqRBASwTWxNIw ) )
{
if ( $_obfuscate_VjwVmUA8tDAL6mE )
{
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" ) && $_obfuscate_Oy0_d5TD->allowshowpanel( ) )
{
$_obfuscate_5nfe = "/admin/structure/structure.php?admin_forms_id=82&operation=edit_node&check_0_".CURRENT_STRUCTURE_ID."=1";
echo "<a href=\"";
echo $_obfuscate_5nfe;
echo "\" onclick=\"ShowEditWindow('";
echo $MSG_kernel['structure_edit'];
echo "', '";
echo $_obfuscate_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> ";
$_obfuscate_jzgDI1jvtug =& singleton( "Structure" );
if ( $_obfuscate_aXj2RtsIN00eGmtuNA = $_obfuscate_jzgDI1jvtug->getstructureitem( CURRENT_STRUCTURE_ID ) )
{
if ( 0 < $_obfuscate_aXj2RtsIN00eGmtuNA['templates_id'] )
{
$_obfuscate_ = $_obfuscate_aXj2RtsIN00eGmtuNA['templates_id'];
}
else
{
$_obfuscate_RZku1IgcQvbm =& singleton( "documents" );
$_obfuscate_vJhJxPF4bhJhmFzXpoa7l4eFRcY = $_obfuscate_RZku1IgcQvbm->getcurrentdocumentversion( $_obfuscate_aXj2RtsIN00eGmtuNA['documents_id'] );
if ( $_obfuscate_vJhJxPF4bhJhmFzXpoa7l4eFRcY )
{
$_obfuscate_ = $_obfuscate_vJhJxPF4bhJhmFzXpoa7l4eFRcY['templates_id'];
}
else
{
$_obfuscate_ = 0;
}
}
if ( $_obfuscate_ )
{
$_obfuscate_5nfe = "/admin/templates/templates/templates.php?admin_forms_id=6&operation=edit_template&check_1_".$_obfuscate_."=1";
echo "<a href=\"";
echo $_obfuscate_5nfe;
echo "\" onclick=\"ShowEditWindow('";
echo $MSG_kernel['template_edit'];
echo "', '";
echo $_obfuscate_5nfe;
echo "', 'template_";
echo $_obfuscate_;
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> ";
}
if ( 0 < $_obfuscate_aXj2RtsIN00eGmtuNA['data_templates_id'] )
{
$_obfuscate_5nfe = "/admin/templates/data_templates/data_templates.php?admin_forms_id=5&operation=edit_data_template&check_1_".$_obfuscate_aXj2RtsIN00eGmtuNA['data_templates_id']."=1";
echo "<a href=\"";
echo $_obfuscate_5nfe;
echo "\" onclick=\"ShowEditWindow('";
echo $MSG_kernel['data_template_edit'];
echo "', '";
echo $_obfuscate_5nfe;
echo "', 'template_";
echo $_obfuscate_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> ";
}
if ( $_obfuscate_aXj2RtsIN00eGmtuNA['structure_type'] == 0 )
{
$_obfuscate_5nfe = "/admin/documents/documents.php?admin_forms_id=9&operation=edit_document&check_1_".$_obfuscate_aXj2RtsIN00eGmtuNA['documents_id']."=1";
echo "<a href=\"";
echo $_obfuscate_5nfe;
echo "\" onclick=\"ShowEditWindow('";
echo $MSG_kernel['document_edit'];
echo "', '";
echo $_obfuscate_5nfe;
echo "', 'document_";
echo $_obfuscate_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> ";
}
if ( class_exists( "InformationSystem" ) )
{
$_obfuscate_9vegn2T2Hmjvkdw7TIUNI = new informationsystem( );
if ( $_obfuscate_HIfty5I8VlnytKbrd0U = $_obfuscate_9vegn2T2Hmjvkdw7TIUNI->getinformationsystembystructureid( CURRENT_STRUCTURE_ID ) )
{
$_obfuscate_5nfe = "/admin/InformationSystems/InformationSystems.php?admin_forms_id=11&operation=edit_information_system&check_1_".$_obfuscate_HIfty5I8VlnytKbrd0U."=1";
echo "<a href=\"";
echo $_obfuscate_5nfe;
echo "\" onclick=\"ShowEditWindow('";
echo $MSG_kernel['information_system_edit'];
echo "', '";
echo $_obfuscate_5nfe;
echo "', 'information_system_";
echo $_obfuscate_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> ";
}
}
if ( class_exists( "shop" ) )
{
$_obfuscate_iDyctQ = new shop( );
if ( $_obfuscate_CtvBJrM8LQ = $_obfuscate_iDyctQ->getshopwhithstructureid( CURRENT_STRUCTURE_ID, CURRENT_SITE ) )
{
$_obfuscate_5nfe = "/admin/shop/shop.php?admin_forms_id=54&operation=edit_shop&check_1_".$_obfuscate_CtvBJrM8LQ['shop_shops_id']."=1";
echo "<a href=\"";
echo $_obfuscate_5nfe;
echo "\" onclick=\"ShowEditWindow('";
echo $MSG_kernel['shop_edit'];
echo "', '";
echo $_obfuscate_5nfe;
echo "', 'shop_";
echo $_obfuscate_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> ";
}
}
}
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'] ) )
{
$_obfuscate_RQlRcP3pGL0 = "xsl.gif";
$_obfuscate_obqvew = $MSG_kernel['hide_xml'];
$_obfuscate_IO8hYI15 = "?hostcms_action=HIDE_XML";
}
else
{
$_obfuscate_RQlRcP3pGL0 = "xsl.gif";
$_obfuscate_obqvew = $MSG_kernel['show_xml'];
$_obfuscate_IO8hYI15 = "?hostcms_action=SHOW_XML";
}
echo "<a href=\"";
echo $_obfuscate_IO8hYI15;
echo "\" title=\"";
echo $_obfuscate_obqvew;
echo "\"><img src=\"/hostcmsfiles/images/";
echo $_obfuscate_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";
$_obfuscate_5_RF = $_obfuscate_Oy0_d5TD->getcurrentlng( );
$_obfuscate_o4_4PtANwFB4 = $_obfuscate_Oy0_d5TD->getversiontimestamp( );
$_obfuscate_Oy0_d5TD->addjs( "/admin/js/lng/".$_obfuscate_5_RF."/{$_obfuscate_5_RF}.js" );
$_obfuscate_1aQH = $_obfuscate_Oy0_d5TD->getalljs( );
if ( is_array( $_obfuscate_1aQH ) && 0 < count( $_obfuscate_1aQH ) )
{
foreach ( $_obfuscate_1aQH as $_obfuscate_2IwOvlE )
{
echo "<script type=\"text/javascript\" src=\"";
echo $_obfuscate_2IwOvlE."?".$_obfuscate_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 ( $_obfuscate_osuAaSk->usersessionvalid( ) )
{
$_obfuscate_SGk_5H5uyuYCQw = new user_access( );
$_obfuscate_z286Vllsoa4 = $_obfuscate_SGk_5H5uyuYCQw->getuserbyname( $_SESSION['valid_user'] );
if ( $_obfuscate_z286Vllsoa4 )
{
$_obfuscate_6VwVQ3qlDSlXVm3Mn8o = $_obfuscate_SGk_5H5uyuYCQw->getusertype( $_obfuscate_z286Vllsoa4['users_type_id'] );
$_obfuscate_Tqh_vFM9LF5UxowI1iCAC1_yaQ = $_obfuscate_6VwVQ3qlDSlXVm3Mn8o['users_type_root_dir'];
}
else
{
$_obfuscate_Tqh_vFM9LF5UxowI1iCAC1_yaQ = "";
}
echo "\t\tvar FM = new FM('";
echo htmlspecialchars( $_obfuscate_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>";
}
$_obfuscate_FiEx145NuQ = $_obfuscate_Oy0_d5TD->getmicrotime( );
$_obfuscate_c6UELg = $_obfuscate_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'], $_obfuscate_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 $_obfuscate_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 ) )
{
$_obfuscate_gTqe_BXhMWc =& singleton( "DataBase" );
$_obfuscate_goDugQ = array( );
$_obfuscate_7w = 0;
foreach ( $HOSTCMS_SQL_LOG as $_obfuscate_qGJ7FNoYNA )
{
$_obfuscate_4zURVL8Y = crc32( $_obfuscate_qGJ7FNoYNA['trimquery'] );
if ( in_array( $_obfuscate_4zURVL8Y, $_obfuscate_goDugQ ) )
{
$_obfuscate_3bfDHedrrD2M4Q = "sql_qd";
}
else
{
$_obfuscate_3bfDHedrrD2M4Q = "sql_q";
}
$_obfuscate_goDugQ[] = $_obfuscate_4zURVL8Y;
echo "<div class=\"";
echo $_obfuscate_3bfDHedrrD2M4Q;
echo "\">";
echo $_obfuscate_gTqe_BXhMWc->highlightsql( htmlspecialchars( $_obfuscate_qGJ7FNoYNA['query'] ) );
echo "</div><div class=\"sql_db\" id=\"sql_h";
echo $_obfuscate_7w;
echo "\">";
if ( isset( $_obfuscate_qGJ7FNoYNA['debug_backtrace'] ) && 0 < count( $_obfuscate_qGJ7FNoYNA['debug_backtrace'] ) )
{
foreach ( $_obfuscate_qGJ7FNoYNA['debug_backtrace'] as $_obfuscate_VLgs_0Yy1g )
{
echo to_str( $_obfuscate_VLgs_0Yy1g['file'] );
echo ", ";
echo to_str( $_obfuscate_VLgs_0Yy1g['line'] );
echo "\n";
}
}
echo "</div><div class=\"sql_t\">";
if ( isset( $_obfuscate_qGJ7FNoYNA['explain'] ) && 0 < count( $_obfuscate_qGJ7FNoYNA['explain'] ) )
{
echo "Explain:<br />\r\n\t\t\t\t\t\t<table class=\"sql_explain\"><tr>";
foreach ( $_obfuscate_qGJ7FNoYNA['explain'][0] as $_obfuscate_ErtiyQFp_X1Xz00 => $_obfuscate_XBiwS7KLuDeZCVc )
{
echo "<td><b>";
echo $_obfuscate_ErtiyQFp_X1Xz00;
echo "</b></td>";
}
echo "</tr>";
foreach ( $_obfuscate_qGJ7FNoYNA['explain'] as $_obfuscate_XBiwS7KLuDeZCVc )
{
echo "<tr>";
foreach ( $_obfuscate_XBiwS7KLuDeZCVc as $_obfuscate_sN8OfJvKDVgoQw5RTBtW => $_obfuscate_7gFvho1YyWWG2QJRnseZPu4 )
{
if ( $_obfuscate_sN8OfJvKDVgoQw5RTBtW == "type" )
{
switch ( mb_strtolower( $_obfuscate_7gFvho1YyWWG2QJRnseZPu4 ) )
{
case "system" :
$_obfuscate_E7LJsMo = "#008000";
break;
case "const" :
$_obfuscate_E7LJsMo = "#008000";
break;
case "eq_ref" :
$_obfuscate_E7LJsMo = "#D9E700";
break;
case "ref" :
$_obfuscate_E7LJsMo = "#E7B300";
break;
case "range" :
$_obfuscate_E7LJsMo = "#E78200";
break;
case "index" :
$_obfuscate_E7LJsMo = "#E76200";
break;
case "all" :
$_obfuscate_E7LJsMo = "#E70B00";
break;
default :
$_obfuscate_E7LJsMo = "#777777";
}
$_obfuscate_bLTOzyihvN7ou4Se2w = " style=\"color: ".$_obfuscate_E7LJsMo."\"";
}
else
{
$_obfuscate_bLTOzyihvN7ou4Se2w = "";
}
echo "<td";
echo $_obfuscate_bLTOzyihvN7ou4Se2w;
echo ">";
echo str_replace( ",", ", ", $_obfuscate_7gFvho1YyWWG2QJRnseZPu4 );
echo "</td>";
}
echo "</tr>";
}
echo "</table>";
}
echo ": ";
echo round( $_obfuscate_qGJ7FNoYNA['time'], 4 );
echo " . <a onclick=\"ShowHide('sql_h";
echo $_obfuscate_7w;
echo "')\" style=\"cursor:pointer\"></a></div>";
++$_obfuscate_7w;
}
unset( $ );
}
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 ( $_obfuscate_VjwVmUA8tDAL6mE && ( !$_obfuscate_osuAaSk->usersessionvalid( ) || !defined( "ALLOW_PANEL" ) || ALLOW_PANEL || defined( "INTEGRATION" ) && INTEGRATION == 0 && to_str( $_SERVER['REQUEST_URI'] ) == "/" && isset( $_obfuscate_3Kv84_rGRuAIZzZoF9LUsQ ) ) )
{
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";
}
$_obfuscate_arOtZ_eDMd4PitTm = ob_get_clean( );
if ( mb_strtoupper( SITE_CODING ) != "UTF-8" )
{
$_obfuscate_arOtZ_eDMd4PitTm = @iconv( "UTF-8", @SITE_CODING."//IGNORE//TRANSLIT", $_obfuscate_arOtZ_eDMd4PitTm );
}
echo $_obfuscate_arOtZ_eDMd4PitTm;
if ( defined( "COMPRESSION_BEGIN" ) )
{
$_obfuscate_ZJqpSKw5W50vY =& singleton( "compression" );
$_obfuscate_ZJqpSKw5W50vY->pagecompressionend( );
}
session_write_close( );
exit( );
}
list( $usec, $sec ) = explode( " ", microtime( ) );
$BeginTime = ( double ) + ( double );
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 );
$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'] ) )
{
$_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>\" \" → \"\"</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'] ) )
{
$URL_QUERY = $url['query'];
if ( !$is_utf8 && function_exists( "mb_parse_str" ) )
{
mb_parse_str( $url['query'], $_GET );
$_REQUEST = $_GET + $_REQUEST;
}
}
else
{
$URL_QUERY = "";
}
$last_slash = mb_strrpos( $url['path'], "/" );
if ( defined( "OPTIONAL_LAST_SLASH" ) && OPTIONAL_LAST_SLASH )
{
$URL_ARRAY = explode( "/", mb_substr( $url_path, 1 ) );
}
else
{
$URL_ARRAY = explode( "/", mb_substr( $url_path, 1, $last_slash ) );
}
$count = count( $URL_ARRAY );
$last_str = mb_substr( $url_path, $last_slash );
$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" ) )
{
$URL_ARRAY[0] = "/";
}
$SYSTEM_URL_ARRAY = $URL_ARRAY;
$param = $URL_ARRAY;
$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\">\" \" → \"\"</a></b>. <b>\"\"</b> . <b>\"\"</b> → <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( &$_POST, SITE_CODING, "UTF-8" );
convert_array( &$_REQUEST, SITE_CODING, "UTF-8" );
convert_array( &$_COOKIES, SITE_CODING, "UTF-8" );
convert_array( &$_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 ) )
{
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 )
{
header( "HTTP/1.0 503 Service Unavailable" );
header( "Content-type: text/html; charset=UTF-8" );
exit_index( $SYSTEM_URL_ARRAY, " !", "! !<p> <b>\" \" → \" \"</b>. <br /><b>\" \"</b> \"<b>/</b>\"." );
}
}
}
else
{
header( "HTTP/1.1 301 Moved Permanently" );
header( "Location: ".$url_path."/" );
$structure_id = false;
exit( );
}
}
$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>\" \" → \" \"</b>. \" \" → \" \"." );
}
$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" )
{
$_SESSION['HOSTCMS_SHOW_XML'] = true;
}
else
{
$_SESSION['HOSTCMS_SHOW_XML'] = false;
}
}
if ( isset( $_REQUEST['show_xml'] ) )
{
$_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" );
$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>\" \" → \" \"</b>.\r\n\t\t <b>\" \" → \" \".</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>, , !" );
}
$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 |
Stats
MD5 | b3d1f9383fd481a657a4caff285380cf |
Eval Count | 0 |
Decode Time | 86 ms |