2)) { $error=10; } if ($error < 10 ) { require("/usr/local/www/peoples.ru/req/utils_v2.class"); $my=new class_utils; $month_name = $my->numtomonth2($month); // $menu="Люди $day $month_name/События $day $month_name"; $my->sql_connect(); // echo "1???$c!!!$y
"; $text=""; if ($c==1) { $menu ="
  • Календарь
  • "; $menu.="
  • Года
  • "; $menu.="
  • Дни
  • "; $menu.="
  • События
  • "; $menu.="
  • Люди $day $month_name
  • "; $menu.="
  • События $day $month_name (current)
  • "; $i=0; $aSQL = "SELECT id ,CONCAT(LEFT(event_txt,200),'...') AS article ,LEFT(event_txt,100) AS title ,DATE_FORMAT(date_calendar, '%Y') AS date_year ,DATE_FORMAT(date_calendar, '%d%m') AS date_cal FROM Calendar_Event WHERE MONTH(date_calendar)='$month' AND DAY(date_calendar)='$day' AND do_n_ery=0 ORDER BY date_calendar DESC"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $NamePhoto=""; if ($i==0) { $text.= "

    События $day $month_name

    \n"; $i++; }; // $text.="
    ".$row['date_year']." ".$row['event_txt']."
    "; $text.="
    \n"; $text.="
    \"\"\n"; $text.="
    \n"; $text.=" \n"; $text.="

    ".stripslashes($row['article'])."

    \n"; $text.="

    ".$row['date_year']."

    \n"; $text.="
    \n"; $text.="
    \n"; $text.="
    \n"; }; $i=0; $aSQL = "SELECT Photo_id ,CONCAT(LEFT(article,100),'...') AS article ,title ,CONCAT(AllUrlInSity,news.path) AS fullpath ,DATE_FORMAT(date, '%Y') AS date_pub ,DATE_FORMAT(date, '%d%m') AS date_cal ,CONCAT(IFNULL(NameRus,''),' ',SurNameRus) AS fullname , AllUrlInSity ,IFNULL(photo.NamePhoto,persons.NamePhoto) AS NamePhoto FROM news JOIN persons ON news.KodPersons=persons.Persons_id LEFT JOIN photo ON photo.KodNews=news.id AND photo.KodPersons=news.KodPersons WHERE MONTH(news.date)='$month' AND DAY(news.date)='$day' ORDER BY news.date DESC"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $NamePhoto=$row['NamePhoto']; $AllUrlInSity=$row['AllUrlInSity']; if (empty($NamePhoto)<>true) { $NamePhoto=$AllUrlInSity.$NamePhoto; } else { $NamePhoto="http://www.peoples.ru/images/no-image.png"; }; if ($i==0) { $text.= "

    Новости от $day $month_name

    "; $i++; }; $text.="
    \n"; $text.="
    \"\"\n"; $text.="
    \n"; $text.=" \n"; $text.="

    ".stripslashes($row['article'])."

    \n"; $text.="

    [".$row['fullname']."] ".$row['date_pub']."

    \n"; $text.="
    \n"; $text.="
    \n"; $text.="
    \n"; // $text.="
    ".$row['date_pub']." ".stripslashes($row['title'])." [".$row['fullname']."]
    "; $title_bar="Новости и события на $day $month_name"; $description_bar="новости $day $month_name, события $day $month_name, что случилось $day $month_name, какие новости на $day $month_name"; $kewords_bar="события на $day $month_name,новости на $day $month_name, сплетни на $day $month_name, список новостей на $day $month_name, что случилось $day $month_name, о чем говорят $day $month_name, жизнь в новостях на $day $month_name"; $image_bar=$NamePhoto; $url_bar=$url_bar; }; } elseif ($c==2) { $menu ="
  • Календарь
  • "; $menu.="
  • Года
  • "; $menu.="
  • Дни
  • "; $menu.="
  • События
  • "; $menu.="
  • Люди $day $month_name (current)
  • "; $menu.="
  • События $day $month_name
  • "; $i=0; $aSQL = "SELECT DATE_FORMAT(DateIn, '%Y') AS date_pub , DATE_FORMAT(DateIn, '%d%m') AS date_cal , CONCAT(IFNULL(NameRus,''),' ',SurNameRus) AS fullname , Epigraph , AllUrlInSity , NamePhoto , persons.aphorism , aph_avtor.avtor , aph_avtor.path AS aphorism_path FROM persons LEFT JOIN aphorism.aph_avtor aph_avtor ON persons.Persons_id=aph_avtor.peoples WHERE MONTH(DateIn)='$month' AND DAY(DateIn)='$day' ORDER BY popularity DESC, DateIn DESC"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $NamePhoto=$row['NamePhoto']; $AllUrlInSity=$row['AllUrlInSity']; $aphorism=$row['aphorism']; $fullname=stripslashes(trim($row['fullname'])); $text_aphorism=""; if ($aphorism > 0) { $avtor=$row['avtor']; $aphorism_path=$row['aphorism_path']; $dSQL="SELECT aphorism,path FROM aphorism.aphorism WHERE avtor='$avtor' AND aphorism_length < 200 ORDER BY pr2 LIMIT 2"; $dResult = $my->get_link()->query($dSQL); while($drow = $dResult->fetch_array()){ $text_aphorism.="

    ".$drow['aphorism']."

    \n"; $text_aphorism.=""; }; $text_avtor="

    [$fullname афоризмы [$aphorism]] ".$row['date_pub']."

    \n"; } else { $text_avtor="

    ".$row['date_pub']."

    \n"; }; if (empty($NamePhoto)<>true) { $NamePhoto=$AllUrlInSity.$NamePhoto; } else { $NamePhoto="http://www.peoples.ru/images/no-image.png"; }; if ($i==0) { $text.= "

    Родились $day $month_name

    "; $i++; }; $text.="
    \n"; $text.="
    \"\"\n"; $text.="
    \n"; $text.=" \n"; $text.="

    ".stripslashes($row['Epigraph'])."

    \n"; $text.=$text_aphorism; $text.=$text_avtor; $text.="
    \n"; $text.="
    \n"; $text.="
    \n"; // if ($i==0) { $text.= "

    Родились $day $month_name

    "; $i++; }; // $text.="
    ".$row['date_pub']." ".$row['fullname'].", ".$row['Epigraph']."
    "; }; $i=0; $aSQL = "SELECT DATE_FORMAT(DateOut, '%Y') AS date_pub ,DATE_FORMAT(DateOut, '%d%m') AS date_cal ,CONCAT(IFNULL(NameRus,''),' ',SurNameRus) AS fullname , Epigraph , AllUrlInSity , NamePhoto , persons.aphorism , aph_avtor.avtor , aph_avtor.path AS aphorism_path FROM persons LEFT JOIN aphorism.aph_avtor aph_avtor ON persons.Persons_id=aph_avtor.peoples WHERE MONTH(DateOut)='$month' AND DAY(DateOut)='$day' ORDER BY popularity DESC,DateOut DESC"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $NamePhoto=$row['NamePhoto']; $AllUrlInSity=$row['AllUrlInSity']; $aphorism=$row['aphorism']; $fullname=stripslashes(trim($row['fullname'])); $text_aphorism=""; if ($aphorism > 0) { $avtor=$row['avtor']; $aphorism_path=$row['aphorism_path']; $dSQL="SELECT aphorism,path FROM aphorism.aphorism WHERE avtor='$avtor' AND aphorism_length < 200 ORDER BY pr2 LIMIT 2"; $dResult = $my->get_link()->query($dSQL); while($drow = $dResult->fetch_array()){ $text_aphorism.="

    ".$drow['aphorism']."

    \n"; $text_aphorism.=""; }; $text_avtor="

    [$fullname афоризмы [$aphorism]] ".$row['date_pub']."

    \n"; } else { $text_avtor="

    ".$row['date_pub']."

    \n"; }; if (empty($NamePhoto)<>true) { $NamePhoto=$AllUrlInSity.$NamePhoto; } else { $NamePhoto="http://www.peoples.ru/images/no-image.png"; }; if ($i==0) { $text.= "

    Покинули нас $day $month_name

    "; $i++; }; $text.="
    \n"; $text.="
    \"\"\n"; $text.="
    \n"; $text.=" \n"; $text.="

    ".stripslashes($row['Epigraph'])."

    \n"; $text.=$text_aphorism; $text.=$text_avtor; $text.="
    \n"; $text.="
    \n"; $text.="
    \n"; // if ($i==0) { $text.= "

    Ушли от нас $day $month_name

    "; $i++; }; // $text.="
    ".$row['date_pub']." ".$row['fullname'].", ".$row['Epigraph']."
    "; }; }; $my->sql_close(); $title_bar="Родились $day $month_name и Умерли $day $month_name"; $description_bar="список дней рождений и дат смерти на $day $month_name"; $kewords_bar="день рождения $day $month_name, рожденные $day $month_name, ушедшие от нас $day $month_name, умершие $day $month_name, покинувшие на $day $month_name"; $image_bar=$NamePhoto; $url_bar=$url_bar; require_once('/usr/local/www/peoples.ru/days/ssi/top.shtml'); // echo $menu; if (empty($text)<>true) { echo $text; } else { echo "У нас нет данных"; }; require_once('/usr/local/www/peoples.ru/days/ssi/foot.shtml'); } else { ?>