Author |
Topic |
|
Cliff
Average Member
United States
501 Posts |
Posted - 13 November 2003 : 07:27:19
|
I know nothing about asp at all.
How can I create a new page to be used with Snitz that will display the current date / time as well as the username? Actually I'd like it to be included in an e-mail.
Thanks. |
|
RebelTech
Average Member
USA
613 Posts |
Posted - 13 November 2003 : 08:51:25
|
I think this should work....
Dim strTimeNow, strHourNow, strMinNow, strSecNow strHourNow = Hour(Now()) strMinNow = Minute(Now()) strSecNow = Second(Now())
strTimeNow = (strHourNow - strTimeOffset) & ":" & strMinNow & ":" & strSecNow
response.write" " & Session(strCookieURL & "username") & " <br> " & strTimeNow & "" & vbNewLine |
|
|
D3mon
Senior Member
United Kingdom
1685 Posts |
Posted - 13 November 2003 : 09:17:14
|
If you're sending an email, bear in mind that the current date and time will already be included in the email information. |
Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
|
|
Cliff
Average Member
United States
501 Posts |
Posted - 13 November 2003 : 09:22:23
|
Thanks RebelTech, I tried a few different things to get it to work. The date was simple to fix, I just sent it as Now(). I can't get the username though
Here is what I tried:
<% Dim objCDO Set objCDO = Server.CreateObject("CDONTS.NewMail") %> <% objCDO.To = "mail@mail.org" objCDO.From = "mail@mail.org" objCDO.bcc = "mail@mail.org"
Dim txtSubject txtSubject = "Hello username has visited the first page of the games selection page. If they moved on to the second page to select a game to play an additional e-mail will be sent. response.write" & Session(strCookieURL & "username") & " <br> " & Now() & "" & vbNewLine
objCDO.Subject = "Attn: The Games page has been visited" objCDO.Body = txtSubject objCDO.Send %>
Here is the e-mail that was received: Hello username has visited the first page of the games selection page. If they moved on to the second page to select a game to play an additional e-mail will be sent. response.write <br> 11/13/03 9:13:51 AM
I took out the first " in the statement after the response.write otherwise it gave an error at that point.
Do I need to include a file so the e-mail page know the username, or should it be set already?
Thanks.
Edited to remove real e-mail addresses. |
Edited by - Cliff on 13 November 2003 09:23:18 |
|
|
RebelTech
Average Member
USA
613 Posts |
Posted - 13 November 2003 : 09:57:26
|
Sorry, I just grabbed the time code from UTC mode that we did earlier. Try this, it works just reformat to your needs.
response.write" " & ChkString(strDBNTUserName, "display") & " <br> " & Now() & "" & vbNewLine
The first was for nt authentification this is for db |
Edited by - RebelTech on 13 November 2003 09:58:06 |
|
|
Cliff
Average Member
United States
501 Posts |
Posted - 13 November 2003 : 11:11:10
|
Thanks!!!
Here is what I used:txtSubject = "Hello " & ChkString(strDBNTUserName, "display") & " has visited the second page of the games selection page on " & Now() & ". They were previously notified that an additional e-mail would be sent and elected to continue." & vbNewLine
Response.Write wasn't needed. It actually came across in the e-mail.
Thanks for the help! |
|
|
RebelTech
Average Member
USA
613 Posts |
Posted - 13 November 2003 : 11:44:31
|
No problem. I am glad it worked! |
|
|
|
Topic |
|