<!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=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="generator" content="anxinMall v{anxinMall:global.cfg_version}" />
<meta name="author" content="www.xuzhou.it" />
<title>商品管理 - {anxinMall:global.cfg_sitename} - Powered by anxinMall</title>
<link rel="stylesheet" href="/skin/default/style/common.css" type="text/css" />
<link rel="stylesheet" href="/skin/default/style/member.css" type="text/css" />
<script type="text/javascript" src="/file/js/config.js"></script>
<script type="text/javascript" src="/file/js/jquery.js"></script>
<script type="text/javascript" src="/file/js/jquery.thickbox.js"></script>
<script type="text/javascript" src="/file/js/jquery.asyncbox.js"></script>
<script type="text/javascript" src="/skin/default/js/common.js"></script>
<script type="text/javascript">
var anxinMall ={"sitename":"{anxinMall:asp}response.write Application("cfg_sitename"){/anxinMall:asp}","siteurl":"{anxinMall:asp}response.write Application("cfg_siteurl"){/anxinMall:asp}","siteskin":"{anxinMall:asp}Application("cfg_siteskin"){/anxinMall:asp}"};
</script>
<script type="text/javascript"> 
$(document).ready(function() { 
	$("#selectAll").click(function() { 
		$(".id").each(function() { 
			if($(this).attr("checked"))
			{
				$(this).attr("checked", false); 
			}
			else
			{
				$(this).attr("checked", true); 
			}
		}); 
	}); 

	var ids=""; 

	$("#delete").click(function() {
		$("[.id][checked]").each(function(){ids+=$(this).val()+",";});
		if (ids==""){$.error('请选择要删除的信息');return false}	
			$.confirm("删除后不可恢复，确定要删除吗？",'删除确认',function(action){
				if(action == 'ok'){
					window.location.href = "prod_action.asp?page={anxinMall:asp}response.write request.querystring("page"){/anxinMall:asp}&shjclassid={anxinMall:asp}response.write request.querystring("shjclassid"){/anxinMall:asp}&action=delete&id="+ids;
				}
			});
	});
	
	$("#refresh").click(function() {
		$("[.id][checked]").each(function(){ids+=$(this).val()+",";});
		if (ids==""){$.error('请选择要刷新的信息');return false}			
			window.location.href = "prod_action.asp?page={anxinMall:asp}response.write request.querystring("page"){/anxinMall:asp}&shjclassid={anxinMall:asp}response.write request.querystring("shjclassid"){/anxinMall:asp}&action=refresh&id="+ids
	});
	
	$("#onshow").click(function() {
		$("[.id][checked]").each(function(){ids+=$(this).val()+",";});
		if (ids==""){$.error('请选择要批量下架的商品信息');return false}			
			window.location.href = "prod_action.asp?page={anxinMall:asp}response.write request.querystring("page"){/anxinMall:asp}&shjclassid={anxinMall:asp}response.write request.querystring("shjclassid"){/anxinMall:asp}&action=onshow&id="+ids
	});	
	
	$("#onshow_on").click(function() {
		$("[.id][checked]").each(function(){ids+=$(this).val()+",";});
		if (ids==""){$.error('请选择要批量上架的商品信息');return false}			
			window.location.href = "prod_action.asp?page={anxinMall:asp}response.write request.querystring("page"){/anxinMall:asp}&shjclassid={anxinMall:asp}response.write request.querystring("shjclassid"){/anxinMall:asp}&action=onshow_on&id="+ids
	});

}); 


function anxinMall_delete(t,l){
	if(t=="")t="确定要删除吗？ 删除后不可恢复！";
	$.confirm(t,'删除确认',function(action){
		if(action == 'ok'){
			window.location.href = l;
		}
	});
}


</script>

</head>

<body>
<div id="anxinMall_layout">
<!--#include file="my_head.tpl"-->
<div id="anxinMall_body2">
<div class="memberbox">
	<table width="980" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="left">
			<!--#include file="my_menu.tpl"-->
		</td>
		<td class="center"></td>
        <td class="right">
			<div class="title">
			<h3 class="current">商品列表</h3>
			<h3><a href="prod_edit.asp?action=addproduct"><font color="#008000" size=3>添加商品</font></a></h3>
			</div>
			<div class="info_list">
