| Author |  Topic  | 
              
                | RyanAverage Member
 
    
 
                USA858 Posts
 | 
                    
                      |  Posted - 06 September 2003 :  19:50:22     
 |  
                      | I am redesinging inc_header.asp but I am having only one problem with it. When you are logged out it shows the login in box but below it it also says You are logged in as with the logout icon. I must have missed something. If one of you coders better than me would like at my txt of inc_header.asp I would appreciate it. While you are at it, if you would, please give the file a quick going over to determine if it will work overall. (Login in, usergroups, etc) I looked it over and carefully cut code and added it elsewhere and I think I did it but I would appreciate verification. Visit the site I am talking about.
 |  
                      | The Poultry Link - "Serving the best of the fancy with the best of the web"
 Forum Setup Help
 |  | 
              
                | masteraoSenior Member
 
     
 
                Sweden1678 Posts
 | 
                    
                      |  Posted - 06 September 2003 :  21:09:31     
 |  
                      | You must have removed an else from your inc_header.asp. 
 Look for line 486 of code in your inc_header.asp:
 
 
 
	end if -> 486
	Response.Write	"        <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form2"" name=""form2"">" & vbNewLine & _ -> 487
 Add else (marked red below) below end if so that it looks like this:
 
 
 
	end if
else
	Response.Write	"        <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form2"" name=""form2"">" & vbNewLine & _
 |  
                      | Jan
 ===========
 FR Portal Forums | Active Users 4.0.20 Mod
 |  
                      |  |  | 
              
                | RyanAverage Member
 
    
 
                USA858 Posts
 | 
                    
                      |  Posted - 06 September 2003 :  21:27:31     
 |  
                      | Sorry Jan, didnt work.  I installed it at line 487 and got an error wanting the else to be removed. |  
                      | The Poultry Link - "Serving the best of the fancy with the best of the web"
 Forum Setup Help
 |  
                      |  |  | 
              
                | The ImpactJunior Member
 
   
 
                Australia398 Posts
 | 
                    
                      |  Posted - 06 September 2003 :  21:59:37   
 |  
                      | The 'Else' is needed where Jan suggested.  
 The error is appearing because the statement isn't ended.
 
 
 		Response.Write	"<br /><br /></font></td>" & vbNewLine & _
				"        </tr>" & vbNewLine
	end if
	Response.Write	"        </form>" & vbNewLine
end if
Response.Write	"      </table>" & vbNewLine & _
		"    </td>" & vbNewLine & _
		"  </tr>" & vbNewLine & _Add the 'End If' in red located below the form tag around line 521. 
 That should fix your problem !
  |  
                      |  |  | 
              
                | masteraoSenior Member
 
     
 
                Sweden1678 Posts
 | 
                    
                      |  Posted - 07 September 2003 :  11:10:22     
 |  
                      | The Impact is correct. I missed that the ending end if wasn't in place, and it should be put there as The Impact suggested. Nice catch, btw  . |  
                      | Jan
 ===========
 FR Portal Forums | Active Users 4.0.20 Mod
 |  
                      |  |  | 
              
                | RyanAverage Member
 
    
 
                USA858 Posts
 | 
                    
                      |  Posted - 09 September 2003 :  13:53:41     
 |  
                      | Thanks. Will try when I get the chance. I was thinking that possibly the else was supposed to be there with something else.  |  
                      | The Poultry Link - "Serving the best of the fancy with the best of the web"
 Forum Setup Help
 |  
                      |  |  | 
              
                | RyanAverage Member
 
    
 
                USA858 Posts
 |  | 
              
                | The ImpactJunior Member
 
   
 
                Australia398 Posts
 | 
                    
                      |  Posted - 10 September 2003 :  04:58:01   
 |  
                      | This may sound like a really stupid question  but did you complete both changes properly ? 
 And did you have an error or just the problem you started with ?
 |  
                      |  |  | 
              
                | RyanAverage Member
 
    
 
                USA858 Posts
 | 
                    
                      |  Posted - 10 September 2003 :  07:14:18     
 |  
                      | I added the pieces of code to the lines you told me. I got an error. |  
                      | The Poultry Link - "Serving the best of the fancy with the best of the web"
 Forum Setup Help
 |  
                      |  |  | 
              
                | masteraoSenior Member
 
     
 
                Sweden1678 Posts
 | 
                    
                      |  Posted - 10 September 2003 :  09:11:48     
 |  
                      | I tested your inc_header.asp on my test-forum (with some changes), and I noticed the error you mentioned. 
 Replace the last part of your inc_header (starting on line 440) with the following, and it should work properly for you:
 
 
 
