admin_product.asp

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

ASP
1,083
字号
                    Response.Write "<b>√</b>"
                Else
                    Response.Write "<font color=red><b>×</b></font>"
                End If
                Response.Write "    </td>"
                If UseCreateHTML > 0 And ObjInstalled_FSO = True And ManageType <> "Special" Then
                    Response.Write "    <td width='40' align='center'>"
                    If ClassID = -1 Or (ClassID > 0 And Child = 0) Then
                        ProductPath = HtmlDir & GetItemPath(StructureType, ParentDir, ClassDir, rsProductList("UpdateTime")) & GetItemFileName(FileNameType, ChannelDir, rsProductList("UpdateTime"), rsProductList("ProductID")) & FileExt_Item
                    Else
                        ProductPath = HtmlDir & GetItemPath(StructureType, rsProductList("ParentDir"), rsProductList("ClassDir"), rsProductList("UpdateTime")) & GetItemFileName(FileNameType, ChannelDir, rsProductList("UpdateTime"), rsProductList("ProductID")) & FileExt_Item
                    End If
                    Response.Write "<a href='#' title='文件位置:" & ProductPath & "'>"
                    If fso.FileExists(Server.MapPath(ProductPath)) Then
                        Response.Write "<b>√</b>"
                    Else
                        Response.Write "<font color=red><b>×</b></font>"
                    End If
                    Response.Write "</a></td>"
                End If
                Select Case ManageType
                Case "HTML"
                    Response.Write "    <td width='180' align='left'>&nbsp;"
                    Response.Write "<a href='Admin_CreateProduct.asp?ChannelID=" & ChannelID & "&Action=CreateProduct&ProductID=" & rsProductList("ProductID") & "' title='生成本" & ChannelShortName & "的HTML页面'>生成文件</a>&nbsp;"
                    If fso.FileExists(Server.MapPath(ProductPath)) Then
                        Response.Write "<a href='" & ProductPath & "' target='_blank' title='查看本" & ChannelShortName & "的HTML页面'>查看文件</a>&nbsp;"
                        Response.Write "<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&Action=DelFile&ProductID=" & rsProductList("ProductID") & "' title='删除本" & ChannelShortName & "的HTML页面' onclick=""return confirm('确定要删除此" & ChannelShortName & "的HTML页面吗?');"">删除文件</a>&nbsp;"
                    End If
                    Response.Write "</td>"
                Case "Recyclebin"
                    Response.Write "<td width='100' align='center'>"
                    Response.Write "<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&Action=ConfirmDel&ProductID=" & rsProductList("ProductID") & "' onclick=""return confirm('确定要彻底删除此" & ChannelShortName & "吗?彻底删除后将无法还原!');"">彻底删除</a> "
                    Response.Write "<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&Action=Restore&ProductID=" & rsProductList("ProductID") & "'>还原</a>"
                    Response.Write "</td>"
                Case "Special"
                    Response.Write "<td width='100' align='center'>"
                    If rsProductList("SpecialID") > 0 Then
                        Response.Write "<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&Action=DelFromSpecial&InfoID=" & rsProductList("InfoID") & "' onclick=""return confirm('确定要将此" & ChannelShortName & "从其所属专题中删除吗?操作成功后此" & ChannelShortName & "将不属于任何专题。');"">从所属专题中删除</a> "
                    End If
                    Response.Write "</td>"
                Case Else
                    Response.Write "    <td width='60' align='center'>"
                    Response.Write "<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&Action=Modify&ProductID=" & rsProductList("ProductID") & "'>修改</a>&nbsp;"
                    Response.Write "<a href='Admin_Product.asp?ChannelID=" & ChannelID & "&Action=Del&ProductID=" & rsProductList("ProductID") & "' onclick=""return confirm('确定要删除此" & ChannelShortName & "吗(有订单的商品无法删除)?删除后你还可以从回收站中还原。');"">删除</a>&nbsp;"
                    Response.Write "</td>"
                End Select
            End If
            Response.Write "</tr>"

            ProductNum = ProductNum + 1
            If ProductNum >= MaxPerPage Then Exit Do
            rsProductList.MoveNext
        Loop
    End If
    rsProductList.Close
    Set rsProductList = Nothing
    Response.Write "</table>"
    Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='0'>"
    Response.Write "  <tr height='30'>"
    If ManageType <> "Price" Then
        Response.Write "    <td width='200'><input name='chkAll' type='checkbox' id='chkAll' onclick='CheckAll(this.form)' value='checkbox'>选中本页显示的所有" & ChannelShortName & "</td>"
    End If
    Response.Write "    <td align='left'>"
    Select Case ManageType
    Case "HTML"
        If AdminPurview = 1 Or AdminPurview_Channel <= 2 Or PurviewChecked = True Then
            Response.Write "<input name='CreateType' type='hidden' id='CreateType' value='1'>"
            Response.Write "<input name='ClassID' type='hidden' id='ClassID' value='" & ClassID & "'>"
            If ClassID > 0 Then
                If UseCreateHTML = 1 Or UseCreateHTML = 3 Then
                    Response.Write "<input name='submit1' type='submit' id='submit1' onClick=""document.myform.Action.value='CreateClass';document.myform.CreateType.value='1';document.myform.action='Admin_CreateProduct.asp';"" value='生成当前栏目列表页'>&nbsp;&nbsp;"
                End If
                Response.Write "<input name='submit1' type='submit' id='submit1' onClick=""document.myform.Action.value='CreateProduct';document.myform.CreateType.value='2';document.myform.action='Admin_CreateProduct.asp';"" value='生成当前栏目的" & ChannelShortName & "'>&nbsp;&nbsp;"
            Else
                Response.Write "<input name='submit1' type='submit' id='submit1' onClick=""document.myform.Action.value='CreateIndex';document.myform.CreateType.value='1';document.myform.action='Admin_CreateProduct.asp';"" value='生成首页'>&nbsp;&nbsp;"
                If UseCreateHTML = 1 Or UseCreateHTML = 3 Then
                    Response.Write "<input name='submit1' type='submit' id='submit1' onClick=""document.myform.Action.value='CreateClass';document.myform.CreateType.value='2';document.myform.action='Admin_CreateProduct.asp';"" value='生成所有栏目列表页'>&nbsp;&nbsp;"
                End If
                Response.Write "<input name='submit1' type='submit' id='submit1' onClick=""document.myform.Action.value='CreateProduct';document.myform.CreateType.value='3';document.myform.action='Admin_CreateProduct.asp';"" value='生成所有" & ChannelShortName & "'>&nbsp;&nbsp;"
            End If
            Response.Write "<input name='submit2' type='submit' id='submit2' onClick=""document.myform.Action.value='CreateProduct';document.myform.action='Admin_CreateProduct.asp';"" value='生成选定的" & ChannelShortName & "'>&nbsp;&nbsp;&nbsp;&nbsp;"
            Response.Write "<input name='Submit3' type='submit' id='submit3' onClick=""document.myform.Action.value='DelFile';document.myform.action='Admin_Product.asp'"" value='删除选定" & ChannelShortName & "的HTML文件'>"
        End If
    Case "Recyclebin"
        If AdminPurview = 1 Or AdminPurview_Channel <= 2 Then
            Response.Write "<input name='submit1' type='submit' id='submit1' onClick=""document.myform.Action.value='ConfirmDel'"" value=' 彻底删除 '>&nbsp;"
            Response.Write "<input name='Submit2' type='submit' id='Submit2' onClick=""document.myform.Action.value='ClearRecyclebin'"" value='清空回收站'>&nbsp;&nbsp;&nbsp;&nbsp;"
            Response.Write "<input name='Submit3' type='submit' id='Submit3' onClick=""document.myform.Action.value='Restore'"" value='还原选定的" & ChannelShortName & "'>&nbsp;"
            Response.Write "<input name='Submit4' type='submit' id='Submit4' onClick=""document.myform.Action.value='RestoreAll'"" value='还原所有" & ChannelShortName & "'>"
        End If
    Case "Special"
        If AdminPurview = 1 Or AdminPurview_Channel <= 2 Then
            Response.Write "<input name='submit1' type='submit' id='submit1' onClick=""document.myform.Action.value='DelFromSpecial'"" value='从所属专题中移除'> "
            Response.Write "<input name='Submit2' type='submit' id='Submit2' onClick=""document.myform.Action.value='AddToSpecial'"" value='添加到其他专题中'> "
            Response.Write "<input name='Submit2' type='submit' id='Submit2' onClick=""document.myform.Action.value='MoveToSpecial'"" value='移动到另一专题中'>"
        End If
    Case "Price"
        If AdminPurview = 1 Or AdminPurview_Channel <= 2 Then
            Response.Write "<input type='submit' name='Submit8' value='保存价格修改结果' onClick=""document.myform.Action.value='SavePrice'"">"
        End If
    Case Else
        If AdminPurview = 1 Or AdminPurview_Channel <= 2 Or PurviewChecked = True Then
            Response.Write "<input type='submit' name='submit1' value='开始销售' onClick=""document.myform.Action.value='StartSale'"">&nbsp;"
            Response.Write "<input type='submit' name='submit2' value='停止销售' onClick=""document.myform.Action.value='StopSale'"">&nbsp;"
            Response.Write "<input type='submit' name='submit3' value='设为热卖' onClick=""document.myform.Action.value='SetHot'"">&nbsp;"
            Response.Write "<input type='submit' name='submit4' value='取消热卖' onClick=""document.myform.Action.value='CancelHot'"">&nbsp;"
            Response.Write "<input type='submit' name='submit3' value='设为推荐' onClick=""document.myform.Action.value='SetElite'"">&nbsp;"
            Response.Write "<input type='submit' name='submit4' value='取消推荐' onClick=""document.myform.Action.value='CancelElite'""><br>"
            Response.Write "<input type='submit' name='submit5' value='批量删除' onClick=""document.myform.Action.value='Del'"">&nbsp;"
            If AdminPurview = 1 Or AdminPurview_Channel <= 2 Then
                Response.Write "<input type='submit' name='Submit6' value='批量设置' onClick=""document.myform.Action.value='Batch'"">&nbsp;"
                Response.Write "<input type='submit' name='Submit7' value='批量移动' onClick=""document.myform.Action.value='MoveToClass'"">&nbsp;"
                Response.Write "<input type='submit' name='Submit8' value='价格变动' onClick=""document.myform.Action.value='BatchPrice'"">&nbsp;"
            End If
        End If
    End Select
    Response.Write "<input name='Action' type='hidden' id='Action' value=''>"
    Response.Write "<input name='ChannelID' type='hidden' id='ChannelID' value='" & ChannelID & "'>"
    Response.Write "  </td></tr>"
    Response.Write "</table>"
    Response.Write "</td>"
    Response.Write "</form></tr></table>"
    If totalPut > 0 Then
        Response.Write ShowPage(strFileName, totalPut, MaxPerPage, CurrentPage, True, True, ChannelItemUnit & ChannelShortName & "", True)
    End If

    Response.Write "<br><b>" & ChannelShortName & "属性中的各项含义:</b><br>"
    Response.Write "<font color=blue>顶</font>----固顶" & ChannelShortName & ",<font color=red>热</font>----热门" & ChannelShortName & ",<font color=green>荐</font>----推荐" & ChannelShortName & ",<font color=blue>图</font>----有" & ChannelShortName & "缩略图,<font color=black>调</font>----有调查<br><br>"