<table width="100%" border="0" cellspacing="1" cellpadding="0" style="margin-top:-20px;">
	<thead>
	<tr>
		<td align="center" width="720" colspan="5" bgcolor="#ffffff">当前查看 >> <b>
		{anxinMall:asp}
		if request.querystring("shjclassid")<>"" then
			set rs=anxinMall.db("select shjclassid,shjclass from [mall_shjclass] where shjclassid="&request.querystring("shjclassid"),2)
			response.write rs("shjclass")
			rs.close
			set rs=nothing
		else
			response.write "所有商品"
		end if
		{/anxinMall:asp}
		</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<select name="shjclass" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" >
			<option value="?shjclassid=">-选择商品分类-</option>
			{anxinMall:myclass $sql=select * from [mall_shjclass] where shjname='{anxinMall:field.username}' $cache=0}
			<option value="?shjclassid=[myclass:shjclassid]">[myclass:shjclass]</option>

			{/anxinMall:myclass}
			</select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 使用[刷新]功能可使用商品店内靠前显示.
		</td>
	</tr>
	<tr>
		<th align="center" width="60">编号</th>
		<th align="center">商品名称</th>
		<th align="center" width="110">更新时间</th>
		<th align="center" width="50">状态</th>
		<th align="center" width="200">管理操作</th>
	</tr>
	</thead>
	<tbody>
	{anxinMall:page $size=9}
	<tr>
		<td><input name="id" class="id" type="checkbox" value="[page:bookid]" />[page:bookid]</td>
		<th>{if:[page:ontop]>0}<font color="red">【置顶】</font>{end if}<a href="../item/[page:bookid].html" target="_blank" title="[page:bookname]">[page:bookname $left=24]</a></th>

		<td>[page:refreshtime]</td><!-- [page:addDate $function=datevalue(@me)] -->

		<td>{if:[page:onshow]=1}<font color="green">展销中</font>{else}<font color="red">已下架</font>{end if}</td>

		<td class="control"><a href="prod_action.asp?page={anxinMall:asp}response.write request.querystring("page"){/anxinMall:asp}&shjclassid={anxinMall:asp}response.write request.querystring("shjclassid"){/anxinMall:asp}&action=onshow&id=[page:bookid]">下架</a>|<a href="prod_action.asp?page={anxinMall:asp}response.write request.querystring("page"){/anxinMall:asp}&shjclassid={anxinMall:asp}response.write request.querystring("shjclassid"){/anxinMall:asp}&action=onshow_on&id=[page:bookid]">上架</a>|<a href="prod_action.asp?page={anxinMall:asp}response.write request.querystring("page"){/anxinMall:asp}&shjclassid={anxinMall:asp}response.write request.querystring("shjclassid"){/anxinMall:asp}&action=refresh&id=[page:bookid]">刷新</a>|<a href="prod_edit.asp?action=editproduct&id=[page:bookid]">编辑</a>|<a href="javascript:;" onclick="anxinMall_delete('','prod_action.asp?page={anxinMall:asp}response.write request.querystring("page"){/anxinMall:asp}&shjclassid={anxinMall:asp}response.write request.querystring("shjclassid"){/anxinMall:asp}&action=delete&id=[page:bookid]')">删除</a></td>
	</tr>
	{/anxinMall:page}
	</tbody>
</table>
<div style="float:left; padding-top:20px; padding-left:10px">
<input id="selectAll" type="button" class="button_1" value="全选/反选" />
<input id="delete" type="button" class="button_1" value="删除所选" />
<input id="refresh" type="button" class="button_1" value="刷新所选" />
<input id="onshow" type="button" class="button_1" value="批量下架" />
<input id="onshow_on" type="button" class="button_1" value="批量上架" />
</div>

<div class="clear"></div>
<div class="pagebreak" style="float:right">{tag:page}</div>
<div class="clear"></div>

			</div>
		</td>
      </tr>
    </table>
</div>
</div>
<!--#include file="my_foot.TPL"-->
</div>
</body>
</html>