if (mlev = 0) then
		Response.Write	"        <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form1"" name=""form1"">" & vbNewLine & _
				"        <input type=""hidden"" name=""Method_Type"" value=""login"">" & vbNewLine & _
				"        <tr>" & vbNewLine & _
				"          <td align=""center"">" & vbNewLine & _
				"            <table>" & vbNewLine & _
				"              <tr>" & vbNewLine
		if (strAuthType = "db") then
			Response.Write	"                <td><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Username:</b></font><br />" & vbNewLine & _
					"                <input type=""text"" name=""Name"" size=""10"" maxLength=""25"" value=""""></td>" & vbNewLine & _
					"                <td><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Password:</b></font><br />" & vbNewLine & _
					"                <input type=""password"" name=""Password"" size=""10"" maxLength=""25"" value=""""></td>" & vbNewLine & _
					"                <td valign=""bottom"">" & vbNewLine
			if strGfxButtons = "1" then
				Response.Write	"                <input src=""" & strImageUrl & "login_box_button.gif"" type=""image"" border=""0"" value=""Login"" id=""submit1"" name=""Login"">" & vbNewLine
			else
				Response.Write	"                <input type=""submit"" value=""Login"" id=""submit1"" name=""submit1"">" & vbNewLine
			end if 
			Response.Write	"                </td>" & vbNewLine & _
					"              </tr>" & vbNewLine & _
					"              <tr>" & vbNewLine & _
					"                <td colspan=""3"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
					"                <input type=""checkbox"" name=""SavePassWord"" value=""true"" tabindex=""-1"" CHECKED><b> Save Password</b></font></td>" & vbNewLine
		else
			if (strAuthType = "nt") then 
				Response.Write	"                <td><font face=""" & strDefaultFontFace & """ size=""1""  color=""" & strHiLiteFontColor & """>Please <a href=""policy.asp"" tabindex=""-1"">register</a> to post in these Forums</font></td>" & vbNewLine
			end if
		Response.Write	"              </tr>" & vbNewLine
		if (lcase(strEmail) = "1") then
			Response.Write	"              <tr>" & vbNewLine & _
					"                <td colspan=""3"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
					"                <a href=""password.asp""" & dWStatus("Choose a new password if you have forgotten your current one...") & " tabindex=""-1"">Forgot your "
			if strAuthType = "nt" then Response.Write("Admin ")
			Response.Write	"Password?</a>" & vbNewLine
			if (lcase(strNoCookies) = "1") then
				Response.Write	"                |" & vbNewLine & _
						"                <a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>" & vbNewLine
			end if
			Response.Write	"                <br /><br /></font></td>" & vbNewLine & _
					"              </tr>" & vbNewLine
		end if
		Response.Write	"            </table>" & vbNewLine & _
				"          </td>" & vbNewLine & _
				"        </tr>" & vbNewLine & _
				"        </form>" & vbNewLine
	end if
