Skip to main content

官方默认index.dwt模板文件分析

<!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 name=”Keywords” content=”{$keywords}” />
<meta name=”Description” content=”{$description}” />
<!– TemplateBeginEditable name=”doctitle” –>
<title>{$page_title}</title>
<!– TemplateEndEditable –>
<!– TemplateBeginEditable name=”head” –>
<!– TemplateEndEditable –>
<link rel=”shortcut icon” href=”favicon.ico” />
<link rel=”icon” href=”animated_favicon.gif” type=”image/gif” />
<link href=”{$ecs_css_path}” rel=”stylesheet” type=”text/css” />
<link rel=”alternate” type=”application/rss+xml” title=”RSS|{$page_title}” href=”{$feed_url}” />
{* 包含脚本文件 *}
{insert_scripts files=’common.js,index.js’}
</head>
<body>
<script type=”text/javascript” src=”../../js/jquery.js”></script>

<!– #BeginLibraryItem “/library/page_header.lbi” –><!– #EndLibraryItem –>
<div></div>
<div>
<!–left start–>
<div>
<!–站内公告 start–>
<div>
<div>
<h3><span>{$lang.shop_notice}</span></h3>
<div>
{$shop_notice}
</div>
</div>
</div>
<div></div>
<!–站内公告 end–>
<!– TemplateBeginEditable name=”左边区域” –>

<!–购物车信息开始–>
<!– #BeginLibraryItem “/library/cart.lbi” –>

{insert_scripts files=’transport.js’}
<div id=”ECS_CARTINFO”>
{insert name=’cart_info’}
</div>
<div></div>

<!– #EndLibraryItem –>
<!–购物车信息结束–>

<!–左边导航菜单开始–>
<!– #BeginLibraryItem “/library/category_tree.lbi” –>

<div>
<div>
<div id=”category_tree”>
<!–{foreach from=$categories item=cat}–>
<dl>
<dt><a href=”{$cat.url}”>{$cat.name|escape:html}</a></dt>
<!–{foreach from=$cat.cat_id item=child}–>
<dd><a href=”{$child.url}”>{$child.name|escape:html}</a></dd>
<!–{foreach from=$child.cat_id item=childer}–>
<dd>&nbsp;&nbsp;<a href=”{$childer.url}”>{$childer.name|escape:html}</a></dd>
<!–{/foreach}–>
<!–{/foreach}–>

</dl>
<!–{/foreach}–>
</div>
</div>
</div>
<div></div>

<!– #EndLibraryItem –>
<!–左边导航菜单结束–>
<!–销售排名–>
<!– #BeginLibraryItem “/library/top10.lbi” –>

<div>
<div>
<div></div>
<div>
<!– {foreach name=top_goods from=$top_goods item=goods}–>
<ul>
<img src=”../images/top_{$smarty.foreach.top_goods.iteration}.gif” />
<!– {if $smarty.foreach.top_goods.iteration<4}–>
<li>
<a href=”{$goods.url}”><img src=”{$goods.thumb}” alt=”{$goods.name|escape:html}” /></a>
</li>
<!– {/if} –>
<li {if $smarty.foreach.top_goods.iteration<4}class=”iteration1″{/if}>
<a href=”{$goods.url}” title=”{$goods.name|escape:html}”>{$goods.short_name}</a><br />
{$lang.shop_price}<font>{$goods.price}</font><br />
</li>
</ul>
<!– {/foreach} –>
</div>
</div>
</div>
<div></div>

<!– #EndLibraryItem –>
<!–销售排名–>

<!–促销信息–>
<!– #BeginLibraryItem “/library/promotion_info.lbi” –>

<!– {if $promotion_info} –>
<!– 促销信息 –>
<div>
<div>
<h3><span>{$lang.promotion_info}</span></h3>
<div>
<!– {foreach from=$promotion_info item=item key=key} –>
<!– {if $item.type eq “snatch”} –>
<a href=”snatch.php” title=”{$lang.$item.type}”>{$lang.snatch_promotion}</a>
<!– {elseif $item.type eq “group_buy”} –>
<a href=”group_buy.php” title=”{$lang.$item.type}”>{$lang.group_promotion}</a>
<!– {elseif $item.type eq “auction”} –>
<a href=”auction.php” title=”{$lang.$item.type}”>{$lang.auction_promotion}</a>
<!– {elseif $item.type eq “favourable”} –>
<a href=”activity.php” title=”{$lang.$item.type}”>{$lang.favourable_promotion}</a>
<!– {/if} –>
<a href=”{$item.url}” title=”{$lang.$item.type} {$item.act_name}{$item.time}” style=”background:none; padding-left:0px;”>{$item.act_name}</a><br />
<!– {/foreach} –>
</div>
</div>
</div>
<div></div>
<!– {/if} –>
<!– #EndLibraryItem –>
<!– 促销信息 –>

