<!--#include file="conn.asp"-->
<!--#include file="inc/cookies_check.asp"-->
<!--#include file="inc/Page_cls.asp"-->
<!--#include file="../include/lebi_config.asp"-->
<%
'*****************************************
'* 软件名称 乐彼网上开店软件(56770 EShop)
'* 软件开发 http://www.56770.com
'* 版权所有 http://www.56770.com
'* 文件名称 Admin_product_list.asp
'* 最后更新 2013-12-01 by 56770.kingdge
'*****************************************
include "lang/"& LangFilePath &"/lang_sys.inc"
include "lang/"& LangFilePath &"/lang_menu.inc"
include "lang/"& LangFilePath &"/lang_product.inc"
include "lang/"& LangFilePath &"/lang_upfile.inc"
CurrentId = 1
CurrentUrl = "admin_product_list.asp"
Dim LI(4)
If request("zhuangtai") = "0" Then
	LI(0) = "" : LI(1) = "class=""current""" : LI(2) = ""
Else
	If request("action") = "" Then
		LI(0) = "class=""current""" : LI(1) = "" : LI(2) = ""
	ElseIf request("action") = "updatepicsize" Then
		LI(0) = "" : LI(1) = "" : LI(2) = "class=""current"""
	End If
End If
LB_Head()
LB_Menu()%>
<div class="tabmenu mainwidth">
      <ul>
        <li <%=LI(0)%>><a href="admin_product_list.asp"><span><%=Lang_Menu(53)%></span></a></li>
        <li <%=LI(1)%>><a href="Admin_product_list.asp?zhuangtai=0"><span><%=Lang_Menu(71)%></span></a></li>
		<li><a href="Admin_product_list_simple.asp"><span><%=Lang_Menu(68)%></span></a></li>
        <li><a href="Admin_product.asp"><span><%=Lang_Menu(52)%></span></a></li>
      </ul>
</div>
<%
Response.Write("<div class=""tab-mainbody"">")
Response.Write("<div class=""tab-mainbody2"">")
If OutSubmit = 1 Then CheckOutSubmit()
Select Case Request("action")
	   Case "delproduct" : delproduct()
       Case "changestate" : changestate()
	   Case "move" : move()
	   Case "movecategory" : movecategory()
	   Case "updatepicsize" : updatepicsize()
	   Case "updatepicsize_ok" : updatepicsize_ok()
	   Case Else
		    productlist()
End Select
Response.Write("</div>")
Response.Write("</div>")
LB_Footer()

sub changestate()
        If OnlyRead = 1 Then OnlyReadMessage()
        admin_flag=",2.2,"
        if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
	            adminflag()
        Else
				id = safereplace(request("id"))
				If Right(id,1) = "," Then id = id &"0"
                uptype = CheckNum(request("uptype"),1)
				sql = "Update [Lebi_product] set"
				Select Case uptype
					   Case "1" sql = sql &" zhuangtai = 1"
					   Case "2" sql = sql &" zhuangtai = 0"
					   Case "3" sql = sql &" stj = 1"
					   Case "4" sql = sql &" stj = 0"
					   Case "5" sql = sql &" IsNew = 1"
					   Case "6" sql = sql &" IsNew = 0"
				End Select
				sql = sql &" where id in ("&id&")"
'				response.write sql
'				response.End
                conn.execute(sql)
				If Config_Lebi_Eshop(17)="1" Then
						Application.Contents.RemoveAll
				Else
						NewEvent "0"
				End If
                response.redirect CheckUrl(request("ref"))
				response.End
        end if
end sub

