'') && ($_GET['y']<>'index')) { if (isset ($_GET['y'])) {$y = (int)$_GET['y'];} else { $y=0; } if ($y==0) { $error=10; } } else { $y='index'; } //if ($y==0) { $error=10; } //if (($c<>'') && ($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; // $menu="���������/�� �����/�������/��������/������"; $my->sql_connect(); //echo "2???$c!!!$y
"; $text=""; $menu ="
  • ���������
  • "; $menu.="
  • ����
  • "; $menu.="
  • ���
  • "; $menu.="
  • ������� (current)
  • "; if ($y<>"index") { $i=0; $aSQL = "SELECT date_calendar,event_txt,DATE_FORMAT(date_calendar, '%d.%m.%Y') AS date_pub,DATE_FORMAT(date_calendar, '%d%m') AS date_cal FROM Calendar_Event WHERE id='$y'"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; $date_calendar=$row['date_calendar']; if ($i==0) { $text.= "

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

    "; $i++; }; if ($date_cal > 10) { $text.="
    ".$row['date_pub']." ".$row['event_txt']."
    "; } else { $text.="
    ".$row['date_pub']." ".$row['event_txt']."
    "; }; }; $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 FROM persons WHERE DateIn='$date_calendar' ORDER BY popularity DESC,RAND() LIMIT 3"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; if ($i==0) { $text.= "

    �������� ��� �� � ���� ����

    "; $i++; }; if ($i==0) { $text.= "

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

    "; $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 FROM persons WHERE DateOut='$date_calendar' ORDER BY popularity DESC,RAND() LIMIT 3"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; if ($i==0) { $text.= "

    ���� �� ��� � ���� ����

    "; $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 news.date ='$date_calendar' ORDER BY RAND() LIMIT 3"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; if ($i==0) { $text.= "

    ������� �� ���� ����

    "; $i++; }; if ($date_cal > 10) { $text.="
    ".$row['date_pub']." ".stripslashes($row['title'])." [".$row['fullname']."]
    "; } else { $text.="
    ".$row['date_pub']." ".stripslashes($row['title'])." [".$row['fullname']."]
    "; }; }; } else { $query = "SELECT * FROM peoples_section WHERE id=25"; $result = $my->get_link()->query($query); while($row = $result->fetch_array()) { $title=$row['nameEng']; $table=$row['table_name']; $count=$row['total']; $onpage=$row['onpage']; $section=$row['path']; } $result->close(); $title_bar="������ �������"; $pages = ceil($count / $onpage); $offset = ($page - 1) * $onpage; $start = $offset + 1; $end = min(($offset + $onpage), $count); $prevlink = ($page > 1) ? '
  • «
  • ' : '
  • «
  • '; $nextlink = ($page < $pages) ? '
  • »
  • ' : '
  • »
  • '; $listofpages= "
    "; // $listofpages="
    $listofpages
    \n"; $text=$listofpages; $aSQL = "SELECT id,CONCAT(LEFT(event_txt,200),'...') AS article,LEFT(event_txt,100) AS title,DATE_FORMAT(date_calendar, '%d.%m') AS date_pub,DATE_FORMAT(date_calendar, '%d%m') AS date_cal,DATE_FORMAT(date_calendar, '%Y') AS date_year FROM Calendar_Event WHERE do_n_ery=0 AND date_calendar < CURDATE() ORDER BY date_calendar DESC LIMIT $onpage OFFSET $offset"; $result = $my->get_link()->query($aSQL); while($row = $result->fetch_array()){ $date_cal=$row['date_cal']; $date_year=$row['date_year']; $link="".$row['date_pub'].".$date_year"; if ($i==0) { $text.= "

    $title_bar $page ��������

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

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

    \n"; $text.="

    $link

    \n"; $text.="
    \n"; $text.="
    \n"; $text.="
    \n"; }; $result->close(); $text.= "
    $listofpages
    "; }; $my->sql_close(); 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'); } else { ?>