Rows($sql); $co_id = $r[0]['co_id']; #-------------------------------------------------------------------------- #NEWS DETAIL $news_id = intval($_GET['id']); $sql1 = " SELECT * FROM tbl_news_com WHERE co_id = '$co_id' AND news_id='$news_id'"; $r1 = $db->Rows($sql1); #NEWS DETAIL THEO CA_ID $ca_id = intval($_GET['ca_id']); $sql11 = " SELECT * FROM tbl_newcat WHERE co_id = '$co_id' AND id='$ca_id'"; $r11 = $db->Rows($sql11); #-------------------------------------------------------------------------- #ORTHER NEWS $sql2 = "SELECT * FROM tbl_news_com WHERE co_id = '$co_id' AND news_id < '$news_id' LIMIT 0,10"; $r2 = $db->Rows($sql2); #--------Menu------------------------------------------------------------ $menu="select tin_tuc,tin_tuckhac,backgrounb from tbl_menubg where co_id='$co_id'"; $row_menu=$db->Rows($menu); #-----option------------------------------------------------------------- $ds = "SELECT * FROM tbl_option WHERE co_id='$co_id'"; $r8=$db->Rows($ds); #-------------------------------------------------------------------------- $smarty->assign("r",$r); $smarty->assign("r1",$r1); $smarty->assign("r11",$r11); $smarty->assign("r2",$r2); $smarty->assign("company",$company); $smarty->assign("row_menu",$row_menu); $smarty->assign("r8",$r8); #-------------------------------------------------------------------------- $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_news_detail.tpl'); ?>