<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//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}" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<!-- 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" />
{* 包含脚本文件 *}
{insert_scripts files='transport.js,common.js,user.js'}
<script type="text/javascript" src="js/action.js"></script>
<style>
.ur_here{ width:780px;}
</style>
</head>
<body>
<!-- #BeginLibraryItem "/library/page_header.lbi" --><!-- #EndLibraryItem -->

<!--主体内容 start-->
<div class="block clearfix">
 <div id="userLeft" class="fl">
 <!-- #BeginLibraryItem "/library/user_menu.lbi" --><!-- #EndLibraryItem -->
 </div>
 <div id="userRight" class="fr">
 <!-- #BeginLibraryItem "/library/ur_here.lbi" --><!-- #EndLibraryItem -->
  <!-- *用户中心默认显示页面 start-->
 <!-- {if $action eq 'default'} -->
  <div class="us_contentBox default clearfix mod1 mod2">
  <span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
	<font class="price">{$info.username}</font> {$lang.welcome_to} {$info.shop_name}！<br /><br />
	{$lang.last_time}: {$info.last_time}<br />
	<font class="f1">{$rank_name} {$next_rank_name}</font><br />
	 <!--{if $info.is_validate eq 0} -->
	{$lang.not_validated} <a href="javascript:sendHashMail()" style="color:#006bd0;">{$lang.resend_hash_mail}</a><br />
	 <!--{/if} -->
	 <div class="us_notice">
	 <img src="images/note.gif" alt="note" />&nbsp;{$user_notice}
	 </div>
	<div class="fl" style="width:350px;">
	<h5>{$lang.your_account}</h5>
	{$lang.your_surplus}:<a href="user.php?act=account_log" style="color:#006bd0;">{$info.surplus}</a><br />
	<!-- {if $info.credit_line gt 0} 如果有信用额度 -->
	{$lang.credit_line}:{$info.formated_credit_line}<br />
	<!-- {/if} -->
	{$lang.your_bonus}:<a href="user.php?act=bonus" style="color:#006bd0;">{$info.bonus}</a><br />
	{$lang.your_integral}:<font class="price">{$info.integral}</font><br />
	</div>
	<div class="fr" style="width:350px;">
	<h5>{$lang.your_notice}</h5>
	 <!--{foreach from=$prompt item=item}-->
	{$item.text}<br />
	<!--{/foreach}-->
	{$lang.last_month_order}<font class="price">{$info.order_count}</font>{$lang.order_unit}<br />
	<!-- {if $info.shipped_order} -->
	{$lang.please_received}<br />
	<!-- {foreach from=$info.shipped_order item=item}-->
	<a href="user.php?act=order_detail&order_id={$item.order_id}" style="color:#006bd0;">{$item.order_sn}</a>
	<!-- {/foreach} -->
	<!-- {/if}-->
	</div>
 </div>
 <!-- {/if} -->
<!-- #用户中心默认显示页面 end-->
				 
