<!--#include file="conn.asp"-->
<!--#include file="inc/cookies_check.asp"-->
<!--#include file="inc/Page_cls.asp"-->
<%
'*****************************************
'* 软件名称 乐彼网上开店软件(56770 EShop)
'* 软件开发 http://www.56770.com
'* 版权所有 http://www.56770.com
'* 文件名称 Admin_tags.asp
'* 最后更新 2012-01-08 by 56770.kingdge
'*****************************************
id=request("id")
Dim admin_flag
admin_flag=",3.6,"
include "lang/"& LangFilePath &"/lang_sys.inc"
include "lang/"& LangFilePath &"/lang_menu.inc"
include "lang/"& LangFilePath &"/lang_tags.inc"
CurrentId = 1
CurrentUrl = "admin_tags.asp"
LB_Head()
LB_Menu()
Response.Write("<div class=""mainbody"">")
Response.Write("<div class=""mainbody2"">")
if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
		adminflag()
Else
		If OutSubmit = 1 Then CheckOutSubmit()
		Select Case Request("action")
				Case "del" : del()
				Case Else
				list()
        End Select
end If
Response.Write("</div>")
Response.Write("</div>")
LB_Footer()

sub del
        If OnlyRead = 1 Then OnlyReadMessage()
        id=safereplace(request("id"))
        if id="" then
               response.write"<SCRIPT language=JavaScript>alert('"& Lang_sys(41) &"');javascript:history.go(-1)</SCRIPT>"
               response.end
        end if
        conn.execute "delete from [Lebi_tags] where tags_id in ("&id&") "
		ManageLog Lang_Tags(1) &" ["&id&"]"
		m_u="admin_tags.asp?page="& request("page") &"&pagenum="& request("pagenum") &"&keyword="& request("keyword")
		Call Up_mes(Lang_sys(43),"·"& Lang_sys(42),0,m_u,0,0,2,1)
end sub

sub list
		page = CheckNum(request("page"),1)
		pagenum = CheckNum(request("pagenum"),15)
		keyword = safereplace(Trim(request("keyword")))
		Dim ors
		Set ors=new Cls_vbsPage
		Set ors.Conn=conn
		With ors
		.PageSize=pagenum
		.PageName="Page"
		If IsSqlDataBase = 0 Then
				.DbType="AC"
		Else
				.DbType="MSSQL"
		End If
		.RecType=0
		.Pkey="tags_id"
		.Field="tags_id,tags_name,tags_num"
		.Table="[Lebi_tags]"
		sql = "1=1"
		If keyword <> "" Then sql = sql &" and (tags_name like '%"& keyword &"%')"
		.Condition=sql
		.OrderBy="tags_num desc"
		End With
		DataCount=ors.RecCount()
		DataList=ors.ResultSet()
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="classtable-top">
<tbody>
<tr>
<form method="get" action="?">
<td height="30" align="left" class="classhead">
<input name="keyword" id="keyword" type="text" class="form_query" size="15" autocomplete="off" onkeyup="search_suggest('keyword','Lebi_tags','')"><input name="Submit" type="submit" value="" title="<%=Lang_sys(25)%>" align="absmiddle" class="btn_query"><br /><div id="search_suggest_keyword" class="search_suggest" style="display:none"></div>
</td>
<td height="30" align="right" class="classhead">
<%=QuickMenu("Admin_protext.asp|"& Lang_Menu(82) &"","Admin_packing.asp|"& Lang_Menu(83) &"")%>
</td>
</form>
</tr>
</tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="list" class="classtable2">
<form name="form" action="?action=del" method="post">
<tr>
  <td colspan="2" height="30" align="left" class="classhead">
     <input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_delete.gif" value=" <%=Lang_sys(15)%> " title=" <%=Lang_sys(15)%> " align="absmiddle">
	 <input name="up" type="image" title=" <%=Lang_Tags(2)%> " onclick="location.href='admin_update.asp?u_type=2&prev=<%=server.urlencode(Backurl())%>';return false;" src="lang/<%=LangFilePath%>/images/bt_update.gif" align="absmiddle">
	 <input type="hidden" name="page" value="<%=page%>">
	 <input type="hidden" name="keyword" value="<%=keyword%>">
	 <input type="hidden" name="pagenum" value="<%= pagenum %>">
  </td>
  <td height="30" class="classhead" align="right"><%=ors.ShowPageHead(page)%></td>
 </tr>
<tr>
<td class="classtop" width="5%" height="30" title="<%=Lang_sys(4)%>" style="cursor:pointer;" onclick="location.href='javascript:selectall();';return false;"><%=Lang_sys(50)%></td>
<td class="classtop" width="20%"><%=Lang_Tags(3)%></td>
<td class="classtop" width="75%"><%=Lang_Tags(4)%></td>
</tr>
<%
If DataCount >0 Then
		For i = 0 To Ubound(DataList,2)
%>
<tr class="classrow">
<td height="30" class="classrow"><input name="id" type="checkbox" value="<%=DataList(0,i)%>"></td>
<td height="30" class="classrow"><%=trim(DataList(1,i))%></td>
<td class="classrow"><%=trim(DataList(2,i))%></td>
</tr>
<%
        Next
End If
%>
</form>
<tr>
	<td height="30" class="classfooter" colspan="2"><%=GetPageNum(15,pagenum)%></td>
	<td height="30" class="classfooter" align="right"><%=ors.ShowPageFoot(page)%></td>
</tr>
<tr>
<td colspan="5" class="classfaq">
<div class="faq_main">
<p class="faq_title"><%=Lang_sys(49)%></p>
<%=Lang_Tags(5)%>
</div>
</td>
</tr>
</table>
<script>tdshow("list");</script>
<%end sub%>