{template 'header.html'}
<div id="c">
{template 'position.html'}

<div id="right">

<div id="text" style="width:775px;overflow:hidden;">

<div class="blank30"></div>
<script src="{$skin_path}/js/jquery.js" type="text/javascript"></script>
<script src="{$skin_path}/js/jqzoom.pack.1.0.1.js" type="text/javascript"></script>
<script src="{$skin_path}/js/jquery.jcarousel.pack.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="{$skin_path}/js/jquery.jcarousel.css" />
<link rel="stylesheet" type="text/css" href="{$skin_path}/js/skin.css" />
<link rel="stylesheet" type="text/css" href="{$skin_path}/js/jqzoom.css" />
<style type = "text/css">
#pro_view {margin:12px;width:780px;height:340px;}
#pro_infor {height:260px;}
#image_box {float:left;width:350px;height:251px;}
#image_box img {border:1px solid #ccc;width:335px;height:251px;}
#pro_baseinfo {float:right; width:400px;height:251px;}
#image_list {clear:both;height:50px;}
#image_list li {width:54px; height:38px; border:1px solid #ccc;overflow:hidden;}
#image_list img {width:50px;height:36px; padding:2px;cursor:pointer;}

#pro_baseinfo ul li {line-height:32px;}
.p_info {height:40px;line-height:40px;padding-left:20px;background:url({$skin_path}/comment.gif) left center no-repeat;border-bottom:1px dotted #ccc;}
</style>
<!-- 幻灯片 -->
<?php $pics = unserialize($archive[pics]); ?>


<script type="text/javascript">

$(function() {

    // 放大镜
    var options =
    {
        zoomWidth: 350,
        zoomHeight: 250,
        showEffect:'show',
        hideEffect:'fadeout',
        fadeoutSpeed: 'slow',
        title :false
    }
    $(".jqzoom").jqzoom(options);

    // 图片左右滚动
    $('#image_list').jcarousel();

    // 点击小图更换大图
    $('#image_list img:only-child').click(function(){
        $('#current_img').attr('src', this.src);
        // 大图的命名方式为 小图 + 下划线
        $('#current_img').parent().attr('href', this.alt);
    });
});
</script>

    <div id="pro_view">
        <div id="pro_infor">
            <div id="image_box">
                <a href="{$base_url}/{$pics[0]}" class="jqzoom" title=""><img src="{$base_url}/{$pics[0]}"  alt="" id="current_img"></a>
            </div>
            <div id="pro_baseinfo">
<ul>
<li><strong>{lang(productname)}：</strong>{$archive[title]}</li>
<li><strong>{lang(price)}：</strong>{$archive[attr2]}</li>
<li><strong>{lang(view)}：</strong>{view_js($archive[aid])}</li>
<li><strong>{lang(adddate)}：</strong>{$archive[adddate]}</li>
<li><strong>{lang(strgrades)}：</strong>{$archive[strgrade]}</li>

<li>&nbsp;</li>
<li><a target="_blank" href="{url('archive/orders/aid/'.$archive[aid],true)}"><img src="{$skin_path}/buy.gif" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a title="{lang(makeorders)}" href="{url('archive/doorders/aid/'.$archive[aid],true)}"><img src="{$skin_path}/shopping.gif" /></a></li>

</ul>

</div>
        </div>

        <ul id="image_list" class="jcarousel-skin-tango">
            {loop $pics $pic}
        {if $pic}<li><img src="{$base_url}/{$pic}" alt="{$base_url}/{$pic}" /></li>{/if}
        {/loop} 
        </ul>
    </div>
<div class="blank30"></div>
<div class="p_info">{lang(pintro)}：</div>
<div class="blank30"></div>
<div id="content" style="width:738px;" class="pd">
{$archive[content]}
</div>

<div class="blank30"></div>

{if $archive[tag]}
<!-- tag -->
<div class="blank10"></div>
{lang(tag)}： {$archive[tag]}
{/if}

{if $archive[special]}
<!-- 专题 -->
<div class="blank10"></div>
{lang(special)}： {$archive[special]}
{/if}


{if $archive[type]}
<!-- 分类 -->
<div class="blank10"></div>
{lang(type)}： {$archive[type]}
{/if}


{if $archive[area]}
<!-- 地区 -->
<div class="blank10"></div>
{lang(area)}： {$archive[area]}
{/if}

<div class="blank30"></div>
{if $pages>1}
<!-- 内页分页 -->
<div class="blank10"></div>
<div class="pages">
{archive_pagination($archive)}
</div>
<div class="blank30"></div>
{/if}

<!--自动调用自定义字段-->
<?php
$set_field=type::getpositionlink($data['typeid']);
$set_fields=array();
if(is_array($set_field))
foreach($set_field as $key => $value) {
    $set_fields[]=$value[id];
}
?>
{cb_data($archive)}
{loop $archive $key $value}
<?php if(setting::$var['archive'][$name]['typeid'] && !in_array(setting::$var['archive'][$name]['typeid'],$set_fields)){
  unset($field[$name]);
  continue;
}?>
<?php if(!preg_match('/^my/',$key) || !$value) continue; ?>
<p> {=setting::$var['archive'][$key]['cname']}: {$value}</p>
{/loop}
<div class="blank20"></div>

<?php if(archive_attachment($archive['aid'],'id')) { ?>
<!-- 附件 -->
<p>
{lang(attachment)}：{attachment_js($archive['aid'])}
</p>
<?php } ?>
<div class="blank30"></div>

<?php if(hasflash()) { ?>
        <div style="color:red;font-size:16px;"><?php echo showflash(); ?></div><?php } ?>

<!-- 投票 -->
        {vote_js($archive[aid])}


<script language="JavaScript">
function shutwin(){
window.close();
return;}
</script>
{if get('lang_type')=='cn'}
<div class="blank30"></div>
<!-- JiaThis Button BEGIN -->
<div id="ckepop" style="margin-left:10px;">
<a href="http://www.jiathis.com/share/" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank">分享到：</a>
<a class="jiathis_button_tools_1"></a>
<a class="jiathis_button_tools_2"></a>
<a class="jiathis_button_tools_3"></a>
<a class="jiathis_button_tools_4"></a>
</div>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
<!-- JiaThis Button END -->
{/if}
<div class="blank30"></div>
<div id="tool">
<ul>
<li><a href="javascript:window.print()" class="print">{lang(printcontent)}</a></li>
<li style="width:90px; padding-left:5px;"><a href='<?php echo url('comment/list/aid/'.$archive['aid']); ?>' class="t_4">{lang(comment)}</a></li>
{if get('lang_type')=='cn'}
<li><a href="javascript:void((function(s,d,e,r,l,p,t,z,c) {var%20f='http://v.t.sina.com.cn/share/share.php?appkey=4174743220',u=z||d.location,p=['&url=',e(u),'& title=',e(t||d.title),'&source=',e(r),'&sourceUrl=',e(l),'& content=',c||'gb2312','&pic=',e(p||'')].join('');function%20a() {if(!window.open([f,p].join(''),'mb', ['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(s.width- 440)/2,',top=',(s.height-430)/2].join('')))u.href=[f,p].join('');}; if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();}) (screen,document,encodeURIComponent,'','','','{$archive[title]}','',''));" class="sinaicon">分享到微博</a></li>
{/if}
</ul>
</div>
<div class="blank30"></div>
<div id="page">
{if $archive['p']['aid']}
<strong>{lang(archivep)}：</strong><a href="{$archive['p']['url']}">{$archive['p']['title']}</a>
{else}
<strong>{lang(archivep)}：</strong>{lang(nopage)}	
{/if}
<div class="clear"></div>
{if $archive['n']['aid']}
 <strong>{lang(archiven)}：</strong><a href="{$archive['n']['url']}">{$archive['n']['title']}</a>
{else}
<strong>{lang(archiven)}：</strong>{lang(nopage)}	
{/if}
</div>

<div class="blank30"></div>
<a title="{lang(gotop)}" href="#" class="clear floatright"><img alt="{lang(gotop)}" src="{$skin_url}/gotop.gif"></a>
<div class="blank30"></div>

</div>
</div>

{template 'left.html'}

<div class="clear"></div>
</div>

<script> 
function resizeImg(obj)
{ 
var obj = document.getElementById(obj); 
var objContent = obj.innerHTML;
var imgs = obj.getElementsByTagName('img'); 
if(imgs==null) return; 
for(var i=0; i<imgs.length; i++) 
{ 
if(imgs[i].width>parseInt(obj.style.width)) 
{ 
imgs[i].width = parseInt(obj.style.width);
} 
} 
} 
window.onload = function() {resizeImg('content');
} 
</script>
{template 'footer.html'}