require "../inc/_config.inc.php"; $tMain="main"; $tAuthors="authors"; $tPart="participants"; $tEvents="events"; $tCath="cathegories"; $cImgsPath="./img"; $cThumbImgsPath="./img/thumbs"; $cRecsPerPage=20; $cEventLength=200; $xAuthors=array(); $dAuthors=$dbMain->Query("SELECT * FROM $tAuthors"); for ($i=0;$i<$dAuthors->NumRows();$i++) { $dAuthors->NextResult(); $xId=$dAuthors->Get("id"); $xName=$dAuthors->Get("name"); $xAuthors[$xId]=$xName; } $xCaths=array(); $dCaths=$dbMain->Query("SELECT * FROM $tCath"); for ($i=0;$i<$dCaths->NumRows();$i++) { $dCaths->NextResult(); $xId=$dCaths->Get("id"); $xName=$dCaths->Get("name"); $xCaths[$xId]=$xName; } $xParts=array(); $dParts=$dbMain->Query("SELECT * FROM $tPart"); for ($i=0;$i<$dParts->NumRows();$i++) { $dParts->NextResult(); $xId=$dParts->Get("id"); $xName=$dParts->Get("name"); $xParts[$xId]=$xName; } $aid=round($aid); $is=0; if ($aid) { $dAuthor=$dbMain->Query("SELECT * FROM $tAuthors WHERE id=$aid"); if ($dAuthor->NumRows()) { $dAuthor->NextResult(); $xName=$dAuthor->Get("name"); Head("Авторы | $xName","authors"); echo "
$xName"; $xDescr=$dAuthor->Get("description"); if ($xDescr) echo "".str_replace("\n", " ";
else echo "Информация отстутствует";
$dEvents=$dbMain->Query("SELECT * FROM $tMain WHERE author_id=$aid");
$xNumRows=$dEvents->NumRows();
if ($xNumRows) {
echo "", $xDescr)." Произведения автора:"; echo "
| ";
}
}
if (!$is) {
$fL = substr($fL, 0, 3);
Head("Авторы | $fL","authors");
echo "
";
echo "Авторы"; if ($fL=="%" || !$fL) {$xCond="ORDER BY name LIMIT 30";} else {$xCond="WHERE UPPER(name) LIKE '$fL%' ORDER BY name";} $dAuthors=$dbMain->Query("SELECT * FROM $tAuthors $xCond"); $xRows=$dAuthors->NumRows(); if ($fPage) $dAuthors->Seek($fPage); echo "
"; // $p->PrintPages(); LetterPages("fL",$fL,$tAuthors); echo " ![]() |