⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_itemdatabase.asp

📁 全球商务网站系统介绍 GLOBALEC.COM.CN[生成HTML版] 系统概述: 软件名称:全球商务网站系统 当前版本:V1.0 最新版本:V1.1 运行环境:WINNT+(IIS)
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<%
dim Action,Rs,Sql,RsItem,SqlItem,ItemID,ItemName,ClassID,SpecialID,Flag,FoundErr,ErrMsg
Dim ObjInstalled,tClass,tSpecial
ObjInstalled=IsObjInstalled("Scripting.FileSystemObject")
Action=trim(request("Action"))
%>      
<html>
<head>
<title>数据采集系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/Admin_Style.css">
<style type="text/css">
.ButtonList {
	BORDER-RIGHT: #000000 2px solid; BORDER-TOP: #ffffff 2px solid; BORDER-LEFT: #ffffff 2px solid; CURSOR: default; BORDER-BOTTOM: #999999 2px solid; BACKGROUND-COLOR: #e6e6e6
}
</style>
<SCRIPT language=javascript>
    function unselectall(thisform){
        if(thisform.chkAll.checked){
            thisform.chkAll.checked = thisform.chkAll.checked&0;
        }   
    }
    function CheckAll(thisform){
        for (var i=0;i<thisform.elements.length;i++){
            var e = thisform.elements[i];
            if (e.Name !="chkAll"&&e.disabled!=true)
                e.checked = thisform.chkAll.checked;
        }
    }
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr class='topbg'> 
    <td height="22" colspan="2" align="center" ><strong>采 集 系 统 数 据 库 管 理</strong></td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr class="tdbg"> 
    <td width="65" height="30"><strong>管理导航:</strong></td>
    <td height="30"><a href="Admin_ItemDatabase.asp?Action=LeadOut">项目导出</a> | <a href="Admin_ItemDatabase.asp?Action=LeadIn">项目导入</a></td>
  </tr>
</table>
<% 
if Action="LeadOut" or Action="LeadOutData" then 
	call ShowLeadOut()
elseif  Action="LeadIn" or Action="ShowLeadInData" or Action="LeadInData"  Then
    call  ShowLeadIn()
End  If
call closeconn()
call closeconnitem()
%>
<!--#include file="Admin_ItemFoot.asp"-->
</body>
</html>

<%Sub  ShowLeadOut
If  Action="LeadOut"  Then
%>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr>
     <td colspan="2" align="center" class="title" height=22><b>项目导出</b></td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<form method="post" name="myform" action="Admin_ItemDatabase.asp?Action=LeadOutData">
   <tr class="tdbg">         
      <td width="5%" height="22" align="center" class=ButtonList>选择</td>                 
      <td width="10%" align="center" class=ButtonList>项目名称</td>
      <td width="10%" align="center" class=ButtonList>所属频道</td> 
      <td width="10%" align="center" class=ButtonList>所属栏目</td> 
      <td width="5%" align="center" class=ButtonList>状态</td>      
   </tr>         
<%
   Set RsItem=server.createobject("adodb.recordset")         
   SqlItem="select ItemID,ItemName,ChannelID,ClassID,SpecialID,Flag from Item order by ItemID ASC"         
   RsItem.open SqlItem,ConnItem,1,1
   If (Not RsItem.Eof)  And (Not RsItem.Bof) then
%>
   <%
      Do While Not RsItem.Eof
   %>
   <tr class="tdbg">         
      <td width="5%" height="22" align="center"><input type="checkbox" value=<%=RsItem("ItemID")%> name="ItemID" onclick="unselectall(this.form)" style="border: 0px;background-color: #E1F4EE;"></td>                 
      <td width="10%" align="left"><%=RsItem("ItemName")%></td>
      <td width="10%" height="22" align="center"><%
if RsItem("ChannelID")=1 then
response.write"商业资讯"
elseif RsItem("ChannelID")=2 then
response.write"展会资讯"
else
response.write"未知"
end if
%></td> 
      <td width="10%" align="center">
<%
if RsItem("ChannelID")=1 then
set rs=conn.execute("select typeid,type from newstype where typeid="&RsItem("ClassID")&"")
response.write"商业资讯 >> "&rs("type")&""
elseif RsItem("ChannelID")=2 then
set rs=conn.execute("select id,type from expoinfotype where id="&RsItem("ClassID")&"")
response.write"展会资讯 >> "&rs("type")&""
else
response.write"未知"
end if
%>
</td>   
      <td width="5%" align="center">
      <%
         If RsItem("Flag")=True Then
            Response.write "√"
         Else
            Response.write "<font color=red>×</font>"
         End If
      %>
      </td>      
   </tr>   
      <%
         RsItem.MoveNext
      Loop
      %>
   <tr class="tdbg">
      <td colspan=7 height="52" align="center">
      <input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox" >全选&nbsp;&nbsp;&nbsp;&nbsp;
      导出到数据库:<input type="text" name="LeadOutMdb" size="30" value="Database/LeadOut.mdb">
      <input type="submit" name="submit" value="导出" style="cursor: hand;background-color: #cccccc;">
      </td>
   </tr>