Sub delproduct
        If OnlyRead = 1 Then OnlyReadMessage()
        on error resume next
        admin_flag=",2.3,"
        if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
	            adminflag()
        Else
				del_id= Replace(safereplace(Trim(request("id"))),"，",",")
				If Right(del_id,1) = "," Then del_id = Left(del_id,Len(del_id)-1)
                if del_id="" then
                        response.write"<SCRIPT language=JavaScript>alert('"& Lang_sys(41) &"');javascript:history.go(-1)</SCRIPT>"
                        response.end
                end if
                sql="select id,pic,cpic from [Lebi_product] where id in ("&del_id&") "
                set rs=conn.execute(sql)
		        If Not rs.eof Then
		                Do While Not rs.eof
                        cpic=LCase(Trim(rs("cpic")))
                        pic=LCase(Trim(rs("pic")))
                        filepath_pic="../"& PicPath &"/"&pic
                        path_pic=server.MapPath(filepath_pic)
                        set objfso = server.createobject("scripting.FileSystemObject")
                        If (pic<>"noimages.gif" And pic<>"nonegif.gif") And objfso.FileExists(path_pic) then
                                objfso.DeleteFile(path_pic)
				        End If
                        If cpic<>"nonegif.gif" And cpic<>"noimages.gif" Then
                                If InStr(cpic,"@@")>0 Then
						                str_cpic=Split(cpic,"@@")
                                        For i = 0 To UBound(str_cpic)
                                                filepath_cpic="../"& PicPath &"/"&str_cpic(i)
		                                        path_cpic= server.MapPath(filepath_cpic)
										        If Trim(str_cpic(i))<>"nonegif.gif" And Trim(str_cpic(i))<>"noimages.gif" And objfso.FileExists(path_cpic) Then
                                                        objfso.DeleteFile(path_cpic)
									            End If
	                                    Next
						        Else
                                        filepath_cpic="../"& PicPath &"/"&cpic
		                                path_cpic= server.MapPath(filepath_cpic)
								        If cpic<>"nonegif.gif" And cpic<>"noimages.gif" And objfso.FileExists(path_cpic) Then
                                                objfso.DeleteFile(path_cpic)
								        End If
								End If
						End If
						set objfso = Nothing
						rem 删除价格表内价格
						conn.execute "delete from [Lebi_product_price] where product_id="&rs("id")&""
						conn.execute "delete from [Lebi_Product_Stock] where p_id="&rs("id")&""
						conn.execute "delete from [Lebi_dvote] where downid="&rs("id")&""
						rem 删除商品时删除收藏夹内的商品 2006-1-2 Lebi.kingdge
						conn.execute "delete from [Lebi_action] where id="&rs("id")&""
						conn.execute "delete from [Lebi_lsbuy] where cpid="&rs("id")&""
						conn.execute "delete from [Lebi_lsview] where lsv_product_id="&rs("id")&""
						conn.execute "delete from [Lebi_product] where id="&rs("id")&""
		        		rs.movenext
		        		Loop
				End If
				rs.close:Set rs=Nothing
				If Config_Lebi_Eshop(17)="1" Then
						Application.Contents.RemoveAll
				Else
						NewEvent "0"
				End If
        		m_u=CheckUrl(request("ref"))
				ManageLog Lang_Product(80) &" ["&id&"]"
				Call Up_mes(Lang_sys(43),"·"& Lang_sys(42),0,m_u,0,0,2,1)
        End If
End Sub

Sub move
        If OnlyRead = 1 Then OnlyReadMessage()
        admin_flag=",2.2,"
        if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
	            adminflag()
        Else
				move_id= Replace(safereplace(request("id")),"，",",")
				If Right(move_id,1) = "," Then move_id = Left(move_id,Len(move_id)-1)
				move_sort_id = ","& Replace(safereplace(request("move_sort_id"))," ","") &","
				if move_id = "" then
						response.write"<SCRIPT language=JavaScript>alert('"& Lang_Product(81) &"');javascript:history.go(-1)</SCRIPT>"
						response.end
				End If
				if request("move_sort_id") = "" then
						response.write"<SCRIPT language=JavaScript>alert('"& Lang_Product(82) &"');javascript:history.go(-1)</SCRIPT>"
						response.end
				End If
				conn.execute("update [Lebi_product] set categoryid='"&move_sort_id&"' where id in("&move_id&")")
				If Config_Lebi_Eshop(17)="1" Then
						Application.Contents.RemoveAll
				Else
						NewEvent "0"
				End If
				response.write("<iframe width='0' height='0' src='admin_update.asp'></iframe>")
				ManageLog Lang_Product(83) &" ["&move_id&"]"
				Call Close_mes(Lang_sys(69),"·"& Lang_Product(84),2)
		End If
