%@ LANGUAGE="VBScript" %>
<%
Option Explicit
Response.Buffer = True
'INCLUDE FILE FOR THE CONTROL PANEL
'**************************************************
'* Script made by Kyle Boyle
'* E-mail: kyleb@flymasters.net
'*
'* Please don't sell this or use it commercially
'* without letting me know first ok?
'************************************************
'check for authentication
If Session("authorized") <> 1 THEN
Response.Redirect("login.asp")
END IF
Dim strDataBaseLocation
Dim strCon
Dim SiteName, HomePageURL
'Site Name is the name of your site that will appear on the top
' navagation bar
SiteName = "Sobercity.com Forums"
'The url of your home page, not the forum dir
'The little house on the top nav bar will link to this
HomePageURL = "http://www.sobercity.com"
strDataBaseLocation = Server.MapPath("../forum.mdb")
' use the ../ to go up a folder
strCon = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &_
strDatabaseLocation & ";"
'You can insert ;pwd=PASSWORD; if you wanna make the db password protected
Function ReplaceChr(strInput)
Dim strTemp
strTemp = Replace(strInput, "'", "`")
ReplaceChr = strTemp
End Function
Function OutputFix(strInput)
Dim strTemp
strTemp= Replace(strInput, vbcrlf, "
")
OutputFix = strTemp
End Function
%>
<%
Dim action
action = Request.QueryString("action")
%>
![]() Go To Forums |
| Options |
|
|
| Forum Info |
Please fill out the following form to add a new forum to the
SoberCity.com message board system.
The new forum, <%=Request.Form("forum_name")%> has been inserted into
the database
Please click on the forum that you would like to remove,
")
Response.Write("along with all of the posts associated with it.
The selected forum and its associated messages have been removed.
") Response.Write("Return to menu") END SUB 'RemoveForum RemoveForum END IF %> <% Case "removemessage" Sub RemoveMessage() Dim conForum, rstRemove, strSQL, m_id, f_id, t_id m_id = Request.QueryString("m_id") f_id = Request.QueryString("f_id") t_id = Request.QueryString("t_id") Set conForum = Server.CreateObject("ADODB.Connection") conForum.Open strCon strSQL = "DELETE * FROM tblMessages WHERE message_id=" &m_id Set rstRemove = conForum.Execute(strSQL) Set rstRemove = NOTHING conForum.Close Set conForum = NOTHING Response.Write("The message has been deleted.
") Response.Write("To menu") End Sub ' RemoveMessage RemoveMessage %> <% Case "removethread" Sub RemoveThread() Dim conForum, rstRemove, strSQL, f_id, t_id f_id = Request.QueryString("f_id") t_id = Request.QueryString("t_id") Set conForum = Server.CreateObject("ADODB.Connection") conForum.Open strCon strSQL = "DELETE * FROM tblMessages WHERE thread_id=" &t_id Set rstRemove = conForum.Execute(strSQL) Set rstRemove = NOTHING conForum.Close Set conForum = NOTHING Response.Write("The Thread has been deleted.
") Response.Write("To Forum