config root man

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

Linux lin122.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/template_gallery_detail.asp

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/blog.asp" -->
<%
Function IsValidString(sValidate)
    Dim sInvalidChars
    Dim bTemp
    Dim i 
    ' Disallowed characters
    sInvalidChars = "!#$%^&*()=+{}[]|\\;?><'"
    for i = 1 To Len(sInvalidChars)
        if InStr(sValidate, Mid(sInvalidChars, i, 1)) > 0 then bTemp = True
        if bTemp then Exit For
    next
    for i = 1 to Len(sValidate)
        if Asc(Mid(sValidate, i, 1)) = 160 then bTemp = True
        if bTemp then Exit For
    next

    if not bTemp then
        bTemp = InStr(sValidate, "..") > 0
    end if
    if not bTemp then
        bTemp = InStr(sValidate, "  ") > 0
    end if
    if not bTemp then
        bTemp = (len(sValidate) <> len(Trim(sValidate)))
    end if 'Addition for leading and trailing spaces
    if not bTemp then
        bTemp = len(sValidate) < 1
    end if 'Empty     

    ' if any of the above are true, invalid string
    IsValidString = Not bTemp
End Function

function HackerSafe_Filter(cleanvar)
	        '  Encode Ampersand
	 cleanvar = replace(cleanvar,"&", "&")
	        '  Encode Single Quote
	 cleanvar = replace(cleanvar,"'", "'")
	        '  Encode Double Quote
	 'cleanvar = replace(cleanvar,""""", """)
	        '  Encode Less Than
	 cleanvar = replace(cleanvar,">", ">")
	        '  Encode Greater Than
	 cleanvar = replace(cleanvar,"<", "<")
	        '  Encode Close Bracket
	 cleanvar = replace(cleanvar,")", ")")
	        '  Encode Open Bracket
	 cleanvar = replace(cleanvar,"(", "(")
	        '  Encode Close Square Bracket
	 cleanvar = replace(cleanvar,"]", "]")
	        '  Encode Open Square Bracket
	 cleanvar = replace(cleanvar,"[", "[")
	        '  Encode Semicolon
	 cleanvar = replace(cleanvar,";", ";")
	        '  Encode Colon
	 cleanvar = replace(cleanvar,":", ":")
	        '  Encode Forward Slash
	 cleanvar = replace(cleanvar,"/", "/")
	        '  Encode Left Brace
	 cleanvar = replace(cleanvar,"}", "}")
	        '  Encode Right Brace
	 cleanvar = replace(cleanvar,"{", "{")
	        '  Encode Exclamation
	 cleanvar = replace(cleanvar,"!", "!")
	        '  Encode Double Dash
	 cleanvar = replace(cleanvar,"--", "--")
	        '  Encode Equal Sign
	 cleanvar = replace(cleanvar,"=", "=")
	        '  Encode Underscore
	 cleanvar = replace(cleanvar,"_", "_")
	 HackerSafe_Filter = cleanvar
end function

Dim rsBlogSite
Dim rsBlogSite_numRows

Set rsBlogSite = Server.CreateObject("ADODB.Recordset")
rsBlogSite.ActiveConnection = MM_blog_STRING
rsBlogSite.Source = "SELECT blogURL, blogTitle, blogSubTitle, blogDesc, blogPosts, blogLayout 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 layout1, layout2, layout3, layout4, layout5 from tblLayout WHERE layoutid = " & (rsBlogSite.Fields.Item("blogLayout").Value)
rsLayout.CursorType = 0
rsLayout.CursorLocation = 2
rsLayout.LockType = 1
rsLayout.Open()

rsLayout_numRows = 0
%>
<%
Dim rsArticles
Dim rsArticles_numRows

