% if session("editor") = "" then response.Redirect("index.asp") end if carpeta = request.QueryString("carpeta") enviarForma = Trim(Request.Form("enviarForma")) if enviarForma = "true" then principalTxt = Trim(Request.Form("principalTxt")) if principalTxt = "si" then principalTxt = true elseif principalTxt = "no" then principalTxt = false end if fecha = Trim(Request.Form("hoyEs")) tituloTxt = Trim(Request.Form("tituloTxt")) pieTxt = Trim(Request.Form("pieTxt")) introTxt = Trim(Request.Form("introTxt")) notaTxt = Trim(Request.Form("nota2Txt")) Set DB = Server.CreateObject("ADODB.Connection") set rs=Server.CreateObject("ADODB.Recordset") set rs1=Server.CreateObject("ADODB.Recordset") DB.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=C:\Inetpub\vhosts\sportstime.com.mx\httpdocs\db\" & DB_) if principalTxt = true then SQL ="Update noticiasAtletas Set principal=false where principal=true and carpeta = '" & carpeta & "'" DB.Execute(SQL) end if SQL = "INSERT INTO noticiasAtletas" SQL = SQL & " (principal,carpeta,titulo,fecha,introduccion,nota,status,pie) " SQL = SQL & "VALUES " SQL = SQL & "(" & principalTxt & ",'" & carpeta & "','"& tituloTxt &"','"& fecha &"','"& introTxt &"','"& notaTxt &"','A','"& pieTxt &"')" DB.execute(SQL) SQL = "SELECT * FROM noticiasAtletas WHERE status = 'A'" rs.open SQL, DB, 3, 3 rs.movelast id = rs.fields("id") rs.close response.Redirect("atletaAgregaNotaImg.asp?id=" & id) end if %>