Rows($sql) or die("Hội Doanh Nhân chưa chọn đăng thông tin về Doanh Nghiệp này. Xin quay lại trang chủ "); $co_id = $r[0]['co_id']; #------------------------------------------------------ $ds = "SELECT * FROM tbl_option WHERE co_id='$co_id'"; $r8=$db->Rows($ds); #TIN TUC NOI BAT $sql3 = "SELECT * FROM tbl_news_com WHERE co_id = '$co_id' ORDER BY iOrder, hotnews, post_date DESC LIMIT 0,1"; $r3 = $db->Rows($sql3); $new_id = $r3[0]['news_id']; $sql4 = "SELECT * FROM tbl_news_com WHERE co_id = '$co_id' AND news_id<'$new_id' ORDER BY news_id, iOrder, hotnews, post_date DESC LIMIT 0,3"; $r4 = $db->Rows($sql4); #--------Menu------------------------------------------------------------ $menu="select san_phamtb,loi_chao,backgrounb from tbl_menubg where co_id='$co_id'"; $row_menu=$db->Rows($menu); #----intro--------------------------------------------------------------- $intro="select t.*,c.co_id,c.account from tbl_intro t,tbl_company c where t.co_id=c.co_id and c.co_id='$co_id'"; $r_intro=$db->Rows($intro); #-------------------------------------------------------------------------- $smarty->assign("r",$r); $smarty->assign("r8",$r8); $smarty->assign("company",$company); $smarty->assign("r3",$r3); $smarty->assign("r4",$r4); $smarty->assign("row_menu",$row_menu); $smarty->assign("r_intro",$r_intro); #-------------------------------------------------------------------------- $sqltemp = "Select * From tbl_template a,tbl_company b where a.id_template = b.id_template AND co_id = $co_id"; $rtemp = $db->Rows($sqltemp); #-------------------------------------------------------------------------- $smarty->assign("rtemp",$rtemp); $smarty->display($template_root.$rtemp[0]["url_template"].'/e-store.tpl'); ?>