require "./inc/_config.inc.php"; $fY = $_GET["from"]; $tY = $_GET["till"]; Head("События", ".", "Годы ".$fY." - ".$tY); $cImgsPath="img"; $cThumbImgsPath="img/thumbs"; $cRecsPerPage=10; $cEventLength=200; $cPerPage=10; function AddDate($xBDate) { global $xxDates, $xDateMin, $xDateMax; list($xYear, $xMonth, $xDay) = split("-", $xBDate, 3); $xYear = round($xYear); if ($xYear) { if ($xDateMin > $xYear) $xDateMin = $xYear; if ($xDateMax < $xYear) $xDateMax = $xYear; $xxYear = substr($xYear + 10, 0, 3)."0"; $xxDates[$xxYear]++; } } $fY = (int)$fY; $tY = (int)$tY; if (!$fY || !$tY) { $xDateMin = 2000; $xDateMax = 0; $xxDates = array(); $dDates = $dbMain->Query("SELECT dat FROM ".$tMain." ORDER BY dat"); for ($i = 0; $i < $dDates->NumRows(); $i++) { $dDates->NextResult(); AddDate($dDates->Get("dat")); } echo "