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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Question
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

slapmonkay
Starting Member

22 Posts

Posted - 30 January 2006 :  20:00:10  Show Profile
What would the IF be if you where logged in to the forums...

So If i want to show something when your logged in it does...

If your logged out i want it to show....






Another thing...

What whould the code be to logout if i want to make a custom form on a seperate part of the site to log out???




Thanks.

Edited by - slapmonkay on 30 January 2006 20:21:42

Soar
Junior Member

USA
197 Posts

Posted - 30 January 2006 :  22:37:05  Show Profile  Visit Soar's Homepage
1. You could use:
If M_STATUS = 1 then
Do XXX
Else
Do YYY

Or, alternatively:
If MEMBER_ID > 0
Do XXX
Else
Do YYY

2. I'm not certain where the logout function is located, but take a look at about line 318 or so in inc_header.asp for some ideas.
Go to Top of Page

slapmonkay
Starting Member

22 Posts

Posted - 31 January 2006 :  13:59:53  Show Profile
anyone got any idea on the logout function?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 31 January 2006 :  14:19:05  Show Profile  Send ruirib a Yahoo! Message
Soar, I guess you mean mlev instead of M_STATUS?

To logout you just need to call the function ClearCookies, in inc_func_common.asp.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

slapmonkay
Starting Member

22 Posts

Posted - 31 January 2006 :  15:57:53  Show Profile
whats the username variable.. (what would i do to show username)
Go to Top of Page

slapmonkay
Starting Member

22 Posts

Posted - 31 January 2006 :  16:27:02  Show Profile
Do i need to carry any Include Files over with the mlev to get it to work?
Go to Top of Page

slapmonkay
Starting Member

22 Posts

Posted - 31 January 2006 :  16:28:20  Show Profile
quote:
Originally posted by slapmonkay

Do i need to carry any Include Files over with the mlev to get it to work?


This is what i got so far Im trying to make a custom login/logout include file that will go in the inc_header.asp file as an include file.




<% if (mlev = 0) then%>
<form method="POST" action="login.asp" id="Form1" name="submit1">
		<table border="0" width="100%" id="table28" cellspacing="0" cellpadding="0" height="100%">
			<tr>
				<td>
				<img border="0" src="../ForumTopImages/10-2-1.jpg" width="35" height="15"></td>
				<td width="94">
				<input type="text" name="Name" size="12" style="height: 13; width: 94; font-family: Verdana; font-size: 2mm; font-weight: bold"></td>
				<td>
				<img border="0" src="../ForumTopImages/10-2-3.jpg" width="10" height="15"></td>
			</tr>
			<tr>
				<td>
				<img border="0" src="../ForumTopImages/10-3-1.jpg" width="35" height="16"></td>
				<td width="94">
				<input type="password" name="Password" size="12" style="height: 14; width: 94; font-family: Verdana; font-size: 10px; font-weight: bold"></td>
				<td>
				<img border="0" src="../ForumTopImages/10-3-3.jpg" width="10" height="16"></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td>
		<img border="0" src="../ForumTopImages/10-4.jpg" width="139" height="8"></td>
	</tr>
	<tr>
		<td>
		<table border="0" width="100%" id="table29" cellspacing="0" cellpadding="0" height="100%">
			<tr>
				<td>
				<img border="0" src="../ForumTopImages/10-5-1.jpg" width="77" height="14"><input class=button input type=image border="0" src="../ForumTopImages/10-5-2.jpg" width="62" height="14" value="Login" id="submit1" name="submit1"><br>
		<img border="0" src="../ForumTopImages/10-6.jpg" width="139" height="15"></td>
			</tr>
		</table>
		</td>
	</tr>
	</table>

	<%
	else
	%>
		<form method="POST" action="<% '" & Request.ServerVariables("URL") & "' %>" id="Form2" name="submit2">
		<table border="0" width="100%" id="table28" cellspacing="0" cellpadding="0" height="100%">
			<tr>
				<td background="../ForumTopImages/BlueBack.jpg" height="31" width="100%"> 
				<b><center></center><font face="Verdana" size="1" color="#FFFFFF">You Are Logged On As: <br> <b><%'" & Session(strCookieURL & "username") & " (" & Session(strCookieURL & "userid") & ")"'%></b></font></td>
				</font></center></b>
				</td>
			</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>
		<input type="hidden" name="Method_Type" value="logout">
		<img border="0" src="../ForumTopImages/10-4-logout.jpg" width="139" height="8"></td>
	</tr>
	<tr>
		<td>
		<table border="0" width="100%" id="table29" cellspacing="0" cellpadding="0" height="100%">
			<tr>
				<td>
				<img border="0" src="../ForumTopImages/10-5-1-logout.jpg" width="77" height="14"><input class=button input type=image border="0" src="../ForumTopImages/10-5-2-logout.jpg" width="62" height="14" value="Login" id="submit1" name="submit1"><br>
		<img border="0" src="../ForumTopImages/10-6.jpg" width="139" height="15"></td>
			</tr>
		</table>
		</td>
	</tr>
	</table>
<%
end if
%>

Edited by - slapmonkay on 31 January 2006 16:30:32
Go to Top of Page

Soar
Junior Member

USA
197 Posts

Posted - 31 January 2006 :  23:33:16  Show Profile  Visit Soar's Homepage
quote:
Originally posted by ruirib

Soar, I guess you mean mlev instead of M_STATUS?

To logout you just need to call the function ClearCookies, in inc_func_common.asp.




Boy, those "Learn ASP in Your Spare Time" lessons aint' what they used to be...

Thanks, Rui.
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.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07