% If Session(strCookieURL & "Approval") = "15916941253" Then %>
<%
Dim rqCatID, strCatTitle
strCatTitle = ""
rqCatID = request("CatID")
if rqCatID = "" then
rqCatID = 0
else
strsql = "SELECT FC_DESCRIPTION FROM " & strTablePrefix & "FAQ_CAT WHERE FC_ID=" & rqCatID
set frs = my_conn.execute(strsql)
strCatTitle = frs("FC_DESCRIPTION")
frs.Close
end if
%>
Add Category | ">Submit Faq Question
<%
strfaction = request.querystring("action")
Select Case strfaction
Case ""
strsql = "SELECT FC_ID, FC_DESCRIPTION FROM " & strTablePrefix & "FAQ_CAT ORDER BY FC_ID"
set frs = my_conn.execute(strsql)
strdisplay = ""
response.write("
" & vbcrlf)
response.write "| " &_
"Categories |
"
if frs.eof then
strdisplay = strdisplay & "| No Faq Categories Found Add |
"
else
Do until frs.eof
' ChkString(Request.QueryString("FORUM_Title"),"display")
' response.write("" & frs("F_FAQ_QUESTION") & "" & vbcrlf)
strdisplay = strdisplay & "| "
strdisplay = strdisplay & ""
strdisplay = strdisplay & "" & ChkString(frs("FC_DESCRIPTION"),"display") & " "
strdisplay = strdisplay & " | " & vbcrlf
strdisplay = strdisplay & " ![]() |
"
frs.movenext
Loop
End if
if strdisplay <> "" then
response.write(strdisplay)
End if
response.write("
")
set frs = nothing
if rqCatID <> 0 then
strsql = "SELECT FI_ID, FI_LINK_TITLE, FI_LINK_BODY FROM " & strTablePrefix & "FAQ_INFO " &_
" WHERE FI_CAT=" & rqCatID & " ORDER BY FI_ORDER"
set frs = my_conn.execute(strsql)
strdisplay = ""
response.write("" & vbcrlf)
if frs.eof then
strdisplay = strdisplay & "| No Faq questions Found, Submit |
"
else
Do until frs.eof
' ChkString(Request.QueryString("FORUM_Title"),"display")
' response.write("" & frs("F_FAQ_QUESTION") & "" & vbcrlf)
strdisplay = strdisplay & " "
strdisplay = strdisplay & ""
strdisplay = strdisplay & "" & ChkString(frs("FI_LINK_TITLE"),"display") & " |
"
strdisplay = strdisplay & vbcrlf
strdisplay = strdisplay & "" & vbcrlf
strdisplay = strdisplay & formatStr(frs("FI_LINK_BODY")) & " "
strdisplay = strdisplay & " |
"
frs.movenext
Loop
End if
if strdisplay <> "" then
response.write(strdisplay)
End if
response.write("
")
set frs = nothing
end if
Case "delete"
%>
<%
strFID = request("id")
if request.querystring("id") = "" then
response.write("Are you sure you want to delete?
" & _
"Yes | No")
Else
strsql = "DELETE FROM " & strTablePrefix & "FAQ_INFO WHERE FI_ID=" & strFID
my_conn.execute(strsql)
response.write("Faq Question Deleted
Click Here To return to Faq Admin")
End if
%>
<%
Case "deleteCat"
%>
<%
strFID = request("id")
if request.querystring("id") = "" then
response.write("
Are you sure you want to delete?
" & _
"Yes | No")
Else
strsql = "DELETE FROM " & strTablePrefix & "FAQ_CAT WHERE FC_ID=" & strFID
my_conn.execute(strsql)
response.write("Faq Question Deleted
Click Here To return to Faq Admin")
End if
%>
<%
Case "edit"
strFID = request("id")
If request.querystring("id") = "" then
%>
<% if strAllowForumCode = "1" then %>
* Forum Code is ON
<% else %>
* Forum Code is OFF
<% end if %>
<% if strAllowHTML = "1" then %>
* HTML is ON
<% else %>
* HTML is OFF
<% end if %>
<%
strsql = "SELECT FI_ID, FI_ORDER, FI_CAT, FI_LINK, FI_LINK_TITLE, FI_LINK_BODY FROM " & strTablePrefix & "FAQ_INFO WHERE FI_ID=" & strFID
set frs = my_conn.execute(strsql)
txtMsg = frs("FI_LINK_BODY")
response.write "")
ELSE
strFormQ = request.form("fquestion")
strFormA = request.form("Message")
strFormQ = ChkString(strFormQ,"message")
strFormA = ChkString(strFormA,"message")
strsql = "UPDATE " & strTablePrefix & "FAQ_INFO set FI_LINK_TITLE='" & strFormQ & "', FI_LINK_BODY='" & strFormA
strSql = strSQL & "', FI_ORDER=" & request.form("fOrder") & ",FI_LINK='" & request.form("flinkref") & "', FI_CAT=" & request.form("fCatID") & " WHERE FI_ID=" & strFID
my_conn.execute(strsql)
response.write("Faq Entry Updated, Click Here to return to Faq Admin")
response.write ""
END IF
%>
<%
Case "submit"
IF request.querystring("do") = "" then
%>
<% if strAllowForumCode = "1" then %>
* Forum Code is ON
<% else %>
* Forum Code is OFF
<% end if %>
<% if strAllowHTML = "1" then %>
* HTML is ON
<% else %>
* HTML is OFF
<% end if %>
<%
response.write "")
ELSE
strFormQ = request.form("fquestion")
strFormA = request.form("Message")
strFormQ = ChkString(strFormQ,"message")
strFormA = ChkString(strFormA,"message")
strsql = "INSERT INTO " & strTablePrefix & "FAQ_INFO (FI_ORDER, FI_LINK, FI_LINK_TITLE, FI_LINK_BODY, FI_CAT)"
strsql = strsql & " VALUES (" & Request.form("fOrder") & ",'" & Request.form("flinkRef") & "', '" & strFormQ & "', '" & strFormA & "'," & Request.form("CatID") & ")"
my_conn.execute(strsql)
response.write("Faq Entry Submitted, Click Here to return to Faq Admin")
response.write ""
end if
response.write ""
Case "addCat"
IF request.querystring("do") = "" then
%>
")
ELSE
strFormT = request.form("catTitle")
strFormT = ChkString(strFormT,"title")
strsql = "INSERT INTO " & strTablePrefix & "FAQ_CAT (FC_DESCRIPTION)"
strsql = strsql & " VALUES ('" & strFormT & "')"
my_conn.execute(strsql)
response.write("Faq Category Submitted, Click Here to return to Faq Admin")
end if
%>
<% Case "editCat"
strsql = "SELECT * FROM " & strTablePrefix & "FAQ_CAT WHERE FC_ID=" & request("id")
set frs = my_conn.execute(strsql)
IF request.querystring("do") = "" then
%>
")
ELSE
strFormT = request.form("catTitle")
strFormT = ChkString(strFormT,"title")
strsql = "UPDATE " & strTablePrefix & "FAQ_CAT SET FC_DESCRIPTION='" & strFormT & "' WHERE FC_ID=" & request("id")
my_conn.execute(strsql)
response.write("Faq Category Submitted, Click Here to return to Faq Admin")
end if
%>
<%
End Select
WriteFooter
Else
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
End IF
%>