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 ""; $is=1; echo ""; } } if (!$is) { $fL = substr($fL, 0, 3); Head("Авторы | $fL","authors"); echo "

$xName

"; $xDescr=$dAuthor->Get("description"); if ($xDescr) echo "
".str_replace("\n", "

", $xDescr)."

"; else echo "Информация отстутствует"; $dEvents=$dbMain->Query("SELECT * FROM $tMain WHERE author_id=$aid"); $xNumRows=$dEvents->NumRows(); if ($xNumRows) { echo "

Произведения автора:

"; echo "
    "; for($i=0;$i<$xNumRows;$i++) { $dEvents->NextResult(); $xId=$dEvents->Get("id"); $xTitle=$dEvents->Get("title"); echo "
  • «".$xTitle."»\n"; } echo "
"; } echo "
"; 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 "
    "; for ($i=0;$i<$xRows;$i++) { $dAuthors->NextResult(); $xId=$dAuthors->Get("id"); $xName=$dAuthors->Get("name"); echo "
  • ".$xName."\n"; } echo "
"; /* $p=new Pages($xRows,$cRecsPerPage,$fPage); $p->SetScript($ps); $p->SetParameterName("fPage"); $p->SetAddParams("code=$code"); $p->SetShownPages(10); $p->SetDivider(" | "); $p->SetText("Авторы"); $p->SetPrevNext("« назад","дальше »"); $p->SetStyle("current","color:red; font-weight:bold"); $p->SetStyle("dividers","color:C0C0C0; font-size:7pt");*/ echo "
Авторы:
"; // $p->PrintPages(); LetterPages("fL",$fL,$tAuthors); echo "
"; }//-------------------------------!!!!!!!!!!!! echo "
"; Foot(); ?>