<%
modec=request.querystring("mode")
if modec="new" then
id=request.querystring("id")
if session("utente")<>"gbserviceok" then
response.redirect("news.asp?mode=login")
end if
query="SELECT * FROM news"
if id<>"" then
query=query & " WHERE id_news = " & id
end if
set news = Server.CreateObject("ADODB.Recordset")
news.ActiveConnection = MM_gbservice_STRING
news.Source =query & " ORDER BY data DESC"
news.CursorType = 0
news.CursorLocation = 2
news.LockType = 3
news.Open()
news_numRows = 0
if news.eof or news.bof or id="" then
news.addnew
end if ' end if news.eof
data=request("data")
if data="" then
data=date
end if
ind="news.asp?mode=save"
if id<>"" then
ind = ind & "&id=" & id
end if
%>