selectDB(db); $title = ""; if ($_SERVER['REQUEST_URI'] == "/") $title = "г. Суздаль – Золотое кольцо России. Поезда в Суздаль на Выходные | Суточное размещение и организация досуга"; else { if ($_GET['inform']) $query = "SELECT * FROM menu WHERE id_menu=".$_GET['inform']; if ($_GET['inf']) $query = "SELECT * FROM menu, inform WHERE menu.id_menu=inform.to_menu and inform.id_inform=".$_GET['inf'].""; $result = $connect->mysql_query($query); if (mysql_num_rows($result) >= 1) { $line = mysql_fetch_array($result, MYSQL_ASSOC); if ($_GET['inform']) $title = $line['title']; if ($_GET['inf']) $title = ""; if (strlen($line['title_inform']) > 1) { $title.="".$line['title_inform']; if ($line['categor_menu'] == 2) $title.=""; $_GET['inform'] = $line['id_menu']; } } else { header("HTTP/1.1 404 Not Found"); echo file_get_contents("404.htm"); exit; } } ?> ".$title."\n"?> "; ?>
return_links(); ?>
mysql_query("SELECT * FROM menu WHERE visible=1 and type_menu=1"); echo ""; ?>
"; echo "
  • "; echo "

    Контакты

    "; echo "
    "; include "contacts.txt"; echo "
    "; echo "
    "; echo "
  • "; echo ""; echo "
      "; echo "
    • "; echo "

      Навигация

      "; echo "
      "; echo ""; echo "
      "; echo "
      "; echo "
    • "; echo "
    "; $result_rekl = $connect->mysql_query("SELECT * FROM blocks WHERE visible=1"); while($line_rek = mysql_fetch_array($result_rekl, MYSQL_ASSOC)) { echo "
      "; echo "
    • "; echo "

      ".$line_rek['title_block']."

      "; echo "
      "; echo $line_rek['inf_block']; echo "
      "; echo "
      "; echo "
    • "; echo "
    "; } require_once "admin.php"; if ($_SESSION['Authoriz'] == 1) { echo "

    Вы авторизованы!

    "; echo ""; echo ""; echo "

    Выход


    "; } ?>
     
     
     
     
     
     
    mysql_query(" SELECT * FROM inform, menu, categor WHERE inform.visible_index_page=1 and inform.to_menu=menu.id_menu and menu.categor_menu=categor.id_cat ORDER BY sort desc"); $prov = 0; $categor = 0; while($line = mysql_fetch_array($result, MYSQL_ASSOC)) { if ($prov == 1 && $categor != $line["caption_cat"]) { echo ""; $prov = 0; } if ($prov == 0) { echo "
    "; echo "
    "; echo ""; $categor = $line["caption_cat"]; //echo ""; $prov = 1; } //echo ""; echo "
    "; echo "

    ".$line['title_inform']."

    "; if ($line['print_all'] == 0) { //echo "
    "; } if ($line['print_all'] == 0) echo $line['index_inform']; else echo $line['inform']; if ($line['print_all'] == 0) echo ""; echo ""; //echo ""; } if ($prov == 1) echo ""; // закрываем самый последний блок } else { if ($_GET['inform']) { $inf = ""; if ($_GET['inf']) $inf = "and `inf`.`id_inform`='".$_GET['inf']."' "; $result = $connect->mysql_query("SELECT * FROM inform AS `inf` LEFT JOIN `cena` AS `cena` ON `cena`.`id_cena`=`inf`.`id_inform` WHERE `inf`.`to_menu`='".$_GET['inform']."' ".$inf." ORDER BY sort ASC"); echo "
    "; if ($_SESSION['Authoriz'] == 1 && !$_GET['inf']) { echo "

    "; echo "Создать"; echo "
    "; } echo "
    "; while($line = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "
    "; if ($line['print_all'] == 1 || $_GET['inf']) echo "

    ".$line['title_inform']."

    "; else echo "

    ".$line['title_inform']."

    "; if ($line['print_all'] == 1 || $_GET['inf']) { if ($_GET['inform'] == 6) eval($line['inform']); else { require_once "zamena.php"; $line['inform'] = modifi_text($line['inform'], $frazi, $frazi2); preg_match_all ("||U", $line['inform'], $out_foto, PREG_SET_ORDER); echo zamena_foto($line['inform'], $out_foto, $line['title_inform']); } } else { if (strlen($line['foto']) < 5) require_once "foto.php"; else $line2['name_foto'] = $line['foto']; if (strlen($line2['name_foto']) > 4) echo ""; $line2['name_foto'] = ""; echo $line['index_inform'] = preg_replace("/(.*)<\/a>/Ui", "$2", $line['index_inform']); echo ""; } echo "
    "; //------------ if ($line['print_all'] == 1 || $_GET['inf']) { $result2 = $connect->mysql_query("SELECT * FROM foto WHERE id_foto=".$line['id_inform'].""); $prov = 0; if (strlen(trim($line["inf_cena"])) > 1) { echo "
    "; echo "

    Цены

    "; //echo str_replace("\n","
    ", $line["inf_cena"]); echo "
    ".$line["inf_cena"]."
    "; echo "
    "; } $foto = array(); $i = 0; while($line2 = mysql_fetch_array($result2, MYSQL_ASSOC)) { for ($f = 0; $f < count($out_foto); $f++) { if (preg_match("/".$line2['name_foto']."/i", $out_foto[$f][0])) { $line2['name_foto'] = 0; break; } } if ($line2['name_foto'] != 0) { $foto[$i] = $line2['name_foto']; $i++; } } // while for ($f = 0; $f < count($foto); $f++) { if ($prov == 0) { echo "


    Фотографии

    "; echo "
    "; } if (file_exists("foto/".$foto[$f])) echo "  "; $prov = 1; } //for mysql_free_result($result2); if ($prov == 1) echo "
    "; if ($line['to_menu'] < 3 && $_GET['inf']) require_once "otziv.php"; echo "
    "; } //-------------------------------------------------------- if ($_SESSION['Authoriz'] == 1) { require_once "lib/adm/inform_mess_del.php"; echo "

    "; echo "Редактировать текст | "; echo "Фото | "; echo "Цена | "; echo "Удалить раздел?"; echo "
    "; } echo "
    "; } echo "
    "; } } mysql_free_result($result); ?>
    "; echo ""; //echo "
     
     
                      Copyright © 2012