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; } $pid=round($pid); $fL = substr($fL, 0, 3); $is=0; if ($pid) { $dPart=$dbMain->Query("SELECT * FROM $tPart WHERE id=$pid"); if ($dPart->NumRows()) { $dPart->NextResult(); $xName=$dPart->Get("name"); $xTree=$dPart->Get("intree"); Head("Персонажи | $xName","people"); echo ""; $is=1; echo ""; } } if (!$is) { Head("Персонажи | $fL","people"); echo "

$xName
   слайдшоу

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

", $xDescr)."

"; else echo "Информация отстутствует"; if ($xTree) echo "

Посмотреть родословную."; $dEvents=$dbMain->Query("SELECT * FROM $tMain WHERE participants_ids LIKE '% $pid %' ORDER BY title"); $xNumRows=$dEvents->NumRows(); if ($xNumRows) { echo "

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

"; echo "
    "; $xMarquee=""; for($i=0;$i<$xNumRows;$i++) { $dEvents->NextResult(); $xId=$dEvents->Get("id"); $xThumb=$dEvents->Get("thumb"); $xTitle=$dEvents->Get("title"); $xAuthor=$dEvents->Get("author_id"); echo "
  • ".$xTitle." / ".$xAuthors[$xAuthor]."\n"; $xMarquee.="
  • "; } $xMarquee.="
    "; $xMovie=$i; echo "
"; } echo "
"; echo "
"; echo "

Персонажи

"; if ($fL=="%" || !$fL) {$xCond="ORDER BY name LIMIT 30";} else {$xCond="WHERE UPPER(name) LIKE '$fL%' ORDER BY name";} $dPeople=$dbMain->Query("SELECT * FROM $tPart $xCond"); $xRows=$dPeople->NumRows(); if ($fPage) $dPeople->Seek($fPage); echo "
    "; for ($i=0;$i<$cRecsPerPage;$i++) { if ($fPage+$i>=$xRows) break; $dPeople->NextResult(); $xId=$dPeople->Get("id"); $xName=$dPeople->Get("name"); $xDescr=$dPeople->Get("description"); echo "
  • ".$xName."\n"; } 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(); LetterPages("fL",$fL,$tPart); echo "
"; }//----------------!!!!!!!!! echo "
"; echo ""; if ($xMovie) { echo "

".$xMarquee."
"; } Foot(); ?>