Deutsch Русский The Shukhov Tower Foundation | |||||||
![]() Donate to Shukhov Tower Rescue!
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
![]() |
![]() |
||||||
getOrderedUin_free("UIN", "WHERE Razdel='$news_razdel' AND Hot='1' ORDER BY Date DESC");
@$date_array = array_values($main_base->getOrderedUin_free("Date", "WHERE Razdel='$news_razdel' AND Hot='1' ORDER BY Date"));
$year_1 = substr($date_array[0], 0, 4);
$year_2 = substr($date_array[count($date_array)-1], 0, 4);
if ( $year_1 == $year_2 )
{
$Year_String = "$year_1 year";
}
else
{
$Year_String = "$year_1 - $year_2 years";
}
$total = count($uin_array);
if ( ( $id <= 1 ) AND ( $id != 'last') )
{
$id=1;
}
$lid1 = $id - 1;
if ( ( $lid1*$news_per_page > $total ) OR ( $id == 'last') )
{
$id = $total / $news_per_page;
$id = (int) $id;
if ( $id <= 1) { $id=1; }
}
$lid1 = $id - 1;
$lid2 = $lid1 - 1;
$nid1 = $id + 1;
$nid2 = $nid1 + 1;
$rid = $id;
$id = $id*$news_per_page;
$lid = $lid1*$news_per_page;
if ($id > $total)
{
$id = $total;
}
$tp = $total / $news_per_page;
$tc = $total % $news_per_page;
if ( $tc != 0 )
{
$tp = $tp + 1;
}
$tp = (int) $tp;
$tl = $tp - $rid;
$Pages_String = null;
for ( $i=1; $i<=$tp; $i++ )
{
if ( $i == $rid )
{
$Pages_String .= " $i ";
}
else
{
$Pages_String .= "$i ";
}
}
if ( $uin_array )
{
for ($i=$lid; $i<$id; $i++)
{
$record_array = null;
@$record_array = $main_base->getRecUin($uin_array[$i]);
$date_array = explode("_", $record_array[9]);
?>
=$date_array[2];?>.=$date_array[1];?>.=$date_array[0];?>
|