<!–订单查询–>
<!– #BeginLibraryItem “/library/order_query.lbi” –>

<!–{if empty($order_query)}–>
<script>var invalid_order_sn = “{$lang.invalid_order_sn}”</script>
<div>
<div>
<h3><span>{$lang.order_query}</span></h3>
<div>
<form name=”ecsOrderQuery”>
<input type=”text” name=”order_sn” /><br />
<div></div>
<input type=”button” value=”{$lang.query_order}” onclick=”orderQuery()” />
</form>
<div id=”ECS_ORDER_QUERY” style=”margin-top:8px;”>
<!–{else}–>
<!–{if $order_query.user_id}–>
<b> {$lang.order_number}:</b><a href=”user.php?act=order_detail&order_id={$order_query.order_id}” class=”f6″>{$order_query.order_sn}</a><br>
<!–{else}–>
<b>{$lang.order_number}:</b>{$order_query.order_sn}<br>
<!–{/if}–>
<b>{$lang.order_status}:</b><br><font>{$order_query.order_status}</font><br>
<!–{if $order_query.invoice_no }–>
<b>{$lang.consignment}:</b>{$order_query.invoice_no}<br>
<!–{/if}–>
{if $order_query.shipping_date}:{$lang.shipping_date} {$order_query.shipping_date}<br>
<!–{/if}–>
<!–{/if}–>
</div>
</div>
</div>
</div>
<div></div>

<!– #EndLibraryItem –>
<!–订单查询–>
<!–发货查询–>
<!– #BeginLibraryItem “/library/invoice_query.lbi” –>

