Церковь адвентистов седьмого дня в Украине http://www.adventist.org.ua/ Церковь адвентистов седьмого дня в Украине ru adventist.org.ua"; $sql='(SELECT cid, name_ru, created, url_name, "_catalog", "" FROM '.$dbprefix.'categories WHERE status=1 AND show_menu=1 AND link2page="" AND url_name!="" AND cid NOT IN (SELECT parentid FROM '.$dbprefix.'categories GROUP by parentid) ORDER By created DESC, name_ru)'."\n" .'UNION ' .'(SELECT id, name, created, "", "_fotogallery", cover_img FROM '.$dbprefix.'gallery_cat WHERE parentid=1 and status!=2 ORDER by id DESC LIMIT 0,10) ' .'UNION ' .'(SELECT cid, name_ru, created, url_name, "_mp3", "" FROM '.$dbprefix.'audio WHERE status=1 AND parentid=7 ORDER by created DESC) ' .'UNION ' .'(SELECT cid, name_ru, created, url_name, "_vsermons", "" FROM '.$dbprefix.'audio WHERE status=1 AND parentid=31 ORDER by created DESC) ' .'UNION ' .'(SELECT nid, name_ru, created, url_name, "_interview", "" FROM '.$dbprefix.'newsworld WHERE status=1 AND type=4 ORDER by created DESC) ' .'UNION ' .'(SELECT nid, name_ru, created, url_name, "_lifestory", "" FROM '.$dbprefix.'newsworld WHERE status=1 AND type=3 ORDER by created DESC) ' .'UNION ' .'(SELECT nid, name_ru, created, url_name, "_newshealth", "" FROM '.$dbprefix.'newsworld WHERE status=1 AND type=2 ORDER by created DESC) ' .'UNION ' .'(SELECT nid, name_ru, created, url_name, "_newsworld", "" FROM '.$dbprefix.'newsworld WHERE status=1 AND type=1 ORDER by created DESC) ' .'UNION ' .'(SELECT nid, name_ru, created, url_name, "_news", main_image FROM '.$dbprefix.'news WHERE status=1 ORDER by created DESC) ' .'UNION ' .'(SELECT id, descr, created, filename, "_downloads", "" FROM '.$dbprefix.'downloads WHERE status=1 AND show_main=1 ORDER by created DESC) ' .' ORDER by created DESC LIMIT 0,20'; $result=MYSQL_QUERY($sql) or die(mysql_error()); while ($row=MYSQL_FETCH_ARRAY($result)){ $id=$row[0]; $title=$row['name_ru']; $gmtTime=$row['created']-10800; $date=date("D, j M Y G:i:s",$gmtTime); $date.=' GMT'; $url=$row['url_name']; $foto=$row[5]; echo " $title"; switch($row[4]){ case '_catalog': echo "http://www.adventist.org.ua/article/{$url}/"; $parLastID=$curCID=$row[0]; $gotLastPath=''; while($parLastID!=0){ $rez=mysql_query('SELECT cid, name_ru, parentid, url_name FROM '.$dbprefix.'categories WHERE status=1 AND cid="'.$parLastID.'"') or die(mysql_error()); $gotLastParent=mysql_fetch_row($rez); if($gotLastParent[1]!=$title) $gotLastPath.=$gotLastParent[1].' | '; $parLastID=$gotLastParent[2]; } echo "".substr($gotLastPath,0,-3).""; break; case '_fotogallery': echo "http://www.adventist.org.ua/gallery/{$id}/"; echo "]]>"; break; case '_mp3': echo "http://www.adventist.org.ua/audio/{$url}/"; echo "".'Аудіопроповіді :: Церковь адвентистов седьмого дня'.""; break; case '_vsermons': echo "http://www.adventist.org.ua/vsermon/{$url}/"; echo "".'Відеопроповіді :: Церковь адвентистов седьмого дня'.""; break; case '_interview': echo "http://www.adventist.org.ua/interview/{$url}/"; echo "".'Інтерв\'ю :: Церковь адвентистов седьмого дня'.""; break; case '_lifestory': echo "http://www.adventist.org.ua/lifestory/{$url}/"; echo "".'Життєві історіі :: Церковь адвентистов седьмого дня'.""; break; case '_newshealth': echo "http://www.adventist.org.ua/worldnews/{$url}/"; echo "".'ЗМІ про здоров\'я :: Церковь адвентистов седьмого дня'.""; break; case '_newsworld': echo "http://www.adventist.org.ua/worldnews/{$url}/"; echo "".'Новини у ЗМІ :: Церковь адвентистов седьмого дня'.""; break; case '_news': echo "http://www.adventist.org.ua/news_{$url}.html"; echo "]]>"; break; case '_downloads': echo "http://www.adventist.org.ua/download/{$id}/"; echo "".'Каталог файлів :: Церковь адвентистов седьмого дня'.""; break; } echo " $date "; } echo ' '; ?>