admin_product.asp

来自「本程序系统完全实现了医院网站程序的全部功能的前台和后台程序」· ASP 代码 · 共 1,083 行 · 第 1/5 页

ASP
1,083
字号
<!--#include file="Admin_Common.asp"-->
<!--#include file="Admin_CommonCode_Content.asp"-->
<!--#include file="../Include/PowerEasy.Common.Content.asp"-->
<!--#include file="../Include/PowerEasy.FSO.asp"-->
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005-2008 佛山市动易网络科技有限公司 版权所有
'**************************************************************

Const NeedCheckComeUrl = True   '是否需要检查外部访问

Const PurviewLevel = 2      '0--不检查,1--超级管理员,2--普通管理员
Const PurviewLevel_Channel = 0   '0--不检查,1--频道管理员,2--栏目总编,3--栏目管理员
Const PurviewLevel_Others = ""   '其他权限

Dim HtmlDir, PurviewChecked
Dim ManageType, ProductKind, arrProductKind, Status, MyStatus, arrStatus
Dim ClassID, SpecialID, ProductID, EnableSale

Dim tClass, ClassName, RootID, ParentID, Depth, ParentPath, Child, arrChildID, ChildID, ParentDir, ClassDir
Dim VoteID

ChannelID = 1000
Call GetChannel(ChannelID)
'检查管理员操作权限
If AdminPurview > 1 Then
    AdminPurview_Channel = PE_CLng(rsGetAdmin("AdminPurview_" & ChannelDir))
    If AdminPurview_Channel = 0 Then AdminPurview_Channel = 5
    
    If AdminPurview_Channel <= PurviewLevel_Channel Then
        PurviewPassed = True
    End If
    If PurviewPassed = False Then
        Response.Write "<br><p align='center'><font color='red' style='font-size:9pt'>对不起,你没有此项操作的权限。</font></p>"
        Call WriteEntry(6, AdminName, "越权操作")
        Response.End
    End If
End If

ModuleType = 5

HtmlDir = InstallDir & ChannelDir

ManageType = Trim(Request("ManageType"))
ProductKind = Trim(Request("ProductKind"))
ClassID = PE_CLng(Trim(Request("ClassID")))
SpecialID = PE_CLng(Trim(Request("SpecialID")))
ProductID = Trim(Request("ProductID"))
SearchType = PE_CLng(Trim(Request("SearchType")))

If Action = "" Then
    Action = "Manage"
End If

If ProductKind = "" Then
    ProductKind = 1
Else
    ProductKind = PE_CLng(ProductKind)
End If
If IsValidID(ProductID) = False Then
    ProductID = ""
End If

FileName = "Admin_Product.asp?Action=" & Action & "&ManageType=" & ManageType & "&ChannelID=1000"
strFileName = FileName & "&SearchType=" & SearchType & "&ClassID=" & ClassID & "&SpecialID=" & SpecialID & "&Field=" & strField & "&keyword=" & Keyword
arrProductKind = Array("", "实物", "软件", "点卡", "服务")

Response.Write "<html><head><title>" & ChannelShortName & "管理</title>" & vbCrLf
Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbCrLf
Response.Write "<link href='Admin_Style.css' rel='stylesheet' type='text/css'>" & vbCrLf
If Action = "Add" Or Action = "Modify" Then
    Response.Write "<script src=""../JS/prototype.js""></script>" & vbCrLf
    Response.Write "<script src=""../JS/checklogin.js""></script>" & vbCrLf
End If
Response.Write "</head>" & vbCrLf
Response.Write "<body leftmargin='2' topmargin='0' marginwidth='0' marginheight='0'>" & vbCrLf
Response.Write "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
Dim strTitle
strTitle = ChannelName & "管理----"
Select Case Action
Case "Add"
    strTitle = strTitle & "添加" & ChannelShortName
Case "Modify"
    strTitle = strTitle & "修改" & ChannelShortName
Case "SaveAdd", "SaveModify"
    strTitle = strTitle & "保存" & ChannelShortName
Case "Move"
    strTitle = strTitle & "移动" & ChannelShortName
Case "Show"
    strTitle = strTitle & "查看" & ChannelShortName
Case "Batch", "DoBatch"
    strTitle = strTitle & "批量修改" & ChannelShortName & "属性"
