"; //print_r($_POST); //echo ""; if ($_POST['search_place']) { $ser_pl = $_POST['search_place']; $ser_txt = urlencode($_POST['text']); switch($ser_pl) { case 'katalog': $prt='search'; break; case 'forum': $redir = "http://www.mytischi.ru/forums/index.php?act=Search&CODE=simpleresults&mode=adv&prune=0&sForm=1&forums=all&sortby=relevant&keywords=".$ser_txt; f::redir_sp($redir); break; case 'full_site': case 'yandex': $redir = "http://yandex.ru/sitesearch?text=".$ser_txt."&searchid=1026846&web=0&lr=213"; /* $redir = "http://yandex.ru/yandsearch?text=".$ser_txt."&words=&filter=www.mytischi.ru&q=&as_sitesearch=www.mytischi.ru&hl=ru&serverurl=www.mytischi.ru&server_name=%CE+%E3%EE%F0%EE%E4%E5+%CC%FB%F2%E8%F9%E8"; */ f::redir_sp($redir); break; case 'rambler': $redir = "http://nova.rambler.ru/search?text=".$ser_txt."&words=".$ser_txt."&filter=www.mytischi.ru&q=&as_sitesearch=www.mytischi.ru&hl=ru&serverurl=www.mytischi.ru&server_name=%CE+%E3%EE%F0%EE%E4%E5+%CC%FB%F2%E8%F9%E8"; f::redir_sp($redir); break; } } include(PATH_CLS.'db.cls.php'); include(PATH_INC.'dbconnect.inc.php'); /*Smarty init*/ require(PATH_INC.'../inc/smarty/Smarty.class.php'); $Smarty = new Smarty; $Smarty->template_dir = PATH_TPL; $Smarty->compile_dir='../templates_c'; /* */ include(PATH_CLS.'form.cls.php'); include(PATH_CLS.'getdata.cls.php'); require(PATH_CLS.'xobject.cls.php'); require(PATH_CLS.'xselect.cls.php'); require(PATH_CLS.'xpagesnavigation.cls.php'); require(PATH_OBJ.'config.obj.php'); require(PATH_OBJ.'last5.obj.php'); require(PATH_OBJ.'ssi.obj.php'); $captcha = '../kcaptcha/index.php?'.session_name().'='.session_id(); $Smarty->assign('captcha', $captcha); if ($_POST['form_type']==2) require(PATH_OBJ.'reg_form.obj.php'); if ($_POST['form_type']==3) require(PATH_OBJ.'reg_form2.obj.php'); require(PATH_OBJ.'ra.obj.php'); $LimitStart=1; $Smarty->assign('THIS_URL_FULL', $THIS_URL_FULL); $Smarty->assign('THIS_URL', $THIS_URL); $TPL_MAIN = 'main.html'; $_TPL['tpl_top'] = 'top.html'; $_TPL['tpl_bot'] = 'bot.html'; $_TPL['tpl_form'] = 'add_form.html'; $_TPL['top_banners'] = 'top_banners.html'; $search = ($_POST['search'])? $_POST['search']:$_POST['text']; $name = $_POST['name']; $info = $_POST['info']; $address = $_POST['address']; $phone = $_POST['phone']; $s_url = $_POST['s_url']; $s_email = $_POST['s_email']; if ($_POST['search']) { $search = $_POST['search']; $name = $_POST['name']; $info = $_POST['info']; $address = $_POST['address']; $phone = $_POST['phone']; $s_url = $_POST['s_url']; $s_email = $_POST['s_email']; } else { $search = $_POST['text']; $name = ($_POST['name'])?$_POST['name']:1; $info = ($_POST['info'])?$_POST['info']:1; $address = ($_POST['address'])?$_POST['address']:1; $phone = ($_POST['phone'])?$_POST['phone']:1; $s_url = ($_POST['s_url'])?$_POST['s_url']:1; $s_email = ($_POST['s_email'])?$_POST['s_email']:1; } $search_cond=' Название   Информация   Адрес   Телефон   Url   Email
'; $Smarty->assign('search_cond',$search_cond); //echo "prt = ".$_GET['prt']."
prm1 = ".$_GET['prm1']." search = ".$_GET['search']."
"; if (!$_POST['search_place']) $prt = addslashes($_GET['prt']); $prm1 = intval($_GET['prm1']); $prm2 = intval($_GET['prm2']); $page = intval($_GET['page']); if ($page) $LimitStart=$page; if ($prt=='rules') { $_TPL['tpl_content'] = "help_rules.html"; } elseif ($prt=='add_ok') { $_TPL['tpl_content'] = "add_ok.html"; } elseif ($prt=='mist_ok') { $_TPL['tpl_content'] = "mist_ok.html"; } elseif ($prt=='search'){ require(PATH_OBJ.'search.obj.php'); $_TPL['tpl_content'] = "search_results.html"; } elseif (!$prt) { require(PATH_OBJ.'catalogue_menu.obj.php'); $_TPL['tpl_content'] = "cat_lvl_1.html"; }elseif ($prt && !$prm1) { require(PATH_OBJ.'catalogue_menu.obj.php'); $_TPL['tpl_content'] = "cat_lvl_2.html"; }elseif ($prt && $prm1 && !$prm2) { require(PATH_OBJ.'catalogue.obj.php'); $_TPL['tpl_content'] = "cat_lvl_3.html"; }elseif ($prm2) { require(PATH_OBJ.'catalogue.obj.php'); $_TPL['tpl_content'] = "cat_lvl_4.html"; } //require(PATH_OBJ.'menu.obj.php'); //$_TPL['tpl_menu'] = 'menu.html'; //$_TPL['tpl_menu2'] = 'menu2.html'; // //if(!$PART||$PART=='index') //{ // $PART=$FIRST_PART; // $PARAM1=$FIRST_PARAM1; // // if(is_array($_URL)) // { // foreach($_URL as $key => $val) // { // if(substr($val,0,4)!='page') // { // $THIS_URL.=$val.'/'; // } // $THIS_URL_FULL.=$val.'/'; // } // } // //$Smarty->assign('THIS_URL_FULL', $THIS_URL_FULL); //$Smarty->assign('THIS_URL', $THIS_URL); //} // // ////echo "PART = ".$PART; //require(PATH_OBJ.'contacts.obj.php'); //require(PATH_OBJ.'partners.obj.php'); //require(PATH_OBJ.'banners.obj.php'); //require(PATH_OBJ.'adress.obj.php'); //require(PATH_OBJ.'fotogalery_1.obj.php'); //$fb = rand(1,11); // //switch($PART) // // { // case 'news': // require(PATH_OBJ.'news.obj.php'); // break; // // case 'print': // $TPL_MAIN = 'print.html'; // break; // // case 'page': // $_TPL['tpl_content'] = 'page.html'; // require(PATH_OBJ.'page.obj.php'); // break; // // case 'sitemap': // $_TPL['tpl_content'] = 'sitemap.html'; // require(PATH_OBJ.'sitemap.obj.php'); // break; // } // //require(PATH_OBJ.'news2left.obj.php'); //require('meta.req.php'); // ///*404*/ // require(PATH_OBJ.'code_ban.obj.php'); if($DO_404) { header("HTTP/1.0 404 Not Found"); require(PATH_OBJ.'404_text.obj.php'); $_TPL['tpl_content'] = '404.html'; } /////*\404*/ $Smarty->assign('PART', $prt); $Smarty->assign('PARAM1', $prm1); //$Smarty->assign('PART', $PART); //$Smarty->assign('PARAM1', $PARAM1); //$Smarty->assign('PARAM2', $PARAM2); //$Smarty->assign('PARAM3', $PARAM3); //$Smarty->assign('PARAM4', $PARAM4); //$Smarty->assign('LAST_PARAM', $LAST_PARAM); ////$Smarty->assign('fb', $fb); if(is_array($_TPL)) { $_TPL=array_reverse($_TPL); foreach($_TPL as $key => $val) { $Smarty->assign($key, $Smarty->fetch($val)); // echo "k: ".$key." || val: ".$val."
"; } } $Smarty->display($TPL_MAIN); ?>