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
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <?php //-----------------portfolio----------------------------- function ShowPortFolio($rowPerPage, $col, $uploadfolderThb ,$uploadfolder){ $startRow=0 ; $query="SELECT * FROM tbl_portfolio_data WHERE product_firstpage= '1' ORDER BY num ASC "; if($rowPerPage!=0){ $queryLimit=$query." LIMIT $startRow , $rowPerPage "; }else{ $queryLimit=$query." "; } $result=mysql_query($queryLimit); ?> <table border="0" align="left" style="padding-left:10px;"> <tr> <?php $n=1; while($data=mysql_fetch_assoc($result)){ $image_name=ShowDataImg($data['id']); ?> <td> <table width="223" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="10" align="right"></td> </tr> <tr> <td width="32%" align="left"><a href="#"><img src="<?php echo $uploadfolderThb.$image_name?>" width="223" height="135" alt="" class="border" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.8;this.filters.alpha.opacity=80" onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100"/></a></td> </tr> <tr> <td width="32%" height="5"></td> </tr> <tr> <td width="32%" align="left" class="txt-port-blue"><a href="reference.php?ref=<?php echo $data['id']?>"><?php echo $data['product_name_th']?></a><br /></td> </tr> <tr> <td width="32%" align="left" class="txt-clipvdo"><?php echo $data['reference_locations']?></td> </tr> </table> </td> <?php if($n==$col){ echo "</td></tr>"; $n=0;} ?> <?php $n++; }?> </tr> </table> <?php } //--------------------------------------------------- function ShowDataImg($id){ $query="SELECT * FROM `tbl_portfolio_img` WHERE product_ID= '".$id."' AND firstpage='1' "; $resultIMG=mysql_query($query); $img=mysql_fetch_assoc($resultIMG); return $img['file_name']; } //--------------------------------------------------- function ShowVideo($max , $width , $height){ if($max=='0'){ $query="SELECT * FROM tbl_video_data WHERE video_status='1' ORDER BY id DESC "; $queryLimit=$query." "; }else{ $query="SELECT * FROM tbl_video_data WHERE video_status='1' ORDER BY id DESC "; $queryLimit=$query." LIMIT 0 , $max "; } $result=mysql_query($queryLimit); while($data=mysql_fetch_assoc($result)){ $data['txtEmbed'] = ereg_replace("<iframe " , "<iframe class='radius8' ", $data['txtEmbed'] ); $data['txtEmbed'] = preg_replace('/height="(.*?)"/i', 'height="' . $height .'"', $data['txtEmbed']); $data['txtEmbed'] = preg_replace('/width="(.*?)"/i', 'width="' . $width .'"', $data['txtEmbed']); ?> <?php echo $data['txtEmbed']?> <span class="txt-clipvdo"><a href="#" id="red"><?php echo $data['video_title']?></a></span> <?php } } ?>
|