sql_query($sql)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql); } $mem_data = $db->sql_fetchrow($result); ?> sql_query($sqldefault)){ message_die("Couldn't run the sql query!!!1","",__LINE__,__FILE__,$sqldefault); } $setdefault=$db->sql_fetchrow($result); if($mode =="home" || $mode == "view" || $mode =="duc" || " " || $mode="catalog") { $u_tite = $setdefault['webtitle']; $description = $setdefault['description']; $keyword_vn = $setdefault['keyword']; //$u_tite = $title; } if($mode == 'productDetail'){ $proid = isset($_GET["pid"]) ? $_GET["pid"] : 0; $sql = "select vb_prolang.name, vb_prolang.seo_description, vb_prolang.seo_keyword, vb_prolang.seo_title from vb_prolang, vb_products where vb_prolang.proid = vb_products.proID and vb_prolang.lang_cat =".$lag." and vb_products.proID=".$proid; if(!$result = $db->sql_query($sql)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql); } $pro_data = $db->sql_fetchrow($result); if($pro_data['seo_title'] == NULL) { $u_tite = $pro_data["name"]; }else{ $u_tite = $pro_data["seo_title"]; } $description = $pro_data['seo_keyword']; $keyword_vn = $pro_data['seo_description']; } if($mode == 'catalog') { $sql="SELECT * FROM vb_categorylang WHERE lang_cat =".$lag." and catid =".$catID; if(!$result=$db->sql_query($sql)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql); } $pro_count=$db->sql_numrows($result); $pro_data=$db->sql_fetchrow($result); $u_tite =$pro_data['title']; $description = $pro_data['description']; } if($mode=='news') { $newsid=isset($_GET["newid"]) ? intval($_GET["newid"]) : 0 ; $sql="select * from vb_news where newid = ".$newsid." and idmem =".$cid; if(!$result=$db->sql_query($sql)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql); } $mem_title=$db->sql_fetchrow($result); $u_tite = $mem_title["title"]; } ?>
sql_query($sql)){ message_die("Couldn't run the sql query!!!1","",__LINE__,__FILE__,$sql); } $pro_count_lg=$db->sql_numrows($result); $pro_data_lg=$db->sql_fetchrowset($result); ?> sql_query($sqllang_d)){ message_die("Couldn't run the sql query!!!1","",__LINE__,__FILE__,$sqllang_d); } $lang_count=$db->sql_numrows($result); $lang_data=$db->sql_fetchrowset($result); if($lang_count > 1) { ?>


sql_query($sql_slide)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql_slide); } $slide_data=$db->sql_fetchrowset($result); foreach($slide_data as $dsslide) { $slide .='
'.$dsslide["title"].'
'; } //#slide // 17-06-14 =====// $sql="select * from vb_products where memID = ".$cid." and sethome = 1 order by proID desc limit 0 ,6"; if(!$result=$db->sql_query($sql)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql); } $pro_count=$db->sql_numrows($result); $pro_data=$db->sql_fetchrowset($result); $j=1; $str .= ""; // HIEN THI THONG TIN SAN PHAM for($i=0;$i<$pro_count;$i++){ //pro link 02-07 $proLink ='p/'.strtolower(str_replace(' ', '-', convert_vi_to_en($pro_data[$i]["ProductName_vn"]))).'-'.$memid.'-'.$pro_data[$i]["proID"].'-'.$pro_data[$i]["catID"].'.html' ; //$proLink ='p/'.$pro_data[$i]["ProductName_vn"].'-'.$memid.'-'.$pro_data[$i]["proID"].'-'.$pro_data[$i]["catID"].'.html' ; //23-05 $proLink = 'http://sh.yellowpages.vn/vn/supplier.php?supplier='.$memid.'&act=products&mode=productDetail&pid='.$pro_data[$i]["proID"]."&catID=".$pro_data[$i]["catID"]."&ids=".$ids."&lang=vn"; $proImage = ''; $sqllang = "SELECT * FROM `vb_prolang` WHERE `lang_cat` =".$lag." and proid =".$pro_data[$i]["proID"]." limit 0 ,5 "; if(!$resultlg=$db->sql_query($sqllang)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sqllang); } $ds_prolang=$db->sql_fetchrowset($resultlg); $str .= '

'.$ds_prolang[0]["name"].'

'.strip_tags(html_entity_decode($ds_prolang[0]["description"])).'

'; if(($i+1)%3==0){ $str.= '
'; } } $str .= '
'; $popularpost =''; $sqlnews="select vb_newslang.title, vb_newslang.description, vb_news.newid, vb_news.lastedit , vb_news.images from vb_news, vb_newslang where vb_newslang.newsid = vb_news.newid and catactive = 1 and vb_newslang.lang_cat =".$lag." and idmem =".$cid." order by newid desc limit 0, 2"; if(!$resultnew=$db->sql_query($sqlnews)){ message_die("Couldn't run the sql query!!!2","",__LINE__,__FILE__,$sqlnews); } $news_data=$db->sql_fetchrowset($resultnew); foreach($news_data as $datanw) { $description = strip_tags($datanw["description"], $allow_tags); if(mb_strlen($description, 'utf8') > 400) { $description = mb_substr($description, 0, 400, 'utf8').'...'; } $urlseo = strtolower(str_replace(' ', '-', convert_vi_to_en($datanw['title'] ))) ; $popularpost .= '

'.$datanw["title"].'

'.strip_tags(htmlspecialchars_decode($description)).''.$pro_data_lg[7]['new_setting'].'

'; } //set language $sqltem_d = "SELECT * FROM vb_choose_temp WHERE idmem =".$cid; $rs_d = mysql_query($sqltem_d); while($r_d = mysql_fetch_array($rs_d)) { $idtemp_d = $r_d["idtemp"]; $idmem_d = $r_d["idmem"]; } $sql="select * from vb_language_temp WHERE lang_cat =".$lag." and idtemp = ".$idtemp_d." and idmem =".$cid." order by noorder asc"; if(!$result=$db->sql_query($sql)){ message_die("Couldn't run the sql query!!!1","",__LINE__,__FILE__,$sql); } $pro_count_lg=$db->sql_numrows($result); $pro_data_lg=$db->sql_fetchrowset($result); $toppr = $pro_data_lg[4]['new_setting']; //load gioi thieu cong ty $sql="select * from vb_companyprofilelang where lang_cat = ".$lag." and memid=".$cid; if(!$result=$db->sql_query($sql)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql); } $mem_data = $db->sql_fetchrow($result); $barner = $site_base_href.'/barner/'.$mem_banner["comImage"]; $template->assign_vars(array( 'gttt' =>$pro_data_lg[1]['new_setting'], 'barner' =>$barner, 'popularpost' =>$popularpost, 'engagement' =>$pro_data_lg[5]['new_setting'], 'slide' => $slide, 'centerabuot' =>htmlspecialchars_decode($mem_data['cominfor']), 'toppr' => $toppr, 'str' =>$str, 'us' =>$us, 'cn' =>$cn, 'vn' =>$vn, 'showlinklang' =>showlinklang(), 'com_photo' => !empty($mem_data["barner"]) ? "" : '' , 'companyName' => $mem_data["CompanyName_vn"], 'maintitle' =>$mem_data["CompanyName_vn"], 'photo' => !empty($mem_data["comImage"]) ? "" : '' , 'info' => $comInfo, 'company' => $mem_data["CompanyName_vn"], 'ContactName' => ($mem_data["Sex"]=="Male" ? "Ông " : "Bà ") .$memName, 'Address' =>str_replace(",","",$mem_data["Address_vn"]), 'email' => $stremail, 'Website' =>$strweb, 'city' =>$mem_data["City_vn"].", ".getContry($mem_data["countryID"]), 'zipCode' => $mem_data["Zip"], 'Telephone' => $mem_data["contrycode"] ."-".$mem_data["areacode"]."-".$mem_data["BusinessPhone"], 'divmobi' => !empty($mem_data["Mobile"]) ? 'bock' : 'none', 'divtel' => !empty($mem_data["BusinessPhone"]) ? 'bock' : 'none', 'divfax' => !empty($mem_data["FaxNumber"]) ? 'bock' : 'none', 'divweb' => !empty($mem_data["Web"]) ? 'bock' : 'none', 'divcontactName' =>strlen($memName)>9 ? 'bock' : 'none', 'mobiphone' =>$mem_data["Mobile"], 'fax' =>$mem_data["faxcontrycode"] ."-".$mem_data["faxareacode"]."-".$mem_data["FaxNumber"], 'aboutInfoSimple' =>$info_simple, 'aboutInfo' =>$mem_data["aboutInfo_vn"], 'supp' =>$memid, 'fNoproduct' =>$pro_count > 0 ? '' : 'style="display:none"' , 'companyExecutive' => ($mem_data["Sex"]=="Male" ? "Ông. " : (($mem_data["Sex"]=="Female ")? "Bà. " : "")) . $mem_data["lName_vn"] ." ".$mem_data["fName_vn"], 'url' =>"supplier.php?&act=productslarge&mode=main&supplier=".$memid."&ids=".$ids."&lang=vn" )); $template->set_filenames(array( "body" => $template_body_page )); $template->pparse('body'); } function main_old(){ global $template,$site_base_href, $base_url, $template_body_page,$db,$cid,$ids ; $memid=isset($_GET["supplier"]) ? intval($_GET["supplier"]) : 0 ; //tri: hien thi so luong hinh anh tuy theo so dong truy van //$sql="select sImages,ProductName_vn,proID,catID from vb_products where setHome=1 and memID=".$memid." limit 4"; $sql="select sImages,ProductName_vn,proID,catID from vb_products where setHome=1 and memID=".$memid." limit 6"; if(!$result=$db->sql_query($sql)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql); } $pro_count=$db->sql_numrows($result); $pro_data=$db->sql_fetchrowset($result); for($i=0;$i<$pro_count;$i++){ $template->assign_block_vars("proRow", array( 'proLink' =>'supplier.php?supplier='.$memid.'&act=products&mode=productDetail&pid='.$pro_data[$i]["proID"]."&catID=".$pro_data[$i]["catID"]."&ids=".$ids."&lang=vn", 'proImage' =>'', 'proName' => $pro_data[$i]["ProductName_vn"] )); } $sql="select m.memID, m.FirstName, m.LastName, m.CompanyName,m.CompanyName_cn, m.Sex, m.AlternativeEmail,m. BusinessType, m.IndustryCategory, m.NumberEmployees, m.Address, m.City, m.State, m.Zip, m.Web, m.JobTitle, m.contrycode, m.areacode, m.BusinessPhone, m.faxcontrycode, m.faxareacode, m.FaxNumber, m.Mobile, m.fName, m.countryID, m.orthJob, m.lName, m.CompanyName_vn, m.Address_vn, m.fName_vn, m.lName_vn, m.FirstName_vn, m.LastName_vn, m.City_vn, m.State_vn, m.orthJob_vn, m.lastEdit, m.lastEdit_vn, m.id,c.* from vb_companyprofile c inner join vb_memberprofile m on c.memID=m.memID where c.memID=".$memid; if(!$result=$db->sql_query($sql)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql); } $mem_data=$db->sql_fetchrow($result); if(!$mem_data["memID"]){ redirect("index.php"); } $detail=html_entity_decode(nl2br($mem_data["aboutInfo_vn"])); $arrStr=explode(' ',$detail); $k= count($arrStr)<40 ? count($arrStr) :40; $detail=''; for($j=0;$j<$k;$j++){ $detail.=$arrStr[$j].' '; } $comInfo= '
'.$detail; if($k==40){ $comInfo.=" ...
Chi tiết     
"; }else{ $comInfo.=''; } //tri: chon hien thi lien ket ngon ngu $memName=$mem_data["lName_vn"] ." ".$mem_data["fName_vn"]; $vn=" Tiếng Việt " ; $cn=" 中文版 " ; $us=" English " ; $template->assign_vars(array( 'us' =>$us, 'cn' =>$cn, 'vn' =>$vn, 'showlinklang' =>showlinklang(), 'com_photo' => !empty($mem_data["barner"]) ? "" : '' , 'companyName' => $mem_data["CompanyName_vn"], 'maintitle' =>$mem_data["CompanyName_vn"], 'photo' => !empty($mem_data["comImage"]) ? "" : '' , 'info' => $comInfo, 'company' => $mem_data["CompanyName_vn"], 'ContactName' => ($mem_data["Sex"]=="Male" ? "Ông " : "Bà ") .$memName, 'Address' =>$mem_data["Address_vn"], 'city' =>$mem_data["City_vn"].", ".getContry($mem_data["countryID"]), 'zipCode' => $mem_data["Zip"], 'Telephone' => $mem_data["contrycode"] ."-".$mem_data["areacode"]."-".$mem_data["BusinessPhone"], 'divmobi' => !empty($mem_data["Mobile"]) ? 'bock' : 'none', 'divtel' => !empty($mem_data["BusinessPhone"]) ? 'bock' : 'none', 'divfax' => !empty($mem_data["FaxNumber"]) ? 'bock' : 'none', 'divweb' => !empty($mem_data["Web"]) ? 'bock' : 'none', 'divcontactName' =>strlen($memName)>9 ? 'bock' : 'none', 'mobiphone' =>$mem_data["Mobile"], 'fax' =>$mem_data["faxcontrycode"] ."-".$mem_data["faxareacode"]."-".$mem_data["FaxNumber"], 'Website' =>$mem_data["Web"], 'supp' =>$memid, 'fNoproduct' =>$pro_count > 0 ? '' : 'style="display:none"' , 'url' =>"supplier.php?&act=productslarge&mode=main&supplier=".$memid."&ids=".$ids."&lang=vn" )); $template->set_filenames(array( "body" => $template_body_page )); $template->pparse('body'); } function ViewDetail(){ global $template_detail_page,$db,$template,$ids,$cid,$lag,$site_base_href,$pro_data_lg ; $memid=isset($_GET["supplier"]) ? intval($_GET["supplier"]) : 0 ; if (isset($_POST['sendmail']) && $_POST['sendmail'] == "Gửi") { require_once('clsemail.php'); $mail = "haminhduc06@gmail.com"; $name = $_POST['userName']; $userEmail = $_POST['userEmail']; $userPhone = $_POST['userPhone']; $userMsg = $_POST['userMsg']; $cc = $name."( ".$userPhone. " )"; $body = ""; $k = "Webmaster"; //goi ham gui mail $clsEmail = new sendEmail($cc, $k,$mail); $clsEmail -> setHeader( $_POST, $k); $clsEmail -> setBody($userMsg, $k); $clsEmail -> sendit($_POST, $k,'sa'); }// ket thut ham gui mail // 18-06-14 load ngon ngu trang gioi thieu cong ty $sqlsl="select * from vb_companyprofilelang where lang_cat =".$lag." and memid = ".$cid; if(!$resultsl=$db->sql_query($sqlsl)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sqlsl); } $selectlang = $db->sql_fetchrow($resultsl); //load danh muc san pham $categories =""; $sql_slide = "SELECT * FROM vb_category WHERE memID =".$cid." limit 0, 7"; $rs_slide = mysql_query($sql_slide); while($r_d = mysql_fetch_array($rs_slide)) { $sql="select * from vb_categorylang WHERE lang_cat =".$lag." and catid = ".$r_d["catID"]; $result = $db->sql_query($sql); $cat_lag = $db->sql_fetchrow($result); $categories .='
  • '.$cat_lag['catname'].'
  • '; } //load post new $popularpost =""; $sqlnews="select vb_newslang.title, vb_news.newid, vb_news.lastedit , vb_news.images from vb_news, vb_newslang where vb_newslang.newsid = vb_news.newid and catactive = 1 and vb_newslang.lang_cat =".$lag." and idmem =".$cid." order by newid desc limit 0, 7"; if(!$resultnew=$db->sql_query($sqlnews)){ message_die("Couldn't run the sql query!!!2","",__LINE__,__FILE__,$sqlnews); } $news_data=$db->sql_fetchrowset($resultnew); foreach($news_data as $datanw) { $urlseo = strtolower(str_replace(' ', '-', convert_vi_to_en($datanw['title'] ))) ; $popularpost .='

    '.$datanw['title'].'

    '.$datanw['lastedit'].'

    '; } $comInfo_new=strlen($selectlang["cominfor"])<250 ? html_entity_decode($selectlang["cominfor"]) : html_entity_decode($selectlang["cominfor"]); $sql="select m.memID, m.FirstName, m.LastName, m.CompanyName, m.Sex, m.AlternativeEmail,m. BusinessType, m.IndustryCategory, m.NumberEmployees, m.Address, m.City, m.State, m.Zip, m.Web, m.JobTitle, m.contrycode, m.areacode, m.BusinessPhone, m.faxcontrycode, m.faxareacode, m.FaxNumber, m.Mobile, m.fName, m.countryID, m.orthJob, m.lName, m.CompanyName_vn, m.Address_vn, m.fName_vn, m.lName_vn, m.FirstName_vn, m.LastName_vn, m.City_vn, m.State_vn, m.orthJob_vn, m.lastEdit, m.lastEdit_vn, m.id,c.* from vb_companyprofile c inner join vb_memberprofile m on c.memID=m.memID where c.memID=".$cid; if(!$result=$db->sql_query($sql)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql); } $mem_data=$db->sql_fetchrow($result); if(!$mem_data["memID"]){ //redirect("index.php?ids=".$ids); } $comInfo=strlen($mem_data["aboutInfo_vn"])<250 ? html_entity_decode(nl2br($mem_data["aboutInfo_vn"])) : html_entity_decode($mem_data["aboutInfo_vn"]); ////=======end====== $memName=$mem_data["lName_vn"] ." ".$mem_data["fName_vn"]; $template->assign_vars(array( 'toptitle' => $pro_data_lg[1]['new_setting'], 'aboutus' => trim(strip_tags(htmlspecialchars_decode($selectlang['cominfor']))," "), 'abconten' => htmlspecialchars_decode($selectlang['conten']), 'categories' =>$categories, 'popularpost' => $popularpost, 'update' => $mem_data["lastEdit_vn"], 'barner' => $site_base_href.'/barner/'.$mem_data["comImage"], 'supp' =>$memid, 'companyName' => $mem_data["CompanyName_vn"], 'maintitle' => $mem_data["CompanyName_vn"], 'Name' => $pro_data_lg[6]['new_setting'], 'Email' => $pro_data_lg[7]['new_setting'], 'Website' => $pro_data_lg[8]['new_setting'], 'submit' => $pro_data_lg[9]['new_setting'], 'logo' => !empty($mem_data["barner"]) ? "" : '' , 'photo' => !empty($mem_data["comImage"]) ? "" : '' , //oll 'cominfo' => $comInfo, 'cominfo' => $comInfo_new, 'company' => $mem_data["CompanyName_vn"], 'ContactName' => ($mem_data["Sex"]=="Male" ? "Ông " : "Bà ") .$mem_data["lName_vn"] ." ".$mem_data["fName_vn"], 'Address' =>$mem_data["Address_vn"], 'city' =>$mem_data["City_vn"].", ".getContry($mem_data["countryID"]), 'zipCode' => $mem_data["Zip"], 'Telephone' => $mem_data["contrycode"] ."-".$mem_data["areacode"]."-".$mem_data["BusinessPhone"], 'mobiphone' =>$mem_data["Mobile"], 'fax' =>$mem_data["faxcontrycode"] ."-".$mem_data["faxareacode"]."-".$mem_data["FaxNumber"], //'Website' =>$mem_data["Web"], 'divtel' => !empty($mem_data["BusinessPhone"]) ? 'bock' : 'none', 'divmobi' => !empty($mem_data["Mobile"]) ? 'bock' : 'none', 'divfax' => !empty($mem_data["FaxNumber"]) ? 'bock' : 'none', 'divweb' => !empty($mem_data["Web"]) ? 'bock' : 'none', 'divcontactName' =>strlen($memName)>9 ? 'bock' : 'none', )); $template->set_filenames(array( "body" => $template_detail_page )); $template->pparse('body'); } function Viewnews(){ global $template_detailnews_page,$db,$template,$ids,$cid,$lag,$site_base_href ,$pro_data_lg, $use_url; $memid=isset($_GET["supplier"]) ? intval($_GET["supplier"]) : 0 ; $newsid=isset($_GET["newid"]) ? intval($_GET["newid"]) : 0 ; // 18-06-14 load ngon ngu trang gioi thieu cong ty $sqlsl="select * from vb_companyprofilelang where lang_cat =".$lag." and memid = ".$cid; if(!$resultsl=$db->sql_query($sqlsl)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sqlsl); } $selectlang = $db->sql_fetchrow($resultsl); //load danh muc san pham $categories =""; $sql_slide = "SELECT * FROM vb_category WHERE memID =".$cid." limit 0, 7"; $rs_slide = mysql_query($sql_slide); while($r_d = mysql_fetch_array($rs_slide)) { $sql="select * from vb_categorylang WHERE lang_cat =".$lag." and catid = ".$r_d["catID"]; $result = $db->sql_query($sql); $cat_lag = $db->sql_fetchrow($result); $categories .='
  • '.$cat_lag['catname'].'
  • '; } //load post new $popularpost =""; $sqlnews="select vb_newslang.title, vb_news.newid, vb_news.lastedit , vb_news.images, vb_news.lastedit from vb_news, vb_newslang where vb_newslang.newsid = vb_news.newid and catactive = 1 and vb_newslang.lang_cat =".$lag." and idmem =".$cid." order by newid desc limit 0, 7"; if(!$resultnew=$db->sql_query($sqlnews)){ message_die("Couldn't run the sql query!!!2","",__LINE__,__FILE__,$sqlnews); } $news_data=$db->sql_fetchrowset($resultnew); foreach($news_data as $datanw) { $urlseo = strtolower(str_replace(' ', '-', convert_vi_to_en($datanw['title'] ))) ; $popularpost .='
  • '.$datanw['title'].'
  • '; } $sql="SELECT * FROM `vb_newslang` WHERE `newsid` = ".$newsid." and lang_cat =".$lag; if(!$result=$db->sql_query($sql)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql); } $news_data=$db->sql_fetchrow($result); if(!$news_data["newsid"]){ //redirect("index.php?ids=".$ids); } $comInfo=strlen($mem_data["content"])<250 ? html_entity_decode(nl2br($mem_data["content"])) : html_entity_decode(nl2br($mem_data["content"])); $memName = $news_data["title"] ." ".$news_data["title"]; $template -> assign_vars(array( 'popularpost' => $popularpost , 'centerabuot' => htmlspecialchars_decode($mem_data['cominfor']), 'title' => $news_data["title"], 'barner' => "'.$site_base_href.'/barner/".$news_data["barner"], 'supp' =>$memid, 'news' =>$pro_data_lg[3]['new_setting'], 'maintitle' => $news_data["title"], 'cominfo' => htmlspecialchars_decode($news_data["description"]), 'abconten' => htmlspecialchars_decode($news_data["content"]), 'update' => $news_data["lastedit"], 'logo' => !empty($mem_data["barner"]) ? "" : '' , 'photo' => !empty($mem_data["comImage"]) ? "" : '' , 'company' => $mem_data["CompanyName_vn"], 'ContactName' => ($mem_data["Sex"]=="Male" ? "Ông " : "Bà ") .$mem_data["lName_vn"] ." ".$mem_data["fName_vn"], 'Address' =>$mem_data["Address_vn"], 'city' =>$mem_data["City_vn"].", ".getContry($mem_data["countryID"]), 'zipCode' => $mem_data["Zip"], 'Telephone' => $mem_data["contrycode"] ."-".$mem_data["areacode"]."-".$mem_data["BusinessPhone"], 'mobiphone' =>$mem_data["Mobile"], 'fax' =>$mem_data["faxcontrycode"] ."-".$mem_data["faxareacode"]."-".$mem_data["FaxNumber"], 'Website' =>$mem_data["Web"], 'divtel' => !empty($mem_data["BusinessPhone"]) ? 'bock' : 'none', 'divmobi' => !empty($mem_data["Mobile"]) ? 'bock' : 'none', 'divfax' => !empty($mem_data["FaxNumber"]) ? 'bock' : 'none', 'divweb' => !empty($mem_data["Web"]) ? 'bock' : 'none', 'divcontactName' =>strlen($memName)>9 ? 'bock' : 'none', )); $template->set_filenames(array( "body" => $template_detailnews_page )); $template->pparse('body'); } function showlinklang(){ global $template, $base_url, $db, $site_base_href, $cid ; $memid=isset($_GET["supplier"]) ? intval($_GET["supplier"]) : 0 ; $sql ="select CompanyName,CompanyName_vn,CompanyName_cn from vb_memberprofile where memID=".$memid ; //echo $sql; die() ; if(!$result=$db->sql_query($sql)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql); } $mem_data=$db->sql_fetchrow($result); $vn=" Tiếng Việt " ; $cn=" 中文版 " ; $us=" English " ; if(($mem_data["CompanyName_cn"]=="NULL") or empty($mem_data["CompanyName_cn"]) ){ $linklang = '
    Chọn Ngôn Ngữ
    ' ; }elseif(($mem_data["CompanyName"]=="NULL")or empty($mem_data["CompanyName"]) ){ $linklang = '
    Chọn Ngôn Ngữ
    ' ; }elseif(($mem_data["CompanyName_vn"]=="NULL") or empty($mem_data["CompanyName_vn"])){ $linklang = '
    Chọn Ngôn Ngữ
    ' ; }else{ $linklang = '
    Chọn Ngôn Ngữ
    ' ; } return $linklang ; } ?>Couldn't run the sql query!!!1

    Contact webmaster for notice, please!
    select vb_newscatlang.name, vb_newscatlang.description ,vb_newcat.newscatid from vb_newcat , vb_newscatlang where vb_newcat.newscatid = vb_newscatlang.newscatid and catactive = 1 and idmem = 19642 and vb_newscatlang.lang_cat = order by vb_newcat.numoder asc limit 0, 1