?? projectmodify.asp
字號:
<%
option explicit
response.buffer=true
Dim Rs,Sql,action,ErrMsg,channelid,classid,classname,classinfo,FoundErr
Dim CurrentPage,Allpage,ProjectNum,iProject,ProjectID,ProjectCollectionTime,RsHistroy
Dim ProjectName,WebName,WebUrl,ListIndex,Url,Urlstr,ShowCode,ListCode
Dim ListStartString,ListEndString,ListType,ListPageStr,PageStart,PageEnd,PageOrder,strRemoteListUrl
Dim LinkStartStr,LinkEndStr,linkurl,NewsArray,Testi,ProjectName_Z,ListCode_z
Dim TitleStartStr,TitleEndStr,ContentStartStr,ContentEndStr,title,content
Dim UserName,Rank
Const PerPage=10
Action=Request.QueryString("Action")
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<html>
<head>
<title>通用文章采集系統(tǒng)</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/style.css">
<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>
<style type="text/css">
<!--
.STYLE1 {
color: #000000;
font-weight: bold;
}
.STYLE2 {color: #FF0000}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<th height="22" colspan="2" align="center">
<span class="STYLE1">采 集 項 目 管 理</span></th>
</tr>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td height="30" colspan="2">
說明:</td>
</tr>
<tr>
<td width="65" height="30">
<strong>管理導航:</strong></td>
<td height="30">
<a href="projectmanage.asp">管理首頁</a> | <a href="?action=Modify_Project">添加項目</a>:<%if action="Modify_Project" then %><span
class="STYLE2">基本設(shè)置</span><%else%>基本設(shè)置<%end if%>
>>
<%if action="Modify_Project1" then %>
<span class="STYLE2">列表設(shè)置</span><%else%>列表設(shè)置<%end if%>
>>
<%if action="Modify_Project2" then %>
<span class="STYLE2">鏈接設(shè)置</span><%else%>鏈接設(shè)置<%end if%>
>>
<%if action="Modify_Project3" then %>
<span class="STYLE2">標題/內(nèi)容設(shè)置</span><%else%>標題/內(nèi)容設(shè)置<%end if%>
>>
<%if action="Modify_Project4" then %>
<span class="STYLE2">采樣測試</span><%else%>采樣測試<%end if%>
>>
<%if action="Modify_Project5" then %>
<span class="STYLE2">屬性設(shè)置</span><%else%>屬性設(shè)置<%end if%>
>>
<%if action="Modify_Project6" then %>
<span class="STYLE2">完成</span><%else%>完成<%end if%>
>> <a href="javascript:history.back()">返回</a></td>
</tr>
</table>
<br>
<%if Action="Modify_Project" then
ProjectID=Trim(Request("ProjectID"))
If ProjectID="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>參數(shù)錯誤,項目ID不能為空!</li>"
Else
ProjectID=Clng(ProjectID)
End If
If FoundErr<>True Then
Sql ="select ProjectID,ProjectName,WebName,WebUrl,ChannelID,ClassID,ListIndex from Project where ProjectID=" & ProjectID
Set Rs=Server.CreateObject("adodb.recordset")
Rs.Open Sql,ConnHistroy,1,1
If Rs.Eof And Rs.Bof Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>參數(shù)錯誤,沒有找到該項目!</li>"
Else
ProjectName=Rs("ProjectName")
ListIndex=Rs("ListIndex")
WebName=Rs("WebName")
WebUrl=Rs("WebUrl")
ChannelID=Rs("ChannelID")
ClassID=Rs("ClassID")
End If
Rs.Close
Set Rs=Nothing
session("ProjectID")=ProjectID
End If
If FoundErr=True Then
Call WriteErrMsg(ErrMsg)
Response.end
End if
%>
<script language="javascript">
var onecount;
onecount=0;
subcat = new Array();
<%
set rs=server.createobject("adodb.recordset")
sql="select * from class"
rs.open sql,conn,1,1
dim i
i =0
do while not rs.eof and i<=rs.recordcount
%>
subcat[<%=i%>] = new Array("<%=rs("channelid")%>","<%=rs("classname")%>","<%=rs("classid")%>");
<%
i=i+1
rs.movenext
loop
%>
onecount=<%=rs.recordcount%>;
function changelocation(locationid)
{
document.form2.Class.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][0] == locationid)
{
document.form2.Class.options[document.form2.Class.length] = new Option(subcat[i][1], subcat[i][2]);
}
}
}
</script>
<center>
<form method="POST" action="?Action=Modify_Project1" name="form2">
<table border="0" cellpadding="0" cellspacing="0" width="97%" class="tableBorder">
<tr>
<td width="100%" height="30" valign="middle">
<font color="#FF0000">采集項目:基本設(shè)置</font>
</td>
</tr>
<tr>
<td width="100%" valign="top">
<table cellpadding="0" cellspacing="0" width="100%" id="table1" bgcolor="#ffffff">
<tr height="25">
<td width="30%" align="right">
<b>項目名稱:</b></td>
<td width="65%">
<input type="text" name="ProjectName" size="31" value="<%=ProjectName%>">
<font color="red">*</font>如:搜狐網(wǎng)-娛樂資訊
</td>
</tr>
<tr height="25">
<td width="30%" align="right">
<b>所屬欄目:</b></td>
<td width="65%">
<select name="Channel" onchange="changelocation(document.form2.Channel.options[document.form2.Channel.selectedIndex].value)"
size="1">
<option selected value="">未指定條件</option>
<%
set rs=conn.execute("select channelid,channelname from channel order by channelid asc")
do while not rs.eof
if rs("channelid")=channelid then
%>
<option value='<%=rs("channelid")%>' selected>
<%=rs("channelname")%>
</option>
<%
else
%>
<option value='<%=rs("channelid")%>'>
<%=rs("channelname")%>
</option>
<%
end if
rs.movenext
loop
rs.close
%>
</select>
<select name="Class">
<%
set rs=conn.execute("select classid,classname from class where channelid="&channelid)
do while not rs.eof
if rs("classid")=classid then
%>
<option selected value="<%=rs("classid")%>">
<%=rs("classname")%>
</option>
<%
else
%>
<option value="<%=rs("classid")%>">
<%=rs("classname")%>
</option>
<%
end if
rs.movenext
loop
rs.close
%>
</select>
<font color="red">*</font></td>
</tr>
<tr height="25">
<td width="30%" align="right">
<b>被采集網(wǎng)站名稱:</b></td>
<td width="65%">
<input type="text" name="WebName" size="21" value="<%=WebName%>">
<font color="red">*</font></td>
</tr>
<tr height="25">
<td width="30%" align="right">
<b>被采集網(wǎng)站地址:</b></td>
<td width="65%">
<input type="text" name="WebUrl" size="41" value="<%=WebUrl%>">
<font color="red">*</font></td>
</tr>
<tr height="25">
<td width="30%" align="right">
<b>列表索引頁面:</b></td>
<td width="65%">
<input type="text" name="ListIndex" size="61" value="<%=ListIndex%>">
<font color="red">*</font><br />
(可以看到所有新聞列表的頁面,如<a href="http://www.trfsoft.com/Knowledge.aspx" target="_blank">http://www.trfsoft.com/Knowledge.aspx</a>)
</td>
</tr>
<tr height="25">
<td width="30%" align="right">
<b>是否顯示源碼:</b></td>
<td width="65%">
<input type="radio" name="ShowCode" value="yes">顯示
<input type="radio" name="ShowCode" value="no" checked>
不顯示</td>
</tr>
<tr height="25">
<td width="30%" align="right">
</td>
<td width="65%">
<input type="submit" value="下一步" name="B2"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</center>
<%end if%>
<%
if Action="Modify_Project1" then
ProjectName=Trim(Request.Form("ProjectName"))
session("ProjectName")=ProjectName
ChannelID=Trim(Request.Form("Channel"))
ClassID=Trim(Request.Form("Class"))
WebName=Trim(Request.Form("WebName"))
WebUrl=Trim(Request.Form("WebUrl"))
ListIndex=Trim(Request.Form("ListIndex"))
If ListIndex<>"" then
Url=split(ListIndex,"/")
Urlstr=""
For i=0 To Ubound(Url)-1
Urlstr=Urlstr&Url(i)&"/"
Next
session("Urlstr")=Urlstr
weburl=Url(0)&"//"&Url(2)
session("weburl")=weburl
end if
ShowCode=Trim(Request.Form("ShowCode"))
If ProjectName="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>項目名稱不能為空</li>"
End If
If ChannelID="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>所屬頻道不能為空</li>"
End If
If ClassID="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>所屬欄目不能為空</li>"
End If
If WebName="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>被采集網(wǎng)站名稱不能為空</li>"
End If
If WebUrl="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>被采集網(wǎng)站地址名稱不能為空</li>"
End If
If ListIndex="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>列表索引頁面不能為空</li>"
End If
If FoundErr=True then
Call WriteErrMsg(ErrMsg)
Response.end
Else
ListCode=GetHttpPage(ListIndex)
If ListCode="$False$" Then
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -