Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Add a post in a forum
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kyodai
New Member

Azerbaijan
74 Posts

Posted - 20 April 2010 :  14:14:38  Show Profile  Reply with Quote
I know it sounds stupid, but i would like to have an asp page that adds a post to a (secret) forum. We have an app which is checking our backend server (The one for videos, images and so on) and can report system state by calling a website.

What i need is an asp page that adds a post to a specific forum, like when i call it http://mysite.com/pager.asp?Message=Server%20Down&Detail=The%20Server%20is%20down%20since%2009:34

so it would make a post in the admin forum that has the subject "Server down" and the message text "The Server is down since 09:34".

I fumbled a lot with it but simply didn't get it to work, it looks like it should work, but i never see the post.



I tried it with a raw SQL statement as i had no better idea. Can anyone help?



strSql = "INSERT INTO " & strTablePrefix & "TOPICS ("
				strSql = strSql & " CAT_ID"
				strSql = strSql & ", FORUM_ID"
				strSql = strSql & ", T_SUBJECT"
				strSql = strSql & ", T_AUTHOR"
				strSql = strSql & ", T_MESSAGE"
				strSql = strSql & ") VALUES ("
				strSql = strSql & " '" & "2" & "'"
				strSql = strSql & ", '" & "60" & "'"
				strSql = strSql & ", '" & "Test Subject" & "'"
				strSql = strSql & ", '" & "1" & "'"
				strSql = strSql & ", '" & "The Server is down test test test" & "'"

my_Conn.Execute (strSql)

kyodai
New Member

Azerbaijan
74 Posts

Posted - 20 April 2010 :  15:44:18  Show Profile  Reply with Quote
nvm, i just added

<!--#INCLUDE FILE="inc_sha256.asp" -->
<!--#INCLUDE FILE="inc_header_short.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->

besides config.asp to the includes and it works. Dun get why these were required, prolly something i overlooked. Anyways, what counts is it works now.
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 21 April 2010 :  10:50:14  Show Profile  Reply with Quote
you need inc_header_short or inc_header because the database connection (my_Conn) is created and opened there. It's closed and destroyed in inc_footer_short.

    _-/Cripto9t\-_
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07