<%
   Else
%>
      <tr class="tdbg">
        <td colspan='9' class="tdbg" align="center"><br>系统中暂无采集项目!</td>
      </tr>
<%
      End If
   RsItem.Close
   Set RsItem=Nothing
%>
</form>
</table>
<%
Else
   Call LeadOutData()
End If
%>
<%End  Sub%>

<%Sub  ShowLeadIn
If  Action="LeadIn" Then
%>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr>
	<td colspan="2" align="center" class="title" height=22><b>项目导入</b></td>
	</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<form method="post" action="Admin_ItemDatabase.asp?Action=ShowLeadInData">
   <tr class="tdbg">
      <td align="center" valign="middle" height="100">
        <br>
	数据库位置:
	<input name="LeadInMdb" type="text" id="LeadInMdb" size="23" value="Databackup/LeadIn.mdb">
      </td>
   </tr>
   <tr class="tdbg">
      <td align="center">
        <input name="submit" type=submit value=" 下&nbsp;一&nbsp;步 " style="cursor: hand;background-color: #cccccc;">
      </td>
   </tr>
</form>
</table>
<%
ElseIf Action="ShowLeadInData" Then
   Call ShowLeadInData()
Else
   Call LeadInData()
End if
End  Sub
Sub LeadOutData
   Dim fso,ItemMdb,ItemMdbPath,LeadOutMdb,RsF,SqlF,RsLead,SqlLead,ItemIDTemp
   LeadOutMdb=trim(request.form("LeadOutMdb"))
   ItemID=trim(request.form("ItemID"))
   ItemMdb=DbItem
   ItemMdbPath=Left(DbItem,Instrrev(DbItem,"/")-1)
   If Instr(ItemMdb,"/")>0 Then
      ItemMdbPath=Left(ItemMdb,InstrRev(ItemMdb,"/"))
   End If
   If LeadOutMdb="" then
      FoundErr=True
      ErrMsg="<br><li>数据库地址不能为空!</li>"
   End If
   If ItemID="" Then
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>请选择要导出的项目</li>"
   Else
      ItemID=Replace(ItemID," ","")
   End If
   If FoundErr<>True And ObjInstalled<>False Then
      Set fso = Server.CreateObject("Scripting.FileSystemObject")
      If fso.FileExists(Server.MapPath(LeadOutMdb)) Then
      Else
         '不存在则创建
         If fso.FileExists(Server.MapPath(ItemMdbPath & "ItemTemp.mdb")) Then
            fso.CopyFile Server.MapPath(ItemMdbPath & "ItemTemp.mdb"),Server.MapPath(LeadOutMdb)
         Else
            FoundErr=True
            ErrMsg=ErrMsg& "<br>用于导出项目的数据库:ItemTemp.mdb不存在!"
         End If
      End If
      set fso=nothing
   End If

   If FoundErr<>True Then
      dim connstrLead,connLead
      Set connLead = Server.CreateObject("ADODB.Connection")
      connstrLead="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(LeadOutMdb)
      connLead.Open connstrLead
      If Err Then
         err.Clear
         FoundErr=True
	 ErrMsg=ErrMsg & "<br>数据库连接出错,请确认数据库是否存在。"
      End If

      If FoundErr<>True Then
         ConnLead.execute("Delete From Item")
         ConnLead.execute("Delete From Filters")
         Set RsItem=server.createobject("adodb.recordset")         
         SqlItem="select * from Item where ItemID in(" & ItemID & ") order by ItemID DESC"         
         RsItem.open SqlItem,ConnItem,1,1
         If Not RsItem.Eof then
            Do while Not RsItem.Eof
               '打开数据库
               Set RsLead=server.createobject("adodb.recordset")         
               SqlLead="select * from Item"         
               RsLead.open SqlLead,ConnLead,1,3
               RsLead.AddNew
               RsLead("ItemName")=RsItem("ItemName")
               RsLead("ChannelID")=RsItem("ChannelID")
               RsLead("ChannelDir")=RsItem("ChannelDir")
               RsLead("ClassID")=RsItem("ClassID")
               RsLead("SpecialID")=RsItem("SpecialID")
               RsLead("WebName")=RsItem("WebName")
               RsLead("WebUrl")=RsItem("WebUrl")
               RsLead("ItemDemo")=RsItem("ItemDemo")
               RsLead("LoginType")=RsItem("LoginType")
               RsLead("LoginUrl")=RsItem("LoginUrl")
               RsLead("LoginPostUrl")=RsItem("LoginPostUrl")
               RsLead("LoginUser")=RsItem("LoginUser")
               RsLead("LoginPass")=RsItem("LoginPass")
               RsLead("LoginFalse")=RsItem("LoginFalse")
               RsLead("ListStr")=RsItem("ListStr")
               RsLead("LsString")=RsItem("LsString")
               RsLead("LoString")=RsItem("LoString")
               RsLead("ListPaingType")=RsItem("ListPaingType")
               RsLead("LPsString")=RsItem("LPsString")
               RsLead("LPoString")=RsItem("LPoString")
               RsLead("ListPaingStr1")=RsItem("ListPaingStr1")
               RsLead("ListPaingStr2")=RsItem("ListPaingStr2")
               RsLead("ListPaingID1")=RsItem("ListPaingID1")
               RsLead("ListPaingID2")=RsItem("ListPaingID2")
               RsLead("ListPaingStr3")=RsItem("ListPaingStr3")
               RsLead("HsString")=RsItem("HsString")
               RsLead("HoString")=RsItem("HoString")
               RsLead("HttpUrlType")=RsItem("HttpUrlType")
               RsLead("HttpUrlStr")=RsItem("HttpUrlStr")
               RsLead("TsString")=RsItem("TsString")
               RsLead("ToString")=RsItem("ToString")
               RsLead("CsString")=RsItem("CsString")
               RsLead("CoString")=RsItem("CoString")
               RsLead("DateType")=RsItem("DateType")
               RsLead("DsString")=RsItem("DsString")
               RsLead("DoString")=RsItem("DoString")
               RsLead("AuthorType")=RsItem("AuthorType")
               RsLead("AsString")=RsItem("AsString")
               RsLead("AoString")=RsItem("AoString")
               RsLead("AuthorStr")=RsItem("AuthorStr")
               RsLead("CopyFromType")=RsItem("CopyFromType")
               RsLead("FsString")=RsItem("FsString")
               RsLead("FoString")=RsItem("FoString")
               RsLead("CopyFromStr")=RsItem("CopyFromStr")
               RsLead("KeyType")=RsItem("KeyType")
               RsLead("KsString")=RsItem("KsString")
               RsLead("KoString")=RsItem("KoString")
               RsLead("KeyStr")=RsItem("KeyStr")
               RsLead("NewsPaingType")=RsItem("NewsPaingType")
               RsLead("NPsString")=RsItem("NPsString")
               RsLead("NPoString")=RsItem("NPoString")
               RsLead("NewsPaingStr")=RsItem("NewsPaingStr")
               RsLead("NewsPaingHtml")=RsItem("NewsPaingHtml")
               RsLead("PaginationType")=RsItem("PaginationType")
               RsLead("MaxCharPerPage")=RsItem("MaxCharPerPage")
               RsLead("ReadLevel")=RsItem("ReadLevel")
               RsLead("Stars")=RsItem("Stars")
               RsLead("ReadPoint")=RsItem("ReadPoint")
               RsLead("Hits")=RsItem("Hits")
               RsLead("UpDateType")=RsItem("UpDateType")
               RsLead("UpDateTime")=RsItem("UpDateTime")
               RsLead("IncludePicYn")=RsItem("IncludePicYn")
               RsLead("DefaultPicYn")=RsItem("DefaultPicYn")
               RsLead("OnTop")=RsItem("OnTop")
               RsLead("Elite")=RsItem("Elite")
               RsLead("Hot")=RsItem("Hot")
               RsLead("SkinID")=RsItem("SkinID")
               RsLead("TemplateID")=RsItem("TemplateID")
               RsLead("Script_Iframe")=RsItem("Script_Iframe")
               RsLead("Script_Object")=RsItem("Script_Object")
               RsLead("Script_Script")=RsItem("Script_Script")
               RsLead("Script_Div")=RsItem("Script_Div")
               RsLead("Script_Class")=RsItem("Script_Class")
               RsLead("Script_Span")=RsItem("Script_Span")
               RsLead("Script_Img")=RsItem("Script_Img")
               RsLead("Script_Font")=RsItem("Script_Font")
               RsLead("Script_A")=RsItem("Script_A")
               RsLead("Script_Html")=RsItem("Script_Html")
               RsLead("CollecListNum")=RsItem("CollecListNum")
               RsLead("CollecNewsNum")=RsItem("CollecNewsNum")
               RsLead("Passed")=RsItem("Passed")
               RsLead("SaveFiles")=RsItem("SaveFiles")
               RsLead("CollecOrder")=RsItem("CollecOrder")
               RsLead("LinkUrlYn")=RsItem("LinkUrlYn")
               RsLead("InputerType")=RsItem("InputerType")
               RsLead("Inputer")=RsItem("Inputer")
               RsLead("EditorType")=RsItem("EditorType")
               RsLead("Editor")=RsItem("Editor")
               RsLead("ShowCommentLink")=RsItem("ShowCommentLink")
               RsLead("Script_Table")=RsItem("Script_Table")
               RsLead("Script_Tr")=RsItem("Script_Tr")

⌨️ 快捷键说明

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