echo tpl_function_pager(array('data' => $this->_vars['pager']), $this);
?>
 <form class="addcomment division" method="post" action='<?php 
echo tpl_function_link(array('ctl' => "message", 'act' => "sendMsgToOpt"), $this);
?>
' onsubmit='checkFormReqs(event);'> <h4><a name='dosubmit'>发布留言</a></h4> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="forform"> <tr> <th><em style='color:red'>*</em>标题:</th> <td><?php 
echo tpl_input_default(array('type' => "text", 'required' => "true", 'size' => 50, 'name' => "subject"), $this);
?>
</td> </tr> <tr> <th><em style='color:red'>*</em>留言内容:</th> <td><?php 
echo tpl_input_textarea(array('required' => "true", 'rows' => "5", 'name' => "message", 'class' => 'inputstyle', 'style' => 'width:80%'), $this);
?>
</td> </tr> <?php 
if ($this->_vars['nomember'] == 'on') {
    ?>
 <tr> <th>联系方式:</th> <td><?php 
    echo tpl_input_default(array('type' => "text", 'size' => 24, 'name' => "email", 'maxlength' => 255, 'class' => 'inputstyle'), $this);
    ?>
(QQ、MSN、Email、电话等,此信息不会被公开)</td> </tr> <?php 
}
if ($this->_vars['msgshow'] == "on") {
    ?>
 <tr> <th><em style='color:red'>*</em>验证码:</th> <td><?php 
    echo tpl_input_default(array('type' => "text", 'required' => "true", 'size' => "4", 'maxlength' => "4", 'name' => "verifyCode", 'class' => 'inputstyle'), $this);
    ?>
&nbsp;<img src="<?php 
    echo tpl_function_link(array('ctl' => "passport", 'act' => "verifyCode"), $this);
    ?>
" border="1" id="imgVerifyCode"/><a href="javascript:changeimg()">&nbsp;看不清楚?换个图片</a></td> </tr> <?php 
}
?>
 <tr> <th></th> <td><input type="submit" value="提交" class='btn' ></td> </tr> </table> </form> 
    if ($this->_vars['item']['price']) {
        ?>
<span class="mktprice1">原价格: <?php 
        echo $CURRENCY->changer($this->_vars['item']['price']);
        ?>
</span><?php 
    }
    ?>
</li> </ul> <?php 
    if ($this->_vars['item']['sale_status'] == '1') {
        ?>
 <ul> <li class="button"><a href="<?php 
        echo tpl_function_link(array('ctl' => cart, 'act' => addGiftToCart, 'arg0' => $this->_vars['item']['gift_id'], 'arg1' => 1), $this);
        ?>
" class="present">兑换赠品</a></li> <li><a href="<?php 
        echo tpl_function_link(array('ctl' => gift, 'act' => index, 'arg0' => $this->_vars['item']['gift_id']), $this);
        ?>
">赠品详细</a></li> </ul> <?php 
    }
    ?>
 </td> <tr> </tr> </table> </div> <?php 
}
?>
 </div> <?php 
echo tpl_function_pager(array('data' => $this->_vars['pager']), $this);
?>
 </div> <script>


