admin_product.asp
来自「本程序系统完全实现了医院网站程序的全部功能的前台和后台程序」· ASP 代码 · 共 1,083 行 · 第 1/5 页
ASP
1,083 行
Call Restore
Case "RestoreAll"
Call RestoreAll
Case "DelFile"
Call DelFile
Case "Batch"
Call Batch
Case "DoBatch"
Call DoBatch
Case "MoveToClass"
Call ShowForm_MoveToClass
Case "MoveToSpecial"
Call ShowForm_MoveToSpecial
Case "AddToSpecial"
Call ShowForm_AddToSpecial
Case "DoMoveToClass"
Call DoMoveToClass
Case "DoMoveToSpecial"
Call DoMoveToSpecial
Case "DoAddToSpecial"
Call DoAddToSpecial
Case "DelFromSpecial"
Call DelFromSpecial
Case "BatchPrice"
Call BatchPrice
Case "DoBatchPrice"
Call DoBatchPrice
Case "Manage", "Price"
Call main
Case "SavePrice"
Call SavePrice
Case Else
Call main
End Select
If FoundErr = True Then
Call WriteErrMsg(ErrMsg, ComeUrl)
End If
Response.Write "</body></html>"
Call CloseConn
Sub main()
If ManageType = "HTML" And UseCreateHTML = 0 Then
FoundErr = True
ErrMsg = ErrMsg & "<li>本频道设置了不生成HTML,所以不用进行生成管理!</li>"
Exit Sub
End If
Dim rsProductList, sql, Querysql
If ClassID = 0 Then
If strField = "" And AdminPurview = 2 And AdminPurview_Channel = 3 And ManageType <> "MyProduct" Then
If arrClass_Manage = "" Then
FoundErr = True
ErrMsg = ErrMsg & "<li>对不起,您没有在此频道管理" & ChannelShortName & "的权限!</li>"
Exit Sub
End If
Set tClass = Conn.Execute("select top 1 ClassID,ClassName,RootID,ParentID,Depth,ParentPath,Child,arrChildID,ParentDir,ClassDir from PE_Class where ChannelID=" & ChannelID & " and ClassID In (" & DelRightComma(arrClass_Manage) & ")")
If tClass.BOF And tClass.EOF Then
FoundErr = True
ErrMsg = ErrMsg & "<li>对不起,您没有在此频道的管理权限!</li>"
Else
ClassID = tClass(0)
ClassName = tClass(1)
RootID = tClass(2)
ParentID = tClass(3)
Depth = tClass(4)
ParentPath = tClass(5)
Child = tClass(6)
arrChildID = tClass(7)
PurviewChecked = True
ParentDir = tClass(8)
ClassDir = tClass(9)
End If
End If
ElseIf ClassID = -1 Then
If AdminPurview = 1 Or (AdminPurview = 2 And AdminPurview_Channel < 3) Then PurviewChecked = True
ElseIf ClassID > 0 Then
Set tClass = Conn.Execute("select ClassName,RootID,ParentID,Depth,ParentPath,Child,arrChildID,ParentDir,ClassDir 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)
ParentDir = tClass(7)
ClassDir = tClass(8)
End If
Set tClass = Nothing
End If
If FoundErr = True Then Exit Sub
If PurviewChecked = False Then
If ParentID > 0 Then
PurviewChecked = CheckPurview_Class(arrClass_Manage, ParentPath & "," & ClassID)
Else
PurviewChecked = CheckPurview_Class(arrClass_Manage, ClassID)
End If
End If
Call ShowJS_Manage(ChannelShortName)
Response.Write "<br><table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
If ManageType = "Special" Then
Response.Write "<tr class='title'>"
Response.Write " <td height='22'>" & GetSpecialList() & "</td></tr>" & vbCrLf
Else
Response.Write " <tr class='title'>"
Response.Write " <td height='22'>" & GetRootClass() & "</td>"
Response.Write " </tr>" & GetChild_Root() & ""
End If
Response.Write "</table><br>"
Select Case ManageType
Case "HTML"
Call ShowManagePath(ChannelShortName & "生成")
Case "Recyclebin"
Call ShowManagePath(ChannelShortName & "回收站管理")
Case "Special"
Call ShowManagePath("专题" & ChannelShortName & "管理")
Case "Price"
Call ShowManagePath("价格设置")
Case Else
Call ShowManagePath(ChannelShortName & "管理")
End Select
Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr>"
Response.Write " <form name='myform' method='Post' action='Admin_Product.asp' onsubmit='return ConfirmDel();'>"
Response.Write " <td><table class='border' border='0' cellspacing='1' width='100%' cellpadding='0'>"
Response.Write " <tr class='title' height='22'> "
If ManageType <> "Price" Then
Response.Write " <td height='22' width='30' align='center'><strong>选中</strong></td>"
End If
Response.Write " <td width='25' align='center'><strong>ID</strong></td>"
If ManageType = "Special" Then
Response.Write " <td width='120' align='center'><strong>所属专题</strong></td>"
End If
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>"
If ManageType = "Price" Then
Response.Write " <td width='60' align='center' ><strong>市场价</strong></td>"
Response.Write " <td width='60' align='center' ><strong>原始价</strong></td>"
Response.Write " <td width='60' align='center' ><strong>当前价</strong></td>"
Response.Write " <td width='60' align='center' ><strong>会员价</strong></td>"
Response.Write " <td width='60' align='center' ><strong>代理价</strong></td>"
Else
Response.Write " <td width='110' align='center' ><strong>价格</strong></td>"
Response.Write " <td width='60' align='center' ><strong>人气值</strong></td>"
Response.Write " <td width='80' align='center' ><strong>" & ChannelShortName & "属性</strong></td>"
Response.Write " <td width='40' align='center' ><strong>销售中</strong></td>"
If UseCreateHTML > 0 And ObjInstalled_FSO = True And ManageType <> "Special" Then
Response.Write " <td width='40' align='center' ><strong>已生成</strong></td>"
End If
Select Case ManageType
Case "HTML"
Response.Write " <td width='180' align='center' ><strong>生成HTML操作</strong></td>"
Case "Recyclebin"
Response.Write " <td width='100' align='center' ><strong>回收站操作</strong></td>"
Case "Special"
Response.Write " <td width='100' align='center' ><strong>专题管理操作</strong></td>"
Case Else
Response.Write " <td width='60' align='center' ><strong>操作</strong></td>"
End Select
End If
Response.Write " </tr>"
If ManageType = "Special" Then
sql = "select top " & MaxPerPage & " I.InfoID,I.SpecialID,P.ProductID,S.SpecialName,P.ProductKind,P.ProductNum,P.ProductName,P.ProductModel,P.ProductStandard,P.ProductThumb,P.Keyword,"
sql = sql & "P.ProductType,P.Price,P.Price_Original,P.Price_Market,P.Price_Member,P.Price_Agent,P.EnableWholesale,P.Unit,P.OnTop,P.IsHot,P.IsElite,P.Stars,P.EnableSale,P.Stocks,P.Discount,P.BeginDate,P.EndDate,P.UpdateTime,P.Hits,P.BuyTimes,P.VoteID"
sql = sql & " from PE_Product P right join (PE_InfoS I left join PE_Special S on I.SpecialID=S.SpecialID) on P.ProductID=I.ItemID "
Else
If ClassID = -1 Or (ClassID > 0 And Child = 0) Then
sql = sql & "select top " & MaxPerPage & " P.ClassID,P.ProductID,P.ProductKind,P.ProductNum,P.ProductName,P.ProductModel,P.ProductStandard,P.ProductThumb,P.Keyword,"
sql = sql & "P.ProductType,P.Price,P.Price_Original,P.Price_Market,P.Price_Member,P.Price_Agent,P.EnableWholesale,P.Unit,P.OnTop,P.IsHot,P.IsElite,P.Stars,P.EnableSale,P.Stocks,P.Discount,P.BeginDate,P.EndDate,P.UpdateTime,P.Hits,P.BuyTimes,P.VoteID"
sql = sql & " from PE_Product P "
Else
sql = sql & "select top " & MaxPerPage & " P.ClassID,P.ProductID,C.ClassName,C.ParentDir,C.ClassDir,P.ProductKind,P.ProductNum,P.ProductName,P.ProductModel,P.ProductStandard,P.ProductThumb,P.Keyword,"
sql = sql & "P.ProductType,P.Price,P.Price_Original,P.Price_Market,P.Price_Member,P.Price_Agent,P.EnableWholesale,P.Unit,P.OnTop,P.IsHot,P.IsElite,P.Stars,P.EnableSale,P.Stocks,P.Discount,P.BeginDate,P.EndDate,P.UpdateTime,P.Hits,P.BuyTimes,P.VoteID"
sql = sql & " from PE_Product P left join PE_Class C on P.ClassID=C.ClassID "
End If
End If
Querysql = " where P.ChannelID=" & ChannelID
If ManageType = "Special" Then
Querysql = Querysql & " and I.ModuleType=" & ModuleType
End If
If ManageType = "Recyclebin" Then
Querysql = Querysql & " and P.Deleted=" & PE_True & ""
Else
Querysql = Querysql & " and P.Deleted=" & PE_False & ""
End If
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"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?