{include "header.inc.html"}
<div class="content_box">
	<div class="toolbar_box">
		<div class="toolbar"> <span> <strong>淘宝客</strong><br />
		<span class="english"></span> </span> </div>
	</div>
<div class="tool">
<div class="left">
<form action="{$adminUrl}taoke/" method="get" class="form">
<label class="label">搜索店铺：</label><input type="checkbox" value="1" name="only_mall"{if $smarty.get.only_mall==1} checked{/if} /><input type="text" name="key" value="{$smarty.get.key}" /><input type="submit" class="btn_sub" value="{$lang.form.search}">
</form>
</div>
<div class="right">
</div>
<div class="clr"></div>
</div><!--.tool-->
 <table class="table-ca table_1" id="tInfo">
 <tr>
<th class="w60">编号</th><th class="w100">卖家昵称</th><th class="w100">店铺用户id</th><th class="w100">店铺名称</th><th class="w300">店铺推广URL</th><th class="w30" title="店铺佣金比率">佣金</th><th class="w60">信用等级</th><th class="w40" title="店铺类型">类型</th><th class="w60" title="累计推广量">推广量</th><th class="w60" title="店铺内商品总数">总数</th><th class="w60">操作</th>
 </tr>
{foreach from=$shops item=item}
<tr>
<td>{$item@index+1}</td><td>{$item.seller_nick}</td><td>{$item.user_id}</td><td>{$item.shop_title}	</td><td><div class="w300 nowrap"><a href="{$item.click_url}" target="_blank">{$item.click_url}</a></div></td><td>{$item.commission_rate}</td><td>{$item.seller_credit}</td><td>{$item.shop_type}</td><td>{$item.total_auction}</td><td>{$item.auction_count}</td><td><a href="javascript:void(0)" title="将店铺信息保存至本地商铺" class="saveShop">保存</a></td>
</tr>
{/foreach}
</table>
<div class="page">
	<div class="pagin fr">{pager allCount=$allCount url='/admin/brand/page/page' number="false"}</div>
</div>
</div><!--.content_box-->
<script type="text/javascript">
$(function(){
	$("a.saveShop").click(function(){
		var tds = $(this).parent("td").parent("tr").find("td");
		var shop={};
		shop['inajax']=1;
		shop['act']='add';
		shop['seller_nick'] = tds.eq(1).text();
		shop['user_id'] = tds.eq(2).text();
		shop['shop_title'] = tds.eq(3).text();
		shop['click_url'] = tds.eq(4).text();
		shop['commission_rate'] = tds.eq(5).text();
		shop['seller_credit'] = tds.eq(6).text();
		shop['shop_type'] = tds.eq(7).text();
		shop['total_auction'] = tds.eq(8).text();
		shop['auction_count'] = tds.eq(9).text();
		$.ajax({
			type:"POST",
			url:"{$adminUrl}taoke/shop",
			data:shop,
			dataType:"json",
			success:function(json){
				if(json.success){
					Msg('添加成功');
				}else{
					qlib.tips(json.message);
				}
			}
			
		})
	});
});
</script>
{include "footer.inc.html"}