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
 Code Support: ASP (Non-Forum Related)
 Just a little piece of snitz's asp code
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

SGr33n
Starting Member

Italy
17 Posts

Posted - 11 June 2001 :  07:22:00  Show Profile  Visit SGr33n's Homepage  Send SGr33n an ICQ Message
Hi !

I need a blank page with just the M_Name of last registered user... it is just a little piece of snitz forum... pls help me...

tnx

Sergio

e3stone
Average Member

USA
885 Posts

Posted - 12 June 2001 :  18:07:32  Show Profile  Send e3stone an AOL message
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<%
if strShowStatistics = "1" then
WriteStatistics
end if
set rs = nothing
set rsForum = nothing
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%

sub WriteStatistics()

Dim NewMember_Name, NewMember_Id, Member_Count

set rs = Server.CreateObject("ADODB.Recordset")


'## Forum_SQL - Get newest membername and id from DB
strSql = "SELECT M_NAME, MEMBER_ID FROM " & strMemberTablePrefix & "MEMBERS WHERE M_STATUS=1 AND MEMBER_ID > 1"
strSql = strSQL & " ORDER BY M_DATE desc;"
set rs = my_Conn.Execute(strSql)
if not rs.EOF then
NewMember_Name = ChkString(rs("M_NAME"), "display")
NewMember_Id = rs("MEMBER_ID")
else
NewMember_Name = ""
end if


if NewMember_Name <> "" then
%>
<tr>
<td bgcolor="<%= strForumCellColor %>" colspan="<% if ((strShowModerators = "1") or (mlev = "4" or mlev = "3")) then Response.Write("6") else Response.Write("4") end if%>">
<font face="<%= strDefaultFontFace %>" size="<% =strFooterFontSize %>">Please welcome our newest member:
<%
if strUseExtendedProfile then
Response.Write " <a href=""pop_profile.asp?mode=display&id="& NewMember_Id & """>"
else
Response.Write " <a href=""JavaScript:openWindow2('pop_profile.asp?mode=display&id=" & NewMember_Id & "')"">"
end if
Response.Write NewMember_Name & "</a>.</font>" & vbcrlf
%>
</td>
</tr>
<%
end if
end sub
%>


that should be it

<-- Eric -->


InsideWaco.com

Edited by - e3stone on 12 June 2001 18:09:01
Go to Top of Page

SGr33n
Starting Member

Italy
17 Posts

Posted - 21 June 2001 :  14:12:11  Show Profile  Visit SGr33n's Homepage  Send SGr33n an ICQ Message
Tnx a lot, but:

Microsoft VBScript compilation error '800a03ea'

Syntax error

/forum/prova.asp, line 1

if strShowStatistics = "1" then WriteStatisticsend if set rs = nothing set rsForum = nothing
---------------------------------------------------^

the file is on:

http://www.ircaserta.it/forum/prova.asp

:(

Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 21 June 2001 :  16:25:57  Show Profile  Visit gor's Homepage
Something got messed up in that file, because that code should be on a couple of lines.
Try adding linebreaks so it looks like:

if strShowStatistics = "1" then
WriteStatistics
end if
set rs = nothing
set rsForum = nothing


Pierre
Join the Snitz WebRing
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