<!-- *我的留言 start-->
<!-- {if $action eq 'message_list'} -->
 <div class="us_contentBox mod1 mod2">
 <span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
  <h6>{$lang.label_message}</h6>   
	<!--{foreach from=$message_list item=message key=key} -->
	<div class="commentsTit">     
		{$message.msg_type}:&nbsp;&nbsp;<font class="f1">{$message.msg_title}</font> ({$message.msg_time})
		<a href="user.php?act=del_msg&amp;id={$key}&amp;order_id={$message.order_id}" title="{$lang.drop}" onclick="if (!confirm('{$lang.confirm_remove_msg}')) return false;" style="position:absolute; top:0px; right:10px;">{$lang.drop}</a>
	</div>	
	<div class="commentsContent word">
	{$message.msg_content}
		 <!-- {if $message.message_img} 如果上传了图片-->
		 <div class="tr">
		 <a href="data/feedbackimg/{$message.message_img}" target="_bank" class="us_textDot">{$lang.view_upload_file}</a>
		 </div>
		 <!-- {/if} -->
		 <!-- {if $message.re_msg_content} -->
			 <div class="re_content">
			 <a href="mailto:{$message.re_user_email}"><font class="f1">{$lang.shopman_reply}</font></a> ({$message.re_msg_time})<br />
			 {$message.re_msg_content}
			 </div>
		 <!-- {/if} -->
	</div>
	<!-- {/foreach} -->
	
	<!-- {if $message_list}-->
	<!--翻页 start-->
	<div class="pagebar">
	<form name="selectPageForm" action="{$smarty.server.PHP_SELF}" method="get">
	<!-- {if $pager.styleid eq 0 } -->
	<div id="pager">
		{$lang.pager_1}{$pager.record_count}{$lang.pager_2}{$lang.pager_3}{$pager.page_count}{$lang.pager_4} <span> <a href="{$pager.page_first}">{$lang.page_first}</a> <a href="{$pager.page_prev}">{$lang.page_prev}</a> <a href="{$pager.page_next}">{$lang.page_next}</a> <a href="{$pager.page_last}">{$lang.page_last}</a> </span>
			<select name="page" id="page" onchange="selectPage(this)">
			{html_options options=$pager.array selected=$pager.page}
			</select>
			<!--{foreach from=$pager.search key=key item=item}-->
			<input type="hidden" name="{$key}" value="{$item}" />
			<!--{/foreach}-->
	</div>
	<!--{else}-->
	
	<!--翻页 start-->
	 <div id="pager">
		{$lang.pager_1}{$pager.record_count}{$lang.pager_2}
		<!-- {if $pager.page_first} --><a href="{$pager.page_first}">{$lang.page_first} ...</a><!-- {/if} -->
		<!-- {if $pager.page_prev} --><a class="prev" href="{$pager.page_prev}">{$lang.page_prev}</a><!-- {/if} -->
		<!-- {if $pager.page_count neq 1} -->
			<!--{foreach from=$pager.page_number key=key item=item}-->
				<!-- {if $pager.page eq $key} -->
				<span class="page_now">{$key}</span>
				<!-- {else} -->
				<a href="{$item}">{$key}</a>
				<!-- {/if} -->
			<!--{/foreach}-->
		<!-- {/if} -->
	
		<!-- {if $pager.page_next} --><a class="next" href="{$pager.page_next}">{$lang.page_next}</a><!-- {/if} -->
		<!-- {if $pager.page_last} --><a class="last" href="{$pager.page_last}">...{$lang.page_last}</a><!-- {/if} -->
		<!-- {if $pager.page_kbd} -->
			<input type="text" name="page" onkeydown="if(event.keyCode==13)selectPage(this)" size="3" class="formBorder" />
			<!--{foreach from=$pager.search key=key item=item}-->
			<input type="hidden" name="{$key}" value="{$item}" />
			<!--{/foreach}-->
			<!-- {/if} -->
   </div>
	<!--翻页 END-->
	<!-- {/if} -->
	</form>
	</div>
	<script type="Text/Javascript" language="JavaScript">
	<!--
	{literal}
	function selectPage(sel)
	{
		sel.form.submit();
	}
	{/literal}
	//-->
	</script>
		<!-- {/if}-->
 <form action="user.php" method="post" enctype="multipart/form-data" name="formMsg" onsubmit="return submitMsg()">
  <table width="100%" border="0" cellpadding="3">
		{if $order_info}
		<tr>
			<td align="right">{$lang.order_number}</td>
			<td>
			<a href ="{$order_info.url}"><img src="images/note.gif" />{$order_info.order_sn}</a>
			<input name="msg_type" type="hidden" value="5" />
			<input name="order_id" type="hidden" value="{$order_info.order_id}" class="InputBorder" />
			</td>
		</tr>
		{else}
		<tr>
			<td align="right">{$lang.message_type}：</td>
			<td><input name="msg_type" type="radio" value="0" checked="checked" />
				{$lang.type[0]}
				<input type="radio" name="msg_type" value="1" />
				{$lang.type[1]}
				<input type="radio" name="msg_type" value="2" />
				{$lang.type[2]}
				<input type="radio" name="msg_type" value="3" />
				{$lang.type[3]}
				<input type="radio" name="msg_type" value="4" />
				{$lang.type[4]} </td>
		</tr>
		{/if}
		<tr>
			<td align="right">{$lang.message_title}：</td>
			<td><input name="msg_title" type="text" size="30" class="InputBorder" /></td>
		</tr>
		<tr>
			<td align="right" valign="top">{$lang.message_content}：</td>
			<td><textarea name="msg_content" cols="50" rows="4" wrap="virtual" class="InputBorder"></textarea></td>
		</tr>
		<tr>
			<td align="right">{$lang.upload_img}：</td>
			<td><input type="file" name="message_img"  size="45"  class="InputBorder" /></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><input type="hidden" name="act" value="act_add_message" />
				<input type="submit" value="{$lang.submit}" class="bnt_number2" />
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>
			{$lang.img_type_tips}<br />
			{$lang.img_type_list}
			</td>
		</tr>
	</table>
 </form>
 </div>		
 <!-- {/if} -->
