<% Dim oConn,rs,oConn1,rd Dim PaginaActual Dim PaginasTotales Dim TamPagina dim c1,c2,c3,c4 dim t1,t2,t3,t4 dim vnom ,vape ,vlic ,vpas ,vclu ,vano ,vcor ,vsex ,vc1,vc2,vc3,vc4, tipo_op,cadena,vfed, esbueno sub enviocorreo() Dim cBody, n , cate cbody="Confirmacion de datos"& chr(13) & chr(10) cbody=cbody & chr(13) & chr(10) cBody = cbody & "Nombre: " & vnom & chr(13) & chr(10) cbody=cbody & "Apellidos: " & vape & chr(13) & chr(10) cbody=cbody & "Nº Licencia: " & vlic & chr(13) & chr(10) cbody=cbody & "Club: " & vclu & chr(13) & chr(10) cbody=cbody & "Sexo: " & vsex & chr(13) & chr(10) cbody=cbody & "Año Nacimiento: " & vano & chr(13) & chr(10) if vsex="MASCULINO" then if vano<= 1958 then cate="MASTER MASCULINO" else if vano<=1968 then cate="VETERANO MASCULINO" else if vano<=1988 then cate="SENIOR MASCULINO" else if vano<=1992 then cate="JUVENIL MASCULINO" else cate="SIN CATEGORIA" end if end if end if end if else if vano<= 1958 then cate="MASTER FEMENINO" else if vano<=1968 then cate="VETERANA FEMENINO" else if vano<=1988 then cate="SENIOR FEMENINO" else if vano<=1992 then cate="JUVENIL FEMENINO" else cate="SIN CATEGORIA" end if end if end if end if end if cbody=cbody & "Categoria: " & cate & chr(13) & chr(10) cbody=cbody & "Federacion: " & vfed & chr(13) & chr(10) cbody=cbody & "Correo Electrónico: " & vcor & chr(13) & chr(10) if c1 then if vc1 then cbody=cbody & "Inscripción para la carrera de ELDA " & chr(13) & chr(10) else cbody=cbody & "NO Inscrito para la carrera de ELDA " & chr(13) & chr(10) end if end if if c2 then if vc2 then cbody=cbody & "Inscripción para la carrera de LA VALL D'UIXÓ " & chr(13) & chr(10) else cbody=cbody & "NO Inscrito para la carrera de LA VALL D'UIXÓ " & chr(13) & chr(10) end if end if if c3 then if vc3 then cbody=cbody & "Inscripción para la carrera de CASTELLON " & chr(13) & chr(10) else cbody=cbody & "NO Inscrito para la carrera de CASTELLON " & chr(13) & chr(10) end if end if if c4 then if vc4 then cbody=cbody & "Inscripción para la carrera de BUSSOT " & chr(13) & chr(10) else cbody=cbody & "NO Inscrito para la carrera de BUSSOT " & chr(13) & chr(10) end if end if cbody=cbody & chr(13) & chr(10) cbody=cbody & "En caso de ser requerido por la organización, deberá presentar una copia de esta confirmación en la carrera. " Set oCDO = Server.CreateObject("CDONTS.NewMail") 'Asignamos las propiedades al objeto oCDO.From = "mavinf@marinaalta.com" oCDO.To = vcor oCDO.Subject = "Confirmacion de alta o cambios en la inscripcion para carreras por montaña de la femecv" oCDO.Body = cBody oCDO.Cc = "mavinf@marinaalta.com;cibergata@hotmail.com;" & vcor oCDO.Bcc = "mavinf@marinaalta.com" 'oCDO.MailFormat = 0 oCDO.Send Set oCDO = Nothing 'Liberar... end sub sub alta() Dim oConn2,rs2,oConn1,rd,ssql, tx , tx2, cate set oConn2=Server.CreateObject("ADODB.Connection") 'set rs=Server.CreateObject("ADODB.Recordset") oconn2.Provider="Microsoft.Jet.OLEDB.4.0" oconn2.Open(Server.Mappath("femecv.mdb")) vnom=replace(vnom,"'"," ") vape=replace(vape,"'"," ") vpas=replace(vpas,"'"," ") vlic=replace(vlic,"'","") vlic=replace(vlic," ","") vcli=replace(vclu,"'"," ") vcor=replace(vcor,"'","") vfed=replace(vfed,"'","") tx="" tx2="" if vsex="MASCULINO" then tx=",sexe" tx2=", 0 " else tx=",sexe" tx2=", -1 " end if if c1 then tx=tx & " , i1 " if vc1 then tx2=tx2 & ", -1" else tx2=tx2 & ", 0" end if end if if c2 then tx=tx & " , i2 " if vc2 then tx2=tx2 & ", -1" else tx2=tx2 & ", 0" end if end if if c3 then tx=tx & " , i3 " if vc3 then tx2=tx2 & ", -1" else tx2=tx2 & ", 0" end if end if if c4 then tx=tx & " , i4 " if vc4 then tx2=tx2 & ", -1" else tx2=tx2 & ", 0" end if end if if vsex="MASCULINO" then if vano<= 1958 then cate="MASTER MASCULINO" else if vano<=1968 then cate="VETERANO MASCULINO" else if vano<=1988 then cate="SENIOR MASCULINO" else if vano<=1992 then cate="JUVENIL MASCULINO" else cate="SIN CATEGORIA" end if end if end if end if else if vano<= 1958 then cate="MASTER FEMENINO" else if vano<=1968 then cate="VETERANA FEMENINO" else if vano<=1988 then cate="SENIOR FEMENINO" else if vano<=1992 then cate="JUVENIL FEMENINO" else cate="SIN CATEGORIA" end if end if end if end if end if vlic=ucase(replace(vlic," ","")) vlic=replace(vlic,"-","") vlic=replace(vlic,"/","") vlic=replace(vlic,".","") vlic=replace(vlic,"@","") vlic=replace(vlic,"(","") vlic=replace(vlic,")","") vlic=replace(vlic,"_","") sSQL="Insert Into corredor (noms,cognoms,licencia,ano,club,correo,envio,federacion,categoriatx" & tx & ") values ('" & vnom & "','" & vape & "','" & vlic & "','" & vano & "','" & vclu & "','" & vcor & "', -1 ,'" & vfed & "', '" & cate & "'" & tx2 & ")" set RS2 = oConn2.Execute(sSQL) %> <% enviocorreo tipo_op=2 end sub sub modificacion() Dim oConn2,rs2,ssql,tx, tx2, cate set oConn2=Server.CreateObject("ADODB.Connection") set rs2=Server.CreateObject("ADODB.Recordset") oconn2.Provider="Microsoft.Jet.OLEDB.4.0" oconn2.Open(Server.Mappath("femecv.mdb")) if vsex="MASCULINO" then tx=", sexe=0 " else tx=", sexe=-1 " end if tx2="" if c1 then IF VC1 THEN tx2=", i1=-1" ELSE tx2=", i1=0" END IF end if if c2 then IF VC2 THEN tx2=", i2=-1" ELSE tx2=", i2=0" END IF end if if c3 then IF VC3 THEN tx2=", i3=-1" ELSE tx2=", i3=0" END IF end if if c4 then IF VC4 THEN tx2=", i4=-1" ELSE tx2=", i4=0" END IF end if vnom=replace(vnom,"'"," ") vape=replace(vape,"'"," ") vlic=replace(vlic,"'","") vlic=replace(vlic," ","") vcli=replace(vclu,"'"," ") vcor=replace(vcor,"'","") vfed=replace(vfed,"'","") vlic=ucase(replace(vlic," ","")) vlic=replace(vlic,"-","") vlic=replace(vlic,"/","") vlic=replace(vlic,".","") vlic=replace(vlic,"@","") vlic=replace(vlic,"(","") vlic=replace(vlic,")","") vlic=replace(vlic,"_","") if vsex="MASCULINO" then if vano<= 1958 then cate="MASTER MASCULINO" else if vano<=1968 then cate="VETERANO MASCULINO" else if vano<=1988 then cate="SENIOR MASCULINO" else if vano<=1992 then cate="JUVENIL MASCULINO" else cate="SIN CATEGORIA" end if end if end if end if else if vano<= 1958 then cate="MASTER FEMENINO" else if vano<=1968 then cate="VETERANA FEMENINO" else if vano<=1988 then cate="SENIOR FEMENINO" else if vano<=1992 then cate="JUVENIL FEMENINO" else cate="SIN CATEGORIA" end if end if end if end if end if sSQL="update corredor set noms='" & vnom & "',cognoms='" & vape & "',licencia='" &vlic & "',ano='" & vano & "',categoriatx='" & cate & "',club='" & vclu & "',correo='" & vcor & "' , envio=-1,federacion='" & vfed & "' " & tx & tx2 & " Where codigo=" & session("cod") set RS2 = oConn2.Execute(sSQL) %> <% enviocorreo end sub sub verok() Dim oConn2,rs2,oConn1,rd set oConn2=Server.CreateObject("ADODB.Connection") set rs2=Server.CreateObject("ADODB.Recordset") oconn2.Provider="Microsoft.Jet.OLEDB.4.0" oconn2.Open(Server.Mappath("femecv.mdb")) rs2.Open "SELECT * FROM corredor ;", oConn2 rs2.movefirst vlic=ucase(replace(vlic," ","")) vlic=replace(vlic,"-","") vlic=replace(vlic,"/","") vlic=replace(vlic,".","") vlic=replace(vlic,"@","") vlic=replace(vlic,"(","") vlic=replace(vlic,")","") vlic=replace(vlic,"_","") esbueno=true do until rs2.eof if rs2("licencia")=vlic then if tipo_op=3 then esbueno=false else if rs2("codigo")<>session("cod") then esbueno=false end if end if end if rs2.movenext loop rs2.Close set rs2=nothing end sub sub vercat(ano, sexo) dim cate if sexo="MASCULINO" then if ano<= 1958 then cate="MASTER MASCULINO" else if ano<=1968 then cate="VETERANO MASCULINO" else if ano<=1988 then cate="SENIOR MASCULINO" else if ano<=1992 then cate="JUVENIL MASCULINO" else cate="SIN CATEGORIA" end if end if end if end if else if ano<= 1958 then cate="MASTER FEMENINO" else if ano<=1968 then cate="VETERANA FEMENINO" else if ano<=1988 then cate="SENIOR FEMENINO" else if ano<=1992 then cate="JUVENIL FEMENINO" else cate="SIN CATEGORIA" end if end if end if end if end if response.write cate end sub %> <% //carga disponibilidad de carreras tipo_op=request.querystring("pulsado") if tipo_op=null then tipo_op=2 if tipo_op="" then tipo_op=3 set oConn=Server.CreateObject("ADODB.Connection") set rs=Server.CreateObject("ADODB.Recordset") oconn.Provider="Microsoft.Jet.OLEDB.4.0" oconn.Open(Server.Mappath("femecv.mdb")) rs.Open "SELECT * FROM carreras ;", oConn rs.movefirst c1=rs.fields("c1") c2=rs.fields("c2") c3=rs.fields("c3") c4=rs.fields("c4") t1=rs.fields("t1") t2=rs.fields("t2") t3=rs.fields("t3") t4=rs.fields("t4") rs.Close set rs=nothing dim tt1 //carga datos corredor //pulsado=1 : alta - pulsado=2 : modificacion - pulsado=3 : modificacion del alta set oConn=Server.CreateObject("ADODB.Connection") set rs=Server.CreateObject("ADODB.Recordset") oconn.Provider="Microsoft.Jet.OLEDB.4.0" oconn.Open(Server.Mappath("femecv.mdb")) if session("clave")<>23 then 'alta/guardar if tipo_op=1 then 'alta vnom="" vape="" vlic="" vclu="" vc1=true vc2=0 vc3=0 vc4=0 vano=0 vcor="" vfed="Valenciana" tipo_op=3 session("super")=false else 'guardar vnom=ucase(request.form("rnom")) vape=ucase(request.form("rape")) vlic=ucase(request.form("rlic")) vclu=ucase(request.form("rclu")) vfed=ucase(request.form("rfed")) tt1=request.form("rc1") if tt1="on" then vc1=true else vc1=false end if tt2=request.form("rc2") if tt2="on" then vc2=true else vc2=false end if tt3=request.form("rc3") if tt3="on" then vc3=true else vc3=false end if tt4=request.form("rc4") if tt4="on" then vc4=true else vc4=false end if vano=request.form("rano") vsex=request.form("rsex") if vano="" then vano=0 end if vcor=ucase(request.form("rcor")) verok if not esbueno then %> <% session("cerrada")=23 session("clave")=23 response.redirect("alta.asp?licencia=" & vlic) else if vnom="" then %> <% else if vape="" then %> <% else if vlic="" then %> <% else if vclu="" then %> <% else if vano<1900 or vano>2007 then %> <% else if vsex<>"MASCULINO" and vsex<>"FEMENINO" then %> <% else if vcor="" then %> <% else 'guardar y/o crear cuenta if tipo_op=3 then alta else modificacion end if end if end if end if end if end if end if end if end if 'comprobar datos end if else 'consulta tipo_op=2 'consulta rs.Open "SELECT * FROM corredor ;", oConn rs.movefirst vlic=request.querystring("licencia") do until rs.eof if rs.fields("licencia")=vlic then vnom=rs.fields("noms") vape=rs.fields("cognoms") 'vlic=rs.fields("licencia") vclu=rs.fields("club") vc1=rs.fields("i1") vc2=rs.fields("i2") vc3=rs.fields("i3") vc4=rs.fields("i4") vano=rs.fields("ano") vcor=rs.fields("correo") vfed=rs.fields("federacion") session("super")=rs.fields("supervisor") if rs.fields("sexe") then vsex="FEMENINO" ELSE vsex="MASCULINO" end if exit do end if rs.movenext loop rs.Close end if set rs=nothing session("clave")=27 %>


CATEGORIAS

JUVENIL

1989 A 1992

SENIOR

1969 A 1988

VETERANO/A

1959 A 1968

MASTER

HASTA 1958 INC.

<% if tipo_op=1 or tipo_op=3 then %>

ALTA FICHA

<% else %>

CONSULTA FICHA

<%end if%>

NOMBRE

APELLIDOS

Nº LICENCIA

CLUB

SEXO: <%IF VSEX="MASCULINO" THEN %> Masculino Femenino <%ELSE%> Masculino Femenino <%END IF%>

AÑO DE NACIMIENTO

<% vercat vano,vsex %>

FEDERACION:

E-MAIL:

Campeonato de Liga de Carreras por Montaña
ELDA

Campeonato de Liga de Carreras por Montaña
LA VALL D'UIXÓ

Campeonato de Liga de Carreras por Montaña
CASTELLON

Campeonato Absoluto Carreras por Montaña Com. Valenciana
BUSSOT

FECHA:10 Febrero 2008

FECHA: 02 Marzo de 2008

FECHA: 14 Marzo de 2008

FECHA: 13 Abril 2008

<%if c1 then %>

checked <% end if %> STYLE="width: 3.82cm; height: 0.77cm">INSCRIPCION

<%else %>

<%=t1%>

<% end if %>
<%if c2 then %>

