<% if session("autorizado") = "" then response.Redirect("index.asp") end if carpeta=request.QueryString("carpeta") Set DB = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.RecordSet") DB.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath("../../db/_spmdb.mdb")) SQL = "select * from atletas where carpeta = '" & carpeta & "'" rs.open SQL, DB, 3, 3 atleta = rs.fields("atleta") rs.close DB.close id = request.QueryString("notaID") id2 = request.QueryString("id2") guardar = request.QueryString("guardar") if carpeta = "" then response.Redirect("_atletaLista.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 noticiasAtletas Set titulo='" & titulo & "', fecha=" & fecha & ", foto='" & foto & "', pie='" & pie & "', introduccion='" & introduccion & "', nota='" & nota & "' where carpeta = '" & carpeta & "' and id=" & id2 set rsUPD = DB.Execute(SQL) end if %> Editor de noticias de <%=atleta%> <% if id <> "" then Set rsEDI = Server.CreateObject("ADODB.RecordSet") SQL ="select * from noticiasAtletas where carpeta = '" & carpeta & "' and id = " & id rsEDI.Open SQL,DB,3,3 %>

<%=errText%>

Noticias de <%=atleta%>

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 noticiasAtletas where carpeta = '" & carpeta & "' and status = 'A' order by fechahora desc" rsNOT.Open SQL,DB,3,3 if rsNOT.eof then response.Write("No existen notas para este atleta
<<Regresar al menu") response.End() end if %>

<<Regresar al menu
<% end if %>