<!--#我的留言 end-->

 <!-- *我的评论 start-->
<!-- {if $action eq 'comment_list'} -->
<div class="us_contentBox  mod1 mod2">
<span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
  <h6>{$lang.label_comment}</h6>
	<!--{foreach from=$comment_list item=comment} -->
   <div class="commentsTit">
	{if $comment.comment_type eq '0'}{$lang.goods_comment}{else}{$lang.article_comment}{/if}: <font class="f1">{$comment.cmt_name}</font>&nbsp;&nbsp;     ({$comment.formated_add_time})
	<a href="user.php?act=del_cmt&amp;id={$comment.comment_id}" title="{$lang.drop}" onclick="if (!confirm('{$lang.confirm_remove_msg}')) return false;" style="position:absolute; top:0px; right:10px;">{$lang.drop}</a>
	 </div>
	<div class="commentsContent word">
	{$comment.content}
		<!--{if $comment.reply_content}-->
		<div class="re_content">
		<b class="f1">{$lang.reply_comment}：</b><br />
		{$comment.reply_content}
		</div>
		<!--{/if}-->
	</div>
	<!-- {/foreach} -->
 <!-- {if $comment_list}-->
	<!-- #BeginLibraryItem "/library/pages.lbi" --><!-- #EndLibraryItem -->
	<!-- {else}-->
	<div class="tips">{$lang.no_comments}</div>
	<!-- {/if}-->
</div>		
<!--{/if} -->
<!--#我的评论 end-->
		
		
<!--#我的标签 start-->
<!--{if $action eq 'tag_list'} -->
<div class="us_contentBox  mod1 mod2">
<span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
  <h6>{$lang.label_tag}</h6>
 <!-- {if $tags} -->
 <!-- 标签云开始 {foreach from=$tags item=tag}-->
 <a href="search.php?keywords={$tag.tag_words|escape:url}">{$tag.tag_words|escape:html}</a> <a href="user.php?act=act_del_tag&amp;tag_words={$tag.tag_words|escape:url}" onclick="if (!confirm('{$lang.confirm_drop_tag}')) return false;" title="{$lang.drop}"><img src="images/drop.gif" alt="{$lang.drop}" /></a>&nbsp;&nbsp;
  <!-- 标签云结束 {/foreach}-->
  <!-- {else} -->
  <div class="tips">{$lang.no_tag}</div>
  <!-- {/if} -->
