/home/bjcompany/domains/benjabhorn.com/public_html/benjabhorn_group/progress_detail.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
<!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;
    margin:0 auto;
    top:158px;
    width:100%;
    height:33px;
    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 
                $monthArray 
= array("01"=>"มกราคม","02"=>"กุมภาพันธ์","03"=>"มีนาคม","04"=>"เมษายน""05"=>"พฤษภาคม","06"=>"มิถุนายน","07"=>"กรกฏาคม","08"=>"สิงหาคม","09"=>"กันยายน","10"=>"ตุลาคม","11"=>"พฤศจิกายน","12"=>"ธันวาคม");
                
            
$queryPhase="SELECT DISTINCT (phase) ,  month_phase , year_phase FROM tbl_project_progress  WHERE  project_id= '".$_GET['ProjectID']."' ORDER BY phase ASC     ";
            
            
$resultPhase=mysql_query($queryPhase);
            
            
//-------------------data  project----------------------//
            
$query="SELECT * FROM tbl_project WHERE id = '".$_GET['ProjectID']."' ";
            
$resultDetail=mysql_query($query);
            
$dataProject=mysql_fetch_assoc($resultDetail);
            
//-----------------data home type---------------------//
            
$query="SELECT a.id, 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='".$_GET['ProjectID']."' ";
            
$resultHomeType=mysql_query($query);

?>

<script type="text/javascript" src="exteen/jquery.lightbox.js"></script>  
<link rel="stylesheet" type="text/css" href="exteen/jquery.lightbox.css" media="screen" />  
<script type="text/javascript">  
$(function() { 
    $('#gallery a').lightBox(); 
}); 
</script>  
<div id="apDiv2" align="right">
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
       <td>&nbsp;</td>
       <td width="990" align="right">
       <table border="0" cellspacing="0" cellpadding="0" align="right">
         <tr>
           <td width="225" height="33" background="images/submenu-project_01.gif" class="name-project" style="background-image:url(images/submenu-project_01.gif); background-repeat:no-repeat;">&nbsp;&nbsp;?php echo $dataProject['project_name']?></td>
           <td><a href="project.php?ProjectID=<?php echo $_GET['ProjectID']?>"><img src="images/submenu-project_02.gif" alt="" width="79" height="33" border="0" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=60"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
           <td><a href="type.php?ProjectID=<?php echo $_GET['ProjectID']?>"><img src="images/submenu-project_03.gif" alt="" width="88" height="33" border="0" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=60"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
           <td><a href="plan.php?ProjectID=<?php echo $_GET['ProjectID']?>"><img src="images/submenu-project_04.gif" alt="" width="91" height="33" border="0" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=60"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
           <td><a href="gallery.php?ProjectID=<?php echo $_GET['ProjectID']?>"><img src="images/submenu-project_05.gif" alt="" width="108" height="33" border="0"style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=60"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
           <td><a href="progress.php?ProjectID=<?php echo $_GET['ProjectID']?>"><img src="images/submenu-project_06.gif" alt="" width="75" height="33" border="0" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=60"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
           <td><a href="location.php?ProjectID=<?php echo $_GET['ProjectID']?>"><img src="images/submenu-project_07.gif" alt="" width="78" height="33" border="0" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=60"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
         </tr>
       </table></td>
       <td>&nbsp;</td>
     </tr>
   </table>
   <p>&nbsp;</p>
  </div>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="left" valign="top"><img src="images/index/2.jpg" alt="" width="994" height="400" /></td>
  </tr>
  <tr>
    <td align="center" valign="top"><img src="images/shadow.png" alt="" width="985" height="20" vspace="1" /></td>
  </tr>
    <tr>
    <td align="center" valign="top">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
       <td>&nbsp;</td>
       <td width="1290" align="right" valign="top">
       <table border="0" cellspacing="0" cellpadding="0" align="left">
         <tr>
           <td width="200" height="33" background="images/submenu-project_01.gif" class="name-project" style="background-image:url(images/submenu-project_01.gif); background-repeat:no-repeat;">&nbsp;&nbsp;<?php echo $dataProject['project_name']?></td>
           <td><a href="project.php?ProjectID=<?php echo $_GET['ProjectID']?>"><img src="images/submenu-project_02.gif" alt="" width="79" height="33" border="0" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=60"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
           <td><a href="type.php?ProjectID=<?php echo $_GET['ProjectID']?>"><img src="images/submenu-project_03.gif" alt="" width="88" height="33" border="0" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=60"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
           <td><a href="plan.php?ProjectID=<?php echo $_GET['ProjectID']?>"><img src="images/submenu-project_04.gif" alt="" width="91" height="33" border="0" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=60"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
           <td><a href="gallery.php?ProjectID=<?php echo $_GET['ProjectID']?>"><img src="images/submenu-project_05.gif" alt="" width="108" height="33" border="0"style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=60"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
           <td><a href="progress.php?ProjectID=<?php echo $_GET['ProjectID']?>"><img src="images/submenu-project_06.gif" alt="" width="75" height="33" border="0" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=60"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
           <td><a href="location.php?ProjectID=<?php echo $_GET['ProjectID']?>"><img src="images/submenu-project_07.gif" alt="" width="78" height="33" border="0" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=60"
onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td>
            <td height="33" width="300" style="background-image: url(images/submenu-project_bg.gif); background-repeat: repeat-x;"> </td>
         </tr>
       </table></td>
       <td>&nbsp;</td>
     </tr>
   </table>
   <p>&nbsp;</p>
        
    </td>
  </tr>

  <tr>
    <td width="1000" 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"><p>PROGRESS / ความก้าวหน้าโครงการ<br />
      </p>
      <hr size="2" noshade="noshade" /></td>
  </tr>
  <tr>
    <td align="center" valign="top"><p>&nbsp;</p>
      <table width="90%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="67" align="left"><div id="showDate"></div><br /> <hr size="2" noshade="noshade" /></td>
        </tr>
      <tr>
        <td align="center" valign="top"><p>
        
        <div id="gallery">
                    <ul> 
        <table  border="0" align="left">
              <tr>
        <?php   $n=1$col=5;  
            
$monthArray = array("01"=>"มกราคม","02"=>"กุมภาพันธ์","03"=>"มีนาคม","04"=>"เมษายน""05"=>"พฤษภาคม","06"=>"มิถุนายน","07"=>"กรกฏาคม","08"=>"สิงหาคม","09"=>"กันยายน","10"=>"ตุลาคม","11"=>"พฤศจิกายน","12"=>"ธันวาคม");
         
$queryIMG="SELECT * FROM tbl_project_progress WHERE  project_id= '".$_GET['ProjectID']."' AND phase = '".$_GET['phase']."' ORDER BY id ASC  ";
              
$resultIMG=mysql_query($queryIMG);
        while(
$pix=mysql_fetch_assoc($resultIMG)){   
                
$month=$pix['month_phase'];$year=$pix['year_phase'];
        
?>
                <td align="left">  
                <li><a href="<?php echo $path_product.$pix['image_file']?>"  title="<?php echo $pix['txtFile']?>">
                <img src="<?php echo $path_product."thb/".$pix['image_file']?>" border="0" class="border"><br />
                <span class="txt10blue"><?php echo $pix['desc']?></span> </a>                </li>                </td>
                <?php if($n==$col){ echo "</tr><tr>"$n=0; } $n++;    } 
                    
$showDate=$monthArray[$month]." &nbsp; ".($year+543);
                
?>
        </tr></table>
        </ul></div>    
        </p> <script language="javascript">
        function changeIMG(img){
                //document.getElementById('showBig').innerHTML="<img src='"+img+"' class='border'>";
            }
            document.getElementById('showDate').innerHTML="<strong><span class='txt14'><?php echo $showDate?></span></strong>";
</script>          </td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="150">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top" class="txt30"><p>ความก้าวหน้าโครงการทั้งหมด<br />
      </p>
      <hr size="2" noshade="noshade" /></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFEA">
    <p>
      <?php 
            $queryPhase
="SELECT DISTINCT (phase) ,  month_phase , year_phase FROM tbl_project_progress  WHERE  project_id= '".$_GET['ProjectID']."' AND  phase NOT IN ('".$_GET['phase']."')  ORDER BY phase DESC     ";
            
            
$resultPhase=mysql_query($queryPhase);
    
?>
    </p>
    <p>&nbsp;</p>
    <table width="98%" border="0" cellspacing="0" cellpadding="5">
     <?php while($phase=mysql_fetch_assoc($resultPhase)){ ?>
      <tr>
        <td height="50" align="left" valign="top"><img src="images/icon/menu-portfolio.png" alt="" width="16" height="15" hspace="10" align="absbottom" /><a href="progress_detail.php?ProjectID=<?php echo $_GET['ProjectID']?>&phase=<?php echo $phase['phase']?>">
        เดือน<?php echo $monthArray[$phase['month_phase']]?> <?php echo $phase['year_phase']+543?></a></td>
        <td width="84%" height="50" align="left" valign="top">
        <table  border="0" align="left">
              <tr>
        <?php   $n=1$col=4;  
         
$queryIMG="SELECT * FROM tbl_project_progress WHERE  project_id= '".$_GET['ProjectID']."' AND phase = '".$phase['phase']."' ORDER BY id ASC LIMIT 0, 4 ";
              
$resultIMG=mysql_query($queryIMG);
        while(
$pix=mysql_fetch_assoc($resultIMG)){ ?>
                <td align="left">  
               
                <img src="<?php echo $path_product."thb/".$pix['image_file']?>" border="0" class="border"><br />
                <span class="txt10blue"><?php echo $pix['txtFile']?></span>                </td>
                <?php if($n==$col){ echo "</tr><tr>"$n=0; } $n++;    } ?>
        </tr></table></td>
      </tr>
      <tr>
        <td align="center" valign="top">&nbsp;</td>
        <td align="left" valign="top"><hr size="2" noshade="noshade" />    </td>
      </tr>
      <?php }?>
    </table>    </td>
  </tr>
  <tr>
    <td align="center">&nbsp;</td>
  </tr>
</table>
</center>
<?php include("footer.php"); ?>
</body>
</html>