'') && ($c<>'event') && ($c<>'news') && ($c<>'birth') && ($c<>'died')) { $error=10; }; if ($error < 10) { require("/usr/local/www/peoples.ru/req/utils_v2.class"); $my=new class_utils; if ($y> 2000) { $menu="���������/�� �����/�������/�������/��������/������"; } else { }; $my->sql_connect(); //echo "2???$c!!!$y
"; $text=""; $month_name = $my->numtomonth2($month); if ($c=="event") { // $menu="���������/�� �����/�������/��������/������"; $menu ="
  • ���������
  • "; $menu.="
  • ����
  • "; $menu.="
  • ���
  • "; $menu.="
  • �������
  • "; $menu.="
  • $y: (current)
  • "; $menu.="
  • ������� (current)
  • "; $menu.="
  • �������
  • "; $menu.="
  • ��������
  • "; $menu.="
  • ����
  • "; $i=0; $aSQL = "SELECT id ,event_txt ,DATE_FORMAT(date_calendar, '%d.%m.%Y') AS date_pub ,DATE_FORMAT(date_calendar, '%d%m') AS date_cal ,CONCAT(LEFT(event_txt,200),'...') AS article ,LEFT(event_txt,100) AS title FROM Calendar_Event WHERE YEAR(date_calendar)='$y' AND do_n_ery=0 ORDER BY date_calendar ASC"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; if ($date_cal > 10) { $link="".$row['date_pub'].""; } else { $link=$row['date_pub']; }; $NamePhoto=""; if ($i==0) { $text.= "

    ������� $y ����

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

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

    \n"; $text.="

    $link

    \n"; $text.="
    \n"; $text.="
    \n"; $text.="
    \n"; // $text.="
    $link ".$row['event_txt']."
    "; }; } elseif ($c=="birth") { $menu ="
  • ���������
  • "; $menu.="
  • ����
  • "; $menu.="
  • ���
  • "; $menu.="
  • �������
  • "; $menu.="
  • $y: (current)
  • "; $menu.="
  • �������
  • "; $menu.="
  • �������
  • "; $menu.="
  • ��������(current)
  • "; $menu.="
  • ����
  • "; $i=0; $aSQL = "SELECT DATE_FORMAT(DateIn, '%d.%m.%Y') AS date_pub ,DATE_FORMAT(DateIn, '%d%m') AS date_cal ,CONCAT(IFNULL(NameRus,''),' ',SurNameRus) AS fullname , Epigraph , AllUrlInSity , NamePhoto FROM persons WHERE YEAR(DateIn)='$y' ORDER BY popularity DESC,DateIn ASC"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; if ($date_cal > 10) { $link="".$row['date_pub'].""; } else { $link=$row['date_pub']; }; if ($i==0) { $text.= "

    �������� � $y ����

    "; $i++; }; $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['Epigraph'])."

    \n"; $text.="

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

    \n"; $text.="
    \n"; $text.="
    \n"; $text.="
    \n"; }; } elseif ($c=="died") { $menu ="
  • ���������
  • "; $menu.="
  • ����
  • "; $menu.="
  • ���
  • "; $menu.="
  • �������
  • "; $menu.="
  • $y: (current)
  • "; $menu.="
  • �������
  • "; $menu.="
  • �������
  • "; $menu.="
  • ��������
  • "; $menu.="
  • ���� (current)
  • "; $i=0; $aSQL = "SELECT DATE_FORMAT(DateOut, '%d.%m.%Y') AS date_pub ,DATE_FORMAT(DateOut, '%d%m') AS date_cal ,CONCAT(IFNULL(NameRus,''),' ',SurNameRus) AS fullname , Epigraph , AllUrlInSity , NamePhoto FROM persons WHERE YEAR(DateOut)='$y' ORDER BY popularity DESC,DateOut ASC"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; if ($i==0) { $text.= "

    ���� �� ��� � $y ����

    "; $i++; }; if ($date_cal > 10) { $link="".$row['date_pub'].""; } else { $link=$row['date_pub']; }; // if ($i==0) { $text.= "

    �������� � $y ����

    "; $i++; }; $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['Epigraph'])."

    \n"; $text.="

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

    \n"; $text.="
    \n"; $text.="
    \n"; $text.="
    \n"; }; } elseif ($c=="news") { $menu ="
  • ���������
  • "; $menu.="
  • ����
  • "; $menu.="
  • ���
  • "; $menu.="
  • �������
  • "; $menu.="
  • $y: (current)
  • "; $menu.="
  • �������
  • "; $menu.="
  • ������� (current)
  • "; $menu.="
  • ��������
  • "; $menu.="
  • ����
  • "; $i=0; $aSQL = "SELECT CONCAT(AllUrlInSity,path) AS fullpath,DATE_FORMAT(date, '%d.%m.%Y') AS date_pub,DATE_FORMAT(date, '%d%m') AS date_cal,CONCAT(IFNULL(NameRus,''),' ',SurNameRus) AS fullname, title, AllUrlInSity FROM news JOIN persons ON news.KodPersons=persons.Persons_id WHERE YEAR(news.date)='$y' ORDER BY news.date ASC"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; if ($i==0) { $text.= "

    ������� $year ����

    "; $i++; }; if ($date_cal > 10) { $text.="
    ".$row['date_pub']." ".stripslashes($row['title'])." [".$row['fullname']."]
    "; } else { $text.="
    ".$row['date_pub']." ".stripslashes($row['title'])." [".$row['fullname']."]
    "; }; }; } elseif (empty($c)==true) { $menu ="
  • ���������
  • "; $menu.="
  • ����
  • "; $menu.="
  • ���
  • "; $menu.="
  • �������
  • "; $menu.="
  • $y: (current)
  • "; $menu.="
  • �������
  • "; $menu.="
  • �������
  • "; $menu.="
  • ��������
  • "; $menu.="
  • ����
  • "; $i=0; $aSQL = "SELECT DATE_FORMAT(DateIn, '%d.%m.%Y') AS date_pub ,DATE_FORMAT(DateIn, '%d%m') AS date_cal ,CONCAT(IFNULL(NameRus,''),' ',SurNameRus) AS fullname , Epigraph , AllUrlInSity , NamePhoto FROM persons WHERE YEAR(DateIn)='$y' ORDER BY popularity DESC,DateIn ASC"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; if ($date_cal > 10) { $link="".$row['date_pub'].""; } else { $link=$row['date_pub']; }; if ($i==0) { $text.= "

    �������� � $y ����

    "; $i++; }; $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['Epigraph'])."

    \n"; $text.="

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

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

    �������� � $y ����

    "; $i++; }; if ($date_cal > 10) { $text.="
    ".$row['date_pub']." ".$row['fullname'].", ".$row['Epigraph']."
    "; } else { $text.="
    ".$row['date_pub']." ".$row['fullname'].", ".$row['Epigraph']."
    "; }; */ }; $i=0; $aSQL = "SELECT DATE_FORMAT(DateOut, '%d.%m.%Y') AS date_pub ,DATE_FORMAT(DateOut, '%d%m') AS date_cal ,CONCAT(IFNULL(NameRus,''),' ',SurNameRus) AS fullname , Epigraph , AllUrlInSity , NamePhoto FROM persons WHERE YEAR(DateOut)='$y' ORDER BY popularity DESC,DateOut ASC"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; if ($date_cal > 10) { $link="".$row['date_pub'].""; } else { $link=$row['date_pub']; }; if ($i==0) { $text.= "

    ���� �� ��� � $y ����

    "; $i++; }; $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['Epigraph'])."

    \n"; $text.="

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

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

    ���� �� ��� � $y ����

    "; $i++; }; if ($date_cal > 10) { $text.="
    ".$row['date_pub']." ".$row['fullname'].", ".$row['Epigraph']."
    "; } else { $text.="
    ".$row['date_pub']." ".$row['fullname'].", ".$row['Epigraph']."
    "; }; */ }; $i=0; $aSQL = "SELECT CONCAT(AllUrlInSity,path) AS fullpath,DATE_FORMAT(date, '%d.%m.%Y') AS date_pub,DATE_FORMAT(date, '%d%m') AS date_cal,CONCAT(IFNULL(NameRus,''),' ',SurNameRus) AS fullname, title, AllUrlInSity FROM news JOIN persons ON news.KodPersons=persons.Persons_id WHERE YEAR(news.date)='$y' ORDER BY news.date ASC"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; if ($i==0) { $text.= "

    ������� $year ����

    "; $i++; }; if ($date_cal > 10) { $text.="
    ".$row['date_pub']." ".stripslashes($row['title'])." [".$row['fullname']."]
    "; } else { $text.="
    ".$row['date_pub']." ".stripslashes($row['title'])." [".$row['fullname']."]
    "; }; }; $i=0; $aSQL = "SELECT CONCAT(LEFT(event_txt,200),'...') AS article,LEFT(event_txt,100) AS title,DATE_FORMAT(date_calendar, '%d.%m.%Y') AS date_pub,DATE_FORMAT(date_calendar, '%d%m') AS date_cal FROM Calendar_Event WHERE YEAR(date_calendar)='$y' AND do_n_ery=0 ORDER BY date_calendar ASC"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; if ($date_cal > 10) { $link="".$row['date_pub'].""; } else { $link=$row['date_pub']; }; $NamePhoto=""; if ($i==0) { $text.= "

    ������� $y ����

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

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

    \n"; $text.="

    $link

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

    ������� $y ����

    "; $i++; }; if ($date_cal > 10) { $text.="
    ".$row['date_pub']." ".$row['event_txt']."
    "; } else { $text.="
    ".$row['date_pub']." ".$row['event_txt']."
    "; }; */ }; }; require_once('/usr/local/www/peoples.ru/days/ssi/top.shtml'); if (empty($text)<>true) { echo $text; } else { echo "� ��� ��� ������"; }; require_once('/usr/local/www/peoples.ru/days/ssi/foot.shtml'); $my->sql_close(); } else { ?>