End Sub

Sub ShowJS_Product()
    Response.Write "<script language = 'JavaScript'>" & vbCrLf
    Response.Write "function SelectProduct(){" & vbCrLf
    Response.Write "  var arr=showModalDialog('Admin_SelectFile.asp?ChannelID=" & ChannelID & "&dialogtype=productthumb', '', 'dialogWidth:820px; dialogHeight:600px; help: no; scroll: yes; status: no');" & vbCrLf
    Response.Write "  if(arr!=null){" & vbCrLf
    Response.Write "    var ss=arr.split('|');" & vbCrLf
    Response.Write "    document.myform.ProductThumb.value=ss[0];" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "function AddItem(strFileName){" & vbCrLf
    Response.Write "  var arrName=strFileName.split('.');" & vbCrLf
    Response.Write "  var FileExt=arrName[1];" & vbCrLf
    Response.Write "  if (FileExt=='gif'||FileExt=='jpg'||FileExt=='jpeg'||FileExt=='jpe'||FileExt=='bmp'||FileExt=='png'){" & vbCrLf
    Response.Write "  frmPreview.img.src='" & InstallDir & ChannelDir & "/" & UploadDir & "/" & "'+strFileName;" & vbCrLf
    Response.Write "  document.myform.ProductThumb.value=strFileName;}" & vbCrLf
    Response.Write "  document.myform.ProductThumbList.options[document.myform.ProductThumbList.length]=new Option(strFileName,strFileName);" & vbCrLf
    Response.Write "  document.myform.ProductThumbList.selectedIndex+=1;" & vbCrLf
    Response.Write "  if(document.myform.UploadFiles.value==''){" & vbCrLf
    Response.Write "    document.myform.UploadFiles.value=strFileName;" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "  else{" & vbCrLf
    Response.Write "    document.myform.UploadFiles.value=document.myform.UploadFiles.value+'|'+strFileName;" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "function selectPaginationType(){" & vbCrLf
    Response.Write "  return false;" & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "function CheckForm()" & vbCrLf
    Response.Write "{" & vbCrLf
    Response.Write "  var CurrentMode=editor.CurrentMode;" & vbCrLf
    Response.Write "  if (CurrentMode==0){" & vbCrLf
    Response.Write "    document.myform.ProductExplain.value=editor.HtmlEdit.document.body.innerHTML; " & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "  else if(CurrentMode==1){" & vbCrLf
    Response.Write "   document.myform.ProductExplain.value=editor.HtmlEdit.document.body.innerText;" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "  else{" & vbCrLf
    Response.Write "    alert('预览状态不能保存!请先回到编辑状态后再保存');" & vbCrLf
    Response.Write "    return false;" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "  var obj=document.myform.ClassID;" & vbCrLf
    Response.Write "  var iCount=0;" & vbCrLf
    Response.Write "  for(var i=0;i<obj.length;i++){" & vbCrLf
    Response.Write "    if(obj.options[i].selected==true){" & vbCrLf
    Response.Write "      iCount=iCount+1;" & vbCrLf
    Response.Write "      if(obj.options[i].value==''){" & vbCrLf
    Response.Write "        ShowTabs(0);" & vbCrLf
    Response.Write "        alert('" & ChannelShortName & "所属栏目不能指定为外部栏目!');" & vbCrLf
    Response.Write "        document.myform.ClassID.focus();" & vbCrLf
    Response.Write "        return false;" & vbCrLf
    Response.Write "      }" & vbCrLf
    Response.Write "      if(obj.options[i].selected==true&&obj.options[i].value=='0'){" & vbCrLf
    Response.Write "        ShowTabs(0);" & vbCrLf
    Response.Write "        alert('指定的栏目不允许添加" & ChannelShortName & "!只允许在其子栏目中添加" & ChannelShortName & "。');" & vbCrLf
    Response.Write "        document.myform.ClassID.focus();" & vbCrLf
    Response.Write "        return false;" & vbCrLf
    Response.Write "      }" & vbCrLf
    Response.Write "    }" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "  if (document.myform.ProductName.value==''){" & vbCrLf
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "    alert('" & ChannelShortName & "名称不能为空!');" & vbCrLf
    Response.Write "    document.myform.ProductName.focus();" & vbCrLf
    Response.Write "    return false;" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "  if (document.myform.Keyword.value==''){" & vbCrLf
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "    alert('关键字不能为空!');" & vbCrLf
    Response.Write "    document.myform.Keyword.focus();" & vbCrLf
    Response.Write "    return false;" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "  if (document.myform.Unit.value==''){" & vbCrLf
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "    alert('" & ChannelShortName & "单位不能为空!');" & vbCrLf
    Response.Write "    document.myform.Unit.focus();" & vbCrLf
    Response.Write "    return false;" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "  if (iCount==0){" & vbCrLf
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "    alert('请选择所属栏目!');" & vbCrLf
    Response.Write "    document.myform.ClassID.focus();" & vbCrLf
    Response.Write "    return false;" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "  if (document.myform.Price_Original.value==''){" & vbCrLf
    Response.Write "    ShowTabs(2);" & vbCrLf
    Response.Write "    alert('" & ChannelShortName & "原始零售价不能为空!');" & vbCrLf

⌨️ 快捷键说明

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