www.gusucode.com > 站长俱乐部新闻发布系统精简版 1.01源码程序 > default_content.asp

    <%
Dim Item__MMColParam
Dim myBool

If (Request.QueryString("itemID") <> "")  Then
        dim itemNum
                itemNum = Request.QueryString("itemID")
        if IsNumeric(itemNum) then
                Item__MMColParam = Request.QueryString("itemID")
        else
                Item__MMColParam = getDefaultPage()
        end if
ElseIf (Request.Form("cID") <> "") Then
        Item__MMColParam = Request.Form("cID")
Else
        Item__MMColParam = getDefaultPage()
End If
%>
<%
function getDefaultPage()
        getDefaultPage = Session("myDefaultPage")
end function
%>
<%
Set Item = Server.CreateObject("ADODB.Recordset")
Item.ActiveConnection = MM_oConn_STRING
Item.Source = "SELECT * FROM ac_item WHERE ID = " & Item__MMColParam & ""
Item.CursorType = 0
Item.CursorLocation = 2
Item.LockType = 1
Item.Open()
Item_numRows = 0
%>
<table width="100%" border="0" cellpadding="5" cellspacing="0">
        <% if ((name="Skin" or name="Acidcat_2") and headingVisibility <> false) then %>
        	<tr>
                <td><img src="admin/<%= Heading_left_image %>" width="16" height="30" alt="" /></td>
                <td class="ac_header_text"><%=(Item.Fields.Item("Title").Value)%></td>
                <td><img src="admin/<%= Heading_right_image %>" width="16" height="30" alt="" /></td>
        	</tr>
        <% elseif headingVisibility <> false then %>
        	<tr>
                <td><img src="admin/images/heading_<%= Name %>_1.gif" width="16" height="30" alt="" /></td>
                <td class="ac_header_text"><%=(Item.Fields.Item("Title").Value)%></td>
                <td><img src="admin/images/heading_<%= Name %>_3.gif" width="16" height="30" alt="" /></td>
        	</tr>
        <% end if %>
        <tr>
                <% 
		'display Iframe
		if Item.Fields.Item("Type").Value = "Iframe" then
  		dim IframeStr, IframeStrArray
		IframeStr = Item.Fields.Item("Content").Value
		IframeStrArray = split(IframeStr,"--")
		%>
		<td class="ac_contentarea" colspan="3"><iframe src="<%= IframeStrArray(2) %>" name="news" width="<%= IframeStrArray(0) %>" height="<%= IframeStrArray(1) %>" scrolling="auto" frameborder="0"></iframe></td>
                <% 
		'display rss
		elseif Item.Fields.Item("Type").Value = "rss" then
  		dim rssStr
		rssStr = Item.Fields.Item("Content").Value
		%>
                <td class="ac_contentarea" colspan="3">
		<% response.ContentType="text/html"
                dim objXML, objXSL
                set objXML=server.CreateObject("MSXML2.DOMDocument")
                set objXSL=server.CreateObject("MSXML2.DOMDocument")
                objXML.async=False
                objXSL.async=False
                objXML.setProperty "ServerHTTPRequest",true
                objXML.load rssStr
                objXSL.load Server.MapPath("default_rssStyle.xslt")
                response.write objXML.transformNode(objXSL)
                set objXML=nothing
                set objXSL=nothing
                %>
		</td>
                <% 
		'display normal
		else %>
		<td class="ac_contentarea" colspan="3"><%=(Item.Fields.Item("Content").Value)%></td>
		<% end if %>
        </tr>
</table>
<%
Item.Close()
Set Item = Nothing
%>