📄 user_wholesale_code.asp
字号:
<!--#include file="CommonCode.asp"-->
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005-2008 佛山市动易网络科技有限公司 版权所有
'**************************************************************
Dim arrProductKind
Dim ClassID, tClass, ClassName, ReadMe, RootID, ParentID, Depth, ParentPath, Child, arrChildID, ChildID
Sub Main()
ChannelID = 1000
Call GetChannel(ChannelID)
If PE_CLng(UserSetting(30)) = 0 Then
Response.Write "对不起,您没有批发商品的权限!如果您需要批发商品,请与我们联系。"
Exit Sub
End If
ClassID = PE_CLng(Trim(Request("ClassID")))
SearchType = PE_CLng(Trim(Request("SearchType")))
FileName = "User_Wholesale.asp?SearchType=" & SearchType
strFileName = FileName
arrProductKind = Array("", "实物", "软件", "点卡", "服务")
If ClassID > 0 Then
Set tClass = Conn.Execute("select ClassName,RootID,ParentID,Depth,ParentPath,Child,arrChildID from PE_Class where ClassID=" & ClassID)
If tClass.BOF And tClass.EOF Then
FoundErr = True
ErrMsg = ErrMsg & "<li>找不到指定的栏目</li>"
Else
ClassName = tClass(0)
RootID = tClass(1)
ParentID = tClass(2)
Depth = tClass(3)
ParentPath = tClass(4)
Child = tClass(5)
arrChildID = tClass(6)
End If
End If
Response.Write "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' Class='border'>"
Response.Write " <tr class='topbg'> "
Response.Write " <td height='22' colspan='3' align='center'><b>批 发 商 品</b></td>"
Response.Write " </tr>"
Response.Write " <tr class='tdbg'>"
Response.Write "<form name='form3' method='Post' action='User_Wholesale.asp'>"
Response.Write "<td width='70' height='30' ><strong>快速查找:</strong></td><td>"
Response.Write " <select size=1 name='SearchType' onChange='javascript:submit()'>"
Response.Write " <option value='0'"
If SearchType = 0 Then Response.Write " selected"
Response.Write ">所有" & ChannelShortName & "</option>"
Response.Write " <option value='3'"
If SearchType = 3 Then Response.Write " selected"
Response.Write ">正常销售的" & ChannelShortName & "</option>"
Response.Write " <option value='4'"
If SearchType = 4 Then Response.Write " selected"
Response.Write ">涨价商品</option>"
Response.Write " <option value='5'"
If SearchType = 5 Then Response.Write " selected"
Response.Write ">降价促销商品</option>"
Response.Write " <option value='6'"
If SearchType = 6 Then Response.Write " selected"
Response.Write ">特价处理商品</option>"
Response.Write " <option value='8'"
If SearchType = 8 Then Response.Write " selected"
Response.Write ">有促销活动的" & ChannelShortName & "</option>"
Response.Write " <option value='12'"
If SearchType = 12 Then Response.Write " selected"
Response.Write ">所有固顶" & ChannelShortName & "</option>"
Response.Write " <option value='13'"
If SearchType = 13 Then Response.Write " selected"
Response.Write ">所有热卖" & ChannelShortName & "</option>"
Response.Write " <option value='14'"
If SearchType = 14 Then Response.Write " selected"
Response.Write ">所有推荐" & ChannelShortName & "</option>"
Response.Write " </select>"
Response.Write "</td>"
Response.Write "</form>" & vbCrLf
Response.Write "<form method='Get' name='SearchForm' action='User_Wholesale.asp'>"
Response.Write "<td><b>高级查询:</b>"
Response.Write "<select name='Field' size='1'>"
Response.Write "<option value='ProductName' selected>" & ChannelShortName & "名称</option>"
Response.Write "<option value='ProductIntro'>" & ChannelShortName & "简介</option>"
Response.Write "<option value='ProductExplain'>" & ChannelShortName & "介绍</option>"
Response.Write "<option value='ProducerName'>厂商</option>"
Response.Write "<option value='TrademarkName'>品牌/商标</option>"
Response.Write "</select>"
Response.Write "<select name='ClassID'><option value=''>所有栏目</option>" & User_GetClass_Option(1, 0) & "</select>"
Response.Write "<input type='text' name='keyword' size='15' value='关键字' maxlength='50' onFocus='this.select();'>"
Response.Write "<input type='submit' name='Submit' value='搜索'>"
Response.Write "<input name='SearchType' type='hidden' id='SearchType' value='-1'>"
Response.Write "</td></form>"
Response.Write "</tr>"
Response.Write "</table><br>"
Dim rsProductList, sql, Querysql
Call ShowJS_Manage(ChannelShortName)
Response.Write "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
Response.Write " <tr class='title'>"
Response.Write " <td height='22'>" & GetRootClass() & "</td>"
Response.Write " </tr>" & GetChild_Root() & ""
Response.Write "</table><br>"
Response.Write "<table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>"
Response.Write " <tr>"
Response.Write " <td height='22'>"
Call ShowPath(ChannelShortName & "批发")
Response.Write " </td></tr>"
Response.Write "</table>"
Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr>"
Response.Write " <form name='myform' method='Post' action='../Shop/ShoppingCart.asp' target='ShoppingCart'>"
Response.Write " <td><table class='border' border='0' cellspacing='1' width='100%' cellpadding='0'>"
Response.Write " <tr class='title' height='22'> "
Response.Write " <td align='center' ><strong>" & ChannelShortName & "名称</strong></td>"
Response.Write " <td width='40' align='center' ><strong>类型</strong></td>"
Response.Write " <td width='40' align='center' ><strong>单位</strong></td>"
Response.Write " <td width='40' align='center' ><strong>库存量</strong></td>"
Response.Write " <td width='60' align='center' ><strong>原始价</strong></td>"
Response.Write " <td width='80' align='center' ><strong>数量/价格</strong></td>"
Response.Write " <td width='80' align='center' ><strong>数量/价格</strong></td>"
Response.Write " <td width='80' align='center' ><strong>数量/价格</strong></td>"
Response.Write " <td width='30' align='center' ><strong>购买</strong></td>"
Response.Write " <td width='60' align='center' ><strong>购买量</strong></td>"
Response.Write " </tr>"
sql = sql & "select top " & MaxPerPage & " P.ProductID,P.ClassID,C.ClassName,P.ProductKind,P.ProductNum,P.ProductName,P.ProductModel,P.ProductStandard,P.ProductType,P.Price_Original,P.Number_Wholesale1,P.Price_Wholesale1,P.Number_Wholesale2,P.Price_Wholesale2,P.Number_Wholesale3,P.Price_Wholesale3,P.Unit,P.Stars,P.Stocks,P.Discount,P.BeginDate,P.EndDate,P.UpdateTime from PE_Product P"
sql = sql & " left join PE_Class C on P.ClassID=C.ClassID "
Querysql = Querysql & " where P.Deleted=" & PE_False & " and P.EnableWholesale=" & PE_True
Select Case SearchType
Case 1
Querysql = Querysql & " and P.EnableSale=" & PE_True
Case 2
Querysql = Querysql & " and P.EnableSale=" & PE_False
Case 3
Querysql = Querysql & " and P.ProductType=1"
Case 4
Querysql = Querysql & " and P.ProductType=2"
Case 5
Querysql = Querysql & " and P.ProductType=3"
Case 6
Querysql = Querysql & " and P.ProductType=5"
Case 7
Querysql = Querysql & " and P.ProductType=4"
Case 8
Querysql = Querysql & " and P.SalePromotionType>0"
Case 9
Querysql = Querysql & " and P.Stocks<=AlarmNum"
Case 10
Querysql = Querysql & " and P.Stocks<=AlarmNum+OrderNum"
Case 11
Querysql = Querysql & " and P.Stocks<=0"
Case 12
Querysql = Querysql & " and P.OnTop=" & PE_True
Case 13
Querysql = Querysql & " and P.Hits>=" & HitsOfHot
Case 14
Querysql = Querysql & " and P.IsElite=" & PE_True
Case 15
Querysql = Querysql & " and P.EnableWholesale=" & PE_True
End Select
If ClassID > 0 Then
If Child > 0 Then
Querysql = Querysql & " and P.ClassID in (" & arrChildID & ")"
Else
Querysql = Querysql & " and P.ClassID=" & ClassID
End If
End If
If Keyword <> "" Then
Select Case strField
Case "ProductName"
Querysql = Querysql & " and P.ProductName like '%" & Keyword & "%' "
Case "ProductIntro"
Querysql = Querysql & " and P.ProductIntro like '%" & Keyword & "%' "
Case "ProductExplain"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -