%@LANGUAGE="VBSCRIPT"%> <% Function generatePassword( allowNumbers ) NUMLOWER = 48 ' 48 = 0 NUMUPPER = 57 ' 57 = 9 LOWERBOUND = 65 ' 65 = A UPPERBOUND = 90 ' 90 = Z LOWERBOUND1 = 97 ' 97 = a UPPERBOUND1 = 122 ' 122 = z PASSWORD_LENGTH = 20 ' initialize the random number generator Randomize() newPassword = "" count = 0 DO UNTIL count = PASSWORD_LENGTH If allowNumbers Then pwd = Int( ( NUMUPPER - NUMLOWER ) * Rnd + NUMLOWER ) Else ' generate a num between 2 and 10 ; ' if num > 4 create an uppercase else create lowercase If Int( ( 10 - 2 + 1 ) * Rnd + 2 ) > 4 Then pwd = Int( ( UPPERBOUND - LOWERBOUND + 1 ) * Rnd + LOWERBOUND ) Else pwd = Int( ( UPPERBOUND1 - LOWERBOUND1 + 1 ) * Rnd + LOWERBOUND1 ) End If End If newPassword = newPassword + Chr( pwd ) count = count + 1 Loop generatePassword = newPassword End Function %> <% ' *** Insert Record: construct a sql insert statement and execute it MM_editAction = CStr(Request("URL")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Request.QueryString End If If (CStr(Request("MM_insert")) <> "") Then MM_tableName = "ecarddata" MM_fields = "name,name,',none,'',email,email,',none,'',fromname,fromname,',none,'',fromemail,fromemail,',none,'',message,message,',none,'',key,random,',none,''" MM_redirectPage = "thankyou.asp?key=" & Request.Form("key") ' create the insert sql statement MM_tableValues = "" MM_dbValues = "" MM_fieldsArray = Split(MM_fields, ",") For i = LBound(MM_fieldsArray) To UBound(MM_fieldsArray) Step 5 FormVal = CStr(Request.Form(MM_fieldsArray(i))) Delim = MM_fieldsArray(i+2) If (Delim = "none") Then Delim = "" AltVal = MM_fieldsArray(i+3) If (AltVal = "none") Then AltVal = "" EmptyVal = MM_fieldsArray(i+4) If (EmptyVal = "none") Then EmptyVal = "" If (FormVal = "") Then FormVal = EmptyVal Else If (AltVal <> "") Then FormVal = AltVal ElseIf (Delim = "'") Then ' escape quotes FormVal = "'" & Replace(FormVal,"'","''") & "'" Else FormVal = Delim + FormVal + Delim End If End If If (i <> LBound(MM_fieldsArray)) Then MM_tableValues = MM_tableValues & "," MM_dbValues = MM_dbValues & "," End if MM_tableValues = MM_tableValues & MM_fieldsArray(i+1) MM_dbValues = MM_dbValues & FormVal Next MM_insertStr = "insert into " & MM_tableName & " (" & MM_tableValues & ") values (" & MM_dbValues & ")" ' finish the sql and execute it Set MM_insertCmd = Server.CreateObject("ADODB.Command") MM_insertCmd.ActiveConnection = "dsn=artistfootdata;" MM_insertCmd.CommandText = MM_insertStr MM_insertCmd.Execute ' redirect with URL parameters If (MM_redirectPage = "") Then MM_redirectPage = CStr(Request("URL")) End If If (InStr(1, MM_redirectPage, "?", vbTextCompare) = 0 And (Request.QueryString <> "")) Then MM_redirectPage = MM_redirectPage & "?" & Request.QueryString End If Set Mail = Server.CreateObject("Persits.MailSender") Mail.Host = "ehost.echallenge.com.au" Mail.From = Request.Form("fromemail") Mail.FromName = Request.Form("fromname") Mail.AddAddress Request.Form("email"), Request.Form("name") Mail.Subject = Request.Form("fromname") & " has sent you a Virtual Postcard!" Mail.Body = "Hello " & Request.Form("name") & vbCrLf & vbCrLf & "You have been sent a Virtual Postcard from " & Request.Form("fromname") & " via the Artistfootsteps website (http://www.artistsfootsteps.com)." & vbCrLf & vbCrLf & _ "Tom Roberts, a major painter of the Heidelberg School, officially recorded the opening of the first Federal Parliament on May 9th, 1901. Your electronic Tom Roberts 'The Big Picture' post card provides a link to this historic event, his painting and the life and works of Tom Roberts. This project is associated with the Federal and State Government's Discovering Democracy program. Other artists of the Heidelberg School featured include Sir Arthur Streeton, Walter Withers, Charles Conder, Clara Southern, May Vale, Jane Price, Jane Sutherland and Elizabeth Parsons. " & vbCrLf & vbCrLf & _ "To view your electronic post card and take a walk in the footsteps of some of Australia's famous artists click on the link below. " & vbCrLf & "http://www.artistsfootsteps.com/ecard/viewcard.asp?key=" & Request.Form("key") & vbCrLf & vbCrLf & _ "If you enjoy the site please pass it onto a friend and spread the word about Australia's cultural heritage." On Error Resume Next Mail.Send If Err <> 0 Then Response.Write "An error occurred: " & Err.Description End If Call Response.Redirect(MM_redirectPage) End If %> <% set rsArtistfoot = Server.CreateObject("ADODB.Recordset") rsArtistfoot.ActiveConnection = "dsn=artistfootdata;" rsArtistfoot.Source = "SELECT * FROM ecarddata" rsArtistfoot.CursorType = 0 rsArtistfoot.CursorLocation = 2 rsArtistfoot.LockType = 3 rsArtistfoot.Open rsArtistfoot_numRows = 0 %>
Help spread the word about Discovering Democracy in Australia by sending a friend an E card of famous Australia painter, Tom Roberts work, 'The Big Picture', which is the official recording of the opening of the first Federal Parliament on 9 May 1901. Your special card will also provide a gateway to information about Tom Roberts, his personal letters, and speeches of the day and a detailed history of this important work. The painting hangs in Parliament House, Canberra, and is very fragile having undergone major restoration. This E card program is being used to take this important work on tour to classrooms and art lovers throughout Australia and the world. By sending this 'In the Artist's Footsteps' E card to friends you will provide them with the opportunity to enjoy the works and lives of some of Australia's most famous painters including Sir Arthur Streeton, Charles Conder, Walter Withers, and the Women of the Heidelberg School Clara Southern, May Vale, Jane Price, Elizabeth Parsons and Jane Sutherland. If you wish to order
a poster of 'The Big Picture' telephone the Federal Parliamentary Bookshop
on
TOM
ROBERTS
Left: Arthur Streeton
- Above Us The Great Grave Sky, 1890
|