currentPage['id']; $currentLangId = $app->current_lang['id']; $page = $db->selectRow("SELECT h1,content,content_img_alt FROM pages WHERE master_id='{$currentPageId}' AND lang={$currentLangId}"); $page["h1"] = stripslashes($page["h1"]); $page["content"] = stripslashes($page["content"]); $page["up_date"] = $db->selectCell("SELECT UNIX_TIMESTAMP(up_date) AS up_date FROM structure WHERE id={$currentPageId}"); $page["show_date"] = $db->selectCell("SELECT show_date FROM structure WHERE id={$currentPageId}"); $page["content_img_alt"] = stripslashes($page["content_img_alt"]); $smarty->assign("page",$page); /*************************************************/ if ($app->currentPage["parent_tmpl"] == "articles") { $recent_videos = $db->select(" SELECT structure.id, structure.show_date, structure.main_img, UNIX_TIMESTAMP(structure.up_date) AS up_date, structure_ext.name, structure_ext.master_id, pages.h1, pages.content, pages.content_img_alt FROM structure,structure_ext,pages WHERE structure.pid={$app->currentPage['parent_id']} AND pages.content_img_alt!='' AND structure_ext.master_id=structure.id AND structure_ext.lang='$currentLangId' AND structure_ext.display='y' AND pages.master_id=structure_ext.master_id AND pages.lang='$currentLangId' AND structure.id!={$currentPageId} ORDER BY structure.up_date DESC LIMIT 9"); foreach($recent_videos as $key => $value){ $recent_videos[$key]["h1"] = stripslashes($value["h1"]); $content = strip_tags($value["content"]); $content = str_replace(" "," ",$content); $content = mb_substr($content,0,130)." ..."; $recent_videos[$key]["preview"] = stripcslashes(nl2br($content)); $recent_videos[$key]["url"] = get_url(array("id"=>$value["id"],"lang"=>$app->current_lang['id'])); } //print_r($recent_videos); $smarty->assign("recent_videos",$recent_videos); } ?>current_lang['id']; $currentPageId = $app->currentPage['id']; $page_banners = $db->selectCell("SELECT banners FROM structure WHERE id={$currentPageId}"); $page_banners = json_decode($page_banners); $tmp = $db->selectCol("SELECT id FROM banner WHERE display='y' AND position='right' ORDER BY sorting"); $tmp = array_merge((array)$page_banners, (array)$tmp); //об'єднання масивів $banners = array(); foreach ($tmp as $key=>$banner_master_id) { $ban_ext = $db->selectRow("SELECT banner_ext.* FROM banner,banner_ext WHERE banner.position='right' AND banner.id='{$banner_master_id}' AND banner_ext.banner_master_id=banner.id AND banner_ext.lang='{$currentLangId}'"); if ($ban_ext) { $banners["{$banner_master_id}"]["sorting"] = $db->selectCell("SELECT sorting FROM banner WHERE id={$banner_master_id}"); $banners["{$banner_master_id}"]["name"] = $ban_ext["name"]; $banners["{$banner_master_id}"]["content"] = $ban_ext["content"]; $banners["{$banner_master_id}"]["design"] = $db->selectCell("SELECT design FROM banner WHERE id={$banner_master_id}"); } } uasort($banners, "sorting_banners"); //print_r($banners); $smarty->assign("banners",$banners); ?>current_lang['id']; $currentPageId = $app->currentPage['id']; $page_banners = $db->selectCell("SELECT banners FROM structure WHERE id={$currentPageId}"); $page_banners = json_decode($page_banners); $tmp = $db->selectCol("SELECT id FROM banner WHERE display='y' AND position='left' ORDER BY sorting"); $tmp = array_merge((array)$page_banners, (array)$tmp); //об'єднання масивів $banners = array(); foreach ($tmp as $key=>$banner_master_id) { $ban_ext = $db->selectRow("SELECT banner_ext.* FROM banner,banner_ext WHERE banner.position='left' AND banner.id='{$banner_master_id}' AND banner_ext.banner_master_id=banner.id AND banner_ext.lang='{$currentLangId}'"); if ($ban_ext) { $banners["{$banner_master_id}"]["sorting"] = $db->selectCell("SELECT sorting FROM banner WHERE id={$banner_master_id}"); $banners["{$banner_master_id}"]["name"] = $ban_ext["name"]; $banners["{$banner_master_id}"]["content"] = $ban_ext["content"]; $banners["{$banner_master_id}"]["design"] = $db->selectCell("SELECT design FROM banner WHERE id={$banner_master_id}"); } } uasort($banners, "sorting_banners"); //print_r($banners); $smarty->assign("banners_top",$banners); ?> Телеканал ВІТА - «Вінниця в мобільному». Цікавитесь, на що можна подивитися у Вінниці окрім фонтану?
20:30
ЩОСУБОТИ
ПостФактум
=>
19:00
ПО БУДНЯХ
Новини
=>
19:30
ПО БУДНЯХ
На часі
=>