Query("SELECT * FROM ".$tPart); for ($i=0;$i<$dParts->NumRows();$i++) { $dParts->NextResult(); $xId=$dParts->Get("id"); $xName=$dParts->Get("name"); $xParts[$xId]=$xName; } $xEvents=array(); $dParts=$dbMain->Query("SELECT * FROM $tEvents WHERE visible='true'"); for ($i=0;$i<$dParts->NumRows();$i++) { $dParts->NextResult(); $xId=$dParts->Get("id"); $xName=$dParts->Get("title"); $xEvents[$xId]=$xName; } if ($wid) { $dEvents=$dbMain->Query("SELECT * FROM $tMain WHERE id=$wid AND visible='true'"); if ($dEvents->NumRows()) { $dEvents->NextResult(); $xTitle=$dEvents->Get("title"); } } echo ""; echo ""; $id=(int)$id; $fL=substr($fL,0,1); if (!$id) { if ($fL!="%" && $fL!="") $dWorks=$dbMain->Query("SELECT * FROM $tMain WHERE visible='true' AND UPPER(title) LIKE '$fL%' ORDER BY dat ASC, title ASC"); else $dWorks=$dbMain->Query("SELECT * FROM $tMain WHERE visible='true' AND (LEFT(title,1)<'А' OR LEFT(title,1)>'я') ORDER BY title ASC"); echo ""; } else { $dWorks=$dbMain->Query("SELECT * FROM $tMain WHERE id=$id AND visible='true'"); if ($dWorks->NumRows()) { $dWorks->NextResult(); $xId=$dWorks->Get("id"); $xTitle=$dWorks->Get("title"); $xEventId=$dWorks->Get("event_id"); $xPeople=$dWorks->Get("participants_ids"); $xDat=$dWorks->Get("dat"); $xDescr=trim($dWorks->Get("description")); $xImg=$dWorks->Get("image"); $xThumb=$dWorks->Get("thumbnail"); $xHideBigImage=$dWorks->Get("hide_big_image"); echo "
"; $is=array(); if ($xThumb) $is=@GetImageSize($cThumbImgsPath."/".$xThumb); $al="left"; if ($is[3]) { $iis=@GetImageSize($cImgsPath."/".$xImg); if ($iis[3] && !$xHideBigImage) echo ""; echo ""; /* Чтобы заставить wget скачать эту картинку */ echo ""; if ($iis[3] && !$xHideBigImage) echo ""; } $xDate=mkDate($xDat); echo "

".$xDate." ".$xTitle."

"; if ($xDescr) echo "
Описание: ".nl2br($xDescr); if ($xEventId && !ereg("^ +$", $xEvents[$xEventId])) echo "
Событие: ".$xEvents[$xEventId]; if ($xPeople) { echo "
Участники: "; $xxPeople=split(" ",trim($xPeople)); for ($j=0;$j".$xParts[$xxPeople[$j]].""; } echo "
"; } } echo "

"; LetterPages("fL",$fL); echo "
"; foot(); ?>