window.addEvent('load',function(){
         var gift_showlistImg=$$('.gift_showlist a img');
                        img.$e=true;
                      },onerror:function(){
                         imga.remove();
                      }});
                      
                      v.map(function(goods,index){
                           if(index<max&&goods['goodsId']==gid){
                                return goods['goodsImg']='';
                           }else{
                                return goods['goodsImg']=data[0]['thumbnail_pic'];
                           }
                      });
                    broswerStore.set('history',v);
                 }}).get($H({'gids':gid}));
                
            
            }
        });          
      });

});


});
</script> <div class="textright"> <a class="lnk clearAll" onclick="if(broswerStore){broswerStore.remove('history');$('box_<?php 
echo $this->_vars['widgets_id'];
?>
').empty()}">清除列表</a> | <a class="lnk viewAll" href="<?php 
echo tpl_function_link(array('ctl' => "tools", 'act' => "history"), $this);
?>
">查看所有</a><span>&nbsp;&nbsp;</span> </div> 
</li><?php 
        }
        if ($this->_vars['trading']['advance'] > 0) {
            ?>
<li>返点 <?php 
            echo $CURRENCY->changer($this->_vars['trading']['advance']);
            ?>
 到预存款账户</li><?php 
        }
        if ($this->_vars['trading']['score'] > 0) {
            ?>
<li>您将获得<?php 
            echo $this->_vars['trading']['score'];
            ?>
点积分,<a href="<?php 
            echo tpl_function_link(array('ctl' => gift, 'act' => index), $this);
            ?>
">看看有什么可以换的&raquo;</a></li><?php 
        }
        foreach ((array) $this->_vars['trading']['pmt_o']['list'] as $this->_vars['item']) {
            ?>
 <li><?php 
            echo $this->_vars['item']['pmt_describe'];
            ?>
</li> <?php 
        }
        ?>
 </ol> </tr> <?php 
    }
}
if (count($this->_vars['trading']['gift_p']) > 0) {
    ?>
';
              
              });              
            }
     });
     
     
     
     /*checkout*/
     $$('form[action$=checkout.html]').addEvent('submit',function(e){
            if(Cookie.get('S[MEMBER]'))return this.submit();
            e.stop();
            var form = this;
            MiniPassport.show(this,{remoteURL:'<?php 
    echo tpl_function_link(array('ctl' => "cart", 'act' => "loginBuy"), $this);
    ?>
'});
            if(this.get('extra') == 'cart'){
                miniPassportDialog.store('margedata',[{t:'hidden',n:'regType',v:'buy'}]);
            }
            miniPassportDialog.store('chain',function(){
                    MessageBox.success('正在转入...');
                    form.submit();
            });        
     });
   
   });
</script> <?php 
}
if ($this->_vars['openid_open']) {
    echo $this->_vars['menus']['mid'];
    ?>
" style="font-size:14px;"><?php 
    echo $this->_vars['menus']['label'];
    ?>
</div></span> <ul> <?php 
    foreach ((array) $this->_vars['menus']['items'] as $this->_vars['items']) {
        ?>
 <li <?php 
        if ($this->_vars['current'] == $this->_vars['items']['link']) {
            ?>
 class="current"<?php 
        }
        ?>
><a href="<?php 
        echo tpl_function_link(array('ctl' => "member", 'act' => $this->_vars['items']['link']), $this);
        ?>
" target="<?php 
        echo isset($this->_vars['items']['target']) && '' !== $this->_vars['items']['target'] ? $this->_vars['items']['target'] : "_self";
        ?>
"><?php 
        if ($this->_vars['items']['label'] == '我的订单') {
            ?>
<b><?php 
        }
        echo $this->_vars['items']['label'];
        if ($this->_vars['items']['label'] == '我的订单') {
            ?>
</b><?php 
        }
        ?>
        ?>
'}" > <img src="<?php 
        echo tpl_modifier_storager(isset($this->_vars['thumb']['thumbnail']) && '' !== $this->_vars['thumb']['thumbnail'] ? $this->_vars['thumb']['thumbnail'] : $this->system->getConf('site.default_thumbnail_pic'));
        ?>
" alt='<?php 
        echo $this->_vars['goods']['name'];
        ?>
' width='55' height='55'/> </a> </td> <?php 
    }
    unset($this->_env_vars['foreach'][gimgs]);
    ?>
 </tr> </table> </center> <?php 
}
?>
 </div> </td> <td width='5%' class='scrollarrow toright' title='向右'>&nbsp; </td> </tr> </table> <a href="<?php 
