function getEditor($id) { $qry=mysql_query("select * from editer where id='$id'"); $fetDet1=mysql_fetch_array($qry); mysql_query("SET NAMES UTF8"); echo $fetDet1['detail']; } ///pportfolio function GetportNum($tid) { $numport=mysql_num_rows(mysql_query("select * from product_detail2_2 where cat_id='$tid'")); return $numport; } function GetportName($tid) { $n=1; $sql="select * from product_detail2_2 where cat_id='$tid' order by id desc"; $qrt=mysql_query($sql); $portName=""; while($fet=mysql_fetch_array($qrt)) { $portName[$n][1]=$fet['id']; $portName[$n][2]=substr($fet['name_th'],0,35); $portName[$n][3]=$fet['pic']; $n=$n+1; } return $portName; } function GetPortDetail($id) { $detail=mysql_fetch_array(mysql_query("select * from product_detail2_2 where id='$id'")); $detailS[1]=$detail['name_th']; $detailS[2]=$detail['detail']; $detailS[3]=$detail['cat_id']; return $detailS; } function GetportPic($id) { $picS=""; $n=1; $sql="select * from slide_en2 where image_b='$id'"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $picS[$n]=$fet['image_s']; $n=$n+1; } return $picS; } /////getNews function GetNumnews() { $numNew=mysql_num_rows(mysql_query("select * from promotion")); return $numNew; } function GetNewsCat($id) { $news=""; $n=1; $sql="select * from promotion order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news[$n][1]=$fet['id']; $news[$n][2]=$fet['title']; $news[$n][3]=$fet['description']; $news[$n][4]=$fet['images']; $news[$n][5]=$fet['date']; $news[$n][6]=$fet['view']; $n=$n+1; } return $news; } /////getNewsAcne function GetNumnewsAcne() { $numNew=mysql_num_rows(mysql_query("select * from news where id_type='3'")); return $numNew; } function GetNewsCatAcne() { $news=""; $n=1; $sql="select * from news where id_type='3' order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news[$n][1]=$fet['id']; $news[$n][2]=$fet['title_th']; $news[$n][3]=$fet['deciption_th']; $news[$n][4]=$fet['images']; $news[$n][5]=$fet['add_date1'].":".$fet['add_date2'].":".$fet['add_date3']; $news[$n][6]=$fet['detail_th']; $n=$n+1; } return $news; } /////getcontent function GetContent() { $numNew=mysql_num_rows(mysql_query("select * from article")); return $numNew; } function GetConCat() { $news=""; $n=1; $sql="select * from article order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news[$n][1]=$fet['id']; $news[$n][2]=$fet['title']; $news[$n][3]=$fet['description']; $news[$n][4]=$fet['images']; $news[$n][5]=$fet['detail']; $news[$n][6]=$fet['category']; $news[$n][7]=$fet['date']; $news[$n][8]=$fet['view']; $n=$n+1; } return $news; } function GetConPro() { $news=""; $n=1; $sql="select * from promotion order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news[$n][1]=$fet['id']; $news[$n][2]=$fet['title']; $news[$n][3]=$fet['description']; $news[$n][4]=$fet['images']; $news[$n][5]=$fet['detail']; $news[$n][6]=$fet['category']; $news[$n][7]=$fet['date']; $news[$n][8]=$fet['view']; $n=$n+1; } return $news; } function GetConReview() { $news=""; $n=1; $sql="select * from review order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news[$n][1]=$fet['id']; $news[$n][2]=$fet['title']; $news[$n][3]=$fet['description']; $news[$n][4]=$fet['images']; $news[$n][5]=$fet['detail']; $news[$n][6]=$fet['type']; $news[$n][7]=$fet['date']; $news[$n][8]=$fet['view']; $n=$n+1; } return $news; } function GetNumnews2() { $numNew2=mysql_num_rows(mysql_query("select * from review")); return $numNew2; } function GetNumPro2() { $numNew2=mysql_num_rows(mysql_query("select * from promotion")); return $numNew2; } function GetNewsCat2() { $news2=""; $n=1; $sql="select * from review order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news2[$n][1]=$fet['id']; $news2[$n][2]=$fet['title']; $news2[$n][3]=$fet['description']; $news2[$n][4]=$fet['images']; $news2[$n][5]=$fet['detail']; $news2[$n][6]=$fet['type']; $news2[$n][7]=$fet['view']; $news2[$n][8]=$fet['date']; $n=$n+1; } return $news2; } function GetNumnewsmask() { $numNew2=mysql_num_rows(mysql_query("select * from news2 where id_type='1'")); return $numNew2; } function GetReviewMask() { $news2=""; $n=1; $sql="select * from review where type='1' order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news2[$n][1]=$fet['id']; $news2[$n][2]=$fet['title']; $news2[$n][3]=$fet['description']; $news2[$n][4]=$fet['images']; $news2[$n][5]=$fet['date']; $news2[$n][6]=$fet['view']; $n=$n+1; } return $news2; } function GetReviewBB() { $news2=""; $n=1; $sql="select * from review where type='2' order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news2[$n][1]=$fet['id']; $news2[$n][2]=$fet['title']; $news2[$n][3]=$fet['description']; $news2[$n][4]=$fet['images']; $news2[$n][5]=$fet['date']; $news2[$n][6]=$fet['view']; $n=$n+1; } return $news2; } function GetReviewCon() { $news2=""; $n=1; $sql="select * from review where type='3' order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news2[$n][1]=$fet['id']; $news2[$n][2]=$fet['title']; $news2[$n][3]=$fet['description']; $news2[$n][4]=$fet['images']; $news2[$n][5]=$fet['date']; $news2[$n][6]=$fet['view']; $n=$n+1; } return $news2; } function GetReviewSerum() { $news2=""; $n=1; $sql="select * from review where type='4' order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news2[$n][1]=$fet['id']; $news2[$n][2]=$fet['title']; $news2[$n][3]=$fet['description']; $news2[$n][4]=$fet['images']; $news2[$n][5]=$fet['date']; $news2[$n][6]=$fet['view']; $n=$n+1; } return $news2; } function GetReviewExpert() { $news2=""; $n=1; $sql="select * from review where type='5' order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news2[$n][1]=$fet['id']; $news2[$n][2]=$fet['title']; $news2[$n][3]=$fet['description']; $news2[$n][4]=$fet['images']; $news2[$n][5]=$fet['date']; $news2[$n][6]=$fet['view']; $n=$n+1; } return $news2; } function GetReviewShimmer() { $news2=""; $n=1; $sql="select * from review where type='6' order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news2[$n][1]=$fet['id']; $news2[$n][2]=$fet['title']; $news2[$n][3]=$fet['description']; $news2[$n][4]=$fet['images']; $news2[$n][5]=$fet['date']; $news2[$n][6]=$fet['view']; $n=$n+1; } return $news2; } function GetReviewloose() { $news2=""; $n=1; $sql="select * from review where type='7' order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news2[$n][1]=$fet['id']; $news2[$n][2]=$fet['title']; $news2[$n][3]=$fet['description']; $news2[$n][4]=$fet['images']; $news2[$n][5]=$fet['date']; $news2[$n][6]=$fet['view']; $n=$n+1; } return $news2; } function GetReviewShimmer3d() { $news2=""; $n=1; $sql="select * from review where type='8' order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news2[$n][1]=$fet['id']; $news2[$n][2]=$fet['title']; $news2[$n][3]=$fet['description']; $news2[$n][4]=$fet['images']; $news2[$n][5]=$fet['date']; $news2[$n][6]=$fet['view']; $n=$n+1; } return $news2; } function GetReviewLoose3d() { $news2=""; $n=1; $sql="select * from review where type='9' order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news2[$n][1]=$fet['id']; $news2[$n][2]=$fet['title']; $news2[$n][3]=$fet['description']; $news2[$n][4]=$fet['images']; $news2[$n][5]=$fet['date']; $news2[$n][6]=$fet['view']; $n=$n+1; } return $news2; } function GetReviewSoap() { $news2=""; $n=1; $sql="select * from review where type='10' order by id desc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $news2[$n][1]=$fet['id']; $news2[$n][2]=$fet['title']; $news2[$n][3]=$fet['description']; $news2[$n][4]=$fet['images']; $news2[$n][5]=$fet['date']; $news2[$n][6]=$fet['view']; $n=$n+1; } return $news2; } function GetnewsDet($id) { $fetDer=mysql_fetch_array(mysql_query("select * from news where id='$id'")); $fetG=""; $fetG[1]=$fetDer['title_th']; $fetG[2]=$fetDer['detail_th']; $fetG[3]=$fetDer['images']; $fetG[4]=$fetDer['id']; $fetG[5]=$fetDer['deciption_th']; $fetG[6]=$fetDer['page_hits']; $fetG[7]=$fetDer['add_date1']."/".$fetDer['add_date2']."/".$fetDer['add_date3']; $fetG[8]=$fetDer['title_en']; return $fetG; } function GetNewsNew($id) { $fetDer1=mysql_fetch_array(mysql_query("select * from promotion where id='$id' order by id desc")); $fetG2=""; $fetG2[1]=$fetDer1['id']; $fetG2[2]=$fetDer1['title']; $fetG2[3]=$fetDer1['description']; $fetG2[4]=$fetDer1['images']; $fetG2[5]=$fetDer1['detail']; $fetG2[6]=$fetDer1['date']; $fetG2[7]=$fetDer1['view']; return $fetG2; } function GetConTNew($id) { $fetDer=mysql_fetch_array(mysql_query("select * from article where id='$id'")); $fetG=""; $fetG[1]=$fetDer['id']; $fetG[2]=$fetDer['title']; $fetG[3]=$fetDer['description']; $fetG[4]=$fetDer['images']; $fetG[5]=$fetDer['detail']; $fetG[6]=$fetDer['view']; $fetG[7]=$fetDer['date']; $fetG[8]=$fetDer['price']; return $fetG; } function GetConTPro($id) { $fetDer=mysql_fetch_array(mysql_query("select * from promotion where id='$id'")); $fetG=""; $fetG[1]=$fetDer['id']; $fetG[2]=$fetDer['title']; $fetG[3]=$fetDer['description']; $fetG[4]=$fetDer['images']; $fetG[5]=$fetDer['detail']; $fetG[6]=$fetDer['view']; $fetG[7]=$fetDer['date']; return $fetG; } function GetConTReview($id) { $fetDer=mysql_fetch_array(mysql_query("select * from review where id='$id'")); $fetG=""; $fetG[1]=$fetDer['id']; $fetG[2]=$fetDer['title']; $fetG[3]=$fetDer['description']; $fetG[4]=$fetDer['images']; $fetG[5]=$fetDer['detail']; $fetG[6]=$fetDer['type']; $fetG[7]=$fetDer['date']; $fetG[8]=$fetDer['view']; return $fetG; } function GetnewsDet2($id) { $fetDer=mysql_fetch_array(mysql_query("select * from news2 where id='$id'")); $fetG2=""; $fetG2[1]=$fetDer['title_th']; $fetG2[2]=$fetDer['detail_th']; $fetG2[3]=$fetDer['deciption_th']; $fetG2[4]=$fetDer['images']; $fetG2[5]=$fetDer['id']; $fetG2[7]=$fetDer['id_type']; $fetG2[6]=$fetDer['add_date1']."-".$fetDer['add_date2']."-".$fetDer['add_date3']; return $fetG2; } //Slide function GetNumSlide() { $numSl=mysql_num_rows(mysql_query("select * from slide order by sort asc")); return $numSl; } function GetPicSlide() { $picS=""; $n=1; $sql="select * from slide order by sort asc"; $qry=mysql_query($sql); while($fet=mysql_fetch_array($qry)) { $picS[$n][1]=$fet['image']; $n=$n+1; } return $picS; } //Servicer function GetnumProduct($id) { $sql="select * from product_detail2 where cat_id='$id'"; $numPro=mysql_num_rows(mysql_query($sql)); return $numPro; } function GetProDet($id) { $fet=mysql_fetch_array(mysql_query("select * from product_detail2 where id='$id'")); $Fetder[1]=$fet['id']; $Fetder[2]=$fet['detail']; $Fetder[3]=$fet['cat_id']; $Fetder[4]=$fet['name_th']; return $Fetder; } function getNumProductN($id) { $numN=mysql_num_rows(mysql_query("select * from product_detail3 where cat_id='$id' order by id asc")); return $numN; } function getProductN($id) { $sql="select * from product_detail3 where cat_id='$id' order by id asc"; $qry=mysql_query($sql); $data=""; $n=1; while($fet=mysql_fetch_array($qry)) { $data[$n][1]=$fet['id']; $data[$n][2]=$fet['type_id']; $data[$n][3]=$fet['promotion']; $data[$n][4]=$fet['name_th']; $data[$n][5]=$fet['p_price']; $data[$n][6]=$fet['pic']; $data[$n][8]=$fet['name_th']; $data[$n][9]=$fet['descip_th']; $n=$n+1; } return $data; } function GetRowProduct($id) { $numN=mysql_num_rows(mysql_query("select * from product order by id asc")); return $numN; } function GetProduct($id) { $sql="select * from product order by id asc"; $qry=mysql_query($sql); $data=""; $n=1; while($fet=mysql_fetch_array($qry)) { $data[$n][1]=$fet['id']; $data[$n][2]=$fet['type_id']; $data[$n][3]=$fet['promotion']; $data[$n][4]=$fet['name_th']; $data[$n][5]=$fet['p_price']; $data[$n][6]=$fet['pic']; $data[$n][8]=$fet['name_th']; $data[$n][9]=$fet['descip_th']; $n=$n+1; } return $data; } function getNumProductN2($id) { $numN=mysql_num_rows(mysql_query("select * from product_detail3 order by id asc")); return $numN; } function getProductN2($id) { $sql="select * from product_detail3 order by id asc"; $qry=mysql_query($sql); $data=""; $n=1; while($fet=mysql_fetch_array($qry)) { $data[$n][1]=$fet['id']; $data[$n][2]=$fet['type_id']; $data[$n][3]=$fet['promotion']; $data[$n][4]=$fet['name_th']; $data[$n][5]=$fet['p_price']; $data[$n][6]=$fet['pic']; $data[$n][7]=$fet['p_price2']; $data[$n][8]=$fet['name_th']; $data[$n][9]=$fet['descip_th']; $n=$n+1; } return $data; } function GetProDet2($id) { $fet=mysql_fetch_array(mysql_query("select * from product_detail3 where id='$id'")); $Fetder[1]=$fet['id']; $Fetder[2]=$fet['detail']; $Fetder[3]=$fet['cat_id']; $Fetder[4]=$fet['name_th']; return $Fetder; } function GetProDet3() { $sql="select * from product_detail3 order by rand() limit 0,8"; $qry=mysql_query($sql); $data=""; $n=1; while($fet=mysql_fetch_array($qry)) { $data[$n][1]=$fet['id']; $data[$n][2]=$fet['type_id']; $data[$n][3]=$fet['promotion']; $data[$n][4]=$fet['name_th']; $data[$n][5]=$fet['p_price']; $data[$n][6]=$fet['pic']; $n=$n+1; } return $data; } function GetProDet4($id) { $fet=mysql_fetch_array(mysql_query("select * from product_detail3 where id='$id'")); $Fetder[1]=$fet['id']; $Fetder[2]=$fet['type_id']; $Fetder[3]=$fet['cat_id']; $Fetder[4]=$fet['detail']; $Fetder[5]=$fet['p_price']; $Fetder[6]=$fet['descip_th']; $Fetder[7]=$fet['promotion']; $Fetder[8]=$fet['name_th']; return $Fetder; } ?>