End Sub

Sub productlist
admin_flag=",2.2,"
if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
	    adminflag()
End If
sort_id = CheckNum(request("sort_id"),0)
vtype = request("vtype")
page = CheckNum(request("page"),1)
pagenum = CheckNum(request("pagenum"),10)
zhuangtai = safereplace(request("zhuangtai"))
keyword = safereplace(request("keyword"))
datefrom=safeReplace(request("datefrom"))
dateto=safeReplace(request("dateto"))
lang = safereplace(request("lang"))
If lang = "" Then lang = LanguageTxt(0)
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="p.id"
.Field="p.id,p.bianhao,p.product_name"& lang &",p.sprice,p.cbprice,p.stj,p.zhuangtai,p.cx,p.cprice,p.kucun,p.buys,p.views,p.pic,p.IsNew,P_SpecificationName,cpic"
.Table="[Lebi_product] as p"
sql = "1=1"
if zhuangtai<>"" then sql=sql + " and zhuangtai="&zhuangtai&""
if keyword<>"" then sql=sql + " and (product_name"& lang &" like '%"&keyword&"%' or bianhao like '%"&keyword&"%' or briefed"& lang &" like '%"&keyword&"%' or brand"& lang &" like '%"&keyword&"%' or id like '%"&keyword&"%')"
If sort_id<>"0" And IsSqlDataBase = 1 Then sql=sql + " and charindex(',"&sort_id&",',categoryid)>0"
If sort_id<>"0" And IsSqlDataBase = 0 Then sql=sql + " and instr(categoryid,',"&sort_id&",')>0"
if vtype="6" then sql=sql + " and kucun=0"
if vtype="3" then sql=sql + " and cx=1"
if vtype="4" then sql=sql + " and (stj=1 or ytj=1)"
if vtype="7" then sql=sql + " and IsNew=1"
If IsSqlDataBase = 1 And datefrom<>"" And dateto<>"" Then sql=sql + " and DateDiff(d,sj,'"& datefrom &"')<=0 and DateDiff(d,sj,'"& dateto &"')>=0"
If IsSqlDataBase = 0 And datefrom<>"" And dateto<>"" Then sql=sql + " and DateDiff('d',sj,'"& datefrom &"')<=0 and DateDiff('d',sj,'"& dateto &"')>=0"
.Condition=sql
if vtype="" then sqlorder = "p_order desc,id desc" 'p_order desc,sj desc"
if vtype="1" then sqlorder = "views desc"
if vtype="2" then sqlorder = "buys desc"
if vtype="3" then sqlorder = "p_order desc,id desc"
if vtype="4" then sqlorder = "p_order desc,id desc"
if vtype="5" then sqlorder = "sj desc,id desc"
.OrderBy=sqlorder
End With
DataCount=ors.RecCount()
DataList=ors.ResultSet()
%>
<script language="javascript" type="text/javascript" src="inc/js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="inc/js/product.js"></script>
<script language="javascript" type="text/javascript" src="inc/js/js_link.js"></script>
<script language="javascript" type="text/javascript" src="inc/js/MyCalendar.js"></script>
<script language="javascript" type="text/javascript" src="inc/js/lightbox/jquery.colorbox-min.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){$("a[rel^='colorbox']").colorbox({title:"<%=Lang_Upfile(21)%>",slideshow:true,slideshowAuto:false,previous:"<%=Lang_Upfile(22)%>",next:"<%=Lang_Upfile(23)%>",close:"<%=Lang_Upfile(24)%>",slideshowStart:"<%=Lang_Upfile(25)%>",slideshowStop:"<%=Lang_Upfile(26)%>",current:"({total}/{current})"});});
function toupProduct()
{   
   var i = 0;   
   var chkArr = document.getElementsByName("id");   
   var ref = document.getElementById("ref").value;
   var uptype = document.getElementsByName("uptype");
   for (var i=0;i<uptype.length ;i++ )
	{ if(uptype[i].checked==true )
	 {
	  uptype = uptype[i].value;
	 }
	}
   var param = "";   
   for (i=0;i<chkArr.length;i++)   
   if (chkArr[i].checked)   
   param+=chkArr[i].value +",";   
   if (param.length == 0)
   {
       alert("<%=Lang_sys(70)%>");
   }else{
       location="Admin_product_list.asp?action=changestate&id="+param+"&uptype="+uptype+"&ref="+escape(ref);  
   }
}
function tomove()
{   
   var i = 0;   
   var chkArr = document.getElementsByName("id");   
   var page = document.getElementById("page").value;
   var param = "";   
   for (i=0;i<chkArr.length;i++)   
   if (chkArr[i].checked)   
   param+=chkArr[i].value +",";   
   if (param.length == 0)
   {
       alert("<%=Lang_sys(70)%>");
   }else{
       var url="Admin_product_list.asp?action=movecategory&id="+param+"&page="+page;   
       window.open(url); 
   }
}
</script>
<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">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<select name="lang">
<option value="" selected>┌ <%=Lang_sys(67)%></option>
<%For LangT = 1 To TotalLang%>
<option value="<%= LanguageTxt(LangT) %>"<%=judge2(LanguageTxt(LangT),Lang)%>>├ <%= LanguageName(LangT) %></option>
<%Next%>
</select>&nbsp;<select name="sort_id">
<option value="0" selected>┌ <%=Lang_Product(85)%></option>
<script src="../include/Lebi_Html/CategoryOption.js"></script>
</select>&nbsp;<select name="zhuangtai">
<option value="" selected>┌ <%=Lang_Product(86)%></option>
<option value="0" <%=judge2("0",zhuangtai)%>>├ <%=Lang_Product(76)%></option>
<option value="1" <%=judge2("1",zhuangtai)%>>├ <%=Lang_Product(75)%></option>
</select>
</td>
<td style="padding-left:5px;"><input type="text" name="dateFrom" value="<%=dateFrom%>" size="12" class="form_calendar" onclick="setday(this)" /> -
<input type="text" name="dateTo" value="<%=dateTo%>" size="12" class="form_calendar" onclick="setday(this)" />
</td>
<td style="padding-left:5px;"><input name="keyword" id="keyword" type="text" value="<%=keyword%>" class="form_query" size="15" autocomplete="off" onkeyup="search_suggest('keyword','lebi_product','<%=lang%>')"><input name="Submit" type="submit" value="" title="<%=Lang_sys(25)%>" align="absmiddle" class="btn_query"> <input type="hidden" name="vtype" value="<%= vtype %>"><input type="hidden" name="pagenum" value="<%= pagenum %>"><br /><div id="search_suggest_keyword" class="search_suggest" style="display:none"></div>
</td>
</tr>
</table>
</td>
</form>
<td align="right" class="classhead">
<%
If zhuangtai = "0" Then
		response.write QuickMenu("admin_product_list.asp|"& Lang_Menu(53) &"","admin_product_list_simple.asp|"& Lang_Menu(68) &"")
