<% if session("autorizado") = "" then response.Redirect("index.asp") end if deporte=request.QueryString("deporte") id = request.QueryString("notaID") id2 = request.QueryString("id2") guardar = request.QueryString("guardar") if deporte = "" then response.Redirect("menu.asp") end if if primer = "si" then primer = true end if if primer = "no" then primer = false end if titulo=request.Form("titulo") fecha=request.Form("fecha") introduccion=request.Form("introduccion") foto=request.Form("foto") pie=request.Form("pie") nota=request.Form("nota") primer_ni=request.Form("primer") if guardar = "si" then if titulo="" then errText = "- Falta el titulo.
" guardar = "no" end if if fecha="" or fecha = "dd/mm/aaaa" then errText = errText & "- Falta la fecha.
" guardar = "no" end if if introduccion="" then errText = errText & "- Falta introduccion.
" guardar = "no" end if if foto="" then errText = errText & "- Falta foto.
" guardar = "no" end if if pie="" then errText = errText & "- Falta pie de foto.
" guardar = "no" end if if nota="" then errText = errText & "- Falta nota.
" guardar = "no" end if end if Set DB = Server.CreateObject("ADODB.Connection") DB.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath("../../db/_spmdb.mdb")) if guardar = "si" then set rsUPD = Server.CreateObject("ADODB.Recordset") SQL ="Update " & deporte & " Set titulo='" & titulo & "', fecha='" & fecha & "', foto='" & foto & "', pie='" & pie & "', introduccion='" & introduccion & "', nota='" & nota & "' where id=" & id2 set rsUPD = DB.Execute(SQL) end if %> Editor de noticias de <%=deporte%> <% if id <> "" then Set rsEDI = Server.CreateObject("ADODB.RecordSet") SQL ="select * from " & deporte & " where id = " & id rsEDI.Open SQL,DB,3,3 %>

<%=errText%>

Noticias de <%=deporte%>

Titulo: ">
Fecha: " maxlength="10">
Foto: ">
Pie de Foto: ">
Introducción:
Nota Completa:
<<Regresar al menu
<% else %>

<% Set rsNOT = Server.CreateObject("ADODB.RecordSet") SQL ="select * from " & deporte & " where status = 'A' order by fechahora desc" rsNOT.Open SQL,DB,3,3 %>

<<Regresar al menu
<% end if %>