Status of viewing members ICQ field - نوشته شده در (459 Views)
Junior Member
endomorph
مطلب: 128
128
I have been trying to wrap by head round this for a few days but I cannot get what I want.
I want to check if the person viewing a forum/topic is a member and has 'something' in their ICQ field.
If not, they get an error message.
Which variable is the "viewing members name/ID" variable ?
Ayy ideas Podge ? Oh great and wonderful guru ?<
Need help with your Snitz ? Most Snitz & ASP custom coding undertaken. Email for info | Search Engine Optimisation
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Dev. Team Member & Support Moderator
OneWayMule
مطلب: 4969
4969
This should give you an idea:
Code:
If mLev > 0 Then
strSql = "SELECT M_ICQ FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & memberID
Set rsMemberICQ = my_conn.Execute(strSql)
If Not rsMemberICQ.EOF Then
strMemberICQ = rsMemberICQ("M_ICQ")
End If
rsMemberICQ.Close
Set rsMemberICQ = Nothing
If trim(strMemberICQ) = "" Then
'No ICQ value -> display error here Else
'Do something else here End If
Else
'User is not logged in, display error here End If

Let me know if you have any questions.<
نوشته شده در
Junior Member
endomorph
مطلب: 128
128
Oneway,

Thanks for that. I managed to sort it in the end.
I used -

Code:

dim rspaid
dim paidmember
dim paidcheck
dim strSqlcheck

if paidmember > 1 then
'# Do nothing
else
'# Check if paid member
set rspaid = server.CreateObject("adodb.recordset")
strSqlcheck = "SELECT M_ICQ FROM " & strMemberTablePrefix & "MEMBERS "
strSqlcheck = strSqlcheck & " WHERE M_NAME = '" & strDBNTUserName & "'"
rspaid.Open strSqlcheck, my_Conn
paidcheck = rspaid("M_ICQ")

if trim(paidcheck) = "Paid" then
paidmember = 1
else paidmember = 0
end if
rspaid.Close
set rspaid = nothing
end if

Seems to work fine but any comments on the above would be appreciated.<
Need help with your Snitz ? Most Snitz & ASP custom coding undertaken. Email for info | Search Engine Optimisation
 
شما باید یک متن وارد کنید