<% if session("autorizado") = "" then response.Redirect("index.asp") end if guardar=request.QueryString("guardar") primer=request.Form("primer") deporte=request.QueryString("deporte") 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=Replace(request.Form("introduccion"),"'","′") foto=request.Form("foto") pie=request.Form("pie") nota=Replace(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 if guardar = "si" then Set DB = Server.CreateObject("ADODB.Connection") Set rs1 = Server.CreateObject("ADODB.RecordSet") Set rs2 = Server.CreateObject("ADODB.RecordSet") DB.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath("../../db/_spmdb.mdb")) if primer = true then SQL ="Update " & deporte & " Set principal=false where principal=true" set rs1 = DB.Execute(SQL) end if SQL ="select * from " & deporte & "" rs1.Open SQL,db,1,2 rs1.AddNew rs1("titulo") = titulo rs1("fecha") = fecha rs1("introduccion") = introduccion rs1("nota") = nota rs1("foto") = foto rs1("pie") = pie rs1("principal") = primer rs1("status") = "A" rs1("fechahora") = now rs1.Update titulo="" fecha="" introduccion="" foto="" foto_thumb="" pie="" nota="" rs1.close rs1.Open SQL, DB, 1, 2 iCuantos = rs1.RecordCount while iCuantos > 16 rs1.MoveFirst rs1.Delete rs1.Update iCuantos = iCuantos - 1 wend rs1.Close end if %> Editor de noticias de <%=deporte%>

<%=errText%>

Noticias de <%=deporte%>

Noticia de primer página: Si No
Titulo:
Fecha:
Foto:
Pie de Foto:
Introducción:
Nota Completa:
<<Regresar al menu