%
topic = request.form("topic")
msg = request.form("msg")
status = request.form("status")
show = request.form("show")
if show = "ON" then
show = 1
else
show = 0
end if
'==============================================
'======= Where the links will be directed
'======= if there is an action
'==============================================
Page = "links_add"
'==============================================
'======= Where the links will be directed
'======= if there is a jump action
'======= [e.g. After addition, we need to jump to the edit page]
'==============================================
Page2 = "links_edit"
'==============================================
'======= Set the db table belonging to this page
'==============================================
dbTable = "page_links"
'==============================================
'======= including the HeaderTableStart
'==============================================
HeaderTableTitle = "Links: Add"
%>
<%
''''' HeaderTableEnd : must be added after including the HeaderTableStart
'==============================================
If status = "ok" then
if msg = "" then
writeMSG "Please fill the blank fields.", "ErrorType"
Else
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''' In executing query: if there is Error Resume Next
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
On Error Resume Next
selectSQL = "SELECT * FROM "&dbTable&" ORDER BY orderid DESC"
set rs=ADO.execute(selectSQL)
if not rs.eof then
orderid = cint(rs("orderid")) + 1
else
orderid = 1
end if
addSQL= "INSERT INTO "&dbTable&" (orderid, thetopic, thetext ,show) VALUES ("&orderid&", '"&topic&"', '"&msg&"','"&show&"')"
ADO.execute(addSQL)
if err.number = 0 then
writeMSG "Addition done successufly." , "OkType"
response.write "
Adding a links page information |