📄 user_space_code.asp
字号:
End If
Response.Write "<br><table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td><img src='images/help.gif'>聚合空间,是本站为您提供的一个集RSS在线阅读器,文章、软件、图片信息汇总,个人日志、图片等信息管理的综合显示功能、您可以通过"
If usespacepass = True Then
Response.Write "<a href='User_Space.asp?Action=Add'>增减栏目</a>"
Else
Response.Write "增减栏目"
End If
Response.Write "来调整您的个人空间使用的模块。</td></table>"
End Sub
Sub Add()
If PE_CLng(UserSetting(25)) = 1 Then
Dim rsBlog, rsBlogClass
Set rsBlog = Conn.Execute("select top 1 ID,Passed from PE_Space Where Type=1 and UserID=" & UserID)
If Not (rsBlog.BOF And rsBlog.EOF) Then
If rsBlog("Passed") = True Then
Response.Write "<form method='post' action='User_Space.asp' name='myform' onsubmit='javascript:return CheckInput();'>"
Response.Write " <table width='600' border='0' align='center' cellpadding='2' cellspacing='1' class='border' >"
Response.Write " <tr class='title'> "
Response.Write " <td height='22' colspan='2'> <div align='center'><strong>增 加 聚 合 空 间 栏 目</strong></div></td>"
Response.Write " </tr>"
If Action = "AddRss" Then
Dim XmlRss, RssDOM, oItem, tetitle, teurl
teurl = Trim(Request("url"))
If teurl <> "" Then
On Error Resume Next
Set XmlRss = Server.CreateObject("MSXML2.ServerXMLHTTP")
XmlRss.SetTimeouts 5000, 5000, 120000, 60000
XmlRss.Open "GET", teurl, False
XmlRss.Send
If Err.Number <> 0 Then
Err.Clear
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>来源状态:</strong><font color='#FF0000'>来源地址不存在或无法连接!</font></td></tr>"
Else
If XmlRss.Readystate <> 4 Or Trim(XmlRss.responseText & "") = "" Then
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>来源状态:</strong><font color='#FF0000'>来源地址不存在或无法连接!</font></td></tr>"
Else
Set RssDOM = Server.CreateObject("microsoft.XMLDOM")
RssDOM.async = False
RssDOM.Load (XmlRss.responseXML)
If RssDOM.Readystate = 4 Then
Dim RSSVersion, rootNode
Set rootNode = RssDOM.documentElement
Select Case rootNode.NodeName
Case "rss"
RSSVersion = "RSS" & rootNode.getAttribute("version")
If rootNode.getAttribute("version") = "2.0" Then
Set oItem = RssDOM.getElementsByTagName("channel")
tetitle = oItem(0).selectSingleNode("title").text
End If
Case "rdf:RDF"
RSSVersion = "RSS1.0"
Set oItem = RssDOM.getElementsByTagName("channel")
tetitle = oItem(0).selectSingleNode("title").text
Case "feed"
RSSVersion = "ATOM"
Set oItem = RssDOM.getElementsByTagName("feed")
tetitle = oItem(0).selectSingleNode("title").text
End Select
Else
Response.Write "<tr class='tdbg'><td colspan='2'> <strong>来源状态:</strong><font color='#FF0000'>这个地址不是有效的RSS数据源!</font></td></tr>"
End If
Set RssDOM = Nothing
End If
End If
Set XmlRss = Nothing
End If
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>栏目类型:</strong><select name='addtype' onChange=""changemode()""><option value=2 Selected>外部RSS数据</option><option value=3>我的日志</option><option value=4>我的音乐</option><option value=5>我的图书</option><option value=6>我的图片</option><option value=7>我的连接</option></select> <font color='#FF0000'>* 本栏目使用的空间模块 <a href='space_detal.html' target='_blank'>[查看详细说明]</a></font></td></tr>"
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>栏目名称:</strong><input name='BlogName' type='text' size='45' maxlength='40' value='" & tetitle & "'> <font color='#FF0000'>*"
If RSSVersion <> "" Then Response.Write "您添加了一个“" & RSSVersion & "”格式的数据源"
Response.Write "</font></td></tr>"
Response.Write "<tbody id='url' style='display:'>"
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>来源地址:</strong><input name='LinkUrl' type='text' size='45' maxlength='100' value='" & teurl & "'> <font color='#FF0000'>* 支持RSS1.0 RSS2.0 ATOM格式</font></td></tr></tbody>"
Else
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>栏目类型:</strong><select name='addtype' onChange=""changemode()""><option value=2>外部RSS数据</option><option value=3>我的日志</option><option value=4>我的音乐</option><option value=5>我的图书</option><option value=6>我的图片</option><option value=7>我的连接</option></select> <font color='#FF0000'>* 本栏目使用的空间模块 <a href='space_detal.html' target='_blank'>[查看详细说明]</a></font></td></tr>"
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>栏目名称:</strong><input name='BlogName' type='text' size='45' maxlength='40'> <font color='#FF0000'>*</font></td></tr>"
Response.Write "<tbody id='url' style='display:'>"
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>来源地址:</strong><input name='LinkUrl' type='text' size='45' maxlength='100' value='http://'> <font color='#FF0000'>* 支持RSS1.0 RSS2.0 ATOM格式</font></td></tr></tbody>"
End If
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>显示条数:</strong><input name='ListNum' type='text' size='5' maxlength='3' value='10'> <font color='#FF0000'>* 首页与分页显示数量</font></td></tr>"
Response.Write " <tr class='tdbg'> "
Response.Write " <td colspan='2'> <strong>栏目首页显示公告</strong>↓<br>"
Response.Write " <textarea name='Intro' id='Intro' cols='72' rows='9' style='display:none'></textarea>"
Response.Write " <iframe ID='editor' src='../editor.asp?ChannelID=1&ShowType=2&tContentid=Intro' frameborder='1' scrolling='no' width='550' height='300' ></iframe>"
Response.Write " </td>"
Response.Write " </tr>"
Response.Write " <tr>"
Response.Write " <td height='40' colspan='2' align='center' class='tdbg'>"
Response.Write " <input name='Action' type='hidden' id='Action' value='SaveAdd'>"
Response.Write " <input type='submit' name='Submit' value=' 添 加 ' style='cursor:hand;'> <input name='Cancel' type='button' id='Cancel' value=' 取 消 ' onClick=""window.location.href='User_Space.asp?Action=Manage';"" style='cursor:hand;'></td>"
Response.Write " </tr>"
Response.Write "</table></form>"
Else
Response.Write " <table width='600' border='0' align='center' cellpadding='2' cellspacing='1' class='border' >"
Response.Write " <tr class='title'> "
Response.Write " <td height='22'> <div align='center'><strong>申 请 我 的 聚 合</strong></div></td>"
Response.Write " </tr>"
Response.Write " <tr class='tdbg'><td aling='center'><font color='#FF0000'>您的聚合尚未通过审核!</font></td></tr>"
Response.Write "</table>"
End If
Else
Response.Write "<form method='post' action='User_Space.asp' name='myform' onsubmit='javascript:return CheckInput();'>"
Response.Write " <table width='600' border='0' align='center' cellpadding='2' cellspacing='1' class='border' >"
Response.Write " <tr class='title'> "
Response.Write " <td height='22' colspan='2'> <div align='center'><strong>申 请 我 的 聚 合 空 间</strong></div></td>"
Response.Write " </tr>"
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>空间名称:</strong><input name='BlogName' type='text' size='20' maxlength='20'> <font color='#FF0000'>* 您为聚合空间设置的名称</font></td></tr>"
Response.Write " <tr class='tdbg'><td colspan='2'><table><tr><td> <strong>空间首页<br> 显示项目:</strong></td><td>"
Set rsBlogClass = Conn.Execute("select * from PE_Channel Where Disabled=" & PE_False & " and ModuleType>0 and ModuleType<4 and ChannelType=0 order by OrderID")
Do While Not rsBlogClass.EOF
If FoundInArr(arrClass_Input, rsBlogClass("ChannelDir") & "none", ",") = False Then
Response.Write "<input type='checkbox' name='Showitem' value='" & rsBlogClass("ChannelID") & "' checked>我在" & rsBlogClass("ChannelName") & "频道发表的作品<br>"
End If
rsBlogClass.MoveNext
Loop
Response.Write "</td></tr></table></td></tr><tr class='tdbg'>"
Response.Write " <td height='22' colspan='2'><strong>选填项目</strong></td>"
Response.Write " </tr>"
Response.Write " <tr class='tdbg'> "
Response.Write " <td width='300' class='tdbg'> <strong>分类:</strong><select name='BlogType'>" & GetKingOpti(0) & "</select></td>"
Response.Write " <td rowspan='10' align='center' valign='top' class='tdbg'>"
Response.Write " <table width='180' height='200' border='1'>"
Response.Write " <tr><td width='100%' align='center'><img id='img' src='" & InstallDir & "Space/default.gif' width='150' height='172'></td></tr>"
Response.Write " </table>"
Response.Write " <input name='url' type='text' size='25'><strong>:照 片 地 址</strong><br><iframe style='top:2px' ID='uploadPhoto' src='Upload.asp?dialogtype=UserBlogPic&size=" & UserSetting(27) & "' frameborder=0 scrolling=no width='285' height='25'></iframe>"
Response.Write " </td></tr>"
Response.Write " <tr class='tdbg'><td> <strong>住址:</strong><input name='Address' type='text' size='20' maxlength='20'></td></tr>"
Response.Write " <tr class='tdbg'><td> <strong>电话:</strong><input name='Tel' type='text' size='20' maxlength='20'></td></tr>"
Response.Write " <tr class='tdbg'><td> <strong>传真:</strong><input name='Fax' type='text' size='20' maxlength='20'></td></tr>"
Response.Write " <tr class='tdbg'><td> <strong>单位:</strong><input name='Company' type='text' size='20' maxlength='20'></td></tr>"
Response.Write " <tr class='tdbg'><td> <strong>部门:</strong><input name='Department' type='text' size='20' maxlength='20'></td></tr>"
Response.Write " <tr class='tdbg'><td> <strong>QQ:</strong><input name='QQ' type='text'></td></tr>"
Response.Write " <tr class='tdbg'><td> <strong>邮编:</strong><input name='ZipCode' type='text' size='20' maxlength='20'></td></tr>"
Response.Write " <tr class='tdbg'><td> <strong>主页:</strong><input name='HomePage' type='text'></td></tr>"
Response.Write " <tr class='tdbg'><td> <strong>邮件:</strong><input name='Email' type='text' size='20' maxlength='20'></td></tr>"
Response.Write " <tr class='tdbg'> "
Response.Write " <td colspan='2'> <strong>聚合空间简介</strong>↓<br>"
Response.Write " <textarea name='Intro' id='Intro' cols='72' rows='9' style='display:none'></textarea>"
Response.Write " <iframe ID='editor' src='../editor.asp?ChannelID=1&ShowType=2&tContentid=Intro' frameborder='1' scrolling='no' width='550' height='300' ></iframe>"
Response.Write " </td>"
Response.Write " </tr>"
Response.Write " <tr>"
Response.Write " <td height='40' colspan='2' align='center' class='tdbg'>"
Response.Write " <input name='addtype' type='hidden' id='addtype' value=1>"
Response.Write " <input name='Action' type='hidden' id='Action' value='SaveAdd'>"
Response.Write " <input type='submit' name='Submit' value=' 添 加 ' style='cursor:hand;'> <input name='Cancel' type='button' id='Cancel' value=' 取 消 ' onClick=""window.location.href='User_Space.asp?Action=Manage';"" style='cursor:hand;'></td>"
Response.Write " </tr>"
Response.Write "</table></form>"
End If
Else
Response.Write "<center>您所在的用户组尚未开放聚合空间!</center>"
End If
End Sub
Sub Modify()
Dim BlogID
Dim rsBlog, rsBlogClass, sqlBlog
BlogID = Trim(Request("ID"))
If BlogID = "" Then
FoundErr = True
ErrMsg = ErrMsg & "<li>请指定要修改的聚合</li>"
Exit Sub
Else
BlogID = PE_CLng(BlogID)
End If
sqlBlog = "Select * from PE_Space where ID=" & BlogID
Set rsBlog = Server.CreateObject("Adodb.RecordSet")
rsBlog.Open sqlBlog, Conn, 1, 3
If rsBlog.BOF And rsBlog.EOF Then
FoundErr = True
ErrMsg = ErrMsg & "<li>不存在此聚合!</li>"
Else
If rsBlog("type") > 1 Then
Response.Write "<form method='post' action='User_Space.asp' name='myform' onsubmit='javascript:return CheckInput();'>"
Response.Write " <table width='600' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
Response.Write " <tr class='title'> "
Response.Write " <td height='22' colspan='2'> <div align='center'><strong>修 改 栏 目 信 息</strong></div></td>"
Response.Write " </tr>"
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>栏目类型:</strong><select name='addtype' onChange=""changemode()""><option value=2"
If rsBlog("type") = 2 Then Response.Write " selected"
Response.Write ">外部RSS数据</option><option value=3"
If rsBlog("type") = 3 Then Response.Write " selected"
Response.Write ">我的日志</option><option value=4"
If rsBlog("type") = 4 Then Response.Write " selected"
Response.Write ">我的音乐</option><option value=5"
If rsBlog("type") = 5 Then Response.Write " selected"
Response.Write ">我的图书</option><option value=6"
If rsBlog("type") = 6 Then Response.Write " selected"
Response.Write ">我的像册</option><option value=7"
If rsBlog("type") = 7 Then Response.Write " selected"
Response.Write ">我的连接</option></select> <font color='#FF0000'>* 本栏目使用的空间模块 <a href='space_detal.html' target='_blank'>[查看详细说明]</a></font></td></tr>"
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>栏目名称:</strong><input name='BlogName' type='text' size='45' value='" & rsBlog("Name") & "'> <font color='#FF0000'>*</font></td></tr>"
If rsBlog("type") = 2 Then
Response.Write "<tbody id='url' style='display:'>"
Else
Response.Write "<tbody id='url' style='display:none'>"
End If
Response.Write " <tr class='tdbg' ><td colspan='2'> <strong>来源地址:</strong><input name='LinkUrl' type='text' size='45' maxlength='100' value='" & rsBlog("LinkUrl") & "'> <font color='#FF0000'>* 支持RSS1.0 RSS2.0 ATOM格式</font></td></tr></tbody>"
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>显示条数:</strong><input name='ListNum' type='text' size='5' maxlength='3' value='" & rsBlog("listnum") & "'> <font color='#FF0000'>* 首页与分页显示数量</font></td></tr>"
Response.Write " <tr class='tdbg'> "
Response.Write " <td colspan='2'> <strong>显示公告</strong>↓<br>"
Response.Write " <textarea name='Intro' cols='72' rows='9' style='display:none'>" & Server.HTMLEncode(rsBlog("Intro")) & "</textarea>"
Response.Write " <iframe ID='editor' src='../editor.asp?ChannelID=1&ShowType=2&tContentid=Intro' frameborder='1' scrolling='no' width='550' height='250' ></iframe>"
Response.Write " </td>"
Response.Write " </tr>"
Response.Write " <tr>"
Response.Write " <td colspan='2' align='center' class='tdbg'>"
Response.Write " <input name='Action' type='hidden' id='Action' value='SaveModify'>"
Response.Write " <input name='ID' type='hidden' id='ID' value=" & rsBlog("ID") & ">"
Response.Write " <input type='submit' name='Submit' value=' 修 改 ' style='cursor:hand;'> <input name='Cancel' type='button' id='Cancel' value=' 取 消 ' onClick=""window.location.href='User_Space.asp?Action=Manage&Passed=1';"" style='cursor:hand;'></td>"
Response.Write " </tr>"
Response.Write " </table>"
Response.Write "</form>"
Else
Response.Write "<form method='post' action='User_Space.asp' name='myform' onsubmit='javascript:return CheckInput();'>"
Response.Write " <table width='600' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
Response.Write " <tr class='title'> "
Response.Write " <td height='22' colspan='2'> <div align='center'><strong>修 改 我 的 聚 合 空 间 设 置</strong></div></td>"
Response.Write " </tr>"
Response.Write " <tr class='tdbg'><td colspan='2'> <strong>空间名称:</strong><input name='BlogName' type='text' value='" & rsBlog("Name") & "'> <font color='#FF0000'>* 您为聚合空间设置的名称</font></td></tr>"
Response.Write " <tr class='tdbg'><td colspan='2'><table><tr><td> <strong>空间首页<br> 显示项目:</strong></td><td>"
Set rsBlogClass = Conn.Execute("select * from PE_Channel Where Disabled=" & PE_False & " and ModuleType>0 and ModuleType<4 order by OrderID")
Do While Not rsBlogClass.EOF
If FoundInArr(arrClass_Input, rsBlogClass("ChannelDir") & "none", ",") = False Then
Response.Write "<input type='checkbox' name='Showitem' value='" & rsBlogClass("ChannelID") & "'"
If FoundInArr(rsBlog("LinkUrl"), rsBlogClass("ChannelID"), ",") Then Response.Write " checked"
Response.Write ">我在" & rsBlogClass("ChannelName") & "频道发表的作品<br>"
End If
rsBlogClass.MoveNext
Loop
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -