function translitIt($str)
{
$str=trim($str);
$tr = array(
"А"=>"a","Б"=>"b","В"=>"v","Г"=>"g",
"Д"=>"d","Е"=>"e","Ж"=>"j","З"=>"z","И"=>"i",
"Й"=>"y","К"=>"k","Л"=>"l","М"=>"m","Н"=>"n",
"О"=>"o","П"=>"p","Р"=>"r","С"=>"s","Т"=>"t",
"У"=>"u","Ф"=>"f","Х"=>"h","Ц"=>"ts","Ч"=>"ch",
"Ш"=>"sh","Щ"=>"sch","Ъ"=>"","Ы"=>"yi","Ь"=>"",
"Э"=>"e","Ю"=>"yu","Я"=>"ya","а"=>"a","б"=>"b",
"в"=>"v","г"=>"g","д"=>"d","е"=>"e","ж"=>"j",
"з"=>"z","и"=>"i","й"=>"y","к"=>"k","л"=>"l",
"м"=>"m","н"=>"n","о"=>"o","п"=>"p","р"=>"r",
"с"=>"s","т"=>"t","у"=>"u","ф"=>"f","х"=>"h",
"ц"=>"ts","ч"=>"ch","ш"=>"sh","щ"=>"sch","ъ"=>"y",
"ы"=>"yi","ь"=>"","э"=>"e","ю"=>"yu","я"=>"ya",
" "=> "-", "."=> "", ","=> "", "?"=> "","&"=> "",";"=> "","-"=> "",":"=> "","%"=> "","¦"=> "","$"=> "","#"=> "","€"=> "","!"=> "","_"=> "" ,"»"=> "","№"=> "","«"=> "","("=> "",")"=> "", "/"=> "_"
);
return strtr($str,$tr);
}
$host="79.174.76.41";/*Имя сервера*/
$user="gbay_wbyk";/*Имя пользователя*/
$password="ebai6Sei";/*Пароль пользователя*/
$db="wwwgbayru_wbyk";/*Имя базы данных*/
$mysqli=mysql_connect($host, $user, $password);
if (!mysql_select_db($db))
{
die('Не удалось выбрать БД!');
}
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER SET 'utf8'");
?>
Каталог магазинов Абакана - Одежда, сумки, обувь, аксессуары - Abnovki.ru - Абаканский модный портал
Загрузка. Пожалуйста, подождите...
$result = mysql_query("select * from abnovki where idc=2 ORDER BY id desc")
or die("Invalid query: " . mysql_error());
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$html = $row["fulltext"];
/* это получает все аттрибуты src*/
preg_match_all('/ ]*src\s*=\s*[\'\"]*?(.+)[\'\"\s>]/isU', $html, $m1);
if($m1[1][0])
{
$img_url=$m1[1][0];
}
else
{
$img_url="/imgc/".$row["id"].".jpg";
}
?>
=$row["date"];?>
=$row["text"];?>
}
?>