include('admin/inc/123456.php');
include('admin/inc/mysql.php');
include('admin/inc/functions.php');
if (isset($_GET['s'])) {$s=htmlspecialchars(strip_tags(trim($_GET['s'])),ENT_QUOTES);} else {$s='home';}
if (isset($_GET['id_news'])) {$id_news=htmlspecialchars(strip_tags(trim($_GET['id_news'])),ENT_QUOTES);} else {$id_news=0;}
$l='ru'; $lang0="";
$query_texts1=mysql_query("SELECT name".$lang0.",head".$lang0.",text".$lang0.",title".$lang0.",description".$lang0.",keywords".$lang0.",id,parent_id FROM `text` WHERE `link` = '$s' and `level` <> '-1' LIMIT 1",$dbcnx);
$arr_rez_texts1=array();
while ($rez_texts1=mysql_fetch_array($query_texts1, MYSQL_NUM))
{
$arr_rez_texts1[]=$rez_texts1;
}
$count_texts1=count($arr_rez_texts1);
if ($count_texts1==0)
{
@header("Location: ".$URL."");
}
else
{
$name_texts1=stripslashes($arr_rez_texts1[0][0]);
$head_texts1=stripslashes($arr_rez_texts1[0][1]);
$text_texts1=text_read($arr_rez_texts1[0][2], $URL);
$title_texts1=stripslashes($arr_rez_texts1[0][3]);
$description_texts1=stripslashes($arr_rez_texts1[0][4]);
$keywords_texts1=stripslashes($arr_rez_texts1[0][5]);
$id_texts1=$arr_rez_texts1[0][6];
$parent_texts1=$arr_rez_texts1[0][7];
}
$news_header_texts1='';
if (($s=='news') and ($id_news!=0))
{
$query_news3=mysql_query("SELECT date_format(datetime,'%d.%m.%Y') as datetime1,header".$lang0.",big".$lang0.",title".$lang0.",description".$lang0.",keywords".$lang0." FROM `news` WHERE `id`='$id_news' and `show`='1' LIMIT 1",$dbcnx);
$arr_rez_news3=array();
while ($rez_news3=mysql_fetch_array($query_news3, MYSQL_NUM))
{
$arr_rez_news3[]=$rez_news3;
}
$count_news3=count($arr_rez_news3);
if ($count_news3!=0)
{
$datetime_texts1=stripslashes($arr_rez_news3[0][0]);
$news_header_texts1=stripslashes($arr_rez_news3[0][1]);
$text_texts1=text_read($arr_rez_news3[0][2], $URL);
$title_texts1=stripslashes($arr_rez_news3[0][3]);
$description_texts1=stripslashes($arr_rez_news3[0][4]);
$keywords_texts1=stripslashes($arr_rez_news3[0][5]);
$parent_texts1=0;
}
}
if (isset($_GET['object'])) {$object=htmlspecialchars(strip_tags(trim($_GET['object'])),ENT_QUOTES);} else {$object='no';}
$query_opensite=mysql_query("SELECT value FROM `options` WHERE `id`='4' LIMIT 1",$dbcnx);
$rez_opensite=mysql_fetch_array($query_opensite, MYSQL_NUM);
$opensite=$rez_opensite[0];
$query_ipsite=mysql_query("SELECT value FROM `options` WHERE `id`='5' LIMIT 1",$dbcnx);
$rez_ipsite=mysql_fetch_array($query_ipsite, MYSQL_NUM);
$ipsite=$rez_ipsite[0];
if (($opensite=='0') and ($ipsite!=$_SERVER['REMOTE_ADDR'])) {echo "
Sorry, site is on a planned upgrade. Please check back later.
"; exit;}
?>
echo $title_texts1;?>
$query_topmenu1=mysql_query("SELECT id,name".$lang0.",link FROM `text` WHERE `menu`='1' ORDER BY `sort` ASC, `id` ASC ",$dbcnx);
$arr_rez_topmenu1=array();
while ($rez_topmenu1=mysql_fetch_array($query_topmenu1, MYSQL_NUM))
{
$arr_rez_topmenu1[]=$rez_topmenu1;
}
$count_topmenu1=count($arr_rez_topmenu1);
for ($i=0; $i<$count_topmenu1; $i++)
{
$top_menu_url=$URL."?s=".$arr_rez_topmenu1[$i][2];
if ($arr_rez_topmenu1[$i][2]=='home') $top_menu_url=$URL;
echo "".$arr_rez_topmenu1[$i][1]."";
if ($i+1!=$count_topmenu1) echo "";
}
?>
$query_area=mysql_query("SELECT text".$lang0." FROM `text` WHERE `id` = '27' LIMIT 1",$dbcnx);
$arr_rez_area=array();
while ($rez_area=mysql_fetch_array($query_area, MYSQL_NUM))
{
$arr_rez_area[]=$rez_area;
}
$count_area=count($arr_rez_area);
if ($count_area!=0)
{
$text_area=$arr_rez_area[0][0];
echo text_read($text_area, $URL);
}
?>
$query_area=mysql_query("SELECT text".$lang0." FROM `text` WHERE `id` = '28' LIMIT 1",$dbcnx);
$arr_rez_area=array();
while ($rez_area=mysql_fetch_array($query_area, MYSQL_NUM))
{
$arr_rez_area[]=$rez_area;
}
$count_area=count($arr_rez_area);
if ($count_area!=0)
{
$text_area=$arr_rez_area[0][0];
echo text_read($text_area, $URL);
}
?>
$query_area=mysql_query("SELECT text".$lang0." FROM `text` WHERE `id` = '16' LIMIT 1",$dbcnx);
$arr_rez_area=array();
while ($rez_area=mysql_fetch_array($query_area, MYSQL_NUM))
{
$arr_rez_area[]=$rez_area;
}
$count_area=count($arr_rez_area);
if ($count_area!=0)
{
$text_area=$arr_rez_area[0][0];
echo text_read($text_area, $URL);
}
?>
$query_leftmenu1=mysql_query("SELECT id,name".$lang0.",link,new FROM `text` WHERE `menu2`='1' ORDER BY `sort` ASC, `id` ASC ",$dbcnx);
$arr_rez_leftmenu1=array();
while ($rez_leftmenu1=mysql_fetch_array($query_leftmenu1, MYSQL_NUM))
{
$arr_rez_leftmenu1[]=$rez_leftmenu1;
}
$count_leftmenu1=count($arr_rez_leftmenu1);
for ($i=0; $i<$count_leftmenu1; $i++)
{
$left_menu_url=$URL."?s=".$arr_rez_leftmenu1[$i][2];
if ($arr_rez_leftmenu1[$i][2]=='home') $left_menu_url=$URL;
echo "
$query_kol_news_home=mysql_query("SELECT value FROM `options` WHERE `id`='8' LIMIT 1",$dbcnx);
$rez_kol_news_home=mysql_fetch_array($query_kol_news_home, MYSQL_NUM);
$query_news2=mysql_query("SELECT id,datetime,header".$lang0.",small".$lang0." FROM `news` WHERE `show".$lang0."`='1' ORDER BY `datetime` DESC LIMIT ".$rez_kol_news_home[0]." ",$dbcnx);
$arr_rez_news2=array();
while ($rez_news2=mysql_fetch_array($query_news2, MYSQL_NUM))
{
$arr_rez_news2[]=$rez_news2;
}
$count_news2=count($arr_rez_news2);
for ($i=0; $i<$count_news2; $i++)
{
$id_news2=$arr_rez_news2[$i][0];
$datetime_news2=$arr_rez_news2[$i][1];
$header_news2=$arr_rez_news2[$i][2];
$small_news2=strip_tags($arr_rez_news2[$i][3]);
?>
}
?>
} else { ?>
$query_leftmenu1=mysql_query("SELECT id,name".$lang0.",link,new FROM `text` WHERE `menu2`='1' ORDER BY `sort` ASC, `id` ASC ",$dbcnx);
$arr_rez_leftmenu1=array();
while ($rez_leftmenu1=mysql_fetch_array($query_leftmenu1, MYSQL_NUM))
{
$arr_rez_leftmenu1[]=$rez_leftmenu1;
}
$count_leftmenu1=count($arr_rez_leftmenu1);
for ($i=0; $i<$count_leftmenu1; $i++)
{
$left_menu_url=$URL."?s=".$arr_rez_leftmenu1[$i][2];
if ($arr_rez_leftmenu1[$i][2]=='home') $left_menu_url=$URL;
echo "
$query_kol_news_left=mysql_query("SELECT value FROM `options` WHERE `id`='8' LIMIT 1",$dbcnx);
$rez_kol_news_left=mysql_fetch_array($query_kol_news_left, MYSQL_NUM);
$query_news2=mysql_query("SELECT id,datetime,header".$lang0.",small".$lang0." FROM `news` WHERE `show".$lang0."`='1' ORDER BY `datetime` DESC LIMIT ".$rez_kol_news_left[0]." ",$dbcnx);
$arr_rez_news2=array();
while ($rez_news2=mysql_fetch_array($query_news2, MYSQL_NUM))
{
$arr_rez_news2[]=$rez_news2;
}
$count_news2=count($arr_rez_news2);
for ($i=0; $i<$count_news2; $i++)
{
$id_news2=$arr_rez_news2[$i][0];
$datetime_news2=$arr_rez_news2[$i][1];
$header_news2=$arr_rez_news2[$i][2];
$small_news2=strip_tags($arr_rez_news2[$i][3]);
?>
}
?>
$query_area=mysql_query("SELECT text".$lang0." FROM `text` WHERE `id` = '30' LIMIT 1",$dbcnx);
$arr_rez_area=array();
while ($rez_area=mysql_fetch_array($query_area, MYSQL_NUM))
{
$arr_rez_area[]=$rez_area;
}
$count_area=count($arr_rez_area);
if ($count_area!=0)
{
$text_area=$arr_rez_area[0][0];
echo text_read($text_area, $URL);
}
?>
if (($head_texts1!='') and ($id_news==0)) { ?>
} ?>
if ($id_news!=0) echo "
".$news_header_texts1."
";?>
if ($object!='no') echo "
".$object."
";?>
if ($s=='contacts') {include('inc/req_contacts.php'); echo $text_texts1;}
else {echo $text_texts1;}
if ($s=='search') {include('inc/req_search.php');}
else if (($s=='news') and ($id_news==0)) {include('inc/req_news.php');}
if (($s=='portfolio') or ($parent_texts1=='4')) {include('inc/req_portfolio.php');}
?>