[$] Pr1v473 xHeEl B4ckD00RzZ [$]

Current Path : D:/InetPub/vhosts/kuccs.com.kw/httpdocs/PortalCMS/
Upload File
Current File : D:/InetPub/vhosts/kuccs.com.kw/httpdocs/PortalCMS/portal_functions.asp

<%
'-------------------------------------------
'---- Date for kuwait ------

Function ChangeDate(theDate)
	ChangeDate=DateAdd("h",10,theDate)
End Function
'--------------------------------------------
%>

<%
' Author: Faisal Khan (Stardeveloper.com)
' Secure request from forms and querystring
'------------------------------------------------------

Function GetSecureVal(param)
	If IsEmpty(param) Or param = "" Then
		GetSecureVal = param
		Exit Function
	End If
	
	If IsNumeric(param) Then
		GetSecureVal = CLng(param)
	Else
		GetSecureVal = Replace(CStr(param), "'", "''")
		GetSecureVal = Replace(CStr(param), "/", "")
		GetSecureVal = Replace(CStr(param), "\", "")
		GetSecureVal = Replace(CStr(param), "%", "")
		GetSecureVal = Replace(CStr(param), "$", "")
		GetSecureVal = Replace(CStr(param), "&", "")
		GetSecureVal = Replace(CStr(param), "(", "")
		GetSecureVal = Replace(CStr(param), ")", "")
		GetSecureVal = Replace(CStr(param), "-", "")
		GetSecureVal = Replace(CStr(param), ">", "")
		GetSecureVal = Replace(CStr(param), "<", "")
		GetSecureVal = Replace(CStr(param), "[", "")
		GetSecureVal = Replace(CStr(param), "]", "")
		GetSecureVal = Replace(CStr(param), "{", "")
		GetSecureVal = Replace(CStr(param), "}", "")
		GetSecureVal = Replace(CStr(param), "and", "")
		GetSecureVal = Replace(CStr(param), "or", "")
		GetSecureVal = Replace(CStr(param), "union", "")
		
	End If
End Function
%>


<%
'Pagging Function
'-------------------------------------------------------------------------------
' Function SetUpStartRec
' - Set up Starting Record parameters based on Pager Navigation
' - Variables setup: nStartRec

Sub SetUpStartRec()
	Dim nPageNo

	' Check for a START parameter
	If Request.QueryString("start").Count > 0 Then
		nStartRec = Request.QueryString("start")
	ElseIf Request.QueryString("pageno").Count > 0 Then
		nPageNo = Request.QueryString("pageno")
		If IsNumeric(nPageNo) Then
			nStartRec = (nPageNo-1)*nDisplayRecs+1
			If nStartRec <= 0 Then
				nStartRec = 1
			ElseIf nStartRec >= ((nTotalRecs-1)\nDisplayRecs)*nDisplayRecs+1 Then
				nStartRec = ((nTotalRecs-1)\nDisplayRecs)*nDisplayRecs+1
			End If
		Else
			'nStartRec = Session(ewSessionTblStartRec)
			If Not IsNumeric(nStartRec) Or nStartRec = "" Then
				nStartRec = 1 ' Reset start record counter
			End If
		End If
	Else
		'nStartRec = Session(ewSessionTblStartRec)
		If Not IsNumeric(nStartRec) Or nStartRec = "" Then
			nStartRec = 1 'Reset start record counter
		End If
	End If
End Sub

%>