config root man

Current Path : /var/sites/m/makeitez.co.uk/public_html/

Linux lin101.gridhost.co.uk 3.2.83 #4 SMP Thu Oct 27 23:38:08 BST 2016 x86_64
Upload File :
Current File : /var/sites/m/makeitez.co.uk/public_html/rss.asp

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% Response.Buffer = False %>
<%
curpath = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")
curpath =  Left(curpath, InstrRev(curpath, "/"))
%>	
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="admin_default.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
  If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
         (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
    MM_grantAccess = true
  End If
End If
If Not MM_grantAccess Then
  MM_qsChar = "?"
  If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
  MM_referrer = Request.ServerVariables("URL")
  if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
  MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
  Response.Redirect(MM_authFailedURL)
End If
%>
<!--#include file="Connections/blog.asp" -->
<%
Dim rsBlogSite
Dim rsBlogSite_numRows

Set rsBlogSite = Server.CreateObject("ADODB.Recordset")
rsBlogSite.ActiveConnection = MM_blog_STRING
rsBlogSite.Source = "SELECT * FROM tblBlogRSS"
rsBlogSite.CursorType = 0
rsBlogSite.CursorLocation = 2
rsBlogSite.LockType = 1
rsBlogSite.Open()

rsBlogSite_numRows = 0
%>
<%
Dim rsLayout
Dim rsLayout_numRows

Set rsLayout = Server.CreateObject("ADODB.Recordset")
rsLayout.ActiveConnection = MM_blog_STRING
rsLayout.Source = "SELECT * from tblLayout WHERE layoutid = " & (rsBlogSite.Fields.Item("blogLayout").Value)
rsLayout.CursorType = 0
rsLayout.CursorLocation = 2
rsLayout.LockType = 1
rsLayout.Open()

rsLayout_numRows = 0
%>
<%
Dim rsConfig
Dim rsConfig_numRows
Set rsConfig = Server.CreateObject("ADODB.Recordset")
rsConfig.ActiveConnection = MM_blog_STRING
rsConfig.Source = "SELECT * FROM tblBlogRSS"
rsConfig.CursorType = 0
rsConfig.CursorLocation = 2
rsConfig.LockType = 1
rsConfig.Open()
rsConfig_numRows = 0
%>
<%=(rsLayout.Fields.Item("layout1").Value)%>
<title>RSS</title>
<%=(rsLayout.Fields.Item("layout2").Value)%>
<!--new bit -->
<!-- header starts here -->
	<div id="header">
	  <div id="header-content">
        <h1 id="logo">make IT easy</h1>
	    <h2 id="slogan"> business computing made easy</h2>
	    <!-- Menu Tabs -->
        <ul>
          <li><a href="index.asp">Home</a></li>
          <li><a href="services.asp">Services</a></li>
          <li><a href="contact.asp">Contact</a></li>
          <li><a href="default.asp" id="current">Blog</a></li>
          <li><a href="uploads/vids/vids.asp">Videos</a></li>     
        </ul>
      </div>
	</div>
<!-- end of new bit --><%=(rsLayout.Fields.Item("layout3").Value)%>
<% 
' Timer code
	Dim StopWatch(19) 
	sub StartTimer(x)
		StopWatch(x) = timer
	end sub
	function StopTimer(x)
		EndTime = Timer
		'Watch for the midnight wraparound...
		if EndTime < StopWatch(x) then
			EndTime = EndTime + (86400)
		end if
		StopTimer = EndTime - StopWatch(x)
	end function
	StartTimer 1
%>
   <h3>RSS</h3>   
<%
Dim artRec
Dim artRec_numRows
Set artRec = Server.CreateObject("ADODB.Recordset")
artRec.ActiveConnection = MM_blog_STRING
artRec.Source = "SELECT * FROM tblBlog, tblCat, tblAuthor  WHERE BlogCat = CatID  AND tblBlog.BlogAuthor = tblAuthor.fldAuthorID AND tblBlog.BlogDraft <> 1 ORDER BY BlogDate DESC"
artRec.CursorType = 0
artRec.CursorLocation = 2
artRec.LockType = 1
artRec.Open()
artRec_numRows = 0
%>
<%
sFilename = "rss.xml"
%>
<%
	Dim oFSO
	Dim fFile
	' create an instance of the FileSystemObject
	Set oFSO = Server.CreateObject ("Scripting.FileSystemObject")
	' create file
	Set fFile = oFSO.CreateTextFile (Server.MapPath(sFilename))
%>
<%
Dim oRs__currentDate
oRs__currentDate = "Month(Date())"
If (Month(Date()) <> "") Then 
  oRs__currentDate = Month(Date())
End If
%>
<%
Dim rsBlogConfig
Dim rsBlogConfig_numRows
Set rsBlogConfig = Server.CreateObject("ADODB.Recordset")
rsBlogConfig.ActiveConnection = MM_blog_STRING
rsBlogConfig.Source = "SELECT * FROM tblBlogRSS"
rsBlogConfig.CursorType = 0
rsBlogConfig.CursorLocation = 2
rsBlogConfig.LockType = 1
rsBlogConfig.Open()
rsBlogConfig_numRows = 0
%>
<%
function CI_StripHTML(strtext)				
 on error resume next	
	'Strips the HTML tags from strHTML
	
	Dim objRegExp, strOutput
	Set objRegExp = New Regexp
	
	objRegExp.IgnoreCase = True
	objRegExp.Global = True
	objRegExp.Pattern = "<(.|\n)+?>"
	
	'Replace all HTML tag matches with the empty string
	strOutput = objRegExp.Replace(strtext, "")

	Set objRegExp = Nothing	
	
	strOutput = replace(strOutput,"&lsquo;","")
	strOutput = replace(strOutput,"&rsquo;","")
	strOutput = replace(strOutput,"&sbquo;","")
	strOutput = replace(strOutput,"&ldquo;", "")
	strOutput = replace(strOutput,"&rdquo;", "")
	strOutput = replace(strOutput,"&bdquo;", "")
	strOutput = replace(strOutput,"&dagger;", "")
	strOutput = replace(strOutput,"&Dagger;", "")
	strOutput = replace(strOutput,"&permil;", "")
	strOutput = replace(strOutput,"&lsaquo;", "")
	strOutput = replace(strOutput,"&rsaquo;", "")
	strOutput = replace(strOutput,"&spades;", "")
	strOutput = replace(strOutput,"&clubs;", "")
	strOutput = replace(strOutput,"&hearts;", "")
	strOutput = replace(strOutput,"&diams;", "")
	strOutput = replace(strOutput,"&oline;", "")
	strOutput = replace(strOutput,"&larr;", "")
	strOutput = replace(strOutput,"&uarr;", "")
	strOutput = replace(strOutput,"&rarr;", "")
	strOutput = replace(strOutput,"&darr;", "")
	strOutput = replace(strOutput,"&trade;", "")
	strOutput = replace(strOutput,"&quot;", "")
	strOutput = replace(strOutput,"&amp;", "")
	strOutput = replace(strOutput,"&frasl;", "")
	strOutput = replace(strOutput,"&lt;", "")
	strOutput = replace(strOutput,"&gt;", "")
	strOutput = replace(strOutput,"&ndash;", "")
	strOutput = replace(strOutput,"&mdash;", "")
	strOutput = replace(strOutput,"&nbsp;", " ")
	strOutput = replace(strOutput,"&iexcl;", "")
	strOutput = replace(strOutput,"&cent;", "")
	strOutput = replace(strOutput,"&pound;", "")
	strOutput = replace(strOutput,"&curren;", "")
	strOutput = replace(strOutput,"&yen;", "")
	strOutput = replace(strOutput,"&brvbar;", "")
	strOutput = replace(strOutput,"&brkbar;", "")
	strOutput = replace(strOutput,"&sect;", "")
	strOutput = replace(strOutput,"&uml;", "")
	strOutput = replace(strOutput,"&die;", "")
	strOutput = replace(strOutput,"&copy;", "")
	strOutput = replace(strOutput,"&ordf;", "")
	strOutput = replace(strOutput,"&laquo;", "")
	strOutput = replace(strOutput,"&not;", "")
	strOutput = replace(strOutput,"&shy;", "")
	strOutput = replace(strOutput,"&reg;", "")
	strOutput = replace(strOutput,"&macr;", "")
	strOutput = replace(strOutput,"&hibar;", "")
	strOutput = replace(strOutput,"&deg;", "")
	strOutput = replace(strOutput,"&plusmn;", "")
	strOutput = replace(strOutput,"&sup2;", "")
	strOutput = replace(strOutput,"&sup3;", "")
	strOutput = replace(strOutput,"&acute;", "")
	strOutput = replace(strOutput,"&micro;", "")
	strOutput = replace(strOutput,"&para;", "")
	strOutput = replace(strOutput,"&middot;", "")
	strOutput = replace(strOutput,"&cedil;", "")
	strOutput = replace(strOutput,"&sup1;", "")
	strOutput = replace(strOutput,"&ordm;", "")
	strOutput = replace(strOutput,"&raquo;", "")
	strOutput = replace(strOutput,"&frac14;", "")
	strOutput = replace(strOutput,"&frac12;", "")
	strOutput = replace(strOutput,"&frac34;", "")
	strOutput = replace(strOutput,"&iquest;", "")
	strOutput = replace(strOutput,"&Agrave;", "")
	strOutput = replace(strOutput,"&Aacute;", "")
	strOutput = replace(strOutput,"&Acirc;", "")
	strOutput = replace(strOutput,"&Atilde;", "")
	strOutput = replace(strOutput,"&Auml;", "")
	strOutput = replace(strOutput,"&Aring;", "")
	strOutput = replace(strOutput,"&AElig;", "")
	strOutput = replace(strOutput,"&Ccedil;", "")
	strOutput = replace(strOutput,"&Egrave;", "")
	strOutput = replace(strOutput,"&Eacute;", "")
	strOutput = replace(strOutput,"&Ecirc;", "")
	strOutput = replace(strOutput,"&Euml;", "")
	strOutput = replace(strOutput,"&Igrave;", "")
	strOutput = replace(strOutput,"&Iacute;", "")
	strOutput = replace(strOutput,"&Icirc;", "")
	strOutput = replace(strOutput,"&Iuml;", "")
	strOutput = replace(strOutput,"&ETH;", "")
	strOutput = replace(strOutput,"&Ntilde;", "")
	strOutput = replace(strOutput,"&Ograve;", "")
	strOutput = replace(strOutput,"&Oacute;", "")
	strOutput = replace(strOutput,"&Ocirc;", "")
	strOutput = replace(strOutput,"&Otilde;", "")
	strOutput = replace(strOutput,"&Ouml;", "")
	strOutput = replace(strOutput,"&times;", "")
	strOutput = replace(strOutput,"&Oslash;", "")
	strOutput = replace(strOutput,"&Ugrave;", "")
	strOutput = replace(strOutput,"&Uacute;", "")
	strOutput = replace(strOutput,"&Ucirc;", "")
	strOutput = replace(strOutput,"&Uuml;", "")
	strOutput = replace(strOutput,"&Yacute;", "")
	strOutput = replace(strOutput,"&THORN;", "")
	strOutput = replace(strOutput,"&szlig;", "")
	strOutput = replace(strOutput,"&agrave;", "")
	strOutput = replace(strOutput,"&aacute;", "")
	strOutput = replace(strOutput,"&acirc;", "")
	strOutput = replace(strOutput,"&atilde;", "")
	strOutput = replace(strOutput,"&auml;", "")
	strOutput = replace(strOutput,"&aring;", "")
	strOutput = replace(strOutput,"&aelig;", "")
	strOutput = replace(strOutput,"&ccedil;", "")
	strOutput = replace(strOutput,"&egrave;", "")
	strOutput = replace(strOutput,"&eacute;", "")
	strOutput = replace(strOutput,"&ecirc;", "")
	strOutput = replace(strOutput,"&euml;", "")
	strOutput = replace(strOutput,"&igrave;", "")
	strOutput = replace(strOutput,"&iacute;", "")
	strOutput = replace(strOutput,"&icirc;", "")
	strOutput = replace(strOutput,"&iuml;", "")
	strOutput = replace(strOutput,"&eth;", "")
	strOutput = replace(strOutput,"&ntilde;", "")
	strOutput = replace(strOutput,"&ograve;", "")
	strOutput = replace(strOutput,"&oacute;", "")
	strOutput = replace(strOutput,"&ocirc;", "")
	strOutput = replace(strOutput,"&otilde;", "")
	strOutput = replace(strOutput,"&ouml;", "")
	strOutput = replace(strOutput,"&divide;", "")
	strOutput = replace(strOutput,"&oslash;", "")
	strOutput = replace(strOutput,"&ugrave;", "")
	strOutput = replace(strOutput,"&uacute;", "")
	strOutput = replace(strOutput,"&ucirc;", "")
	strOutput = replace(strOutput,"&uuml;", "")
	strOutput = replace(strOutput,"&yacute;", "")
	strOutput = replace(strOutput,"&thorn;", "")
	strOutput = replace(strOutput,"&yuml;", "")
	strOutput = replace(strOutput,Chr(10),"")
	strOutput = replace(strOutput,Chr(13),"")
  
  CI_StripHTML = strOutput	
End Function														
%>
<%
FUNCTION CropSentence(strText, intLength, strTrial) 
  Dim wsCount 
  Dim intTempSize 
  Dim intTotalLen 
  Dim strTemp 
  
  wsCount = 0 
  intTempSize = 0 
  intTotalLen = 0 
  intLength = intLength - Len(strTrial) 
  strTemp = "" 
    
  IF Len(strText) > intLength THEN 
    arrTemp = Split(strText, " ") 
    FOR EACH x IN arrTemp 
      IF Len(strTemp) <= intLength THEN 
        strTemp = strTemp & x & " " 
      END IF 
    NEXT 
      CropSentence = Left(strTemp, Len(strTemp) - 1) & strTrial 
  ELSE 
    CropSentence = strText 
  END IF 
END FUNCTION
%>
<%
Function return_RFC822_Date(myDate, offset)
  Dim myDay, myDays, myMonth, myYear
  Dim myHours, myMonths, mySeconds
	
  myDate = CDate(myDate)
  myDay = WeekdayName(Weekday(myDate),true)
  myDays = Day(myDate)
  myMonth = MonthName(Month(myDate), true)
  myYear = Year(myDate)
  myHours = zeroPad(Hour(myDate), 2)
  myMinutes = zeroPad(Minute(myDate), 2)
  mySeconds = zeroPad(Second(myDate), 2)
	
  return_RFC822_Date = myDay&", "& _
                       myDays&" "& _
                       myMonth&" "& _ 
                       myYear&" "& _
                       myHours&":"& _
                       myMinutes&":"& _
                       mySeconds&" "& _ 
                       offset
End Function 
Function zeroPad(m, t)
  zeroPad = String(t-Len(m),"0")&m
End Function
%>
<%
	sSiteTitle = (rsBlogConfig.Fields.Item("blogTitle").Value)
	sSiteDescr = (rsBlogConfig.Fields.Item("blogDesc").Value)
	sSiteURL = (rsBlogConfig.Fields.Item("blogURL").Value)
	if right(sSiteURL, 1) <> "/" then
		sSiteURL = sSiteURL & "/"
	end if
	sSiteDetails = ""
	sImageURL = (rsBlogConfig.Fields.Item("blogImage").Value)
	sFurtherReading = ""
	sAuthorNames = (rsBlogConfig.Fields.Item("blogAuthor").Value)
	sAuthorEmails = (rsBlogConfig.Fields.Item("blogEmail").Value)
%>
<%
fFile.WriteLine ("<?xml version=""1.0"" encoding=""utf-8""?>")
'fFile.WriteLine ("<?xml-stylesheet type=""text/css"" href=""" & sSiteURL &  "rss.css"" ?>")
fFile.WriteLine ("<!--  RSS generated by " & sSiteTitle & " on " & Now() & " -->")
fFile.WriteLine ("<rss version=""2.0"">")
fFile.WriteLine ("   <channel>")
fFile.WriteLine("	<title>" & sSiteTitle & "</title>")
fFile.WriteLine("	<link>" & sSiteURL & "</link>")
fFile.WriteLine("	<description>" & sSiteDescr & "</description>")
fFile.WriteLine("	<language>en-US</language>")
fFile.WriteLine("	<lastBuildDate>" & return_RFC822_Date(Now(), "GMT") & "</lastBuildDate>")
fFile.WriteLine("	<category domain=""" & sSiteURL & """>" & sSiteTitle & "</category>")
fFile.WriteLine("	<generator>BP Blog 7.0</generator>")
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 10
Repeat1__index = 0
artRec_numRows = artRec_numRows + Repeat1__numRows
%>
<% 
While ((Repeat1__numRows <> 0) AND (NOT artRec.EOF)) 
%>
<%
	fFile.WriteLine ("	<item>")
	fFile.WriteLine ("		<title>" & artRec("BlogHeadline") & "</title>")
	fFile.WriteLine ("		<link>" & sSiteURL & "template_permalink.asp?id=" & artRec.Fields.Item("BlogID").Value & "</link>")
	fFile.WriteLine ("		<guid isPermaLink=""true"">" & sSiteURL & "template_permalink.asp?id=" & artRec.Fields.Item("BlogID").Value & "</guid>")
	fFile.WriteLine ("		<description>" & (CropSentence(CI_StripHTML(artRec.Fields.Item("BlogHTML").Value), 250, "...")) & "</description>")
	fFile.WriteLine ("		<pubDate>" & return_RFC822_Date(artRec.Fields.Item("BlogDate").Value, "GMT") & "</pubDate>")
	fFile.WriteLine("		<category domain=""" & sSiteURL & "template_archives_cat.asp?cat=" & artRec.Fields.Item("CatID").Value & """>" & artRec.Fields.Item("CatName").Value & "</category>")
	fFile.WriteLine ("	</item>")
%>
<% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  artRec.MoveNext()
Wend
%>
<%
' Write out the End Channel Data tag and End RSS tag.
fFile.WriteLine ("	</channel>")
fFile.WriteLine ("</rss>")
	fFile.Close 
	Set fFile = Nothing
	Set oFSO = Nothing
%>
<%
rsBlogConfig.Close()
Set rsBlogConfig = Nothing
%>
<%
artRec.Close()
Set artRec = Nothing
%>
<p>RSS published in <%=abs(round(StopTimer(1), 2))%> seconds. </p>
<p>Back to the <a href="main.asp">main admin page</a>. </p>
<%=(rsLayout.Fields.Item("layout4").Value)%><!-- #BeginLibraryItem "/Library/admin_sidebar.lbi" --><% if Session("MM_Username") <> "" Then %>
<% 
if Session("MM_Username") = "admin" Then 
	Session("isAdmin") = 1
else
	Session("isAdmin") = 0
end if
%>
<%
Dim rsComments_Pending
Dim rsComments_Pending_numRows

Set rsComments_Pending = Server.CreateObject("ADODB.Recordset")
rsComments_Pending.ActiveConnection = MM_blog_STRING
rsComments_Pending.Source = "SELECT Count(*) as CommentsPendingCount FROM tblComment WHERE commentInclude = 0"
rsComments_Pending.CursorType = 0
rsComments_Pending.CursorLocation = 2
rsComments_Pending.LockType = 1
rsComments_Pending.Open()

rsComments_Pending_numRows = 0
%>
<%
Dim rsUserID
Dim rsUserID_numRows

Set rsUserID = Server.CreateObject("ADODB.Recordset")
rsUserID.ActiveConnection = MM_blog_STRING
rsUserID.Source = "SELECT *  FROM tblAuthor WHERE fldAuthorUsername = '" + Session("MM_Username") + "'"
rsUserID.CursorType = 0
rsUserID.CursorLocation = 2
rsUserID.LockType = 1
rsUserID.Open()
Session("MM_UserID") = (rsUserID.Fields.Item("fldAuthorID").Value)

rsUserID_numRows = 0
%>
<%
rsUserID.Close()
Set rsUserID = Nothing
%>
<h2>Blog</h2>
<ul>
  <li><a href="main.asp">Blog Entries</a></li>
  <li><a href="add_blog.asp">Create a New Entry</a></li>
<% if Session("isAdmin") = 0 then %> 
<li><a href="user_update.asp?id=<%=Session("MM_UserID")%>">Profile</a></li> 
</ul>
<% end if %>  
<% if Session("isAdmin") = 1 then %>  
  <li><a href="approve_comments.asp">Approve Comments (<%=(rsComments_Pending.Fields.Item("CommentsPendingCount").Value)%> Pending)</a></li>
  <li><a href="blog_config.asp">Blog Configuration</a></li> 
</ul>
<h2>Categories</h2>
<ul>
  <li><a href="cat.asp">Categories</a></li>
  <li><a href="cat_add.asp">Add a Category</a></li>
</ul>
<h2>Pages</h2>
<ul>
  <li><a href="pages.asp">Pages</a></li>
  <li><a href="add_page.asp">Add Page</a></li>
</ul>
<h2>Gallery</h2>
<ul>
  <li><a href="gallery.asp">Gallery</a></li>
  <li><a href="gallery_config.asp">Gallery Configuration</a></li>
</ul>
<h2>Users</h2>
<ul>
  <li><a href="users.asp">Users</a></li>
  <li><a href="user_add.asp">Add User</a></li>
  <li><a href="admin_default.asp">Login</a></li>
</ul>
<h2>Layout</h2>
<ul>
  <li><a href="layout.asp">Available layouts</a></li>
  <li><a href="layout_add.asp">Add a new layout</a></li>
</ul>
<% end if %>
<h2>Errata</h2>
<ul>
  <li><a href="rss.asp">Update RSS</a></li>
</ul>
<%
rsComments_Pending.Close()
Set rsComments_Pending = Nothing
%>
<% End If %>
<!-- #EndLibraryItem --><%=(rsLayout.Fields.Item("layout5").Value)%>
<%
rsConfig.Close()
Set rsConfig = Nothing
%>
<%
rsBlogSite.Close()
Set rsBlogSite = Nothing
%>
<%
rsLayout.Close()
Set rsLayout = Nothing
%>

Man Man