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; } $is=0; $cid = round($cid); $fPage = round(fPage); if ($cid) { $dClass=$dbMain->Query("SELECT * FROM $tCath WHERE id=$cid"); if ($dClass->NumRows()) { $dClass->NextResult(); $xName=$dClass->Get("name"); Head("Жанр | $xName","class"); echo ""; $is=1; echo ""; } } if (!$is) { Head("Жанр","class"); echo "

$xName

"; $dCaths=$dbMain->Query("SELECT * FROM $tMain WHERE cath_id=$cid ORDER BY title"); $xNumRows=$dCaths->NumRows(); if ($xNumRows) { echo "
    "; for($i=0;$i<$xNumRows;$i++) { $dCaths->NextResult(); $xId=$dCaths->Get("id"); $xTitle=$dCaths->Get("title"); echo "
  • «".$xTitle."»\n"; } echo "
"; } echo "
"; } echo "
"; echo "

Жанры

"; $dCaths=$dbMain->Query("SELECT * FROM $tCath ORDER BY name"); $xRows=$dCaths->NumRows(); if ($fPage) $dCaths->Seek($fPage); echo "
    "; for ($i=0;$i<$cRecsPerPage;$i++) { if ($fPage+$i>=$xRows) break; $dCaths->NextResult(); $xId=$dCaths->Get("id"); $xName=$dCaths->Get("name"); if (trim($xName) || $xDate) echo "
  • ".$xName."\n"; else $cRecsPerPage++; } echo "
"; $p=new Pages($xRows,$cRecsPerPage,$fPage); $p->SetScript($ps); $p->SetParameterName("fPage"); $p->SetAddParams("code=$code"); $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(); echo "
"; echo "
"; Foot(); ?>