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
|
<?php include("phpconfig.php");?> <?php if($_GET['time']=='present'){ $txtHead='โครงการปัจจุบัน'; } if($_GET['time']=='future'){ $txtHead='โครงการในอนาคต'; } if($_GET['time']=='pass'){ $txtHead='โครงการที่ผ่านมา'; } $query="SELECT COUNT(id) AS numID FROM tbl_project WHERE project_status='".$_GET['time']."' ORDER BY id DESC "; $result=mysql_query($query); $data=mysql_fetch_assoc($result); $Column=3; $toralRow=$data['numID']; $totalDiv=ceil($toralRow/$Column); // echo 'total row -> '.$toralRow.' total div= '.$totalDiv; // echo "numRow >".$toralRow."<br>"; //echo "<br>>numRow%3= ".ceil($toralRow/$Column); echo "<br>"; ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<link href="jquery.ennui.contentslider.css" rel="stylesheet" type="text/css" /> <script src="jquery-1.6.2.min.js" type="text/javascript"></script> <script src="jquery.easing.1.3.js" type="text/javascript"></script> <script src="jquery.ennui.contentslider.js" type="text/javascript"></script> <script type="text/javascript">
$(function() {
$('#slide').ContentSlider({
leftBtn: 'home_feature_prev.gif',
rightBtn: 'home_feature_next.gif',
width : '1000px',
height : '403px',
speed : 800,
easing : 'easeInOutBack'
});
});
</script> <link href="style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- body { background-image: url(); } --> </style></head> <!-- End contentslider --> <body > <div id="slide" class="contentslider"> <div class="cs_wrapper"> <div class="cs_slider"> <?php for($i=0;$i< $totalDiv;$i++){ ?> <div class=cs_article> <table border="0" cellpadding=0 style="border-collapse: collapse" > <tr> <td height="100"> <div align="center"> <!--<table border='0' width='100%' cellpadding='0' style='border-collapse: collapse'> <tr> <td width='55' height='20'></td> <td width='' height='20'></td> <td width='55' height='20'></td> </tr> <tr> <td width='55' height='40'> </td> <td width='900' height='40' align='left'> <font style="color:#F37022;font-weight:bold;font-size:14px;"><?php //echo $txtHead?></font></td> <td width='55' height='40'> </td> </tr> </table> --> <table width='' height='300' border='0' cellpadding='0' cellspacing="1" id='table<?php echo $n?>' style='border-collapse: collapse' align="left"> <tr> <?php if($i==0){ $limitStart=0; }else{ $limitStart= ($i*$Column);} $query="SELECT * FROM tbl_project WHERE project_status='".$_GET['time']."' ORDER BY id DESC LIMIT $limitStart, $Column "; $result=mysql_query($query); while($data=mysql_fetch_assoc($result)){ ?> <td width='25' align='center'></td> <td width='160' valign='top' align='left'> <table width="250" border="0"> <tr> <td height="10"> </td> </tr> <tr><td> <span class="bx-thumbs"><a href="project.php?ProjectID=<?php echo $data['id']?>" target="_top"><img src="<?php echo $path_product_thb.$data['project_image']?>"/></a></span> </td> </tr> <tr><td> </td></tr> </table> <a href="project.php?ProjectID=<?php echo $data['id']?>" target="_top"><span class="txt-project12"><?php echo $data['project_name']?></span></a><br /> <span class="L25"><?php echo $data['project_desc']?></span></td> <td width='25' align='center'></td> <?php $n++; } ?> </tr> </table> </div> </td> </tr> </table> </div> <?php }?>
</div> <!-- End cs_slider -->
</div> <!-- End cs_wrapper -->
</div>
<!-- End contentslider --> </body> </html>
|