/home/bjcompany/domains/benjabhorn.com/public_html/benjabhorn_group/index_bk.php


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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
<!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">


<script type="text/javascript" src="Scripts/cufon-yui.js"></script>
<script type="text/javascript" src="Scripts/DBOzone_400.font.js"></script>
<script type="text/javascript" src="Scripts/Quicksand_400.font.js"></script>
<script type="text/javascript" src="Scripts/dtac_400-dtac_400.font.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="featuredcontentglider.css" />
<script type="text/javascript" src="featuredcontentglider.js">
/***********************************************
* Featured Content Glider script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
</script>
<style type="text/css">
<!--
body {
    background-image: url(images/bg.jpg); background-position:top; background-repeat:repeat-x;
}
-->
</style>
<script src="ajax.js"></script>    
<script language="javascript">
        function getLocate(provinceID){
                var str=Math.random();
                    var isNS4 = (navigator.appName=="Netscape")?1:0;
                    var mydata='provinceID='+provinceID+'&str='+str;    
                     ajax = new sack('getSubCate.php');
                    ajax.element ="showLocate";
                    ajax.runAJAX(mydata)
    }
        function getProject(locationID){
                var str=Math.random();
                    var isNS4 = (navigator.appName=="Netscape")?1:0;
                    var mydata='locationID='+locationID+'&str='+str;    
                     ajax = new sack('getSubCate2.php');
                    ajax.element ="showproject";
                    ajax.runAJAX(mydata)
    }    
        function getType(projectID){
                var str=Math.random();
                    var isNS4 = (navigator.appName=="Netscape")?1:0;
                    var mydata='projectID='+projectID+'&str='+str;    
                     ajax = new sack('getSubCate3.php');
                    ajax.element ="showType";
                    ajax.runAJAX(mydata)
    }        
    
    </script>
</head>
<body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<?php include("header.php"); ?>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="1000" height="420" align="left"><iframe src="Slideshow2/slide/index_slide.php" width="994" height="430" scrolling="no" frameborder="0" style="background:transparent;"></iframe></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><iframe src="loation_slide.php" width="994" height="420" scrolling="no" frameborder="0" style="background:transparent;"></iframe></td>
  </tr>
  <tr>
    <td>
  <!--  /////////-News-///////////// -->
  <?php 
           $queryNC
="SELECT * FROM  tbl_act_category  ORDER BY id  ASC ";
            
$resultNC=mysql_query($queryNC);
         
$CountCate =mysql_num_rows($resultNC);
         
$n=1;$col=2//echo  " CountCate-> ".$CountCate;
         //echo $CountCate%$col;
  
?>
    <table width="100%" border="0">
      <tr>
          <?php  $count=1$n=1; while($cate=mysql_fetch_assoc($resultNC)){ 
                    if((
$count==$CountCate)&&($CountCate%$col==1)){ $tdColspan="colspan=".$col;}
        
?> 
          <td <?php echo $tdColspan?>>
                  <?php if($count $CountCate){ ?>
                      <!--2 COLUMN --> 
                <table width="496" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td  background="images/index/index_34.jpg">
                    <table width="496" border="0" align="left">
                                              <tr>
                                                <td  width="496" height="64" align="left" background="images/index/index_32-copy.jpg">&nbsp;&nbsp;&nbsp;<span class="CateName"><?php echo $cate['category_name']?></span></td>
                                              </tr>
                                            </table>                    </td>
                  </tr>
                  <tr>
                    <td width="496" height="117" align="center" valign="top" background="images/index/index_34.jpg"><script type="text/javascript">
                featuredcontentglider.init({
                    gliderid: "canadaprovinces<?php echo $count?>", //ID of main glider container
                    contentclass: "glidecontent", //Shared CSS class name of each glider content
                    togglerid: "p-select<?php echo $count?>", //ID of toggler container
                    remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
                    selected: 0, //Default selected content index (0=1st)
                    persiststate: false, //Remember last content shown within browser session (true/false)?
                    speed: 500, //Glide animation duration (in milliseconds)
                    direction: "rightleft", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
                    autorotate: true, //Auto rotate contents (true/false)?
                    autorotateconfig: [4000, 0] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
                })
                
                </script>
                      <div id="canadaprovinces<?php echo $count?>" class="glidecontentwrapper">
                      <?php $queryShowTopic="SELECT * FROM tbl_act3_data WHERE cate_id='".$cate['id']."'  AND first_page='1' ORDER BY id DESC LIMIT 0, 3  ";
                                     
$resultSt=mysql_query($queryShowTopic);
                                   while(
$news=mysql_fetch_assoc($resultSt)){ 
                                       
$query="SELECT pic_name FROM tbl_act3_pic WHERE model_data_id = '".$news['id']."' LIMIT 0, 1";
                                        
$resultPix=mysql_query($query);
                                        
$pix=mysql_fetch_assoc($resultPix);
                                        
//$info =  pathinfo($path_product_thb."/".$pix['pic_name']);
                                    
                                    
?>
                    <?php if($news['id']){ ?>
                      <div class="glidecontent">
                        <table width="411" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="23%">
                            <img src="<?php echo $path_product_tempx."/".$pix['pic_name']?>"  class="border" style="margin-left:5px; margin-right:5px" /></td>
                            <td width="77%" align="left" valign="top"><a href="news_detail.php?NewsID=<?php echo $news['id']?>&CateID=<?php echo $cate['id']?>" id="news"><?php echo $news['topic']?></a>&nbsp;<?php $icon=" <img src='images/ico-4408.gif'  width='30' height='10' border='0'/>"GetNewIcon($news['date_start'],$icon)?><?php //echo $news['date_post'];?>
                            <br /><br />
                            <p><?php $act['detail']=strip_tags($news['detail'], '<*>');  echo substr($news['detail'],0,250);?></p></td>
                          </tr>
                        </table>
                      </div>
                      <?php ?> 
                      <?php ?>                      </td>
                  </tr>
                  <tr>
                    <td width="496" height="32" align="center" background="images/index/index_36.jpg"><div id="p-select<?php echo $count?>" class="glidecontenttoggler"><a href="#" class="prev"> &laquo; Prev</a> <a href="news.php?CateID=<?php echo $cate['id']?>">ALL</a> <a href="#" class="next">Next&raquo;</a>&nbsp;&nbsp; </div></td>
                  </tr>
                </table>
                <?php } if(($count == $CountCate)&&($CountCate%$col==0)){ ?>
                      <!--2 COLUMN --> 
                <table width="496" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td  background="images/index/index_34.jpg">
                    <table width="496" border="0" align="left">
                                              <tr>
                                                <td  width="496" height="64" align="left" background="images/index/index_32-copy.jpg">&nbsp;&nbsp;&nbsp;<span class="CateName"><?php echo $cate['category_name']?></span></td>
                                              </tr>
                                            </table>                    </td>
                  </tr>
                  <tr>
                    <td width="496" height="117" align="center" valign="top" background="images/index/index_34.jpg"><script type="text/javascript">
                featuredcontentglider.init({
                    gliderid: "canadaprovinces<?php echo $count?>", //ID of main glider container
                    contentclass: "glidecontent", //Shared CSS class name of each glider content
                    togglerid: "p-select<?php echo $count?>", //ID of toggler container
                    remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
                    selected: 0, //Default selected content index (0=1st)
                    persiststate: false, //Remember last content shown within browser session (true/false)?
                    speed: 500, //Glide animation duration (in milliseconds)
                    direction: "rightleft", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
                    autorotate: true, //Auto rotate contents (true/false)?
                    autorotateconfig: [4000, 0] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
                })
                
                </script>
                      <div id="canadaprovinces<?php echo $count?>" class="glidecontentwrapper">
                      <?php $queryShowTopic="SELECT * FROM tbl_act3_data WHERE cate_id='".$cate['id']."'  AND first_page='1' ORDER BY id DESC LIMIT 0, 3  ";
                                     
$resultSt=mysql_query($queryShowTopic);
                                   while(
$news=mysql_fetch_assoc($resultSt)){ 
                                       
$query="SELECT pic_name FROM tbl_act3_pic WHERE model_data_id = '".$news['id']."' LIMIT 0, 1 ";
                                        
$resultPix=mysql_query($query);
                                        
$pix=mysql_fetch_assoc($resultPix);
                                        
//$info =  pathinfo($path_product_thb."/".$pix['pic_name']);
                                    
                                    
?>
                    <?php if($news['id']){ ?>
                      <div class="glidecontent">
                        <table width="411" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="23%">
                            <img src="<?php echo $path_product_tempx."/".$pix['pic_name']?>"  class="border" /></td>
                            <td width="77%" align="left" valign="top"><a href="news_detail.php?NewsID=<?php echo $news['id']?>&CateID=<?php echo $cate['id']?>" id="news"><?php echo $news['topic']?></a>&nbsp;<?php $icon=" <img src='images/ico-4408.gif'  width='30' height='10' border='0'/>"GetNewIcon($news['date_start'],$icon)?><?php //echo $news['date_post'];?>
                            
                            <p><?php $act['detail']=strip_tags($news['detail'], '<*>');  echo substr($news['detail'],0,250);?></p></td>
                          </tr>
                        </table>
                      </div>
                      <?php ?> 
                      <?php ?>                      </td>
                  </tr>
                  <tr>
                    <td width="496" height="32" align="right" background="images/index/index_36.jpg"><div id="p-select<?php echo $count?>" class="glidecontenttoggler"><a href="#" class="prev"> &laquo; Prev</a> <a href="news.php?CateID=<?php echo $cate['id']?>">ALL</a> <a href="#" class="next">Next&raquo;</a>&nbsp;&nbsp; </div></td>
                  </tr>
                </table>
                 <?php }else if(($count==$CountCate)&&($CountCate%$col==1)){ ?>
                     <!--1 COLUMN -->   
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="61" colspan="2" valign="top" background="images/news/news_02.png">
                  <table width="213" border="0" align="left" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td background="images/news/news_01.png"   width="213" height="60">&nbsp;&nbsp;&nbsp;<span class="CateName"><?php echo $cate['category_name']?></span></td>
                                              </tr>
                                            </table>                  </td>
                  <td width="15" height="61"><img src="images/news/news_03.png" width="15" height="61" alt="" /></td>
                </tr>
                <tr>
                  <td rowspan="2" background="images/news/news_04.png"><img src="images/news/news_04.png" /></td>
                  <td>
                              <!--///////////////////////////////////////// -->
                          <script type="text/javascript">
                featuredcontentglider.init({
                    gliderid: "canadaprovinces<?php echo $count?>", //ID of main glider container
                    contentclass: "glidecontent2", //Shared CSS class name of each glider content
                    togglerid: "p-select<?php echo $count?>", //ID of toggler container
                    remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
                    selected: 0, //Default selected content index (0=1st)
                    persiststate: false, //Remember last content shown within browser session (true/false)?
                    speed: 500, //Glide animation duration (in milliseconds)
                    direction: "rightleft", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
                    autorotate: true, //Auto rotate contents (true/false)?
                    autorotateconfig: [4000, 0] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
                })
                
                </script>
                      <div id="canadaprovinces<?php echo $count?>" class="glidecontentwrapper2">
                      <?php $queryShowTopic="SELECT * FROM tbl_act3_data WHERE cate_id='".$cate['id']."' AND first_page='1' ORDER BY id DESC LIMIT 0, 3  ";
                                     
$resultSt=mysql_query($queryShowTopic);
                                   while(
$news=mysql_fetch_assoc($resultSt)){ 
                                       
$query="SELECT pic_name FROM tbl_act3_pic WHERE model_data_id = '".$news['id']."'  LIMIT 0, 1 ";
                                        
$resultPix=mysql_query($query);
                                        
$pix=mysql_fetch_assoc($resultPix);
                                        
//$info =  pathinfo($path_product_thb."/".$pix['pic_name']);
                                    
?>
                <?php if($news['id']){ ?>
                      <div class="glidecontent2">
                        <table width="980" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="100" align="center">
                            <img src="<?php echo $path_product_tempx."/".$pix['pic_name']?>"  class="border" /></td>
                            <td align="left" valign="top"><a href="news_detail.php?NewsID=<?php echo $news['id']?>&CateID=<?php echo $cate['id']?>" id="news"><?php echo $news['topic']?></a>&nbsp;<?php $icon=" <img src='images/ico-4408.gif'  width='30' height='10' border='0'/>"GetNewIcon($news['date_start'],$icon)?>
                              <p><?php $act['detail']=strip_tags($news['detail'], '<*>');  echo substr($news['detail'],0,500);?></p></td>
                          </tr>
                        </table>
                      </div>  
                      <?php }?>
                       <?php }?>
                       
                            <!--///////////////////////////////////////// -->                  </td>
                  <td width="15" rowspan="2" background="images/news/news_06.png"><img src="images/news/news_06.png" /></td>
                </tr>
                <tr>
                  <td><div id="p-select<?php echo $count?>" class="glidecontenttoggler2"><a href="#" class="prev"> &laquo; Prev</a> <a href="news.php?CateID=<?php echo $cate['id']?>">ALL</a> <a href="#" class="next">Next&raquo;</a>&nbsp;&nbsp; </div></td>
                </tr>
                <tr>
                  <td width="27"><img src="images/news/news_07.png" width="27" height="36" alt="" /></td>
                  <td background="images/news/news_09.png"><img src="images/news/news_09.png" /></td>
                  <td width="15"><img src="images/news/news_10.png" width="15" height="36" alt="" /></td>
                </tr>
              </table>
                     <?php }?>
                    <!--END -->          </td>
          
           <?php if($n==$col){ echo "</t><tr>";$n=0;}?>
       <?php $n++; $count++; } ?>
      </tr>
    </table>
  <!-- //////////////////// -->    </td>
    </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><form action="search.php" method="post" name="searchForm"><table width="98%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="185" rowspan="4"><img src="images/index/index_42.jpg" width="185" height="130" alt=""></td>
        <td width="343" height="28" align="center" bgcolor="#E7ECF2"><img src="images/icon/Service.png" alt="" />&nbsp;
        <?php $query="SELECT * FROM tbl_province ORDER BY province_name ASC ";
                    
$resultProvince=mysql_query($query);
        
?>
          <select name="provinceID" style="width:230px;" onchange="getLocate(this.value)">
              <option value="" selected="selected">{ เลือกจังหวัด }</option>
             <?php while($province=mysql_fetch_assoc($resultProvince)){ ?>
             <option value="<?php echo $province['id']?>"><?php echo $province['province_name']?></option>
             <?php ?>
                    </select></td>
        <td width="151" rowspan="4" bgcolor="#E7ECF2"><a href="#" onclick="document.searchForm.submit()"><img src="images/index/index_50.jpg" alt="" width="84" height="28" border="0"style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.4;this.filters.alpha.opacity=40"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/ ></a></td>
        <td width="14" rowspan="4">&nbsp;</td>
        <td width="326" rowspan="4"><a href="estimate.php"><img src="images/index/index_40.jpg" alt="" width="324" height="150" border="0" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.4;this.filters.alpha.opacity=40"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
      </tr>
      
      <tr>
        <td height="28" align="center" bgcolor="#E7ECF2">
        <?php     $query="SELECT * FROM `tbl_location` ORDER BY  location_name ASC ";
            
$resultLocate=mysql_query($query);?>
        <div id="showLocate"><img src="images/icon/Service.png" alt="" />&nbsp; 
        <select name="locationID" style="width:230px;" onchange="getProject(this.value)">
             <option value="" selected="selected">{ เลือกทำเล }</option>
         <?php while($data=mysql_fetch_assoc($resultLocate)){?> 
         <option value="<?php echo $data['id']?>"><?php echo $data['location_name']?></option><?php ?>
        </select>
        </div></td>
        </tr>
      <tr>
        <td height="28" align="center" bgcolor="#E7ECF2">
        <?php
                $query
="SELECT * FROM tbl_project ORDER BY  project_name ASC LIMIT 0";
                 
$resultproject=mysql_query($query);
        
?>
        <div id="showproject"><img src="images/icon/Service.png" alt="" />&nbsp; 
          <select name="projectID" style="width:230px;">
          <option value="" selected="selected">{ เลือกโครงการ }</option>
        
        <?php while($data=mysql_fetch_assoc($resultproject)){?>
         <option value="<?php echo $data['id']?>"><?php echo $data['project_name']?></option>
         <?php ?>
        </select></div>
        </td>
        </tr>
      <tr>
        <td height="28" align="center" bgcolor="#E7ECF2"><div id="showType"><img src="images/icon/Service.png" alt="" />&nbsp; 
       <?php
                $query
="SELECT * FROM tbl_home_type ORDER BY  home_type_name ASC ";
               
$resulttype=mysql_query($query);
        
?>
        <select name="HomeTypeID" style="width:230px;">
              <option value="" selected="selected">{ เลือกประเภทที่อยู่อาศัย }</option>
             <?php while($data=mysql_fetch_assoc($resulttype)){?>
         <option value="<?php echo $data['id']?>"><?php echo $data['home_type_name']?></option>
         <?php ?>
            </select></div></td>
        </tr>
      
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table></form></td>
  </tr>
  <tr>
    <td align="center">&nbsp;</td>
  </tr>
</table>
</center>
<?php include("footer.php"); ?>
</body>
</html>