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") { $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_description']; $keyword_vn = $pro_data['seo_keyword']; } if($mode == 'catalog') { $sql="SELECT * FROM vb_category WHERE memID =".$cid." 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_fetchrowset($result); $u_tite =$pro_data[0]['cat_Name']; $sql1="SELECT * FROM vb_categorylang WHERE catid =".$pro_data[0]['catID']; if(!$result1 = $db->sql_query($sql1)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql1); } $pro_count1 = $db->sql_numrows($result1); $pro_data1 = $db->sql_fetchrowset($result1); if($pro_data1[0]['title'] != NULL) $u_tite = $pro_data1[0]['title']; } 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"]; } ?> Chuyên cung cấp chất lượng đảm bảo. sql_query($sqlanalytics)){ message_die("Couldn't run the sql query!!!1","",__LINE__,__FILE__,$sqlanalytics); } $setanalytics = $db -> sql_fetchrow($resultana); echo $setanalytics['google']; ?>

    sql_query($sql); $cat_lag=$db->sql_fetchrow($result); ?>
  • .html">
" data-thumb="/sproducts/">
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 ='ps/'.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"]; if(!$resultlg=$db->sql_query($sqllang)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sqllang); } $ds_prolang=$db->sql_fetchrowset($resultlg); $str .= ' '; } $str .= ""; //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']; $template->assign_vars(array( '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 ; $memid=isset($_GET["supplier"]) ? intval($_GET["supplier"]) : 0 ; //oll 18-06-14 ==== $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=".$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?ids=".$ids); } $comInfo=strlen($mem_data["aboutInfo_vn"])<250 ? html_entity_decode(nl2br($mem_data["aboutInfo_vn"])) : html_entity_decode(nl2br($mem_data["aboutInfo_vn"])); //end oll 18-06-14 ==== // 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); $comInfo_new=strlen($selectlang["cominfor"])<250 ? html_entity_decode(nl2br($selectlang["cominfor"])) : html_entity_decode(nl2br($selectlang["cominfor"])); ////=======end====== $memName=$mem_data["lName_vn"] ." ".$mem_data["fName_vn"]; $template->assign_vars(array( 'barner' => "'.$site_base_href.'/barner/".$mem_data["barner"], 'supp' =>$memid, 'companyName' => $mem_data["CompanyName_vn"], 'maintitle' => $mem_data["CompanyName_vn"], '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_detail_page,$db,$template,$ids,$cid,$lag ; $memid=isset($_GET["supplier"]) ? intval($_GET["supplier"]) : 0 ; $newsid=isset($_GET["newid"]) ? intval($_GET["newid"]) : 0 ; $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); } $mem_data=$db->sql_fetchrow($result); if(!$mem_data["newsid"]){ //redirect("index.php?ids=".$ids); 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=$mem_data["title"] ." ".$mem_data["title"]; $template->assign_vars(array( 'barner' => "'.$site_base_href.'/barner/".$mem_data["barner"], 'supp' =>$memid, 'maintitle' => $mem_data["title"], 'logo' => !empty($mem_data["barner"]) ? "" : '' , 'photo' => !empty($mem_data["comImage"]) ? "" : '' , 'cominfo' => $comInfo, '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 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 ; } ?>