photo1170748647.gif

Cty TNHH Xây Dựng Minh Phương

Được tách ra từ đội thi công Cơ Điện Lạnh của một công ty thuộc Tổng Công Ty Xây Dựng ...

sql_query($sql)){ message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql); } $mem_data=$db->sql_fetchrow($result); $sql="select * from vb_products where 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); //$simages=''.$pro_data[$i]['; $simages = ""; if(file_exists('/home/yellowpages/public_html/my/bigimg/'.$pro_data["Images"])){ $simages = "http://www.yellowpages.vn/my/bigimg/".$pro_data["Images"]; }elseif(file_exists('/home/yellowpages/public_html/my/products/'.$pro_data["Images"])){ $simages = "http://www.yellowpages.vn/my/products/".$pro_data["Images"]; }elseif(file_exists('/home/yellowpages/public_html/my/products/'.$pro_data["sImages"])){ $simages = "http://www.yellowpages.vn/my/products/".$pro_data["sImages"]; }elseif(file_exists('/home/yellowpages/public_html/my/sproducts/'.$pro_data["sImages"])){ $simages = "http://www.yellowpages.vn/my/sproducts/".$pro_data["sImages"]; }elseif(file_exists('/home/yellowpages/public_html/my/sproducts/'.$pro_data["images180"])){ $simages = "http://www.yellowpages.vn/my/sproducts/".$pro_data["images180"]; } // if(!ereg(".jpg",$pro_data["sImages"]) && !ereg(".gif",$pro_data["sImages"]) ){ // $simages=''; // //$simages=''; // } $memName=$mem_data["lName_vn"] ." ".$mem_data["fName_vn"]; $description = trim($pro_data["Description_vn"])!=''? '
   Chi tiết sản phẩm
 