</div>	
<!--{/if} -->
<!--#我的标签 end-->
		
		
<!--*收藏商品列表页面 start-->
<!--{if $action eq 'collection_list'} -->
{insert_scripts files='transport.js,utils.js'}
<div class="us_contentBox mod1 mod2">
<span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
  <h6>{$lang.label_collection}</h6>
 <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
	<tr align="center">
		<th width="35%" bgcolor="#ffffff">{$lang.goods_name}</th>
		<th width="30%" bgcolor="#ffffff">{$lang.price}</th>
		<th width="35%" bgcolor="#ffffff">{$lang.handle}</th>
	</tr>
	<!--{foreach from=$goods_list item=goods}-->
	<tr>
		<td bgcolor="#ffffff"><a href="{$goods.url}" class="f6">{$goods.goods_name|escape:html}</a></td>
		<td bgcolor="#ffffff"><!-- {if $goods.promote_price neq ""} -->
			{$lang.promote_price}<span class="goods-price">{$goods.promote_price}</span>
			<!-- {else}-->
			{$lang.shop_price}<span class="goods-price">{$goods.shop_price}</span>
			<!--{/if}-->        </td>
		<td align="center" bgcolor="#ffffff">
			<!-- {if $goods.is_attention} -->
			<a href="javascript:if (confirm('{$lang.del_attention}')) location.href='user.php?act=del_attention&rec_id={$goods.rec_id}'" >{$lang.no_attention}</a>
			<!-- {else} -->
			<a href="javascript:if (confirm('{$lang.add_to_attention}')) location.href='user.php?act=add_to_attention&rec_id={$goods.rec_id}'" >{$lang.attention}</a>
			<!-- {/if} -->
			 <a href="javascript:addToCart({$goods.goods_id})" >{$lang.add_to_cart}</a> <a href="javascript:if (confirm('{$lang.remove_collection_confirm}')) location.href='user.php?act=delete_collection&collection_id={$goods.rec_id}'" class="f6">{$lang.drop}</a>
		</td>
	</tr>
	<!--{/foreach} -->
</table>
</div>
<!-- #BeginLibraryItem "/library/pages.lbi" --><!-- #EndLibraryItem -->

<div class="us_contentBox mod1 mod2">
<span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
  <h6>{$lang.label_affiliate}</h6>
 <form name="theForm" method="post" action="">
 <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
	<tr>
		<td align="right" bgcolor="#ffffff">{$lang.label_need_image}</td>
		<td bgcolor="#ffffff">
			<select name="need_image" id="need_image" class="InputBorder">
				<option value="true" selected>{$lang.need}</option>
				<option value="false">{$lang.need_not}</option>
			</select>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">{$lang.label_goods_num}</td>
		<td bgcolor="#ffffff"><input name="goods_num" type="text" id="goods_num" value="6" class="InputBorder" /></td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">{$lang.label_arrange}</td>
		<td bgcolor="#ffffff"><select name="arrange" id="arrange" class="InputBorder">
			<option value="h" selected>{$lang.horizontal}</option>
			<option value="v">{$lang.verticle}</option>
		</select></td>
	</tr>
	<tr>
		 <td align="right" bgcolor="#ffffff">{$lang.label_rows_num}</td>
		 <td bgcolor="#ffffff"><input name="rows_num" type="text" id="rows_num" value="1" class="InputBorder" /></td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">{$lang.label_charset}</td>
		<td bgcolor="#ffffff"><select name="charset" id="charset" class="InputBorder">
			{html_options options=$lang_list}
		</select></td>
	</tr>
	<tr>
		<td colspan="2" align="center" bgcolor="#ffffff">
		<input type="button" name="gen_code" value="{$lang.generate}" onclick="genCode()" class="bnt_number4" />
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center" bgcolor="#ffffff">
		<textarea name="code" cols="80" rows="5" id="code" class="InputBorder"></textarea>
		</td>
	</tr>
	</table>
 </form>
 <script language="JavaScript">
	var elements = document.forms['theForm'].elements;
	var url = '{$url}';
	var u   = '{$user_id}';
	/**
	 * 生成代码
	 */
	function genCode()
	{
			// 检查输入
			if (isNaN(parseInt(elements['goods_num'].value)))
			{
					alert('{$lang.goods_num_must_be_int}');
					return;
			}
			if (elements['goods_num'].value < 1)
			{
					alert('{$lang.goods_num_must_over_0}');
					return;
			}

			// 生成代码
			var code = '\<script src=\"' + url + 'goods_script.php?';
			code += 'need_image=' + elements['need_image'].value + '&';
			code += 'goods_num=' + elements['goods_num'].value + '&';
			code += 'arrange=' + elements['arrange'].value + '&';
			code += 'charset=' + elements['charset'].value + '&u=' + u;
			code += '\"\>\</script\>';
			elements['code'].value = code;
			elements['code'].select();
			if (Browser.isIE)
          {
              window.clipboardData.setData("Text",code);
          }
      }
			var compare_no_goods = "{$lang.compare_no_goods}";
			var btn_buy = "{$lang.btn_buy}";
			var is_cancel = "{$lang.is_cancel}";
			var select_spe = "{$lang.select_spe}";
  </script>
