require "./inc/_config.inc.php"; $id = (int) $_GET["id"]; $fL = $_GET["fL"]; if (!$fL){ $fL = 'А'; } $tPeople=$tPart; if ($id){ $sql = "SELECT * FROM $tPeople WHERE id=$id"; $res = mysql_query($sql); $xName = mysql_result($res, 0, "name"); $xDat=MakeDate(mysql_result($res, 0, "bdate"), mysql_result($res, 0, "ddate")); $Title2 = $xName.($xDat?" ($xDat)":""); } Head("Люди", ".", $Title2); $cImgsPath="img"; $cThumbImgsPath="img/thumbs"; $cRecsPerPage=10; $cEventLength=200; $cPerPage=10; $id=(int)$id; $fL=substr($fL,0,1); if (!$id) { if ($fL) $dPeople=$dbMain->Query("SELECT * FROM $tPeople WHERE UPPER(name) LIKE '$fL%' ORDER BY name"); else { $dPeople=$dbMain->Query("SELECT * FROM $tPeople WHERE name<'А' OR name>'Я' ORDER BY name ASC LIMIT $cRecsPerPage"); if ($dPeople->NumRows()<=1) $dPeople->Query("SELECT * FROM $tPeople ORDER BY name LIMIT $cRecsPerPage"); } } else $dPeople=$dbMain->Query("SELECT * FROM $tPeople WHERE id=$id"); if (!$id) { echo "