Hi i am trying to make a config for a mod. i am fairly new to this so sorry if this is a simple thing..
i am pretty sure i have every thing set up right but for some reason it doesn't update the database with the new vaules.. i have all the database stuff setup right to..
here is my code i am using..
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_admin.asp"--><%
if Session(strCookieURL & "Approval") <> "15916941253" then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if
NewsScriptV = "1.0" ' to do put in main script.
Response.Write "<div class=""content"">" & _
"<table>" & _
"<tr>" & _
"<td>" & _
"<a href=""default.asp"">All Forums</a> " & _
"<a href=""admin_home.asp"">Admin Section</a> " & _
"Site Addon's Configuration</td>" & _
"</tr>" & _
"</table>"
if Request.Form("Method_Type") = "Write_Configuration" then
Err_Msg = ""
if Request.Form("strNewsForum_ID") = "" then
Err_Msg = Err_Msg & "<li>You Must Enter a forum Number</li>"
end if
if Request.Form("STRNEWSTOPICCOUNT") = "" then
Err_Msg = Err_Msg & "<li>You Must Enter a Number for news post</li>"
end if
if Err_Msg = "" then
for each key in Request.Form
if left(key,3) = "str" or left(key,3) = "int" then
strDummy = SetConfigValue(1, key, ChkString(Request.Form(key),"SQLstring"))
end if
next
Application(strCookieURL & "ConfigLoaded") = ""
Response.Write "<table><tr><td class=""tc"">Configuration Posted" & _
"<meta http-equiv=""Refresh"" content=""2; URL=admin_home.asp"">" & _
"<br />Congratulations!" & _
"<br /><a href=""admin_home.asp"">Back To Admin Home</a></td></tr></table>"
end if
else
strtest = chkString(STRNEWSTOPICCOUNT,"")
Response.Write "<form action=""admin_config_addon.asp"" method=""post"" id=""Form1"" name=""Form1"" onReset=""Javascript:doDefaultHighlights();"">" & _
"<input type=""hidden"" name=""Method_Type"" value=""Write_Configuration"">" & _
"<table>" & _
"<tr>" & _
"<td><b>Site Addon's Configuration</b></td>" & _
"</tr>" & _
"<tr>" & _
"<td class=""tc""><b>News Setup</b><br />" & strtest & "</td>" & _
"</tr>" & _
"</table>" & _
"<table>" & _
"<tr>" & _
"<td><b>News Script Version Number</b></td>" & _
"<td>" & NewsScriptV & "</td>" & _
"</tr>" & _
"<tr>" & _
"<td><b>Script outside of forum</b></td>" & _
"<td>" & _
"<input type=""radio"" class=""radio"" name=""strOUTSIDEFORUM"" value=""1""" & _
chkRadio(strOUTSIDEFORUM,0,1) & ">Yes " & _
"<input type=""radio"" class=""radio"" name=""strOUTSIDEFORUM"" value=""0""" & _
chkRadio(strOUTSIDEFORUM,0,0) & ">No " & _
" </td>" & _
"</tr>" & _
"<tr>" & _
"<tr>" & _
"<td><b>Select News Forum</b><br /></td>" & _
"<td>" & _
"<input type=""text"" name=""strNewsForum_ID"" size=""3"" value=""" & chkExist(chkString(strNewsForum_ID,"edit")) & """> " & _
" </td>" & _
"</tr>" & _
"<tr>" & _
"<td><b>Total Post to Disply</b></td>" & _
"<td>" & _
"<input type=""text"" name=""STRNEWSTOPICCOUNT"" size=""3"" value=""" & chkExist(chkString(strNEWSTOPICCOUNT,"edit")) & """> " & _
" </td>" & _
"</tr>" & _
"</table>" & _
"<table>" & _
"<tr class=""tc"">" & _
"<td>" & _
"<input type=""submit"" value=""Submit New Config"" id=""submit1"" name=""submit1""> " & _
"<input type=""reset"" value=""Reset Old Values"" id=""reset1"" name=""reset1""></td>" & _
"</tr>" & _
"</table>" & _
"</div>" & _
"</form>"
end if
Call WriteFooter
Response.End
%>