</div>
<!--{/if} -->
<!--#收藏商品列表页面 end-->

<!--*缺货登记列表页面 start-->
<!--{if $action eq 'booking_list'} -->
<div class="us_contentBox mod1 mod2">
<span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
  <h6>{$lang.label_booking}</h6>
 <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
	<tr align="center">
		<td width="20%" bgcolor="#ffffff">{$lang.booking_goods_name}</td>
		<td width="10%" bgcolor="#ffffff">{$lang.booking_amount}</td>
		<td width="20%" bgcolor="#ffffff">{$lang.booking_time}</td>
		<td width="35%" bgcolor="#ffffff">{$lang.process_desc}</td>
		<td width="15%" bgcolor="#ffffff">{$lang.handle}</td>
	</tr>
	<!-- {foreach from=$booking_list item=item} -->
	<tr>
		<td align="left" bgcolor="#ffffff"><a href="{$item.url}" target="_blank">{$item.goods_name}</a></td>
		<td align="center" bgcolor="#ffffff">{$item.goods_number}</td>
		<td align="center" bgcolor="#ffffff">{$item.booking_time}</td>
		<td align="left" bgcolor="#ffffff">{$item.dispose_note}</td>
		<td align="center" bgcolor="#ffffff"><a href="javascript:if (confirm('{$lang.confirm_remove_account}')) location.href='user.php?act=act_del_booking&id={$item.rec_id}'">{$lang.drop}</a> </td>
	</tr>
	<!--{/foreach}-->
</table>
</div>
<!--{/if} -->
<!--#缺货登记列表页面 end-->
	 
<!--{if $action eq 'add_booking'} 缺货登记-->
{insert_scripts files='utils.js'}
<script type="text/javascript">
{foreach from=$lang.booking_js item=item key=key}
var {$key} = "{$item}";
{/foreach}
</script>
<div class="us_contentBox mod1 mod2">
<span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
  <h6>{$lang.add}{$lang.label_booking}</h6>
 <form action="user.php" method="post" name="formBooking" onsubmit="return addBooking();">
 <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
	<tr>
		<td align="right" bgcolor="#ffffff">{$lang.booking_goods_name}</td>
		<td bgcolor="#ffffff">{$info.goods_name}</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">{$lang.booking_amount}:</td>
		<td bgcolor="#ffffff"><input name="number" type="text" value="{$info.goods_number}" class="InputBorder" /></td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">{$lang.describe}:</td>
		<td bgcolor="#ffffff"><textarea name="desc" cols="50" rows="5" wrap="virtual" class="InputBorder">{$info.goods_desc|escape}</textarea>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">{$lang.contact_username}:</td>
		<td bgcolor="#ffffff"><input name="linkman" type="text" value="{$info.consignee|escape}" size="25"  class="InputBorder"/>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">{$lang.email_address}:</td>
		<td bgcolor="#ffffff"><input name="email" type="text" value="{$info.email|escape}" size="25" class="InputBorder" /></td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">{$lang.contact_phone}:</td>
		<td bgcolor="#ffffff"><input name="tel" type="text" value="{$info.tel|escape}" size="25" class="InputBorder" /></td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff">&nbsp;</td>
		<td bgcolor="#ffffff">
		  <input name="act" type="hidden" value="act_add_booking" />
			<input name="id" type="hidden" value="{$info.id}" />
			<input name="rec_id" type="hidden" value="{$info.rec_id}" />
			<input type="submit" name="submit" class="bnt_number6" value="{$lang.submit_booking_goods}" />
			<input type="reset" name="reset" class="bnt_number4" value="{$lang.button_reset}" />
		</td>
	</tr>
