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/calendar.asp

<%@LANGUAGE="VBSCRIPT"%>
<%
curpath = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")
curpath =  Left(curpath, InstrRev(curpath, "/"))
%>
<!--#include file="Connections/blog.asp" -->
<%
Dim rsCal
Dim rsCal_numRows

Set rsCal = Server.CreateObject("ADODB.Recordset")
rsCal.ActiveConnection = MM_blog_STRING
rsCal.Source = "SELECT *  FROM tblBlog WHERE Month(BlogDate) = Month(Now()) ORDER BY BlogDate ASC"
rsCal.CursorType = 0
rsCal.CursorLocation = 2
rsCal.LockType = 1
rsCal.Open()

rsCal_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rsCal_numRows = rsCal_numRows + Repeat1__numRows
%>
<%
Dim MyMonth 'Month of calendar
Dim MyYear  'Year of calendar
Dim FirstDay 'First day of the month.  0 = Sunday
Dim CurrentDay 'Used to print dates in calendar
Dim Col 'Calendar column
Dim Row 'Calendar row

MyMonth = cint(Request("chosenYear"))
MyYear = cint(Request("chosenMonth"))

If MyMonth = 0 then MyMonth = Month(Date)
if MyYear = 0 then MyYear = Year(Date)

%>

<link href="styles-site.css" rel="stylesheet" type="text/css">

<DIV class=calendar align=center>
<TABLE cellSpacing=4 cellPadding=0 summary="Monthly calendar with links to each day's posts" border=0>
<CAPTION class=calendarhead><%=MonthName(MyMonth)%></CAPTION>
<TBODY>
<TR>
<TH align=middle abbr=Sunday><SPAN class=calendar>Sun</SPAN></TH>
<TH align=middle abbr=Monday><SPAN class=calendar>Mon</SPAN></TH>
<TH align=middle abbr=Tuesday><SPAN class=calendar>Tue</SPAN></TH>
<TH align=middle abbr=Wednesday><SPAN class=calendar>Wed</SPAN></TH>
<TH align=middle abbr=Thursday><SPAN class=calendar>Thu</SPAN></TH>
<TH align=middle abbr=Friday><SPAN class=calendar>Fri</SPAN></TH>
<TH align=middle abbr=Saturday><SPAN class=calendar>Sat</SPAN></TH></TR>
<%

FirstDay = WeekDay(DateSerial(MyYear, MyMonth, 1)) -1
CurrentDay = 1

'Let's build the calendar
For Row = 0 to 5
	For Col = 0 to 6
		If Row = 0 and  Col < FirstDay then
			response.write "<TD align=middle><SPAN class=calendar></SPAN></TD>"
		elseif CurrentDay > LastDay(MyMonth, MyYear) then
			response.write "<TD align=middle><SPAN class=calendar></SPAN></TD>"
		else
			response.write "<TD"

			if MyMonth = Month(Date) and CurrentDay = Day(Date) then 
				response.write " align=middle><SPAN class=calendar>"
			else 
				response.write " align=middle><SPAN class=calendar>"
			end if
			
			if rsCal.EOF then
				flgEnd = 1
			end if
			
			if flgEnd <> 1 then
				theCurrentDay = Day(rsCal.Fields.Item("BlogDate").Value)
			end if
			
			Do Until Day(rsCal.Fields.Item("BlogDate").Value) <> CurrentDay
			
			if CurrentDay = theCurrentDay then
				Response.Write("<a href='#'>" & CurrentDay & "</a></SPAN></TD>")
			else
			response.write "" & CurrentDay & "</SPAN></TD>"
			end if

			CurrentDay = CurrentDay + 1

		End If

	Next
	response.write "</tr>"
Next


Function MonthName(MyMonth)
	Select Case MyMonth
		Case 1
			MonthName = "January"
		Case 2
			MonthName = "Febuary"
		Case 3
			MonthName = "March"
		Case 4
			MonthName = "April"
		Case 5
			MonthName = "May"
		Case 6
			MonthName = "June"
		Case 7
			MonthName = "July"
		Case 8
			MonthName = "August"
		Case 9
			MonthName = "September"
		Case 10
			MonthName = "October"
		Case 11
			MonthName = "November"
		Case 12
			MonthName = "December"
		Case Else
			MonthName = "ERROR!"
	End Select
End Function

Function LastDay(MyMonth, MyYear)
    ' Returns the last day of the month. Takes into account leap years
    ' Usage: LastDay(Month, Year)
    ' Example: LastDay(12,2000) or LastDay(12) or Lastday
    

    Select Case MyMonth
        Case 1, 3, 5, 7, 8, 10, 12
            LastDay = 31
            
        Case 4, 6, 9, 11
            LastDay = 30
            
        Case 2
            If IsDate(MyYear & "-" & MyMonth & "-" & "29") Then LastDay = 29 Else LastDay = 28
            
        Case Else
            LastDay = 0
    
    End Select
End Function 
%>
</DIV>
<%
rsCal.Close()
Set rsCal = Nothing 
%>

Man Man