Set rsArticles = Server.CreateObject("ADODB.Recordset")
rsArticles.ActiveConnection = MM_blog_STRING
rsArticles.Source = "SELECT BlogID, BlogHeadline, BlogHTML, BlogDate, BlogCat, BlogAuthor, BlogCommentInclude, BlogReadMore, BlogDraft, CatID, CatName, CatDesc, fldAuthorID, fldAuthorRealName, (SELECT COUNT(*) FROM tblComment WHERE tblComment.BlogID = tblBlog.BlogID AND tblComment.CommentInclude = 1) as CommentCount, (SELECT COUNT(*) FROM tblBlog WHERE BlogCat = CatID AND BlogDraft <> 1) as CategoryCount  FROM tblBlog, tblCat, tblAuthor  WHERE BlogCat = CatID  AND tblBlog.BlogAuthor = tblAuthor.fldAuthorID AND tblBlog.BlogDraft <> 1 ORDER BY BlogDate DESC"
rsArticles.CursorType = 0
rsArticles.CursorLocation = 2
rsArticles.LockType = 1
rsArticles.Open()

rsArticles_numRows = 0
%>
<%
Dim rsGalleryConfig
Dim rsGalleryConfig_numRows

Set rsGalleryConfig = Server.CreateObject("ADODB.Recordset")
rsGalleryConfig.ActiveConnection = MM_blog_STRING
rsGalleryConfig.Source = "SELECT fldGalleryTitleThumb, fldGalleryThumb FROM tblGalleryConfig"
rsGalleryConfig.CursorType = 0
rsGalleryConfig.CursorLocation = 2
rsGalleryConfig.LockType = 1
rsGalleryConfig.Open()

rsGalleryConfig_numRows = 0
%>
<%
Dim rsGalleryDetail__MMColParam
rsGalleryDetail__MMColParam = "1"
If (Request.QueryString("fldGalleryID") <> "") AND (Len(Request.QueryString("fldGalleryID")) < 5) AND (IsValidString(Request.QueryString("fldGalleryID")) = True) Then 
  rsGalleryDetail__MMColParam = HackerSafe_Filter(Request.QueryString("fldGalleryID"))
Else
	Response.End  
End If
%>
<%
Dim rsGalleryDetail
Dim rsGalleryDetail_numRows

Set rsGalleryDetail = Server.CreateObject("ADODB.Recordset")
rsGalleryDetail.ActiveConnection = MM_blog_STRING
rsGalleryDetail.Source = "SELECT fldGalleryID, fldGalleryTitle, fldGalleryDesc, fldGalleryPic, fldGalleryCreated FROM tblGallery WHERE fldGalleryID = " + Replace(rsGalleryDetail__MMColParam, "'", "''") + ""
rsGalleryDetail.CursorType = 0
rsGalleryDetail.CursorLocation = 2
rsGalleryDetail.LockType = 1
rsGalleryDetail.Open()

rsGalleryDetail_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rsBlogSite_numRows = rsBlogSite_numRows + Repeat1__numRows
%>
<%
Dim Repeat3__numRows
Dim Repeat3__index

Repeat3__numRows = 20
Repeat3__index = 0
rsArticles_numRows = rsArticles_numRows + Repeat3__numRows
%>

<script language="VBScript" type="text/vbscript" runat="server">					
function DoDateTime(str, nNamedFormat, nLCID)				
	dim strRet								
	dim nOldLCID								
										
	strRet = str								
	If (nLCID > -1) Then							
		oldLCID = Session.LCID						
	End If									
										
	On Error Resume Next							
										
	If (nLCID > -1) Then							
		Session.LCID = nLCID						
	End If									
										
	If ((nLCID < 0) Or (Session.LCID = nLCID)) Then				
		strRet = FormatDateTime(str, nNamedFormat)			
	End If									
										
	If (nLCID > -1) Then							
		Session.LCID = oldLCID						
	End If									
										
	DoDateTime = strRet							
End Function									
</script>	
<%
curpath = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")
curpath =  Left(curpath, InstrRev(curpath, "/"))
galleryroot = Right((rsBlogSite.Fields.Item("blogURL").Value), Len((rsBlogSite.Fields.Item("blogURL").Value)) - Instr((rsBlogSite.Fields.Item("blogURL").Value), "//")-1)
galleryroot = Right(galleryroot, Len(galleryroot) - Instr(galleryroot, "/")+1) & "images/"
%>	
<%=(rsLayout.Fields.Item("layout1").Value)%>
<title><%=(rsBlogSite.Fields.Item("blogTitle").Value)%> | Gallery | <%=(rsGalleryDetail.Fields.Item("fldGalleryTitle").Value)%></title>
<meta name="Description" content="<%=(rsGalleryDetail.Fields.Item("fldGalleryDesc").Value)%>" />
<link rel="alternate" type="application/rss+xml" href="rss.xml" title="RSS feed for <%=(rsBlogSite.Fields.Item("blogTitle").Value)%>">
<%=(rsLayout.Fields.Item("layout2").Value)%>
<h1 align="center" id="blog-title"><img src="images/mainlogo.gif" width="621" height="101" border="0" align="top" usemap="#Map" />
<map name="Map" id="Map"><area shape="circle" coords="102,42,5" href="main.asp" />
<area shape="circle" coords="463,104,6" href="http://rpc.technorati.com/rpc/ping" />
</map></h1>