Case "Manage"
    If ManageType = "HTML" Then
        strTitle = strTitle & ChannelShortName & "生成"
    ElseIf ManageType = "Recyclebin" Then
        strTitle = strTitle & ChannelShortName & "回收站管理"
    ElseIf ManageType = "Special" Then
        strTitle = strTitle & "专题" & ChannelShortName & "管理"
    Else
        strTitle = strTitle & ChannelShortName & "管理首页"
    End If
End Select
Call ShowPageTitle(strTitle, 10151)
Response.Write "  <tr class='tdbg'>"
Response.Write "    <td width='70' height='30' ><strong>管理导航:</strong></td><td colspan='9'>"
Response.Write "<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&EnableSale=All'>" & ChannelShortName & "管理首页</a>&nbsp;|&nbsp;"
Response.Write "<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&Action=Add&ProductKind=1&ClassID=" & ClassID & "&SpecialID=" & SpecialID & "'>添加" & ChannelShortName & "(实物)</a>&nbsp;|&nbsp;"
Response.Write "<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&Action=Add&ProductKind=2&ClassID=" & ClassID & "&SpecialID=" & SpecialID & "'>添加" & ChannelShortName & "(软件)</a>&nbsp;|&nbsp;"
Response.Write "<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&Action=Add&ProductKind=3&ClassID=" & ClassID & "&SpecialID=" & SpecialID & "'>添加" & ChannelShortName & "(点卡)</a>&nbsp;|&nbsp;"
If AdminPurview = 1 Or AdminPurview_Channel <= 2 Then
Response.Write "<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&ManageType=Special'>专题" & ChannelShortName & "管理</a>&nbsp;|&nbsp;"
End If
If AdminPurview = 1 Or AdminPurview_Channel = 1 Then
Response.Write "<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&ManageType=Recyclebin&EnableSale=All'>" & ChannelShortName & "回收站管理</a>"
End If
If UseCreateHTML > 0 And ObjInstalled_FSO = True Then
    Response.Write "&nbsp;|&nbsp;<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&ManageType=HTML&EnableSale=True'><b>生成HTML管理</b></a>"
End If
Response.Write "</td></tr>" & vbCrLf
If Action = "Manage" Then
    Response.Write "  <tr class='tdbg'>"
    Response.Write "<form name='form3' method='Post' action='" & FileName & "'>"
    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='1'"
    If SearchType = 1 Then Response.Write " selected"
    Response.Write ">正在销售的" & ChannelShortName & "</option>"
    Response.Write "          <option value='2'"
    If SearchType = 2 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 ">涨价" & ChannelShortName & " </option>"
    Response.Write "          <option value='5'"
    If SearchType = 5 Then Response.Write " selected"
    Response.Write ">特价处理" & ChannelShortName & "</option>"
    Response.Write "          <option value='6'"
    If SearchType = 6 Then Response.Write " selected"
    Response.Write ">降价促销" & ChannelShortName & "</option>"
    Response.Write "          <option value='7'"
    If SearchType = 7 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='9'"
    If SearchType = 9 Then Response.Write " selected"
    Response.Write ">实际库存报警的" & ChannelShortName & "</option>"
    Response.Write "          <option value='10'"
    If SearchType = 10 Then Response.Write " selected"
    Response.Write ">预订库存报警的" & ChannelShortName & "</option>"
    Response.Write "          <option value='11'"
    If SearchType = 11 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 "          <option value='15'"
    If SearchType = 15 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='" & FileName & "'>"
    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 "<option value='ID'>" & ChannelShortName & "ID</option>"
    Response.Write "</select>"
    Response.Write "<select name='ClassID'><option value=''>所有栏目</option>" & 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 "<input name='ManageType' type='hidden' id='ManageType' value='" & ManageType & "'>"
    Response.Write "<input name='ChannelID' type='hidden' id='ChannelID' value='" & ChannelID & "'>"
    Response.Write "</td></form>"
    Response.Write "</tr>"
End If
Response.Write "</table>" & vbCrLf

Select Case Action
Case "Add"
    Call Add
Case "Modify"
    Call Modify
Case "SaveAdd", "SaveModify"
    Call SaveProduct
Case "SetOnTop", "CancelOnTop", "SetElite", "CancelElite", "SetHot", "CancelHot", "StartSale", "StopSale"
    Call SetProperty
Case "Show"
    Call Show
Case "Del"
    Call Del
Case "ConfirmDel"
    Call ConfirmDel
Case "ClearRecyclebin"
    Call ClearRecyclebin
Case "Restore"

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?