require "./inc/_config.inc.php"; $id = (int)$_GET["id"]; $fL = $_GET["fL"]; if ($id){ $sql = "SELECT * FROM $tEvents WHERE id=$id AND visible='true'"; $res = mysql_query($sql); $xDat=MakeDate(mysql_result($res, 0, "bdate"),mysql_result($res, 0, "edate")); $Title2 = mysql_result($res, 0, "title").($xDat?" ($xDat)":""); } head("События", ".", $Title2); $cImgsPath="img"; $cThumbImgsPath="img/thumbs"; $cRecsPerPage=100; $cEventLength=200; $cPerPage=10; $id=(int)$id; $fL=substr($fL,0,1); if (!$id) { if ($fL && $fL!="%") { $dEvents = $dbMain->Query("SELECT * FROM ".$tEvents." WHERE visible='true' AND LEFT(UPPER(title),1)='".$fL."' ORDER BY bdate ASC"); } else { /*$dEvents=$dbMain->Query("SELECT * FROM ".$tEvents." WHERE visible='true' AND (LEFT(title,1)<'А' OR LEFT(title,1)>'я') ORDER BY bdate ASC LIMIT ".$cRecsPerPage); if ($dEvents->NumRows() <= 1) { $dEvents->Query("SELECT * FROM $tEvents WHERE visible='true' ORDER BY bdate ASC LIMIT ".$cRecsPerPage); }*/ $dEvents=$dbMain->Query("SELECT * FROM $tEvents WHERE visible='true' ORDER BY bdate ASC LIMIT ".$cRecsPerPage); } } else { $dEvents=$dbMain->Query("SELECT * FROM $tEvents WHERE id=$id AND visible='true'"); } if (!$id) { echo "