<!–{if $invoice_list}–>
<style type=”text/css”>
.boxCenterList form{display:inline;}
.boxCenterList form a{color:#404040; text-decoration:underline;}
</style>
<div>
<div>
<h3><span>{$lang.shipping_query}</span></h3>
<div>
<!– 发货单查询{foreach from=$invoice_list item=invoice} –>
{$lang.order_number} {$invoice.order_sn}<br />
{$lang.consignment} {$invoice.invoice_no}
<div></div>
<!– 结束发货单查询{/foreach}–>
</div>
</div>
</div>
<div></div>
<!– {/if} –>
<!– #EndLibraryItem –>
<!– #BeginLibraryItem “/library/vote_list.lbi” –>

{insert name=’vote’}
<!– #EndLibraryItem –>
<!–发货查询–>

<!–邮件订阅–>
<!– #BeginLibraryItem “/library/email_list.lbi” –>

<div>
<div>
<h3><span>{$lang.email_subscribe}</span></h3>
<div>
<input type=”text” id=”user_email” /><br />
<div></div>
<input type=”button” value=”{$lang.email_list_ok}” onclick=”add_email_list();” />
<input type=”button” value=”{$lang.email_list_cancel}” onclick=”cancel_email_list();” />
</div>
</div>
</div>
<div></div>
<script type=”text/javascript”>
var email = document.getElementById(‘user_email’);
function add_email_list()
{
if (check_email())
{
Ajax.call(‘user.php?act=email_list&job=add&email=’ + email.value, ”, rep_add_email_list, ‘GET’, ‘TEXT’);
}
}
function rep_add_email_list(text)
{
alert(text);
}
function cancel_email_list()
{
if (check_email())
{
Ajax.call(‘user.php?act=email_list&job=del&email=’ + email.value, ”, rep_cancel_email_list, ‘GET’, ‘TEXT’);
}
}
function rep_cancel_email_list(text)
{
alert(text);
}
function check_email()
{
if (Utils.isEmail(email.value))
{
return true;
}
else
{
alert(‘{$lang.email_invalid}’);
return false;
}
}
</script>

<!– #EndLibraryItem –>
<!–邮件订阅–>

<!– TemplateEndEditable –>

</div>
<!–left end–>

<!–right start–>
<div>
<!–焦点图和站内快讯 START–>
<div>
<div>
<div id=”focus”>
<!–flash焦点图–>
<!– #BeginLibraryItem “/library/index_ad.lbi” –><!– #EndLibraryItem –>
</div>
<!–news–>
<div id=”mallNews”>
<div></div>
<div>
<!– TemplateBeginEditable name=”站内快讯上广告位(宽:210px)” –>
<!– TemplateEndEditable –>
<!–站内快讯–>
<!– #BeginLibraryItem “/library/new_articles.lbi” –><!– #EndLibraryItem –>
</div>
</div>
<!–news end–>
</div>
</div>
<div></div>
<!–焦点图和站内快讯 END–>
<!–今日特价,品牌 start–>
<div>
<!–特价–>
<!– #BeginLibraryItem “/library/recommend_promotion.lbi” –><!– #EndLibraryItem –>
<!–品牌–>
<div>
<div id=”brands”>
<!– #BeginLibraryItem “/library/brands.lbi” –><!– #EndLibraryItem –>
</div>
</div>
</div>
<div></div>
<!– TemplateBeginEditable name=”右边主区域” –>

<!–精品推荐–>
<!– #BeginLibraryItem “/library/recommend_best.lbi” –>

<!– {if $best_goods} –>
<!– {if $cat_rec_sign neq 1} –>
<div>
<div>
<div id=”itemBest”>
{if $cat_rec[1]}
<h2><a href=”javascript:void(0)” onclick=”change_tab_style(‘itemBest’, ‘h2’, this);get_cat_recommend(1, 0);”>{$lang.all_goods}</a></h2>
{foreach from=$cat_rec[1] item=rec_data}
<h2><a href=”javascript:void(0)” onclick=”change_tab_style(‘itemBest’, ‘h2’, this);get_cat_recommend(1, {$rec_data.cat_id})”>{$rec_data.cat_name}</a></h2>
{/foreach}
{/if}
</div>
<div id=”show_best_area”>
<!– {/if} –>
<!–{foreach from=$best_goods item=goods}–>
<div>
<span></span>
<a href=”{$goods.url}”><img src=”{$goods.thumb}” alt=”{$goods.name|escape:html}” /></a><br />
<p><a href=”{$goods.url}” title=”{$goods.name|escape:html}”>{$goods.short_style_name}</a></p>
<font>
<!– {if $goods.promote_price neq “”} –>
{$goods.promote_price}
<!– {else}–>
{$goods.shop_price}
<!–{/if}–>
</font>
</div>
<!–{/foreach}–>
<div><a href=”../search.php?intro=best”><img src=”images/more.gif” /></a></div>
<!– {if $cat_rec_sign neq 1} –>
</div>
</div>
</div>
<div></div>
<!– {/if} –>
<!– {/if} –>

<!– #EndLibraryItem –>
<!–精品推荐–>

<!–新品上市–>
<!– #BeginLibraryItem “/library/recommend_new.lbi” –>

<!– {if $new_goods} –>
<!– {if $cat_rec_sign neq 1} –>
<div>
<div>
<div id=”itemNew”>
{if $cat_rec[2]}
<h2><a href=”javascript:void(0)” onclick=”change_tab_style(‘itemNew’, ‘h2’, this);get_cat_recommend(2, 0);”>{$lang.all_goods}</a></h2>
{foreach from=$cat_rec[2] item=rec_data}
<h2><a href=”javascript:void(0)” onclick=”change_tab_style(‘itemNew’, ‘h2’, this);get_cat_recommend(2, {$rec_data.cat_id})”>{$rec_data.cat_name}</a></h2>
{/foreach}
{/if}
</div>
<div id=”show_new_area”>
<!– {/if} –>
<!–{foreach from=$new_goods item=goods}–>
<div>
<span></span>
<a href=”{$goods.url}”><img src=”{$goods.thumb}” alt=”{$goods.name|escape:html}” /></a><br />
<p><a href=”{$goods.url}” title=”{$goods.name|escape:html}”>{$goods.short_style_name}</a></p>
<font>
<!– {if $goods.promote_price neq “”} –>
{$goods.promote_price}
<!– {else}–>
{$goods.shop_price}
<!–{/if}–>
</font>
</div>
<!–{/foreach}–>
<div><a href=”../search.php?intro=new”><img src=”images/more.gif” /></a></div>
<!– {if $cat_rec_sign neq 1} –>
</div>
</div>
</div>
<div></div>
<!– {/if} –>
<!– {/if} –>

<!– #EndLibraryItem –>
<!–新品上市–>

<!–热卖商品–>
<!– #BeginLibraryItem “/library/recommend_hot.lbi” –>

<!– {if $hot_goods} –>
<!– {if $cat_rec_sign neq 1} –>
<div>
<div>
<div id=”itemHot”>
{if $cat_rec[3]}
<h2><a href=”javascript:void(0)” onclick=”change_tab_style(‘itemHot’, ‘h2’, this);get_cat_recommend(3, 0);”>{$lang.all_goods}</a></h2>
{foreach from=$cat_rec[3] item=rec_data}
<h2><a href=”javascript:void(0)” onclick=”change_tab_style(‘itemHot’, ‘h2’, this);get_cat_recommend(3, {$rec_data.cat_id})”>{$rec_data.cat_name}</a></h2>
{/foreach}
{/if}
</div>
<div id=”show_hot_area”>
<!– {/if} –>
<!–{foreach from=$hot_goods item=goods}–>
<div>
<span></span>
<a href=”{$goods.url}”><img src=”{$goods.thumb}” alt=”{$goods.name|escape:html}” /></a><br />
<p><a href=”{$goods.url}” title=”{$goods.name|escape:html}”>{$goods.short_style_name}</a></p>
<font>
<!– {if $goods.promote_price neq “”} –>
{$goods.promote_price}
<!– {else}–>
{$goods.shop_price}
<!–{/if}–>
</font>
</div>
<!–{/foreach}–>
<div><a href=”../search.php?intro=hot”><img src=”images/more.gif” /></a></div>
<!– {if $cat_rec_sign neq 1} –>
</div>
</div>
</div>
<div></div>
<!– {/if} –>
<!– {/if} –>

<!– #EndLibraryItem –>
<!–热卖商品–>

<!–拍卖活动–>
<!– #BeginLibraryItem “/library/auction.lbi” –>

<!– {if $auction_list} –>
<div>
<div>
<h3><span>{$lang.auction_goods}</span><a href=”auction.php”><img src=”../images/more.gif”></a></h3>
<div>
<div style=”border:none;”>
<!–{foreach from=$auction_list item=auction}–>
<div>
<a href=”{$auction.url}”><img src=”{$auction.thumb}” alt=”{$auction.goods_name|escape:html}” /></a><br />
<p><a href=”{$auction.url}” title=”{$auction.goods_name|escape:html}”>{$auction.short_style_name|escape:html}</a></p>
<font>{$auction.formated_start_price}</font>
</div>
<!–{/foreach}–>
</div>
</div>
</div>
</div>
<div></div>
<!– {/if} –>
<!– #EndLibraryItem –>
<!–拍卖活动–>

<!–团购商品–>
<!– #BeginLibraryItem “/library/group_buy.lbi” –>

<!– {if $group_buy_goods} –>
<div>
<div>
<h3><span>{$lang.group_buy_goods}</span><a href=”group_buy.php”><img src=”../images/more.gif”></a></h3>
<div>
<div style=”border:none;”>
<!–{foreach from=$group_buy_goods item=goods}–>
<div>
<a href=”{$goods.url}”><img src=”{$goods.thumb}” alt=”{$goods.goods_name|escape:html}” /></a><br />
<p><a href=”{$goods.url}” title=”{$goods.goods_name|escape:html}”>{$goods.short_style_name|escape:html}</a></p>
<font>{$goods.last_price}</font>
</div>
<!–{/foreach}–>
</div>
</div>
</div>
</div>
<div></div>
<!– {/if} –>
<!– #EndLibraryItem –>
<!–团购商品–>
<!– TemplateEndEditable –>
</div>
<!–right end–>
</div>
<div></div>
<!–帮助–>
<div>
<div>
<div>
<!– #BeginLibraryItem “/library/help.lbi” –><!– #EndLibraryItem –>
</div>
</div>
</div>
<div></div>
<!–帮助–>
<!–友情链接 start–>
<!–{if $img_links or $txt_links }–>
<div id=”bottomNav”>
<div>
<div>
<!–开始图片类型的友情链接{foreach from=$img_links item=link}–>
<a href=”{$link.url}” target=”_blank” title=”{$link.name}”><img src=”{$link.logo}” alt=”{$link.name}” border=”0″ /></a>
<!–结束图片类型的友情链接{/foreach}–>
<!– {if $txt_links} –>
<!–开始文字类型的友情链接{foreach from=$txt_links item=link}–>
[<a href=”{$link.url}” target=”_blank” title=”{$link.name}”>{$link.name}</a>]
<!–结束文字类型的友情链接{/foreach}–>
<!– {/if} –>
</div>
</div>
</div>
<!–{/if}–>
<!–友情链接 end–>
<div></div>
<!–版权信息–>
<!– #BeginLibraryItem “/library/page_footer.lbi” –><!– #EndLibraryItem –>
</body>
</html>