/var/www/(Del)tsolpv.com/2013/en/product_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
<?php require_once('../webadmin/configure.php');
$result0 mysql_query("SELECT * FROM home ");
$row0 mysql_fetch_array($result0,MYSQL_ASSOC);
$result mysql_query("SELECT * FROM sys_menu WHERE mpage = 'product' ");
$row mysql_fetch_array($result,MYSQL_ASSOC);

$result1 mysql_query("SELECT * FROM product_cat WHERE pdcatid = ".safe_param($_GET['pdcatid'])." AND pdcatstatus = '1' ORDER BY pdcatsort ASC ");
if (
mysql_num_rows($result1) > 0){
    
$row1 mysql_fetch_array($result1,MYSQL_ASSOC);
} else {
    
header("Location: index.php");
}
// echo path
function getLevel($p)
{
    
$sql1 "select * from product_cat where pdcatid = "$p ." ";
    
$result1 mysql_query($sql1);
    while (
$row1 mysql_fetch_array($result1,MYSQL_ASSOC))
    {
        if (
$row1{parentid} <> 0)
        {
            
$n =  $n getLevel($row1{'parentid'}) ." > <a href='product.php?pdcatid="$row1{'pdcatid'} ."'>"$row1{'pdcattitleen'} ."</a>";
        }
        else
        {
            
$n " > <a href='product.php?pdcatid="$row1{'pdcatid'} ."'>"$row1{'pdcattitleen'} ."</a>";
        }
    }
    return 
$n;
}
?><!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" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title><?=$row1{'metatitleen'};?></title>
<meta name="keywords" content="<?=$row1{'metakeyworden'};?>" />
<meta name="description" content="<?=$row1{'metadescen'};?>" />
<link rel="stylesheet" type="text/css" href="../css/style.css" />

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="../js/jquery.cycle.all.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('.banner').cycle({
        fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    });
});
</script>

<script type="text/javascript" src="../js/jquery.jcarousel.pack.js"></script>
<link rel="stylesheet" type="text/css" href="../css/jquery.jcarousel2.css" />
<link rel="stylesheet" type="text/css" href="../css/skin.css" />
<script type="text/javascript" src="../js/jCarousel.js"></script>

<script type="text/javascript" src="../fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css" media="screen" />
<script type="text/javascript">
    $(document).ready(function() {
    $("a[rel=example_group]").fancybox({
            'transitionIn'        : 'none',
            'transitionOut'        : 'none',
            'titlePosition'     : 'over',
            'titleFormat'        : function(title, currentArray, currentIndex, currentOpts) {
                //return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
            }
        });
    });
</script>


<script type="text/javascript"> 
    $(function(){
        // 預設顯示第一個 Tab
        var _showTab = 0;
        var $defaultLi = $('ul.tabs li').eq(_showTab).addClass('active');
        $('.tab_content').eq($defaultLi.index()).siblings().hide();
        
        // 當 li 頁籤被點擊時...
        // 若要改成滑鼠移到 li 頁籤就切換時, 把 click 改成 mouseover
        $('ul.tabs li').mouseover(function() {
            // 找出 li 中的超連結 href(#id)
            var $this = $(this),
                _index = $this.index();
            // 把目前點擊到的 li 頁籤加上 .active
            // 並把兄弟元素中有 .active 的都移除 class
            $this.addClass('active').siblings('.active').removeClass('active');
            // 淡入相對應的內容並隱藏兄弟元素
            $('.tab_content').eq(_index).stop(false, true).fadeIn().siblings().hide();
 
            return false;
        }).find('a').focus(function(){
            this.blur();
        });
    });
</script> 
</head>
<body>
<div id="container">
   <!-- Header -->
   <?php require_once('header.php');?>
   <!-- Main Content -->
   <div id="body">
       <div id="body_content">
        <div id="submenu">
            <ul><?php // Left Menu
            
$result3 mysql_query("SELECT * FROM product_cat WHERE levelnum = '1' AND pdcatstatus = '1' ORDER BY pdcatsort ASC ");
            while (
$row3 mysql_fetch_array($result3,MYSQL_ASSOC)){
                echo 
"<li><a href='product.php?pdcatid=".$row3{'pdcatid'}."'>".$row3{'pdcattitleen'}."</a>";
                    
$result4 mysql_query("SELECT * FROM product_cat WHERE levelnum = '2' AND parentid = ".$row3{'pdcatid'}." AND pdcatstatus = '1' ORDER BY pdcatsort ASC ");
                    if (
mysql_num_rows($result4) > 0){
                        echo 
"<ul>";
                        while (
$row4 mysql_fetch_array($result4,MYSQL_ASSOC)){
                            echo 
"<li><a href='product.php?pdcatid=".$row4{'pdcatid'}."'>".$row4{'pdcattitleen'}."</a>";
                        }                    
                        echo 
"</ul>";
                    }
                echo 
"</li>";
            }