echo tpl_function_link(array('ctl' => product, 'act' => viewpic, 'arg0' => $this->_vars['goods']['goods_id'], 'arg1' => $this->_vars['goods']['image_default']), $this);
?>
" target="_blank" onclick='_open(this.href);return false;'> <img src="statics/transparent.gif" alt="查看大图" style="width:101px;height:26px;background-image:url(statics/icons.gif);background-repeat:no-repeat;background-position:0 -121px;" /> </a> <script>
      window.addEvent('domready',function(){

         var picThumbnailItems=$$('#goods-viewer .goods-detail-pic-thumbnail td a');              
         if(!picThumbnailItems.length)return;
         var goodsPicPanel = $E('#goods-viewer .goods-detail-pic');
         var goodsDetailPic = $E('#goods-viewer .goods-detail-pic img');
         
         
         var picscroll=$E('#goods-viewer .picscroll');
         var scrollARROW=picscroll.getElements('.scrollarrow');
         var picsContainer=$E('.pics',picscroll).scrollTo(0,0);
             picsContainer.store('selected',picThumbnailItems[0]);
        
<?php

if (!function_exists('tpl_function_link')) {
    require CORE_DIR . '/include_v5/smartyplugins/function.link.php';
}
?>
<div class="ShopCartWrap"> <a href="<?php 
echo tpl_function_link(array('ctl' => "cart", 'act' => "index"), $this);
?>
" class="cart-container">购物车中有<b class="cart-number"> <script>document.write(Cookie.get('S[CART_COUNT]')?Cookie.get('S[CART_COUNT]'):0);</script></b>件商品</a> </div> 
 <input id='cart-coupon-submitBtn' type="button" value="确定" /> <script>
                      $('cart-coupon-submitBtn').addEvent('click',function(e){
                          e.stop();
                          new Element('form',{method:'post',action:'<?php 
            echo tpl_function_link(array('ctl' => "cart", 'act' => "applycoupon"), $this);
            ?>
'}).adopt($('cart-coupon').clone()).inject(document.body).submit();
                      });
                  </script> <?php 
        }
        ?>
 </div> </div> <div class="floatRight" style='width:45%'> <div id="cartTotal"> <?php 
        echo $this->_fetch_compile_include($this->_get_resource('user:'******'/' . "cart/cart_total.html") ? 'user:'******'/' . "cart/cart_total.html" : 'shop:' . "cart/cart_total.html", array());
        ?>
 </div> </div> <div class="clear"></div> </div> <div class="CartBtn clearfix" style="margin-bottom:5px;"> <div class="span-auto"><a href="./" class="actbtn btn-return" >&laquo;继续购物</a></div> <div class="span-auto"><a id="clearCart" class="actbtn btn-clearcat" href="javascript:Cart.empty('<?php 
        echo tpl_function_link(array('ctl' => cart, 'act' => 'removeCart', 'arg0' => all), $this);
        ?>
');">清空购物车</a></div> <div class="span-auto floatRight"><input class="actbtn btn-next" type="submit" value="下单结算&raquo;" /></div> </div> </form> </div> <?php 
    }
    ?>
 <div id="cart-none-msg" style='<?php 
    if (count($this->_vars['trading']['products']) > 0 or count($this->_vars['trading']['package']) > 0 or count($this->_vars['trading']['gift_e']) > 0) {
        ?>
display:none;<?php 
    }
    ?>
'> <br/> <br/> <div class='success' >您已清空了购物车.</div> <h3>现在您可以:</h3> <ul class='list'> <li><a href='./'>返回网站首页</a></li> <li><a href='javascript:opener=null;window.close();'>关闭此页面</a></li> </ul> </div> </div> <script>
/*
*CartJs update :2009-9-8 11:33:20
*
*@author litie[aita]shopex.cn
                        echo tpl_function_link(array('ctl' => "gallery", 'act' => $this->_vars['setting']['view'], 'arg0' => $this->_vars['childId']), $this);
                        ?>
"><?php 
                        echo $this->_vars['child']['label'];
                        ?>
</a> <?php 
                        echo $this->_vars['setting']['page_devide'];
                        ?>
</td> <?php 
                    }
                    echo tpl_function_counter(array('assign' => "result", 'print' => false), $this);
                }
            }
            ?>
 </tbody> </table> <?php 
        }
        ?>
 </li> <?php 
    } else {
        ?>
 <li class="c-cat-depth-1"><a href="<?php 
        echo tpl_function_link(array('ctl' => 'gallery', 'act' => $this->_vars['setting']['view'], 'arg0' => $this->_vars['parentId']), $this);
        ?>
"><?php 
        echo $this->_vars['parent']['label'];
        ?>
</a></li> <?php 
    }
}
?>
 </ul> </div> 
コード例 #11
0
    }
    ?>
 <a href="<?php 
    echo tpl_function_link(array('ctl' => passport, 'act' => signup), $this);
    ?>
">[免费注册]</a> </span> <?php 
} else {
    ?>
 <span id="memberBar_<?php 
    echo $this->_vars['widgets_id'];
    ?>
"> <a href="<?php 
    echo tpl_function_link(array('ctl' => member, 'act' => index), $this);
    ?>
">[会员中心]</a>&nbsp;&nbsp; <a href="<?php 
    echo tpl_function_link(array('ctl' => passport, 'act' => logout), $this);
    ?>
">[退出]</a> </span> <?php 
}
if ($this->_vars['data']['open_id_open'] && !$_COOKIE['MEMBER']) {
    ?>
 <style id='thridpartystyle'> .trustlogin { background:url(statics/icons/thridparty1.gif) no-repeat left; padding-left:18px; height:20px; line-height:20px; } #accountlogin{visibility:hidden;cursor:pointer;padding-top:0px; } </style> <script>
(function(){
    var loginBtn=$ES('.trust__login','loginBar_<?php 
    echo $this->_vars['widgets_id'];
    ?>
'),timer;
	$$(loginBtn,$('accountlogin')).addEvents({'mouseenter':function(){
			if(timer)$clear(timer);
			$('accountlogin').setStyles({'visibility':'visible','top':'20','left':'10'});
		},'mouseleave':function(){
echo tpl_function_pager(array('data' => $this->_vars['pager']), $this);
?>
 </div> <?php 
foreach ((array) $this->_vars['data'] as $this->_vars['data']) {
    ?>
 <div class="span-5 items"> <dl> <dt class="img" style="text-align:center"><a href="<?php 
    echo tpl_function_link(array('ctl' => brand, 'act' => index, 'arg0' => $this->_vars['data']['brand_id']), $this);
    ?>
" title="了解 <?php 
    echo $this->_vars['data']['brand_name'];
    ?>
"><img src="<?php 
    echo tpl_modifier_storager(isset($this->_vars['data']['brand_logo']) && '' !== $this->_vars['data']['brand_logo'] ? $this->_vars['data']['brand_logo'] : 'statics/transparent.gif');
    ?>
"></a></dt> <dd class="intro textcenter"> <a href="<?php 
    echo tpl_function_link(array('ctl' => brand, 'act' => index, 'arg0' => $this->_vars['data']['brand_id']), $this);
    ?>
" title="了解 <?php 
    echo $this->_vars['data']['brand_name'];
    ?>
"><?php 
    echo $this->_vars['data']['brand_name'];
    ?>
</a> <a href="<?php 
    echo $this->_vars['data']['link'];
    ?>
" title="全部<?php 
    echo $this->_vars['data']['brand_name'];
    ?>
商品">&raquo;</a> </dd> </dl> </div> <?php 
}
<?php

if (!function_exists('tpl_function_link')) {
    require CORE_DIR . '/include_v5/smartyplugins/function.link.php';
}
if (!function_exists('tpl_input_default')) {
    require CORE_DIR . '/include_v5/smartyplugins/input.default.php';
}
?>
<form action="<?php 
echo tpl_function_link(array('ctl' => search, 'act' => result), $this);
?>
" method="post" class="SearchBar"> <table cellpadding="0" cellspacing="0"> <tr> <td class="search_label"> <span>关键字:</span> <input name="name[]" size="10" class="inputstyle keywords" value="<?php 
echo $this->_vars['setting']['search'];
?>
" /> </td> <?php 
if ($this->_vars['setting']['searchopen']) {
    ?>
 <td class="search_price1">价格从 <?php 
    echo tpl_input_default(array('name' => "price[0]", 'type' => "number", 'size' => "4", 'class' => "inputstyle gprice_from"), $this);
    ?>
</td> <td class="search_price2">到<?php 
    echo tpl_input_default(array('name' => "price[1]", 'type' => "number", 'size' => "4", 'class' => "inputstyle gprice_to"), $this);
    ?>
</td> <?php 
}
?>
 <td><input type="submit" value="搜索" class="btn_search" onfocus='this.blur();'/> </td> <td><a href="<?php 
echo tpl_function_link(array('ctl' => "search", 'act' => "index"), $this);
?>
" class="btn_advsearch">高级搜索</a> </td> </tr> </table> </form> 
            ?>
"></a></div><?php 
        }
        $_block_content = ob_get_contents();
        ob_end_clean();
        $_block_content = tpl_block_capture($this->_tag_stack[count($this->_tag_stack) - 1][1], $_block_content, $this);
        echo $_block_content;
        array_pop($this->_tag_stack);
        $_block_content = '';
        $this->_tag_stack[] = array('tpl_block_capture', array('name' => goodsName));
        tpl_block_capture(array('name' => goodsName), null, $this);
        ob_start();
        if ($this->_vars['setting']['showGoodsName'] == "on") {
            ?>
 <h6><a href="<?php 
            echo tpl_function_link(array('ctl' => "product", 'act' => "index", 'arg0' => $this->_vars['goods_data']['goods_id']), $this);
            ?>
" target="_blank" title="<?php 
            echo $this->_vars['goods_data']['name'];
            ?>
"><?php 
            echo tpl_modifier_cut($this->_vars['goods_data']['name'], $this->_vars['setting']['max_length']);
            ?>
</a></h6> <?php 
        }
        $_block_content = ob_get_contents();
        ob_end_clean();
        $_block_content = tpl_block_capture($this->_tag_stack[count($this->_tag_stack) - 1][1], $_block_content, $this);
        echo $_block_content;
        array_pop($this->_tag_stack);
        $_block_content = '';
?>
 </span> <select class="inputstyle" name="delivery[time]"> <option value="任意时间段">任意时间段</option> <option value="上午">上午</option> <option value="下午">下午</option> <option value="晚上">晚上</option> </select> </div> </div> </div> <?php 
if ($this->_vars['trading']['receiver']['addrlist']) {
    ?>
 <script>
window.addEvent('domready',function(){

<?php 
    if ($this->_vars['trading']['admindo']) {
        ?>
    var url_area = 'index.php?ctl=order/order&act=getAddr';
<?php 
    } else {
        ?>
    var url_area = '<?php 
        echo tpl_function_link(array('ctl' => "cart", 'act' => "getAddr"), $this);
        ?>
';
<?php 
    }
    ?>


   
    var addlistRadios=$$('input[name^=delivery[addr_id]','receiver');
    
    if(addlistRadios.length){
        addlistRadios.addEvent('click', function(e,edit){     
                this.set('checked',true);             
                var _value=this.value;
                
});
<?php 
if ($this->_vars['valideCode']) {
    ?>

   void function(formclz){
         var vcodeBox = $E('.'+formclz+' .verifyCode');
         var vcodeImg  =vcodeBox.getElement('img');
         var refreshVcodeBtn  = vcodeBox.getElement('a').addEvent('click',function(e){
              e.stop();
              vcodeImg.src = vcodeImg.get('codesrc')+'?'+$time();
         });
         $$('.'+formclz+' input').addEvent('focus',function(){
             if (this.form.retrieve('showvcode',false))return;
             vcodeBox.show();
             refreshVcodeBtn.fireEvent('click',{stop:$empty});
             this.form.store('showvcode',true);
         });
   
   }('mini-signupform');

<?php 
}
?>
function nameCheck(input){
  new Request.HTML({update:$(input).getNext(),data:'name='+encodeURIComponent(input.value=input.value.trim())}).post('<?php 
echo tpl_function_link(array('ctl' => passport, 'act' => namecheck), $this);
?>
');
}
</script> 
            ?>
"><?php 
            echo $this->_vars['data']['brand_name'];
            ?>
</a> <?php 
        }
        ?>
 </div> <?php 
    }
}
unset($this->_env_vars['foreach'][brandlist]);
?>
</div> <?php 
if ($this->_vars['setting']['showMore'] == 'on') {
    ?>
<div class="more"><a href="<?php 
    echo tpl_function_link(array('ctl' => brand, 'act' => showList), $this);
    ?>
">更多品牌</a></div><?php 
}
?>
 </div> <script>


window.addEvent('load',function(){
         var BrandListImgs=$$('.newBrandListWrap a img');
        try{
         fixProductImageSize($$(BrandListImgs),'a');
         }catch(e){}
    });
</script>
    echo tpl_function_link(array('ctl' => article, 'act' => index, 'arg0' => $this->_vars['data']['article_id']), $this);
    ?>
" title="<?php 
    echo $this->_vars['data']['title'];
    ?>
"><?php 
    echo tpl_modifier_cut($this->_vars['data']['title'], $this->_vars['setting']['max_length']);
    ?>
</a></li> <?php 
}
?>
 </ul> <?php 
if ($this->_vars['setting']['showMore'] == "on") {
    ?>
 <div class="more clearfix"><a href="<?php 
    echo tpl_function_link(array('ctl' => artlist, 'act' => index, 'arg0' => $this->_vars['setting']['id1']), $this);
    ?>
">更多...</a></div> <?php 
}
$_block_content = ob_get_contents();
ob_end_clean();
$_block_content = tpl_block_capture($this->_tag_stack[count($this->_tag_stack) - 1][1], $_block_content, $this);
echo $_block_content;
array_pop($this->_tag_stack);
$_block_content = '';
?>
 <div class="ArticleListWrap"> <?php 
if ($this->_vars['setting']['showTitleImg'] == "off") {
    ?>
 <div class="ArticleList"> <?php 
    echo $this->_env_vars['capture']['articleCat'];
            } elseif ($this->_vars['order']['ship_status'] == 2) {
                ?>
 部分发货 <?php 
            } elseif ($this->_vars['order']['ship_status'] == 4) {
                ?>
 已退货 <?php 
            } elseif ($this->_vars['order']['ship_status'] == 0) {
                ?>
 未发货 <?php 
            }
            ?>
] <?php 
        } else {
            ?>
 <a href="<?php 
            echo tpl_function_link(array('ctl' => member, 'act' => orderpay, 'arg0' => $this->_vars['order']['order_id']), $this);
            ?>
" >等待付款</a> <?php 
            if ($this->_vars['order']['ship_status'] == 1) {
                ?>
 [已发货] <?php 
            } elseif ($this->_vars['order']['ship_status'] == 2) {
                ?>
 [部分发货] <?php 
            } elseif ($this->_vars['order']['ship_status'] == 3) {
                ?>
 [部分退货] <?php 
            } elseif ($this->_vars['order']['ship_status'] == 4) {
                ?>
 [已退货] <?php 
            }