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; } $xPreview=""; $century = round($century); $is=0; if ($century) { $dEventOld=$dbMain->Query("SELECT * FROM $tEvents WHERE from_date LIKE '".sprintf("%02d",$century).".%' OR till_date LIKE '".sprintf("%02d",$century).".%' ORDER BY from_date ASC"); Head("Время | $century в.","time"); echo ""; if ($eid) { echo ""; $is=1; //echo ""; } } if (!$is) { Head("Время","time"); echo "
"; $dEvent=$dbMain->Query("SELECT * FROM $tEvents WHERE id=$eid"); if ($dEvent->NumRows()) { $dEvent->NextResult(); $xDate=$dEvent->Get("date"); $xName=$dEvent->Get("event"); $xFromDate=$dEvent->Get("from_date"); $xTillDate=$dEvent->Get("till_date"); echo "

".MakeDate($xFromDate,$xTillDate)."

"; if ($xName) echo "
".str_replace("\n", "

", MakeEvent($xName))."

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

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

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

$century век

"; } else { echo "

$century век

"; $is=1; echo "".($eid?"":"")."
"; } if (!$eid) { echo "
"; echo "

Временной отрезок

"; $dEvents=$dbMain->Query("SELECT * FROM $tEvents ORDER BY from_date"); $xRows=$dEvents->NumRows(); if ($fPage) $dEvents->Seek($fPage); $xLast=0; echo "
    "; for ($i=0;$i<$xRows;$i++) { $dEvents->NextResult(); $xId=$dEvents->Get("id"); $xDate=$dEvents->Get("date"); $xName=$dEvents->Get("event"); $xFromDate=$dEvents->Get("from_date"); $xTillDate=$dEvents->Get("till_date"); $xCentury=substr($xFromDate,0,2); if ($xLast!=$xCentury) { echo "
  • $xCentury в.\n"; $xLast=$xCentury; } } echo "
"; echo "
"; } else echo ""; if ($xMovie) { echo "

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