*/ if ($prin==1) $m_item['template_id']=16; //if ($prin==2) $m_item['template_id']=16; $parent_id = $m_item['p_id']; $ref = $menu->getRefererId(); if ($ref) { $m_item['p_id'] = $ref; } ////////////// //print_r($m_item); /////// first time // $bren2= takebrendid($_SESSION['lasturl']); if ($bren2==0) $_SESSION['savebrend']=''; // $_SESSION['lasturl']=$url; /////// first time if ( $fbren==1) $_SESSION['savebrend']=''; $m_item['tags'] = $menu->tags_to_links($m_item['tags']); // //echo 'Sos'; if (isset($search) && $search) { $m_item['type_']=0;// $m_item['id']=-1; $price_s=-1; $f =$search; } // if (in_array($m_item['type_'], array('0')) && !isset($search) && !isset($tag)) // if (in_array($m_item['type_'], array('0')) && !isset($tag)) { //echo 'Sos'; /////// first time if (!(isset($Nid)) ) $Nid=0; if ($bren==0) {$_SESSION["IDF"]= $_SESSION["IDF"] .$_SESSION['savebrend']; } if ($bren!=0) $_SESSION["IDF"]=''; //if (iseet($_SESSION['ot']!='')) if ($_SESSION['ot']!='') { $price_s= $_SESSION['otprice'].';'.$_SESSION['doprice'];} //$outers=Showfiltr($m_item['id'],$url); $index = $menu->get_index($m_item['id'], $m_item['url_id'], $page, PER_PAGE, $f, $price_s,$Nid,$indic); $smarty->assign('index', $index['index']); $smarty->assign('pages', $index['pages']); //$tags = new Tags($smarty); $smarty->assign('tags_filter', $tags->filter($tag, $from_d, $from_m, $from_y, $to_d, $to_m, $to_y)); } elseif (in_array($m_item['type_'], array('3')) && !isset($search) && !isset($tag)) // { if (!isset($image)) $image = 0; $image_block = $menu->get_image($m_item['id'], $m_item['url_id'], $image, 1); $smarty->assign('photo', $image_block); /* if ($image) { $image_block = $menu->get_image($m_item['id'], $m_item['url_id'], $image); $smarty->assign('photo', $image_block); } else { $index = $menu->get_gallery($m_item['id'], $m_item['url_id'], $page, PER_PAGE); $smarty->assign('index', $index['index']); $smarty->assign('pages', $index['pages']); } */ } //// //echo 'SOS'; if (($m_item['type_'] == 4) || ($m_item['type_'] == 5) ) // { $models=''; if ($m_item['type_']==5) { $qu="SELECT * FROM `mr3_tagname` where (p_id=".$m_item['p_id'] . " or p_id=".$m_item['id'] . " or p_id=1) and param=1 order by p_id, position_"; $models=getunder($qu,$m_item['id']); //echo $qu; //echo $models; } $m_item['type_']=4; $brend_list= BrendList($m_item['id'],$url,$parent_id); $smarty->assign('brandname', $_SESSION["rusbrandname"]); $_SESSION["brandname"]=''; $smarty->assign('rusbrandname', $_SESSION["rusbrandname"]); $_SESSION["rusbrandname"]=''; //rusbrand ?? $smarty->assign('brend_list', $brend_list); $smarty->assign('video', $m_item['video']); $smarty->assign('models', $models); if (!isset($image)) $image = 0; $images = $menu->get_image($m_item['id'], $m_item['url_id'], $image, 2); $smarty->assign('images', $images); $m_item['prod_group'] = $menu->getProdGroup($m_item['id'], $parent_id); } ///// if (MENU) { $sub_menu = explode(',', $menu->get_sub_menus(MENU, $m_item['id'])); if (in_array($m_item['id'], $sub_menu)) { $n = $menu->view_menu($m_item['id']); } else { $n = $menu->view_menu(MENU); } } else $n = $menu->view_menu($m_item['id']); //print_r($n); $menu->view_menu_tree(MENU_LEVEL); // //$menu->menu_tree; $smarty->assign('menu', $menu->build_menu()); //$smarty->assign('menu', $menu->n(1, '', true)); $smarty->assign('n1', $menu->n(1)); // $smarty->assign('n2', $menu->n(2)); $smarty->assign('n3', $menu->n(3)); $smarty->assign('tree', $menu->tree($m_item['id'])); $smarty->assign($m_item); $smarty->assign('home', HOME); $smarty->assign('user_form', $user_form); $smarty->assign('search_form', $search_form); $smarty->assign('see_also', $menu->seeAlso($m_item['p_id'], 3,$m_item['recomend'])); $smarty->assign('filter_who', $menu->viewFilter(' ', $f)); $smarty->assign('filter_event', $menu->viewFilter(' ', $f)); $filter_title = rtrim(ucwords(implode(', ', $f)),','); if ($filter_title) { $smarty->assign('title', $filter_title); } $smarty->assign('price_options', $menu->optionsPrice()); $smarty->assign('price_s', $price_s); $smarty->assign('do_filter', $do_filter); ////// poll // include "/home/cscgrou/public_html/manutd.org.ua/poll/poll_cookie.php"; // include_once "/home/cscgrou/public_html/manutd.org.ua/poll/booth.php"; //$php_poll->set_template_set(""); // $poll = $php_poll->poll_process("newest"); // $smarty->assign('poll', $poll); /////////////////////////////SL /////////////////// if ($url=='glossarii') { $categories2 = new Categories(); $out = $categories2->glosub_categories(20264); $res=''; //print_r ($res); foreach ($out as $k => $value2) { $res = $res . $value2['name'] . ' ' . $value2['explo'] . '
' ; //$options[$cat_info['position_']] = $cat_info['position_'].' '.$cat_info['name']; } // $res=''; $m_item['description']= $m_item['description'] . $res ; // '!!!!!!!'; //Showmycat(20264); } if ($m_item['url_id'] == 'sitemap') { $smarty->assign('description', str_replace("%SITEMAP%", $menu->sitemap(0, 1), $m_item['description'])); } $bren= takebrendid($url); // echo $bren; if ($bren!=0) { $_SESSION['savebrend']=$bren.','; $res= $menu->brendcatalog(0, 1,$bren); $smarty->assign('description', str_replace("%brendcatalog%", $res[0], $m_item['description'])); $smarty->assign('brendcatalog', $res[0]); } //$smarty->assign('description', str_replace("%brendcatalog%", $menu->brendcatalog(0, 1,''), $m_item['description'])); $smarty->assign('search_result', $search_result); $outers=''; //$outers='FASD'. $m_item['id']; $asa=getenv("HTTP_REFERER"); $as2= 'https://truba-kiev.com.ua/'.$url.'' ; $as3= 'https://www.truba-kiev.com.ua/'.$url.'' ; //if (( $as2!= $asa ) && ( $as3!= $asa ) && ($asa!='')) $_SESSION["IDF"]=''; if ( ( strpos(' '.$asa, $as2 ) == 0 ) && ( strpos(' '.$asa, $as3 ) == 0 ) && ($asa!='')) $_SESSION["IDF"]=''; if (strlen($url)<=2) $_SESSION["IDF"]=''; //echo "$asa"; ///save brend if ($bren==0) {$_SESSION["IDF"]= $_SESSION["IDF"] .$_SESSION['savebrend']; $_SESSION['savebrend']=''; } if ($bren!=0) $_SESSION["IDF"]=''; //echo $_SESSION['savebrend']; //echo $_SESSION["IDF"]; ///save brend //if (strpos($asa, 'make.php') ==0 ) $_SESSION["IDF"]=''; $outers=Showfiltr($m_item['id'],$url); $smarty->assign('outers', $outers); if ($m_item['type_'] == 4) { $bids= $m_item['p_id']; } else $bids= $m_item['id']; //$Brendi=Brendi($bids,$url); $smarty->assign('Brendi', $Brendi); $res_Brendi=Brendi($bids,$url); $smarty->assign('Brendi', $res_Brendi[0]); $smarty->assign('comboBrendi', $res_Brendi[1]); $_SESSION["controlid"]= $bids; if ($_SESSION["IDF"]!='') { $_SESSION["havetovar"]=1; $_SESSION["ottovar"]='';$_SESSION["dotovar"]=''; } //$_SESSION["hidhelps"]=1; //$_SESSION["hidhelps"]=0; $smarty->assign('hidhelps', $_SESSION["hidhelps"]); $smarty->assign('havetovar', $_SESSION["havetovar"]); $smarty->assign('cae', $_SESSION["cae"]); $smarty->assign('prin', $prin); $smarty->assign('addtv', $_SESSION["addtv"]); $smarty->assign('parent_id', $parent_id); if (strlen($user_message)>=2) $smarty->assign('user_message', $user_message); $_SESSION["addtv"]=0; $_SESSION["showallpages"]=0; /////////////////////////////SL if ($search) $html = $smarty->fetch(lg.'search_result.html'); elseif ($url == 'comparison') { $html = $smarty->fetch(lg.'comparison.html'); } else { $comments = new Comments($smarty); $comments->buildComments($m_item['id']); $smarty->assign('comments', $comments->viewComments($m_item['id'])); //$k=$menu->get_template($m_item['template_id']; //if($prin==0) if ($prin==2) {$html = $smarty->fetch('__order_print.html'); } else $html = $smarty->fetch(lg.$menu->get_template($m_item['template_id'])); // else $smarty->fetch(lg.'__template_print.html'); //echo lg. $menu->get_template($m_item['template_id']); //__template_print.html } header('Content-Type: text/html; charset=windows-1251'); $macros = new Macros($smarty); $macros->apply($html); //echo "!! ". $m_item['p_id']; //echo "!! ". $parent_id; echo ""; // ?>