mod_db_setup is missing this code - Posted (1089 Views)
Starting Member
shaggy073077
Posts: 29
29
Hi all,

Maybe in the dotnet release the mod_db_setup files with will have this in the header of it. It's missing "All Forum--->Admin Section buttons/links right below the header.
Ok coders don't laugh.
Around/about line number 50-71 it'll show this:

Code:
if MemberID <> intAdminMemberID then
Err_Msg = "<li>Only the Forum Admin can access this page</li>"

Response.Write "<table align=""center"" width=""50%"" height=""50%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine & _
" <br><br><p align=""center""><font face=""Verdana, Arial, Helvetica"" size=""3"" color=""#FF0000"">There has been a problem!</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""Verdana, Arial, Helvetica"" size=""2"" color=""#FF0000""><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center"" valign=""middle""><font face=""Verdana, Arial, Helvetica"" size=""2""><a href=""JavaScript:history.go(-1)"">Go Back To Admin Section</a></font></p>" & vbNewLine & _
" <br><br></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
Response.Write " <br></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
writefooter
Response.End
end if

Add below this below:

Code:
Response.Write " <table border=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""") & " <a href=""admin_home.asp"">Admin Section</a><br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine

Snitz forum is missing the top part two links below the header. the "all forum" and "Admin Section" link on the top below the header. That's what this mod add is them links.
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Starting Member
shaggy073077
Posts: 29
29
I have also posted a code snippet some where's on here similar to this one except it adds code lines below where it says "Click here to go to the forum" you pretty much don't need that mod if your adding this one.
Posted
Advanced Member
Carefree
Posts: 4224
4224
You can clean all that up a bit.
"admin_mod_dbsetup.asp"
Code:

Look for the following lines (appx 35-63):

%>
<!--#include file="config.asp"-->
<%
if Session(strCookieURL & "Approval") <> "15916941253" then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if
%>
<!--#include file="inc_sha256.asp"-->
<!--#include file="inc_header.asp"-->
<%
if MemberID <> intAdminMemberID then
Err_Msg = "<li>Only the Forum Admin can access this page</li>"

Response.Write "<table align=""center"" width=""50%"" height=""50%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine & _
" <p align=""center""><font face=""Verdana, Arial, Helvetica"" size=""3"" color=""#FF0000"">There has been a problem!</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""Verdana, Arial, Helvetica"" size=""2"" color=""#FF0000""><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center"" valign=""middle""><font face=""Verdana, Arial, Helvetica"" size=""2""><a href=""JavaScript:history.go(-1)"">Go Back To Admin Section</a></font></p>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
Response.End
end if

Replace them with these:

%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp"-->
<%
If Session(strCookieURL & "Approval") <> "15916941253" Or (MemberID <> intAdminMemberID) Then
scriptname = split(Request.ServerVariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname)) & "?" & Request.ServerVariables("Query_String")
End If
Response.Write "<table border=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolder,"","align=""absmiddle""") & " <a href=""admin_home.asp"">Admin Section</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""") & " <b>Database Modification</b><br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<br />" & vbNewLine
Posted
Starting Member
shaggy073077
Posts: 29
29
thanks carefree. I didn't know how far off I was. Them two links right below header is in every last file/link in admin_home but the db_setup files.
Posted
Advanced Member
Carefree
Posts: 4224
4224
You were on the right track. Reason it could be streamlined was due to relocating the "include" files. By moving "inc_header.asp" up where I put it, you can now identify the member's ID (and use it to compare against the admin member ID). That lets us eliminate all of that secondary error trapping business.
 
You Must enter a message