Else
		response.write QuickMenu("","Admin_product_list.asp?zhuangtai=0|"& Lang_Menu(71) &"")
End If
%>
</td>
</tr>
<tr>
<td height="30" align="left" class="classhead">
<%=Lang_Product(88)%><input type="radio" name="uptype" value="1" checked><%=Lang_Product(75)%>
<input type="radio" name="uptype" value="2"><%=Lang_Product(76)%>
<input type="radio" name="uptype" value="3"><%=Lang_Product(28)%>
<input type="radio" name="uptype" value="4"><%=Lang_Product(89)%>
<input type="radio" name="uptype" value="5"><%=Lang_Product(27)%>
<input type="radio" name="uptype" value="6"><%=Lang_Product(90)%>
<input type="image" border="0" title=" <%=Lang_sys(1)%> " onclick="location.href='javascript:toupProduct();';return false;" src="lang/<%=LangFilePath%>/images/bt_app.gif" align="absmiddle">
</td>
<td align="right" class="classhead">
<select name="anclassid" onChange="var jmpURL=this.options[this.selectedIndex].value ;if(jmpURL!='') {window.location=jmpURL; }else{ this.selectedIndex=0; }">
<option selected>┌ <%=Lang_Product(91)%></option>
<option value="?">├ <%=Lang_Product(92)%></option>
<option value="?vtype=7"<%=judge2(vtype,7)%>>├ <%=Lang_Product(93)%></option>
<option value="?vtype=3"<%=judge2(vtype,3)%>>├ <%=Lang_Product(94)%></option>
<option value="?vtype=4"<%=judge2(vtype,4)%>>├ <%=Lang_Product(95)%></option>
<option value="?vtype=1"<%=judge2(vtype,1)%>>├ <%=Lang_Product(96)%></option>
<option value="?vtype=2"<%=judge2(vtype,2)%>>├ <%=Lang_Product(97)%></option>
<option value="?vtype=5"<%=judge2(vtype,5)%>>├ <%=Lang_Product(98)%></option>
<option value="?vtype=6"<%=judge2(vtype,6)%>>├ <%=Lang_Product(99)%></option>
</select></td>
</tr>
</thead>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="classtable" class="classtable2">
<thead>
<form action="?action=delproduct" method="post">
<tr>
<td height="30" class="classhead" align="left" colspan="3"><input type="image" name="Submit" title=" <%=Lang_sys(15)%> " onClick="return confirm('<%=Lang_sys(64)%>')" src="lang/<%=LangFilePath%>/images/bt_delete.gif" align="absmiddle">
<input type="image" border="0" title=" <%=Lang_sys(21)%> " onclick="location.href='javascript:tomove();';return false;" src="lang/<%=LangFilePath%>/images/bt_move.gif" align="absmiddle">
<input type="hidden" name="page" id="page" value="<%= page %>">
<input type="hidden" name="ref" id="ref" value="<%= backurl() %>">
</td>
<td height="30" class="classhead" align="right" colspan="7"><%=ors.ShowPageHead(page)%></td>
</tr>
<tr>
<td class="classtop" height="30" width="4%" title="<%=Lang_sys(4)%>" style="cursor:pointer;" onclick="location.href='javascript:selectall();';return false;"><%=Lang_sys(50)%></td>
<td class="classtop" width="6%"><%=Lang_Product(100)%></td>
<td class="classtop" width="37%"><%=Lang_Product(101)%></td>
<td class="classtop" width="12%"><%=Lang_Product(102)%></td>
<td class="classtop" width="8%"><%=Lang_Product(103)%></td>
<td class="classtop" width="5%"><%=Lang_Product(27)%></td>
<td class="classtop" width="5%"><%=Lang_Product(28)%></td>
<td class="classtop" width="5%"><%=Lang_Product(86)%></td>
<td class="classtop" width="5%"><%=Lang_Product(104)%></td>
<td class="classtop" width="8%"><%=Lang_Product(105)%></td>
</tr>
</thead>
<%
On Error Resume Next 
If DataCount >0 Then
		For i = 0 To Ubound(DataList,2)
		cpic = DataList(15,i)
		picarr = ""
		If (Left(cpic,2) <> "@@" And Trim(cpic) <> "") Or Isnull(cpic) Or Trim(cpic) = "" Then cpic = "@@"& cpic
		If UBound(Split(cpic,"@@")) > 1 Then 
			For c = 2 To UBound(Split(cpic,"@@"))
				picarr = picarr &"<a href=""../"& PicPath &"/"& Split(cpic,"@@")(c) &""" rel=""colorbox"& DataList(0,i) &"""></a>"
			Next 
		End If 
