'.$k[4].'';} if($k[7]){$top_img = $k[7];} if($k[2]) { for ($j = 0; $j < $s; $j++) { $l = explode("|", trim($f[$j])); if($l[0]) { if($k[0]==$l[1]) { if($point2==$l[3]) { $ptitle2 = $l[4]; $ptitle = ''.$ptitle1.' » '.$ptitle2; $main_point = $l[3]; if($l[5]){$menu .= '
'.$l[4].'
';} if($l[7]){$top_img = $l[7];} if($l[2]) { for ($z = 0; $z < $s; $z++) { $d = explode("|", trim($f[$z])); if($d[0]) { if($l[0]==$d[1]) { if($point3==$d[3]) { $ptitle3 = $d[4]; $ptitle = ''.$ptitle2.' » '.$ptitle3; $main_point = $d[3]; if($d[5]){$menu .= '
'.$d[4].'
';} if($d[7]){$top_img = $d[7];} }else{ if($d[5]){$menu .= '
'.$d[4].'
';} } } } } } }else{ if($l[5]){$menu .= '
'.$l[4].'
';} } } } } } $main = FALSE; }else{ if($k[5]){$menu .= ''.$k[4].'';} } } } } // =========================== Меню ============================================ // ============================================================================= if($lang=='en') { if($main_point) { $sql = new DB(); if ($main_point=='pereoborudovanie' or $main_point=='nedvizhimost_na_vode' or $main_point=='plavdachi' or $main_point=='maloe_sudostroenie') { if($point=='built') { $zpoint=4; }else{ $zpoint=3; } $rec = mysqli_fetch_array($sql->query('SELECT * FROM `r_text` WHERE r_name="'.$main_point.'" and linked="'.$zpoint.'";')); }else{ $rec = mysqli_fetch_array($sql->query('SELECT * FROM `r_text` WHERE r_name="'.$main_point.'";')); } $main_text = $rec['full_text']; if ($rec['fotos']==1) { $sql->query('SELECT * FROM `r_foto` WHERE rname="'.$main_point.'";'); if ($sql->num_rows()) { $main_text .= ''. ''. ''. '
Photos of object:

'. '
'; while ($rec2 = $sql->next_record()) { $main_text .= ''; } $main_text .= '
'. '
'; } if($point3) { $main_text .= '
« Back to the catalogue'; }else{ if($point2) { $main_text .= '
« Back in section'; } } } } if($main) { // ============================================================================= $title = 'Aqua Building & Project :: Designing and construction of courts, yachts, landing-stages, any water constructions.'; $keywords = 'designing, construction, courts, yachts, landing-stages, water constructions, water, ship'; $description = 'Aqua Building & Project :: Designing and construction of courts, yachts, landing-stages, any water constructions'; // ============================================================================= $place_holders = array( '{TITLE}' => $title, '{KEYWORDS}' => $keywords, '{DESCRIPTION}' => $description, '{MENU}' => $menu ); // ============================================================================= $__tpl = ''; $__tplfile = 'templates/main_en.htm'; }else{ // ============================================================================= $title = 'Aqua Building & Project :: Designing and construction of courts, yachts, landing-stages, any water constructions.'; $keywords = 'designing, construction, courts, yachts, landing-stages, water constructions, water, ship'; $description = 'Aqua Building & Project :: Designing and construction of courts, yachts, landing-stages, any water constructions'; // ============================================================================= $place_holders = array( '{TITLE}' => $title, '{KEYWORDS}' => $keywords, '{DESCRIPTION}' => $description, '{MENU}' => $menu, '{TOP_IMG}' => $top_img, '{PTITLE}' => $ptitle, '{MAIN_TEXT}' => $main_text ); // ============================================================================= $__tpl = ''; $__tplfile = 'templates/sub_en.htm'; } // ============================================================================= }else{ // ============================================================================= if($main_point) { $sql = new DB(); if ($main_point=='pereoborudovanie' or $main_point=='nedvizhimost_na_vode' or $main_point=='plavdachi' or $main_point=='maloe_sudostroenie') { if($point=='built') { $zpoint=4; }else{ $zpoint=3; } $rec = mysqli_fetch_array($sql->query('SELECT * FROM `r_text` WHERE r_name="'.$main_point.'" and linked="'.$zpoint.'";')); }else{ $rec = mysqli_fetch_array($sql->query('SELECT * FROM `r_text` WHERE r_name="'.$main_point.'";')); } $main_text = $rec['full_text']; if ($rec['fotos']==1) { $sql->query('SELECT * FROM `r_foto` WHERE rname="'.$main_point.'";'); if ($sql->num_rows()) { $main_text .= ''. ''. ''. '
Фотографии объекта:

'. '
'; while ($rec2 = $sql->next_record()) { $main_text .= ''; } $main_text .= '
'. '
'; } if($point3) { $main_text .= '
« Назад к каталогу'; }else{ if($point2) { $main_text .= '
« Назад в раздел'; } } } } if($main) { // ============================================================================= $title = 'Aqua Building & Project :: Проектирование и строительство судов, яхт, дебаркадеров, любых водных сооружений.'; $keywords = 'яхта, катер, дебаркадер, водные сооружения, дизайн, проектирование, заправочные станции, рестораны на воде, ночные клубы на воде'; $description = 'Aqua Building & Project :: Проектирование и строительство судов, яхт, дебаркадеров, любых водных сооружений'; // ============================================================================= $place_holders = array( '{TITLE}' => $title, '{KEYWORDS}' => $keywords, '{DESCRIPTION}' => $description, '{MENU}' => $menu ); // ============================================================================= $__tpl = ''; $__tplfile = 'templates/main_ru.htm'; }else{ // ============================================================================= $title = 'Aqua Building & Project :: Проектирование и строительство судов, яхт, дебаркадеров, любых водных сооружений.'; $keywords = 'яхта, катер, дебаркадер, водные сооружения, дизайн, проектирование, заправочные станции, рестораны на воде, ночные клубы на воде'; $description = 'Aqua Building & Project :: Проектирование и строительство судов, яхт, дебаркадеров, любых водных сооружений'; // ============================================================================= $place_holders = array( '{TITLE}' => $title, '{KEYWORDS}' => $keywords, '{DESCRIPTION}' => $description, '{MENU}' => $menu, '{TOP_IMG}' => $top_img, '{PTITLE}' => $ptitle, '{MAIN_TEXT}' => $main_text ); // ============================================================================= $__tpl = ''; $__tplfile = 'templates/sub_ru.htm'; } // ============================================================================= } if ($__fp = fopen($__tplfile,'r')) { $__tpl = fread($__fp,filesize($__tplfile)); fclose($__fp); } foreach($place_holders as $key => $value) { $__tpl = preg_replace("/$key/s",$value,$__tpl); } echo $__tpl; // ============================================================================= ?>