'.html_entity_decode(nl2br($pro_data["Description_vn"])).'
':''; $template->assign_vars(array( 'productDetail' =>$pro_data["ProductName_vn"], 'companyName' => $mem_data["CompanyName_vn"], 'maintitle' => $mem_data["CompanyName_vn"], 'com_photo' => !empty($mem_data["barner"]) ? "  " : '' , 'viewlarger' => 'Xem hình lớn', 'proName' => $pro_data["ProductName_vn"], 'ProModel' =>!empty($pro_data["Model_vn"]) ? 'Model : '.$pro_data["Model_vn"] : '' , 'supp' =>$cid, 'proDescription' =>$description,//html_entity_decode(nl2br($pro_data["Description_vn"])), 'photo' => ''.$pro_data[$i][', 'nophoto' => $simages ? ' ' : 'style="display:none"', '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"], 'a_action' =>"http://www.yellowpages.vn/contact_vn_test.php?name=".$mem_data["CompanyName_vn"]."&url=enquiry@yellowpages.vn&kw=Q3R5IEPhu5UgUGjhuqduIEThu4tjaCBW4bulIFRyYW5nIFbDoG5nLVZwxJFk", 'lid' =>$proid, 'detaildis' =>!empty($pro_data["Description_vn"]) ? 'bock' : 'none', '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', 'proID' =>$proid, )); $template->set_filenames(array( "body" => $template_proDetail )); $template->pparse('body'); } function viewProduct(){ global $template, $db, $template_products_body,$catID,$cid,$keyw,$site_base_href,$base_url,$langUrl,$ids ; $start = isset($_GET["start"]) ? intval($_GET["start"]) : 0; $txtgoto = isset($_POST['txtgoto']) ? intval($_POST['txtgoto']) : 0; $display=15; if($txtgoto){ $start = floor($txtgoto*$display)-1; } $sql="select * from vb_products where proActive=1 and memID=".$cid." and Keywords_vn='$keyw' ORDER BY ProductName_vn limit $start,$display" ; 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); $sql = "SELECT count(proID) AS total FROM vb_products where proActive=1 and memID=".$cid." and Keywords_vn='$keyw'" ; if ( !$result = $db->sql_query($sql) ) { message_die("Couldn't run the sql query!!!", __LINE__, __FILE__, $sql); } $total = $db->sql_fetchrow($result); $pagination = g3_pagination("supplier.php?supplier=".$cid."&act=products&catID=".$catID."&ids=".$ids."&lang=vn", $total['total'], $display, $start, 'start', 'Page ' . '////')." "; $total_pages = ceil($total['total']/$display); $db->sql_freeresult($result); for ($i=0; $i<$pro_count; $i++){ $simages = ""; if(file_exists('/home/yellowpages/public_html/my/bigimg/'.$pro_data[$i]["Images"])){ $simages = "http://www.yellowpages.vn/my/bigimg/".$pro_data[$i]["Images"]; }elseif(file_exists('/home/yellowpages/public_html/my/products/'.$pro_data[$i]["Images"])){ $simages = "http://www.yellowpages.vn/my/products/".$pro_data[$i]["Images"]; }elseif(file_exists('/home/yellowpages/public_html/my/products/'.$pro_data[$i]["sImages"])){ $simages = "http://www.yellowpages.vn/my/products/".$pro_data[$i]["sImages"]; }elseif(file_exists('/home/yellowpages/public_html/my/sproducts/'.$pro_data[$i]["sImages"])){ $simages = "http://www.yellowpages.vn/my/sproducts/".$pro_data[$i]["sImages"]; }elseif(file_exists('/home/yellowpages/public_html/my/sproducts/'.$pro_data[$i]["images180"])){ $simages = "http://www.yellowpages.vn/my/sproducts/".$pro_data[$i]["images180"]; } // $simages=''; // if(!ereg(".jpg",$pro_data[$i]["sImages"]) && !ereg(".gif",$pro_data[$i]["sImages"])&& !ereg(".png",$pro_data[$i]["sImages"]) ){ // $simages=''; // } $detail=html_entity_decode(nl2br($pro_data[$i]["Description_vn"])); $arrStr=explode(' ',$detail); $k= count($arrStr)<18 ? count($arrStr) : 18; $detail=''; for($j=0;$j<$k;$j++){ $detail.=$arrStr[$j].' '; } if($k==18){ $detail.=' ...'; } $template->assign_block_vars("productList", array( 'pname' => ''.$pro_data[$i]["ProductName_vn"].'', 'photo' => '', 'CHECKBOX' => '', 'model' => $pro_data[$i]["Model"] ? 'Model No : '. $pro_data[$i]["Model"] : " ", 'pdetail' => $detail )); } $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); $memName=$mem_data["lName_vn"] ." ".$mem_data["fName_vn"]; //luu giu cat id khi chuyen qua viewlist va view gellary $strvar; if($catID==0) $strvar='mode=main'; else $strvar='catID='.$catID; $template->assign_vars(array( 'barner' => "../barner/".$mem_data["barner"], 'companyName' => $mem_data["CompanyName_vn"], 'maintitle' => $mem_data["CompanyName_vn"], 'com_photo' => !empty($mem_data["barner"]) ? "" : '' , 'supp' => $cid, '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"], 'a_action' => "supplier.php?supplier=".$cid."&act=memcontacts&catID=".$catID."&ids=".$ids."&lang=vn", 'NAVIGATOR' => $pagination, 'navidis' => $total_pages>1? 'display' : 'none', 'g_action' => "supplier.php?supplier=".$cid."&act=products&catID=".$catID."&ids=".$ids."&lang=vn", 'Products' => 'Sản phẩm > '.$keyw, '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', 'oldurl' => $langUrl, 'varlink' => $ids, 'varlink1' => $cid, 'strvar' => $strvar, 'sum_pro' => $pro_count )); $template->set_filenames(array( "body" => $template_products_body )); $template->pparse('body'); } function mainproducts(){ global $template, $db, $template_products_body,$catID,$cid,$keyw,$site_base_href,$base_url,$langUrl,$ids ; $start = isset($_GET["start"]) ? intval($_GET["start"]) : 0; $txtgoto=isset($_POST['txtgoto']) ? intval($_POST['txtgoto']) : 0; $display=15; if($txtgoto){ $start = floor(($txtgoto-1)*$display); } $sql="select * from vb_products where proActive=1 and memID=".$cid." order by ProductName_vn limit $start,$display" ; echo $sql; 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); $sql = "SELECT count(proID) AS total FROM vb_products where proActive=1 and memID=".$cid ; if ( !$result = $db->sql_query($sql) ) { message_die("Couldn't run the sql query!!!", __LINE__, __FILE__, $sql); } $total = $db->sql_fetchrow($result); if($total['total']<1){ echo '
There are no product

