Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Display Name
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Cliff
Average Member

United States
501 Posts

Posted - 13 November 2003 :  07:27:19  Show Profile  Visit Cliff's Homepage
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  Show Profile  Visit RebelTech's Homepage  Send RebelTech an ICQ Message
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
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 13 November 2003 :  09:17:14  Show Profile  Visit D3mon's Homepage
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"
Go to Top of Page

Cliff
Average Member

United States
501 Posts

Posted - 13 November 2003 :  09:22:23  Show Profile  Visit Cliff's Homepage
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
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 13 November 2003 :  09:57:26  Show Profile  Visit RebelTech's Homepage  Send RebelTech an ICQ Message
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
Go to Top of Page

Cliff
Average Member

United States
501 Posts

Posted - 13 November 2003 :  11:11:10  Show Profile  Visit Cliff's Homepage
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!
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 13 November 2003 :  11:44:31  Show Profile  Visit RebelTech's Homepage  Send RebelTech an ICQ Message
No problem. I am glad it worked!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.4 seconds. Powered By: Snitz Forums 2000 Version 3.4.07