<%=site_title%>
<%
Function randomPassword(Min, Max)
Dim Password
Dim AddConsonant
Dim Letter
Dim Length
Dim index
Dim random
Const DoubleConsonants = "cdfglmnprst"
Const SingleConsonants = "bcdfghjklmnprstv"
Const Vowels = "aeiou"
randomize()
Length = int(Rnd * (Max - (Min - 1))) + Min
While Len(Password) < Length
random = int(Rnd * 100)
If Not Password = "" And AddConsonant And random < 10 Then
index = int(Rnd * Len(DoubleConsonants)) + 1
Letter = Mid(DoubleConsonants, index, 1)
Password = Password & Letter & Letter
AddConsonant = False
ElseIf Not Password = "" And AddConsonant And random < 90 Then
index = int(Rnd * Len(SingleConsonants)) + 1
Letter = Mid(SingleConsonants, index, 1)
Password = Password & Letter
AddConsonant = False
Else
index = int(Rnd * Len(Vowels)) + 1
Letter = Mid(Vowels, index, 1)
Password = Password & Letter
AddConsonant = True
End If
Wend
If Len(Password) > Max Then Password = Left(Password, Max)
randomPassword = Password
End Function
'Then call it with something like
Function getRandomnum()
Randomize
dim randomVar1, randomVar2, randomVar3
randomVar1 = (Rnd() * 1000000)
randomVar2 = Sqr(randomVar1)
randomVar3 = Round(1000000 * (randomVar1 * randomVar2))
getRandomnum = (randomVar3)
End Function
numb=getRandomnum()
function getWorkingDays(d1, d2)
if not (isdate(d1) and isdate(d2)) then
response.write "At least one date is invalid."
exit function
else
d1 = cdate(d1): d2 = cdate(d2)
if d1 > d2 then
response.write "Invalid date range."
exit function
end if
end if
' figure out how many actual days
getWorkingDays = datediff("d", d1, d2) + 1 - subtract
' subtract the in-between weekends
'getWorkingDays = absdays '- cint(2 * (absdays \ 7))
' in case both are in the same weekend
'if getWorkingDays < 0 then getWorkingDays = 0
end function
d1=request("d1")
d2=request("d2")
cumulative_total=0
rw getWorkingDays(d1, d2)
sub rw(s)
a = s-1
'response.Write(d1) & " " & a & " "
Resultdate=d1
for i=1 to a
Resultdate= DateSerial(Year(Resultdate), Month(Resultdate), Day(Resultdate)+1)
'response.Write(resultdate) & " "
next
b=request("price")
price=b*a
%>