'				pro_name = DataList(13,i)
'				pro_info = DataList(14,i)
'				If InStr(pro_name,"$")= 0 Or IsNull(DataList(13,i)) Then pro_name = "$$$$$$$"
'				If InStr(pro_info,"$$$")= 0 Or IsNull(DataList(14,i)) Then pro_info = "$$$$$$$$$$$$$$$$$$$$$"
'				pro_name=split(pro_name,"$")
'				pro_info=split(pro_info,"$$$")
'				productinfo = ""
'				For ii = 0 To UBound(pro_name)
'						If Trim(pro_name(ii)) <> "" Then
'								productinfo = productinfo & Trim(pro_name(ii)) &"："& Trim(pro_info(ii)) &"<br/>"
'						End If
'				Next
%>
<tr class="classrow">
<td class="classrow" height="30" rowspan="2"><input name="id" type="checkbox" value="<%=DataList(0,i)%>" title="ID:<%=DataList(0,i)%>"></td>
<td class="classrow" rowspan="2"><div class="pro-pic"><a href="../<%= PicPath %>/<%=Split(cpic,"@@")(1)%>" rel="colorbox<%=DataList(0,i)%>" target="_blank" title="<%=Lang_Upfile(21)%>"><img src='../<%= PicPath %>/<%=trim(DataList(12,i))%>' align='absmiddle' onMouseover="javascript:ddrivetip('<img src=../<%= PicPath %>/<%=trim(DataList(12,i))%> width=<%=Upload_SPicWidth%>>', '#ffffff', '<%=Upload_SPicWidth%>')" onMouseout="hideddrivetip()" border="0" class="picb"></a><%=picarr%></div></td>
<td class="classrow"><%=DataList(2,i)%></td>
<td class="classrow"><%=DataList(1,i)%></td>
<td class="classrow"><%=formatnumber2(DataList(4,i))%></td>
<td class="classrow"><a href="?action=changestate&uptype=<%=5+DataList(13,i)%>&id=<%=DataList(0,i)%>&ref=<%=server.urlencode(backurl())%>" title="<%=Lang_Product(106)%>"><%if DataList(13,i)=1 then response.write"<font color=red>√</font>" else response.write"×" end if %></a></td>
<td class="classrow"><a href="?action=changestate&uptype=<%=3+DataList(5,i)%>&id=<%=DataList(0,i)%>&ref=<%=server.urlencode(backurl())%>" title="<%=Lang_Product(106)%>"><%if DataList(5,i)=1 then response.write"<font color=red>√</font>" else response.write"×" end if %></a></td>
<td class="classrow"><a href="?action=changestate&uptype=<%=1+DataList(6,i)%>&id=<%=DataList(0,i)%>&ref=<%=server.urlencode(backurl())%>" title="<%=Lang_Product(106)%>"><%if DataList(6,i)=1 then response.write Lang_Product(75) else response.write"<font color=red>"& Lang_Product(76) &"</font>" end if %></a></td>
<td class="classrow"<%If DataList(14,i) <> "" Then%>onMouseOver="GetStockTips('<%=DataList(2,i)%>','<%=DataList(0,i)%>','<%=DataList(14,i)%>','2');" onMouseOut="RemoveTips(null,true);"<%End If%>><%if DataList(9,i)<10 then response.write"<font color=red><strong>"&DataList(9,i)&"</strong></font>" else  response.write DataList(9,i) end if%></td>
<td class="classrow"><a href="Admin_product_add.asp?id=<%=DataList(0,i)%>&sort_id=<%=sort_id%>&ref=<%=server.urlencode(backurl())%>"><img src="images/icon_copy.gif" border="0" title="<%=Lang_Product(107)%>" width="16" height="16" /></a>&nbsp;&nbsp;<a href="Admin_product_edit.asp?id=<%=DataList(0,i)%>&ref=<%=server.urlencode(backurl())%>"><img src="images/icon_edit.gif" border="0" title="<%=Lang_sys(51)%>" width="16" height="16" /></a>&nbsp;&nbsp;<a target="_blank" href="<%If Config_Lebi_Eshop(16) = 0 Then
response.write("../showproduct.asp")
Else
response.write("../product/")
End If
%>?id=<%=DataList(0,i)%>"><img src="images/icon_view.gif" border="0" title="<%=Lang_sys(59)%>" width="16" height="16" /></a>
</td>
</tr>
<tr class="classrow">
<td class="classrow" colspan="4"><%
		If DataList(7,i) =1 Then
				response.write "<font color=red>"& Lang_Product(34) &"</font>"&dw &""& formatnumber2(DataList(8,i)) &"&nbsp;&nbsp;"
		Else
				Set GetPrice = conn.execute("Select price from [Lebi_product_price] where product_id="& DataList(0,i) &" order by grade_id asc")
				If Not GetPrice.eof Then
						AllPrice = GetPrice.getrows()
				End If
				GetPrice.close : Set GetPrice = Nothing
				If UBound(AllPrice,2) < UserGroupNumber Then UserGroupNumber = UBound(AllPrice,2)+1
				for j=1 to UserGroupNumber
						response.write cache_ugrade_txt(j)&"："& formatnumber2(AllPrice(0,j-1)) &"&nbsp;&nbsp;"
				Next
		End If