else
	Response.Write	"        <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form2"" name=""form2"">" & vbNewLine & _
			"        <input type=""hidden"" name=""Method_Type"" value=""logout"">" & vbNewLine & _
			"        <tr>" & vbNewLine & _
			"          <td align=""center"">" & vbNewLine & _
			"            <table>" & vbNewLine & _
			"              <tr>" & vbNewLine & _
			"                <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>You are logged on as<br />"
	if strAuthType="nt" then
		Response.Write	"<b>" & Session(strCookieURL & "username") & " (" & Session(strCookieURL & "userid") & ")</b></font></td>" & vbNewLine & _
				"                <td> "
	else 
		if strAuthType = "db" then 
			Response.Write	"<b>" & ChkString(strDBNTUserName, "display") & "</b></font></td>" & vbNewLine & _
					"                <td>"
			if strGfxButtons = "1" then
				Response.Write	"<input src=""" & strImageUrl & "logout_box_button.gif"" type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1"">"
			else
				Response.Write	"<input type=""submit"" value=""Logout"" id=""submit1"" name=""submit1"" tabindex=""-1"">"
			end if 
		end if 
	end if 
	Response.Write	"</td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _
			"            </table>" & vbNewLine & _
			"          </td>" & vbNewLine & _
			"        </tr>" & vbNewLine
	if (mlev = 4) or (lcase(strNoCookies) = "1") then
		Response.Write	"        <tr>" & vbNewLine & _
				"          <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>"
		if mLev = 4 and (strEmailVal = "1" and strRestrictReg = "1" and strEmail = "1" and User_Count > 0) then Response.Write(" | <a href=""admin_accounts_pending.asp""" & dWStatus("(" & User_Count & ") Member(s) awaiting approval") & " tabindex=""-1"">(" & User_Count & ") Member(s) awaiting approval</a>")
		Response.Write	"<br /><br /></font></td>" & vbNewLine & _
				"        </tr>" & vbNewLine
	end if
	Response.Write	"        </form>" & vbNewLine
end if
Response.Write	"      </table>" & vbNewLine & _
		"    </td>" & vbNewLine & _
		"  </tr>" & vbNewLine & _
		"</table>" & vbNewLine & _
		"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine
%>
<!--#INCLUDE FILE="alert_members.asp" -->
<%
%>
<!--#INCLUDE FILE="navigation_bar.asp" -->
<%
%>
 |  
                      | Jan
 ===========
 FR Portal Forums | Active Users 4.0.20 Mod
 |  
                      | Edited by - masterao on 10 September 2003  09:37:28
 |  
                      |  |  | 
              
                | RyanAverage Member
 
    
 
                USA858 Posts
 | 
                    
                      |  Posted - 10 September 2003 :  11:28:42     
 |  
                      | Thanks will try when I get on my computer which has my forum files. |  
                      | The Poultry Link - "Serving the best of the fancy with the best of the web"
 Forum Setup Help
 |  
                      |  |  | 
              
                | RyanAverage Member
 
    
 
                USA858 Posts
 | 
                    
                      |  Posted - 10 September 2003 :  17:46:03     
 |  
                      | ouch. Nope sorry that was not it. It screwed it up terrible. It pushed everything over to the left of the screen cut off the footer and made a big black bar at the top. |  
                      | The Poultry Link - "Serving the best of the fancy with the best of the web"
 Forum Setup Help
 |  
                      |  |  | 
              
                | RolandAdvanced Member
 
      
 
                Netherlands9335 Posts
 | 
                    
                      |  Posted - 10 September 2003 :  17:54:52   
 |  
                      | did you remove that TXT file, or is your server really slow at the moment?Okay, well despite the fact that it takes ages to load the pages for me, I don't see any problems in the header part of your pages... Maybe I'm missing something, or you've found the solution
  |  
                      | Edited by - Roland on 10 September 2003  18:01:43
 |  
                      |  |  | 
              
                | RyanAverage Member
 
    
 
                USA858 Posts
 | 
                    
                      |  Posted - 10 September 2003 :  17:57:30     
 |  
                      | sorry FrutZle seemed to go really slow. Any I had to remake the file because I forgot to make a backup and I fixed it in the process. |  
                      | The Poultry Link - "Serving the best of the fancy with the best of the web"
 Forum Setup Help
 |  
                      |  |  | 
              
                | RolandAdvanced Member
 
      
 
                Netherlands9335 Posts
 | 
                    
                      |  Posted - 10 September 2003 :  18:02:25   
 |  
                      | Glad to hear you fixed it... I was wondering where I should look to find the problem  |  
                      |  |  | 
              
                | masteraoSenior Member
 
     
 
                Sweden1678 Posts
 | 
                    
                      |  Posted - 10 September 2003 :  19:41:52     
 |  
                      | Im glad you got it fixed, as it seemed to be something else missing in addition to the login/logout display from your old inc_header.asp.  |  
                      | Jan
 ===========
 FR Portal Forums | Active Users 4.0.20 Mod
 |  
                      |  |  | 
              
                
                |  Topic  |  |