<p id="description">&nbsp;</p>
<%=(rsLayout.Fields.Item("layout3").Value)%>
<div class="gallery">
<div class="thumb"><a title="<%=(rsGalleryDetail.Fields.Item("fldGalleryTitle").Value)%>" rel="lightbox[<%=(rsGalleryDetail.Fields.Item("fldGalleryID").Value)%>]" href="<%=galleryroot%><%=(rsGalleryDetail.Fields.Item("fldGalleryID").Value)%>/<%=(rsGalleryDetail.Fields.Item("fldGalleryPic").Value)%>"><img src="thumbnailimage.aspx?filename=<%=galleryroot%><%=(rsGalleryDetail.Fields.Item("fldGalleryID").Value)%>/<%=(rsGalleryDetail.Fields.Item("fldGalleryPic").Value)%>&amp;width=<%=(rsGalleryConfig.Fields.Item("fldGalleryTitleThumb").Value)%>" alt="View Full Size" border="0" /></a></div>
<h3><%=(rsGalleryDetail.Fields.Item("fldGalleryTitle").Value)%></h3>
<p><%=(rsGalleryDetail.Fields.Item("fldGalleryDesc").Value)%></p>
</div>
<div class="gallery">
<% 
thepath = galleryroot & (rsGalleryDetail.Fields.Item("fldGalleryID").Value) & "/"
Recurse(Server.MapPath(thepath))
%>
<% 
Sub Recurse(Path)
	
	Dim fso, Root, WindowsFolder, Files, _
		Folders, File, i, FoldersArray(100)
		
	Const ForReading = 1
	Set fso = Server.CreateObject("Scripting.FileSystemObject")
	Set Root = fso.getfolder(Path)
	Set Files = Root.Files
	Set Folders = Root.SubFolders
	For Each File In Files 
	if file.name <> (rsGalleryDetail.Fields.Item("fldGalleryPic").Value) then
	%>
<div class="thumb"><a href="<%=thepath & file.name%>" title="<%=(rsGalleryDetail.Fields.Item("fldGalleryTitle").Value)%>" rel="lightbox[<%=(rsGalleryDetail.Fields.Item("fldGalleryID").Value)%>]"><img src="thumbnailimage.aspx?filename=<%=thepath & file.name%>&amp;width=<%=(rsGalleryConfig.Fields.Item("fldGalleryThumb").Value)%>" alt="View Full Size" /></a></div>
	<% end if
	Next
		 	
	For i = 0 To UBound(FoldersArray)
		if FoldersArray(i) <> "" Then 
			Recurse FoldersArray(i)				
		Else
			Exit For
		End if
	Next
	
End Sub
%>
</div>
<br clear="all" />
<div align="center"><a href="/gallery_folder/index.asp">Back to Gallery List </a></div>
<%=(rsLayout.Fields.Item("layout4").Value)%>
<!--#include file="inc_sidebar.asp" -->
<%=(rsLayout.Fields.Item("layout5").Value)%>
<%
rsBlogSite.Close()
Set rsBlogSite = Nothing
%>
<%
rsCats.Close()
Set rsCats = Nothing
%>
<%
rsArchives.Close()
Set rsArchives = Nothing
%>
<%
rsArticles.Close()
Set rsArticles = Nothing
%>
<%
rsRecent.Close()
Set rsRecent = Nothing
%>
<%
rsGalleryConfig.Close()
Set rsGalleryConfig = Nothing
%>
<%
rsGalleryDetail.Close()
Set rsGalleryDetail = Nothing
%>
<%
rsLayout.Close()
Set rsLayout = Nothing
%>

Man Man