%>
</td>
<td class="classrow" style="font-size:11px;" title="<%=Lang_Product(108) & DataList(10,i)%>" colspan="2"><div style="position:relative; border:1px solid #ccc; width:88px; overflow:hidden"><div style="position:absolute;top:-10px;right:2px"><%=DataList(10,i)%></div><div style="background: url(images/bar.gif); width:<%=GetBarWidth(DataList(10,i))%>px; height:10px" alt="<%=Lang_Product(108) & DataList(10,i)%>"></div></div></td>
<td class="classrow" style="font-size:11px;" title="<%=Lang_Product(109) & DataList(11,i)%>" colspan="2"><div style="position:relative; border:1px solid #ccc; width:88px; overflow:hidden"><div style="position:absolute;top:-10px;right:2px; color:#646245"><%=DataList(11,i)%></div><div style="background: url(images/bar1.gif); width:<%=GetBarWidth(DataList(11,i))%>px; height:10px" alt="<%=Lang_Product(109) & DataList(11,i)%>"></div></div></td>
</tr>
<%
        Next
End If
%>
</form>
<tfoot>
<tr>
	<td height="30" class="classfooter" colspan="2"><%=GetPageNum(10,pagenum)%></td>
	<td height="30" class="classfooter" align="right" colspan="8"><%=ors.ShowPageFoot(page)%></td>
