%@ Language=VBScript %>
<%
Option Explicit
dim conexion, registros,sql,hoy
if session("login_afiliado")<>"" then
Response.Redirect("admon.asp")
End if
set conexion= Server.CreateObject ("ADODB.connection")
%><%
conexion.open
set registros = Server.CreateObject ("ADODB.RECORDSET")
registros.CursorLocation = 2
registros.CursorType = 2
registros.LockType = 3
sql="select count(*) as cuantos from ciec_banners"
registros.open sql,conexion
dim numero, NumeroBanner, banner
randomize
numero=registros("cuantos")
NumeroBanner=int((rnd*numero)+1)
registros.close
sql="select * from ciec_banners where id='"&NumeroBanner&"'"
registros.open sql,conexion
banner=registros("nombre")
registros.close
%>
CIEC - Extranet
<%
if Request("oculto")="1" then
sql= "select * from ciec_afiliado where login='"& request("login_txt") &"' and password='"& request("password_txt") &"'"
registros.open sql,conexion,1
if registros.EOF =true or registros.BOF =true then
registros.Close
%>
<%
else
session("login_afiliado")=Request.Form("login_txt")
session("password_afiliado")=Request.Form("password_txt")
session.TimeOut = 120
dim id, nivel_var
id=registros("id")
nivel_var=registros("nivel")
registros.close
sql = "select max(veces) as mayor from ciec_afiliado where login='"& request("login_txt") &"' and password='"& request("password_txt") &"'"
registros.open sql,conexion,1
dim veces_var
veces_var=registros("mayor")+1
If veces_var="" then
veces_var=1
End If
registros.close
sql= "select * from ciec_afiliado where login='"& request("login_txt") &"' and password='"& request("password_txt") &"'"
registros.open sql,conexion,1
registros("veces")=veces_var
registros.Update
registros.close
sql="select * from ciec_extradisticas"
registros.open sql,conexion,1
dim idafiliado_var
dim fecha_var
dim hora_var
idafiliado_var=id
fecha_var=date
hora_var=time
registros.addnew
registros("idafiliado")=idafiliado_var
registros("fecha")=fecha_var
registros("hora")=hora_var
registros.Update
registros.close
response.redirect("admon.asp")
end if
end if
%>
<%
dim contador
sql = "select top 5 * from ciec_exterior order by id desc"
registros.Open sql,conexion,1
if not registros.bof and not registros.eof then
%>
Orientación en Comercio Exterior
<%do while not registros.eof%>
<%
registros.movenext
loop%>
Mas en la extranet...
<%end if
registros.close
sql = "select top 5 * from ciec_tributaria order by id desc"
registros.Open sql,conexion,1
if not registros.bof and not registros.eof then
%>
Orientación Tributaria
<%do while not registros.eof%>
<%
registros.movenext
loop%>
Mas en la extranet...
<%end if
registros.close
sql = "select top 5 * from ciec_juridica order by id desc"
registros.Open sql,conexion,1
if not registros.bof and not registros.eof then
%>
Orientación Laboral
<%do while not registros.eof%>
<%
registros.movenext
loop%>
Mas en la extranet...
<%end if
registros.close
sql = "select top 5 * from ciec_cambio order by id desc"
registros.open sql,conexion,1
if not registros.bof and not registros.eof then
%>