checked <% end if %> STYLE="width: 3.82cm; height: 0.77cm">INSCRIPCION

<%else %>

<%=t2%>

<% end if %>
<%if c3 then %>

checked <% end if %> STYLE="width: 3.82cm; height: 0.77cm">INSCRIPCION

<%else %>

<%=t3%>

<% end if %>
<%if c4 then %>

checked <% end if %> STYLE="width: 3.82cm; height: 0.77cm">INSCRIPCION

<%else %>

<%=t4%>

<% end if %>

<% if session("super") then %> <%end if%>

PAGINA PRINCIPAL




Instrucciones: Introduzca sus datos – Nombre, Apellidos, Nº de Licencia Federativa, Club de montaña al que pertenece, Año de nacimiento para calcular la categoria a la que pertenece, Federación a la que pertenece (ej: Valenciana, Murciana...) , Direccion de Correo electrónico para verificar su inscripción y/o cambios realizados en su ficha.

Marque la casilla de validación de la carrera si desea inscribirse. Solo se activará una carrera a la vez. La siguiente carrera se activará una vez finalizada la anterior. Las inscripciones informáticas se cerrarán a las 24 horas del viernes anterior a la realizacion de la carrera.

En caso de ser requerido por la organización, deberá presentar una copia de la hoja de inscripcion que se generará una vez rellenada la ficha (por lo tanto, es conveniente imprimir la hoja), también lo será la tarjeta federativa.

IMPORTANTE: No se guardará ninguna ficha ni cambio si no pulsa en el boton de GUARDAR.

<% sub salir() 'set MM=nothing 'set rr=nothing 'set arti=nothing 'set oro=nothing 'set tt=nothing 'set session("TT")=nothing 'set Session("carrito")=nothing 'set Session("tipo")=nothing 'set Session("arti")=nothing 'set Session("oro")=nothing 'set session("carrito")=nothing session.abandon response.redirect("www.femecv.com") end sub %>