</table>
 </form>
</div> 
<!-- {/if} -->


<!-- *我的推荐 -->
<!-- {if $affiliate.on eq 1} -->
  <!-- {if $action eq 'affiliate'} -->
   <!-- {if !$goodsid || $goodsid eq 0} -->
		<div class="us_contentBox mod1 mod2">
        <span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
		<h6>{$lang.affiliate_detail}</h6>
		<div class="modContent">
		 {$affiliate_intro}
		 </div>
		</div> 
    <!-- {if $affiliate.config.separate_by eq 0} -->
    <!-- 下线人数、分成 -->
    <div class="us_contentBox mod1 mod2">
    <span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
    <h6><a name="myrecommend">{$lang.affiliate_member}</a></h6>
		<table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
			<tr align="center">
				<td bgcolor="#ffffff">{$lang.affiliate_lever}</td>
				<td bgcolor="#ffffff">{$lang.affiliate_num}</td>
				<td bgcolor="#ffffff">{$lang.level_point}</td>
				<td bgcolor="#ffffff">{$lang.level_money}</td>
			</tr>
			<!-- {foreach from=$affdb key=level item=val name=affdb} -->
			<tr align="center">
				<td bgcolor="#ffffff">{$level}</td>
				<td bgcolor="#ffffff">{$val.num}</td>
				<td bgcolor="#ffffff">{$val.point}</td>
				<td bgcolor="#ffffff">{$val.money}</td>
			</tr>
			<!-- {/foreach} -->
		</table>
		</div>
    <!-- /下线人数、分成 -->
   <!-- {/if} -->

<!-- 我的推荐清单 -->
<div class="us_contentBox mod1 mod2">
<span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
<h6>分成规则</h6>
<table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
    <tr align="center">
      <td bgcolor="#ffffff">{$lang.order_number}</td>
      <td bgcolor="#ffffff">{$lang.affiliate_money}</td>
      <td bgcolor="#ffffff">{$lang.affiliate_point}</td>
      <td bgcolor="#ffffff">{$lang.affiliate_mode}</td>
      <td bgcolor="#ffffff">{$lang.affiliate_status}</td>
    </tr>
    <!-- {foreach from=$logdb item=val name=logdb} -->
    <tr align="center">
      <td bgcolor="#ffffff">{$val.order_sn}</td>
      <td bgcolor="#ffffff">{$val.money}</td>
      <td bgcolor="#ffffff">{$val.point}</td>
      <td bgcolor="#ffffff"><!-- {if $val.separate_type == 1 || $val.separate_type === 0} -->{$lang.affiliate_type.$val.separate_type}<!-- {else} -->{$lang.affiliate_type.$affiliate_type}<!-- {/if} --></td>
      <td bgcolor="#ffffff">{$lang.affiliate_stats[$val.is_separate]}</td>
    </tr>
    {foreachelse}
<tr><td colspan="5" align="center" bgcolor="#ffffff">{$lang.no_records}</td>
</tr>
    <!-- {/foreach} -->
    <!-- {if $logdb} -->
    <tr>
    <td colspan="5" bgcolor="#ffffff">
 <form action="{$smarty.server.PHP_SELF}" method="get">
  <div id="pager"> {$lang.pager_1}{$pager.record_count}{$lang.pager_2}{$lang.pager_3}{$pager.page_count}{$lang.pager_4} <span> <a href="{$pager.page_first}">{$lang.page_first}</a> <a href="{$pager.page_prev}">{$lang.page_prev}</a> <a href="{$pager.page_next}">{$lang.page_next}</a> <a href="{$pager.page_last}">{$lang.page_last}</a> </span>
    <select name="page" id="page" onchange="selectPage(this)">
    {html_options options=$pager.array selected=$pager.page}
    </select>
    <input type="hidden" name="act" value="affiliate" />
  </div>