</tr>
</tfoot>
</table>
<script>tdshow("classtable");</script>
<%
end Sub

Sub movecategory()
        admin_flag=",2.2,"
        If Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 Then
	            adminflag()
        End If
%>
<title><%=Lang_Product(110)%></title>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="move" class="classtable">
<tbody>
<form>
<input type="hidden" name="id" value="<%=request("id")%>">
<tr>
<td class="classtop" height="30">
<%=Lang_Product(111)%>
</td>
<td class="classtop" align="right" height="30">
 <input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" value=" <%=Lang_sys(1)%> " title=" <%=Lang_sys(1)%> ">
</td>
</tr>
<tr>
<td class="classrow" colspan="2">
 <select name="move_sort_id" size="20" multiple="multiple" id="move_sort_id">
<% check_sort (0),ii,0 %>
</select>
<input type="hidden" name="action" value="move">
</td>
</tr>
</form>
</tbody>
</table>
<script>tdshow("move");</script>
<%
End Sub

Sub updatepicsize()
        admin_flag=",2.2,"
        if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
	            adminflag()
        End If
		Dim pic_xw,pic_xh
		Set rs=conn.execute("select s_picsize from [Lebi_skins] where s_check=1")
		If Not rs.eof Then
			pic_xw=Split(rs("s_picsize"),"##")(0)
			pic_xh=Split(rs("s_picsize"),"##")(1)
		Else
			pic_xw = 100
			pic_xh = 100
		End If
		rs.close:Set rs=Nothing