'; return ; } $pagination = g3_pagination("supplier.php?supplier=".$cid."&act=products&mode=main", $total['total'], $display, $start, 'start', 'Page:' . '////')." "; $total_pages = ceil($total['total']/$display); $db->sql_freeresult($result); for ($i=0; $i<$pro_count; $i++){ // $simages=''; // if(!ereg(".jpg",$pro_data[$i]["sImages"]) && !ereg(".gif",$pro_data[$i]["sImages"]) && !ereg(".png",$pro_data[$i]["sImages"]) ){ // $simages=''; // } $simages = ""; if(file_exists('/home/yellowpages/public_html/my/bigimg/'.$pro_data[$i]["Images"])){ $simages = "http://www.yellowpages.vn/my/bigimg/".$pro_data[$i]["Images"]; }elseif(file_exists('/home/yellowpages/public_html/my/products/'.$pro_data[$i]["Images"])){ $simages = "http://www.yellowpages.vn/my/products/".$pro_data[$i]["Images"]; }elseif(file_exists('/home/yellowpages/public_html/my/products/'.$pro_data[$i]["sImages"])){ $simages = "http://www.yellowpages.vn/my/products/".$pro_data[$i]["sImages"]; }elseif(file_exists('/home/yellowpages/public_html/my/sproducts/'.$pro_data[$i]["sImages"])){ $simages = "http://www.yellowpages.vn/my/sproducts/".$pro_data[$i]["sImages"]; }elseif(file_exists('/home/yellowpages/public_html/my/sproducts/'.$pro_data[$i]["images180"])){ $simages = "http://www.yellowpages.vn/my/sproducts/".$pro_data[$i]["images180"]; } $detail=html_entity_decode(nl2br($pro_data[$i]["Description_vn"])); $detail_full = $detail; $arrStr=explode(' ',$detail); $k= count($arrStr)<18 ? count($arrStr) : 18; $detail=''; for($j=0;$j<$k;$j++){ $detail.=$arrStr[$j].' '; } if($k==18){ $detail.=' ...'; } $template->assign_block_vars("productList", array( 'pname' => ''.$pro_data[$i]["ProductName_vn"].'', 'photo' => '', 'CHECKBOX' => '', 'model' => $pro_data[$i]["Model"] ? 'Model No : '. $pro_data[$i]["Model"] : " ", 'pdetail' => $detail_full )); } $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); $memName=$mem_data["lName_vn"] ." ".$mem_data["fName_vn"]; //luu giu cat id khi chuyen qua viewlist va view gellary $strvar; if($catID==0) $strvar='mode=main'; else $strvar='catID='.$catID; $template->assign_vars(array( 'barner' => "../barner/".$mem_data["barner"], 'Products' =>'Sản Phẩm', 'companyName' => $mem_data["CompanyName_vn"], 'com_photo' => !empty($mem_data["barner"]) ? "" : '' , 'supp' => $cid, 'maintitle' => $mem_data["CompanyName_vn"], '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"], 'a_action' => "supplier.php?supplier=".$cid."&act=memcontacts&mode=main&ids=".$ids."&lang=vn", 'NAVIGATOR' => $pagination, 'g_action' => "supplier.php?supplier=".$cid."&act=products&mode=main&ids=".$ids."&lang=vn", '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', 'navidis' => $total_pages>1? 'display' : 'none', 'oldurl' => $langUrl, 'varlink'=>$ids, 'varlink1'=>$cid, 'strvar'=>$strvar, 'sum_pro'=>$pro_count )); $template->set_filenames(array( "body" => $template_products_body )); $template->pparse('body'); } ?>
space
Phân Loại
Từ khóa liên quan