iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://www.peoples.ru/horoscope/zodiac-sagittarius.html
check_search_string($c); $my->sql_connect(); //echo $inputc; $horoscope=""; $i=0; if (empty($inputc)<>true) { $qSQL = "SELECT hs.path AS horoscope_sign_path,hn.path AS horoscope_name_path,h.horoscope_sign_id,h.start,h.end,h.year,hs.description,hn.title AS horoscope_name, hs.title AS horoscope_sign FROM horoscope h LEFT JOIN horoscope_sign hs ON h.horoscope_sign_id=hs.id LEFT JOIN horoscope_name hn ON hs.horoscope_name_id=hn.id WHERE hn.path='$inf1' AND hs.path='$inf2'"; //echo $qSQL; $qQResults = mysql_query($qSQL); if (mysql_error()) { print(mysql_error()); } while ($qrow = mysql_fetch_array($qQResults)): $i++; $horoscope_sign_id=trim($qrow['horoscope_sign_id']); $horoscope_name=trim($qrow['horoscope_name']); $horoscope_sign=$qrow['horoscope_sign']; $horoscope_name_path=trim($qrow['horoscope_name_path']); $horoscope_sign_path=$qrow['horoscope_sign_path']; $description=$qrow['description']; $name=$qrow['name']; $start=$qrow['start']; $end=$qrow['end']; $year=$qrow['year']; if (empty($year)<>true) { $type=1; $horoscope.=$year.","; } else { $type=2; $dates=explode("-",$start); $horoscope.=$dates[2]." ".$my->numtomonth2($dates[1])." - "; $dates=explode("-",$end); $horoscope.=$dates[2]." ".$my->numtomonth2($dates[1]); }; if ($i>4) { $horoscope.="
\n"; $i=0; }; endwhile; $titlesmall=$horoscope_name.": ".$horoscope_sign; $pic=""; }; if (empty($horoscope_name)==true) { ?> <? echo $titlesmall; ?> " />

Гороскопы / ">".$horoscope_name.": ".$horoscope_sign."
[".$horoscope."]"; ?>

= (STR_TO_DATE(CONCAT(MONTH(h.start),'-',DAY(h.start)),'%c-%e')) AND (STR_TO_DATE(CONCAT(MONTH(p.DateIn),'-',DAY(p.DateIn)),'%c-%e')) <= (STR_TO_DATE(CONCAT(MONTH(h.end),'-',DAY(h.end)),'%c-%e')) WHERE WHERE h.horoscope_sign_id='.$horoscope_sign_id.' GROUP BY KodPersons')) or die('error! Записей не найдено!'); */ $dSQL = " SELECT p.DateIn,p.KodPersons,h.id,h.year,h.start,h.end FROM peoples_data_stat_histories_today p LEFT JOIN horoscope h ON (STR_TO_DATE(CONCAT(MONTH(p.DateIn),'-',DAY(p.DateIn)),'%c-%e')) >= (STR_TO_DATE(CONCAT(MONTH(h.start),'-',DAY(h.start)),'%c-%e')) AND (STR_TO_DATE(CONCAT(MONTH(p.DateIn),'-',DAY(p.DateIn)),'%c-%e')) <= (STR_TO_DATE(CONCAT(MONTH(h.end),'-',DAY(h.end)),'%c-%e')) WHERE h.horoscope_sign_id='$horoscope_sign_id' GROUP BY KodPersons"; $count = mysql_numrows(mysql_query($dSQL)); } $pages_count = ceil($count / $perpage); // Количество страниц // Если номер страницы оказался больше количества страниц if ($page > $pages_count) $page = $pages_count; $start_pos = ($page - 1) * $perpage; // Начальная позиция, для запроса к БД // Вызов функции, для вывода ссылок на экран echo "
\n"; $my->universal_link_bar($page, $count, $pages_count, 9); echo "
\n"; // Вывод информации из базы данных $rec=0; if ($type == 1) { $dQResult = mysql_query('SELECT p.DateIn,p.KodPersons,h.id,h.year,p.KodPersons,p.Title,p.Epigraph FROM peoples_data_stat_histories_today p LEFT JOIN horoscope h ON YEAR(p.DateIn)=h.year WHERE h.horoscope_sign_id='.$horoscope_sign_id.' GROUP BY KodPersons ORDER BY SurNameRus ASC limit '.$start_pos.', '.$perpage) or die('error1!'); } elseif ($type == 2) { $dSQL = " SELECT p.Epigraph,p.Title,p.DateIn,p.KodPersons,h.id,h.year,h.start,h.end FROM peoples_data_stat_histories_today p LEFT JOIN horoscope h ON (STR_TO_DATE(CONCAT(MONTH(p.DateIn),'-',DAY(p.DateIn)),'%c-%e')) >= (STR_TO_DATE(CONCAT(MONTH(h.start),'-',DAY(h.start)),'%c-%e')) AND (STR_TO_DATE(CONCAT(MONTH(p.DateIn),'-',DAY(p.DateIn)),'%c-%e')) <= (STR_TO_DATE(CONCAT(MONTH(h.end),'-',DAY(h.end)),'%c-%e')) WHERE h.horoscope_sign_id='$horoscope_sign_id' GROUP BY KodPersons ORDER BY SurNameRus ASC limit $start_pos, $perpage"; $dQResult = mysql_query($dSQL); if (mysql_error()) { print(mysql_error()); } } echo "\n"; while ($row = mysql_fetch_array($dQResult)) { $KodPersons=stripslashes($row['KodPersons']); $DateIn=stripslashes($row['DateIn']); $rec++; $Out_news=""; $Out_photo=""; // $OKodPersons=$row['KodPersons']; $whole_infos=$my->findpersoninfo($KodPersons); $whole_info=explode("##", $whole_infos); $russian_name=trim($whole_info[0]); $english_name=trim($whole_info[1]); $IAllUrlInSity=$whole_info[2]; $in_site_path=$whole_info[3]; $who_is=$whole_info[4]; $famous_for=$whole_info[5]; $DateIn=$whole_info[6]; $DateOut=$whole_info[7]; $TownIn=$whole_info[8]; $TownOut=$whole_info[9]; $KodCountry=$whole_info[10]; $wholenames=$whole_info[11]; $Oarticle=substr(stripslashes($row['Epigraph']), 0, 250)." ...."; $Otitle=stripslashes($row['Title']); if (empty($Otitle)==true) { $Otitle=$russian_name; } else { $Otitle=$Otitle."/".$russian_name; } $full_photo=$my->peoples_photo($KodPersons); $img=""; if (empty($full_photo)<>true) { $img="\"$Otitle\""; } // $Out_news=""; // $Out_photo="\"$Otitle\"\n"; echo "\n"; if ($rec==3): echo "\n\n"; elseif ($rec==7): echo "\n\n"; elseif ($rec==11): echo "\n\n"; endif; } echo "
$Oarticle
($full_name [$Odate])

$Otitle


".$my->date_rus($DateIn)."
$img$Oarticle\n".$Out_photo."
\n"; require_once('/usr/local/www/peoples.ru/www/ssi/ads-468x60.shtml'); echo "
\n"; require_once('/usr/local/www/peoples.ru/www/ssi/rec2.shtml'); echo "
\n"; require_once('/usr/local/www/peoples.ru/www/ssi/rec4.html'); echo "
\n"; // Вызов функции, для вывода ссылок на экран echo "
\n"; $my->universal_link_bar($page, $count, $pages_count, 9); echo "
\n"; ?>