", $s); $s = str_replace("[", "<", $s); $s = str_replace("]", ">", $s); $s = str_replace(" - ", " — ", $s); $s = str_replace("«", '"', $s); $s = str_replace("»", '"', $s); return $s; } function lz($str__, $len__) { if (strlen($str__)==0) { return ""; } if (strlen($str__)>=$len__) { return $str__; } $res = $str__; while (strlen($res)<$len__) { $res = "0".$res; } return $res; } if (!isset($_GET["id"])) { header("HTTP/1.1 301 Moved Permanently"); header("Location: http://chastnik.ru"); exit(); } else { $db = mysql_connect('localhost', '37chastnik_main', 'Adj4xewXzR') or die('Не удалось соединиться с сервером' . mysql_error()); mysql_select_db('chastnik_bitrix', $db); mysql_query('SET NAMES "cp1251"'); $query = "SELECT * FROM jour_content WHERE idx = ".preg_replace('[^0-9]', '', $_GET["id"]); if($res = mysql_query($query)) { while ($row = mysql_fetch_array($res, MYSQL_ASSOC)){ $txt1 = iconv("windows-1251", "utf-8", $row["heading"]); $txt2 = iconv("windows-1251", "utf-8", $row["announce"]); $txt3 = iconv("windows-1251", "utf-8", $row["msg"]); $date_in = $row["date_in"]; } } ?> <?php echo isset($txt1)? $txt1: '';?> Частник.ru : Иваново
".$txt1.""; echo '
'.$txt2.'
'; $fo = '/upload/jour/'; $fi = "publ".lz($_GET["id"], 6).".jpg"; if (file_exists($_SERVER['DOCUMENT_ROOT'].$fo.$fi)) { echo ""; } echo '

'; echo txt_parser($txt3); echo '

'; } ?>


Rambler's Top100 Яндекс цитирования Система Orphus