?></ul>
        </div>

        <div id="maincontent">
            <div id="pagetitle" class="pagetitle"><?=$row1{'pdcattitleen'};?></div>
            <div id="path" class="path"><a href="index.php">Home</a><?=getLevel($row1{'pdcatid'});?></div>
            <div id="pagecontent" class="pagecontent"><?php 
            $result5 
mysql_query("SELECT * FROM product_det WHERE pdid = ".safe_param($_GET['pdid'])." AND pdstatus = '1' ");
            if (
mysql_num_rows($result5) > 0){
                
$row5 mysql_fetch_array($result5,MYSQL_ASSOC);
            } else {
                
header("Location: index.php?langcode=".$_GET['langcode']."");
            }
            
$result6 mysql_query("SELECT * FROM product_img WHERE pdid = ".$row5{'pdid'}." ORDER BY pimgsort ASC ");    
            
?>
            
                <table width="670" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="210" height="210" align="left" valign="top" class="prodlistimg">
                    <div id="slideshow-main">
                        <ul>
                            <?php $x=1
                                    while (
$row6 mysql_fetch_array($result6,MYSQL_ASSOC))    {
                                    
$getsize getimagesize("../products/large/".$row6{'pimgfile'});
                                    if(
$getsize[0] > $getsize[1]){ // 0=w 1=h                    
                                        
$pimgfile "<a rel='example_group' href='../products/large/".$row6{'pimgfile'}."' title=''><img src='../products/thumb/".$row6{'pimgfile'}."' width='210' alt='".$row5{'pdtitleen'}."' /></a>";
                                    } else {
                                        
$pimgfile "<a rel='example_group' href='../products/large/".$row6{'pimgfile'}."' title=''><img src='../products/thumb/".$row6{'pimgfile'}."' height='210' alt='".$row5{'pdtitleen'}."' /></a>";
                                    }
                                    echo 
"<li class='p".$x;
                                     if (
$x=='1') echo ' active';
                                    echo 
"'>".$pimgfile."</li>\n";
                                    
$x++; }  ?>    
                        </ul>                                        
                    </div></td>
                    <td align="left" valign="top">
                    <div class="prodlist_name"><?=$row5{'pdcode'};?>&nbsp;&nbsp;<?=$row5{'pdtitleen'};?><br /><br /></div>
                    <div class="prodlist_feat"><?=$row5{'pdfeaten'};?></div>
                    <br /><br />
                    <div id="slideshow-carousel">        
                    <ul> 
                        <?php $y=1
                            while (
$row6 mysql_fetch_array($result6,MYSQL_ASSOC))    {
                            
$getsize getimagesize("../products/large/".$row6{'pimgfile'});
                            if(
$getsize[0] > $getsize[1]){ // 0=w 1=h                    
                                
echo "<li><a rel='p".$y." href='#'><img src='../products/thumb/".$row6{'pimgfile'}."' height='66' alt='".$row5{'pdtitleen'}."' /></a></li>\n";
                            } else {
                                echo 
"<li><a rel='p".$y." href='#'><img src='../products/thumb/".$row6{'pimgfile'}."' height='66' alt='".$row5{'pdtitleen'}."' /></a></li>\n";
                            }
                            
$y++; }  ?>    
                    </ul>    
                    </div>
                
                    <div class="clear"></div></td>
                  </tr>
                </table>
                <br /><br />
                <div class="productdesc_tab"> 
                    <ul class="tabs"> 
                        <li><a href="#"><span>Advantages</span></a></li> 
                        <li><a href="#"><span>Parameters</span></a></li> 
                    </ul> 
             
                    <div class="tab_container"> 
                        <div id="tab1" class="tab_content"><?=$row5{'pdadven'};?></div> 
                        <div id="tab2" class="tab_content"><?=$row5{'pdparen'};?></div> 
                    </div> 
                </div>
                
            </div>
        </div>
        <div class="clear"></div>
    </div>
   </div>
   <!-- Footer -->
   <?php require_once('footer.php');?>
</div>
</body>
</html>