1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <title>เบญจพรกรุ๊ป Benjabhorn Group</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- body { background-image:url(images/bg-inside.jpg); background-position:top; background-repeat:repeat-x; } #apDiv1 { position:absolute; left:422px; top:136px; width:822px; height:310px; z-index:1; } #apDiv2 { position:absolute; left:130px; top:160px; width:1000px; height:50px; z-index:1; } --> </style></head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <!--<div id="apDiv1"> <iframe src="slide-project/index.html" width="800" height="300" frameborder="0" scrolling="no"></iframe></div> --> <center> <?php include("header.php"); ?>
<?php $rowPerPage=8; if((!$_GET['page'])||($_GET['page']==1)){ $_GET['page']=1; $startRow=0; }else{ $startRow=($_GET['page']-1)*$rowPerPage; } //---------------------SEARCH DATA------------------------ $querySearch="SELECT p.* , l.location_name , pro.province_name, h.home_name , t.home_type_name FROM `tbl_project` p " ." LEFT JOIN tbl_location l ON p.project_localtion_id=l.id " ." LEFT JOIN tbl_province pro ON l.provice_id=pro.id " ." LEFT JOIN tbl_home_data h ON p.id=h.project_id " ." LEFT JOIN tbl_home_type t ON h.home_type_id=t.id " ." WHERE 1 "; if($_POST['provinceID']){ $querySearch= $querySearch." AND pro.id='".$_POST['provinceID']."' "; } if($_POST['locationID']){ $querySearch= $querySearch." AND l.id='".$_POST['locationID']."' "; } if($_POST['projectID']){ $querySearch= $querySearch." AND p.id='".$_POST['projectID']."' "; } if($_POST['HomeTypeID']){ $querySearch= $querySearch." AND h.id='".$_POST['HomeTypeID']."' "; } $resultSearch=mysql_query($querySearch); //---------------STR SEARCH ----------------------- if($_POST['provinceID']){ $queryStr= " SELECT * FROM `tbl_province` WHERE id='".$_POST['provinceID']."' "; $resultStr=mysql_query($queryStr); $data=mysql_fetch_assoc($resultStr); $txtProvince=" ".$data['province_name']; } if($_POST['locationID']){ $queryStr= " SELECT * FROM `tbl_location` WHERE id='".$_POST['locationID']."' "; $resultStr=mysql_query($queryStr); $data=mysql_fetch_assoc($resultStr); $txtLocation=" ".$data['location_name']; } if($_POST['projectID']){ $queryStr= " SELECT * FROM `tbl_project` ` WHERE id='".$_POST['projectID']."' "; $resultStr=mysql_query($queryStr); $data=mysql_fetch_assoc($resultStr); $txtProject=" ".$data['project_name']; } if($_POST['HomeTypeID']){ $queryStr= " SELECT * FROM `tbl_home_type` WHERE id='".$_POST['HomeTypeID']."' "; $resultStr=mysql_query($queryStr); $data=mysql_fetch_assoc($resultStr); $txtHome=" ".$data['home_type_name']; } ?>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="1000" height="420" align="left" valign="top"><iframe src="Slideshow2/slide/index_slide.php" width="994" height="430" scrolling="no" frameborder="0" style="background:transparent;"></iframe></td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0"> <tr> <td width="56%" height="25"><p class="txt30"> ค้นหา : <?php echo $txtProvince.$txtLocation.$txtProject.$txtHome;?></td> <td width="44%" align="right"></p></td> </tr> </table>
<hr size="2" noshade="noshade" /> </td> </tr> <tr> <td height="35" align="left" valign="top" class="txt30"> <?php //echo $querySearch?> <table width="90%" border="0" cellspacing="5" cellpadding="0"> <?php while($search=mysql_fetch_assoc($resultSearch)){ if($cProject!=$search['id']){ $queryHT="SELECT a.*, b.home_type_name FROM tbl_home_data a LEFT JOIN tbl_home_type b ON a.home_type_id=b.id WHERE a.project_id='".$search['id']."' "; $resultHT=mysql_query($queryHT); ?> <tr> <td width="24%" align="center" valign="top"><img src="<?php echo $path_product_thb.$search['project_image']?>" alt="" class="border" /></td> <td width="76%" align="left" valign="top"><p> <img src="images/icon/menu-portfolio.png" alt="" width="16" height="15" align="absmiddle" /><a href="project.php?ProjectID=<?php echo $search['id']?>" ><span class="h-search LR20"><?php echo $search['project_name']?></span></a><br /><br /> <span class="L45"><?php echo $search['province_name']?></span><br /> <span class="L45"><?php echo $search['location_name']?> <?php echo $search['project_localtion_detail']?></span><br /> <img src="images/index/spacer.gif" alt="" width="16" height="15" hspace="10" vspace="5" align="absmiddle" /> <?php while($type=mysql_fetch_assoc($resultHT)){ ?> <img src="images/scroll_right.png" alt="" width="16" height="16" hspace="5" border="0" align="absmiddle" /> <a href="type_detail.php?ProjectID=<?php echo $search['id']?>&homeID=<?php echo $type['id']?>"><span class="txt10blue"><?php echo $type['home_type_name']." "; }?></span></a><br /><br /> <a href="project.php?ProjectID=<?php echo $search['id']?>"><span class="L45"><img src="images/scroll_right.png" alt="" width="16" height="16" hspace="5" border="0" align="absmiddle" /> <span class="txt10blue">รายละเอียดโครงการ</span></span></a><br /> </p></td> </tr><tr> <td colspan="2" align="center" valign="top"><hr size="1" /></td> </tr> <?php }?> <?php $cProject=$search['id']; }?> </table></td> </tr> <tr> <td align="right" valign="top"><map name="Map" id="Map2"> <area shape="rect" coords="229,2,299,30" href="#" alt="" /> <area shape="rect" coords="306,2,383,30" href="type.php" alt="" /> </map></td> </tr> <tr> <td align="left" valign="top" class="txt30"> </td> </tr> </table>
<p> </p> </center> <?php include("footer.php"); ?> </body> </html>
|