</form>
    </td>
    </tr>
    <!-- {/if} -->
  </table>
 <script type="text/javascript" language="JavaScript">
<!--
{literal}
function selectPage(sel)
{
  sel.form.submit();
}
{/literal}
//-->
</script>
</div>
<!-- /我的推荐清单 -->
<div class="us_contentBox mod1 mod2">
<span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
<h6>{$lang.affiliate_code}</h6>
<table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
<tr>
<td width="30%" bgcolor="#ffffff"><a href="{$shopurl}?u={$userid}" target="_blank" class="f6">{$shopname}</a></td>
<td bgcolor="#ffffff"><input size="40" onclick="this.select();" type="text" value="&lt;a href=&quot;{$shopurl}?u={$userid}&quot; target=&quot;_blank&quot;&gt;{$shopname}&lt;/a&gt;" style="border:1px solid #ccc;" /> {$lang.recommend_webcode}</td>
</tr>
<tr>
<td bgcolor="#ffffff"><a href="{$shopurl}?u={$userid}" target="_blank" title="{$shopname}"  class="f6"><img src="{$shopurl}{$logosrc}" /></a></td>
<td bgcolor="#ffffff"><input size="40" onclick="this.select();" type="text" value="&lt;a href=&quot;{$shopurl}?u={$userid}&quot; target=&quot;_blank&quot; title=&quot;{$shopname}&quot;&gt;&lt;img src=&quot;{$shopurl}{$logosrc}&quot; /&gt;&lt;/a&gt;" style="border:1px solid #ccc;" /> {$lang.recommend_webcode}</td>
</tr>
<tr>
<td bgcolor="#ffffff"><a href="{$shopurl}?u={$userid}" target="_blank" class="f6">{$shopname}</a></td>
<td bgcolor="#ffffff"><input size="40" onclick="this.select();" type="text" value="[url={$shopurl}?u={$userid}]{$shopname}[/url]" style="border:1px solid #ccc;" /> {$lang.recommend_bbscode}</td>
</tr>
<tr>
<td bgcolor="#ffffff"><a href="{$shopurl}?u={$userid}" target="_blank" title="{$shopname}" class="f6"><img src="{$shopurl}{$logosrc}" /></a></td>
<td bgcolor="#ffffff"><input size="40" onclick="this.select();" type="text" value="[url={$shopurl}?u={$userid}][img]{$shopurl}{$logosrc}[/img][/url]" style="border:1px solid #ccc;" /> {$lang.recommend_bbscode}</td>
</tr>
</table>
</div>
<!-- {else} -->
<!-- 单个商品推荐 -->
<style type="text/css">
.types a{ text-decoration:none; color:#006bd0;}
</style>
<div class="us_contentBox mod1 mod2">
<span class="lt"></span><span class="lb"></span><span class="rt"></span><span class="rb"></span>
<h6>{$lang.affiliate_code}</h6> 
<table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
    <tr align="center">
      <td bgcolor="#ffffff">{$lang.affiliate_view}</td>
      <td bgcolor="#ffffff">{$lang.affiliate_code}</td>
    </tr>
    <!-- {foreach from=$types item=val name=types} -->
    <tr align="center">
      <td bgcolor="#ffffff" class="types"><script src="{$shopurl}affiliate.php?charset={$ecs_charset}&gid={$goodsid}&u={$userid}&type={$val}"></script></td>
      <td bgcolor="#ffffff">javascript {$lang.affiliate_codetype}<br>
        <textarea cols=30 rows=2 id="txt{$smarty.foreach.types.iteration}" style="border:1px solid #ccc;"><script src="{$shopurl}affiliate.php?charset={$ecs_charset}&gid={$goodsid}&u={$userid}&type={$val}"></script></textarea>[<a href="#" title="Copy To Clipboard" onclick="Javascript:copyToClipboard(document.getElementById('txt{$smarty.foreach.types.iteration}').value);alert('{$lang.copy_to_clipboard}');"  class="f6">{$lang.code_copy}</a>]
<br>iframe {$lang.affiliate_codetype}<br><textarea cols=30 rows=2 id="txt{$smarty.foreach.types.iteration}_iframe"  style="border:1px solid #ccc;"><iframe width="250" height="270" src="{$shopurl}affiliate.php?charset={$ecs_charset}&gid={$goodsid}&u={$userid}&type={$val}&display_mode=iframe" frameborder="0" scrolling="no"></iframe></textarea>[<a href="#" title="Copy To Clipboard" onclick="Javascript:copyToClipboard(document.getElementById('txt{$smarty.foreach.types.iteration}_iframe').value);alert('{$lang.copy_to_clipboard}');" class="f6">{$lang.code_copy}</a>]
<br />{$lang.bbs}UBB {$lang.affiliate_codetype}<br /><textarea cols=30 rows=2 id="txt{$smarty.foreach.types.iteration}_ubb"  style="border:1px solid #ccc;">{if $val != 5}[url={$shopurl}goods.php?id={$goodsid}&u={$userid}][img]{if $val < 3}{$goods.goods_thumb}{else}{$goods.goods_img}{/if}[/img][/url]{/if}

[url={$shopurl}goods.php?id={$goodsid}&u={$userid}][b]{$goods.goods_name}[/b][/url]
{if $val != 1 && $val != 3}[s]{$goods.market_price}[/s]{/if} [color=red]{$goods.shop_price}[/color]</textarea>[<a href="#" title="Copy To Clipboard" onclick="Javascript:copyToClipboard(document.getElementById('txt{$smarty.foreach.types.iteration}_ubb').value);alert('{$lang.copy_to_clipboard}');"  class="f6">{$lang.code_copy}</a>]
{if $val == 5}<br />{$lang.im_code} {$lang.affiliate_codetype}<br /><textarea cols=30 rows=2 id="txt{$smarty.foreach.types.iteration}_txt"  style="border:1px solid #ccc;">{$lang.show_good_to_you} {$goods.goods_name}

{$shopurl}goods.php?id={$goodsid}&u={$userid}</textarea>[<a href="#" title="Copy To Clipboard" onclick="Javascript:copyToClipboard(document.getElementById('txt{$smarty.foreach.types.iteration}_txt').value);alert('{$lang.copy_to_clipboard}');"  class="f6">{$lang.code_copy}</a>]{/if}</td>
    </tr>
    <!-- {/foreach} -->
  </table>
<script language="Javascript">
copyToClipboard = function(txt)
{
 if(window.clipboardData)
 {
    window.clipboardData.clearData();
    window.clipboardData.setData("Text", txt);
 }
 else if(navigator.userAgent.indexOf("Opera") != -1)
 {
   //暂时无方法:-(
 }
 else if (window.netscape)
 {
  try
  {
    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
  }
  catch (e)
  {
    alert("{$lang.firefox_copy_alert}");
    return false;
  }
  var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
  if (!clip)
    return;
  var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
  if (!trans)
    return;
  trans.addDataFlavor('text/unicode');
  var str = new Object();
  var len = new Object();
  var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
  var copytext = txt;
  str.data = copytext;
  trans.setTransferData("text/unicode",str,copytext.length*2);
  var clipid = Components.interfaces.nsIClipboard;
  if (!clip)
  return false;
  clip.setData(trans,null,clipid.kGlobalClipboard);
 }
}
</script>
<!-- /单个商品推荐 -->

<!-- {/if} --> 
  <!-- {/if} -->
<!-- {/if} -->
  <!-- /我的推荐 -->
</div>
</div>

</div>
<!--主体内容 end-->

<!-- #BeginLibraryItem "/library/help.lbi" --><!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/page_footer.lbi" --><!-- #EndLibraryItem -->
</body>
<script type="text/javascript">
{foreach from=$lang.clips_js item=item key=key}
var {$key} = "{$item}";
{/foreach}
</script>
</html>
