assign(array("page"=>$page)); if( $tr == 'region' ) { $region = myQuery("select * from menu left join pages on menu.PAGEID=pages.ID where REGION = 1 order by RANK asc"); $smarty -> assign( array( 'region' => $region )); } if( $tr == 'regiony-rossii' ) { $region_ros = myQuery("select * from menu left join pages on menu.PAGEID=pages.ID where REGION = 2 order by MTITLE asc"); $smarty -> assign( array( 'region_ros' => $region_ros )); } if ( $tr == "index") { $tnews=MyQuery("select * from news order by DTIME DESC LIMIT 0,3"); $tarticles=MyQuery("select * from articles order by DTIME DESC LIMIT 0,3"); $smarty->assign(array("tnews"=>$tnews, "tarticles"=>$tarticles)); $smarty->display("main.tpl"); } else { $step = myQuery ("select * from steps order by id"); $smarty -> assign (array("step"=>$step)); $smarty->display("index.tpl"); } ?>