%>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" id="form" class="classtable">
		<form action="?action=updatepicsize_ok" name="form" method="post" onSubmit="return CheckForm();">
		<tr>
		  <td height="30" align="left" class="classhead"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> " align="absmiddle"></td>
		  <td align="right" class="classhead">
		  <%=QuickMenu("Admin_product_list_simple.asp|"& Lang_Menu(68) &"","Admin_product.asp|"& Lang_Menu(52) &"")%>
		  </td>
		 </tr>
		<tr>
		<td class="classtop" height="30" colspan="2"><%=Lang_Menu(73)%></td>
		</tr>
		<tr class="classrow">
			 <td width="15%" class="classrow" height="30"><%=Lang_Product(113)%></td>
			 <td class="classrow"><input type="text" name="pic_xw" size="3" class="form" value="<%=pic_xw%>" /> PX</td>
			</tr>
		<tr class="classrow">
			 <td width="15%" class="classrow" height="30"><%=Lang_Product(114)%></td>
			 <td class="classrow"><input type="text" name="pic_xh" size="3" class="form" value="<%=pic_xh%>" /> PX</td>
			</tr>
		</form>
		<tr>
		<td colspan="2" class="classfaq">
		  <div class="faq_main">
		  <p class="faq_title"><%=Lang_sys(49)%></p>
		  <%=Lang_Product(115)%>
		  </div>
		</td>
		</tr>
		</table>
		<script>tdshow("form");</script>
<%
End Sub

Sub Updatepicsize_ok()
        admin_flag=",2.2,"
        if Eshop_Lebi_name="" or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 then
	            adminflag()
        End If
		Dim pw,ph
		pw = CheckNum(request("pic_xw"),100)
		ph = CheckNum(request("pic_xh"),100)
		set rs=server.createobject("ADODB.Recordset")
		sql="select pic_size from [Lebi_product_unite] order by id"
		rs.open sql, conn, 1, 3
		Do While Not rs.eof
			rs("pic_size") = getPicNewSize(rs("pic_size"),pw,ph)
			rs.update
			rs.movenext
		Loop
		rs.close
		sql="select pic_size from [Lebi_product] order by id"
		rs.open sql, conn, 1, 3
		Do While Not rs.eof
			rs("pic_size") = getPicNewSize(rs("pic_size"),pw,ph)
			rs.update
			rs.movenext
		Loop
		rs.close : Set rs = Nothing
		ManageLog Lang_Product(116)
		Call Up_mes(Lang_sys(69),"·"& Lang_sys(68),0,"?action=updatepicsize",0,0,2,1)
End Sub

Function GetBarWidth(str)
		str = checknum(str,0)
		If total = 0 Then total = 1
		GetBarWidth = CLng(str/20)
		If GetBarWidth = 0 Then GetBarWidth = 1
		If GetBarWidth >= 88 Then GetBarWidth = 88
End Function
%>