CREATE OR REPLACE PROCEDURE usuarios_emt2(act number,seq number) AS datosw varchar2(1024); afpw varchar2(1024); intw varchar2(1024); controlexis number; BEGIN htp.print('
Menu Principal





Empresa
Empresa
En Números
Noticias
Nuestros Proyectos
Tu Página Personal
Tu Opinion
Tus
Otros
Página de Inicio
Empresa Malagueña de Transportes. '); if nvl(act,0)=0 then begin htp.print('

Buscar: Pulsa en el icono empleado para iniciar la búsqueda.
Introduce el dato pot el que deseas buscar, y vuelve a pulsar el icono.
Utiliza las flechas adelante y atrás para navegar por la selección.
Para la sección de tráfico,el número de sección es el de inspector o agente.


NºEmpresa: Categoría:
Nombre: NºSección:
Apellido 1: Años en EMT:
Apellido 2:
'); end; end if; if nvl(act,0)=1 then declare cursor c1 is select NUM_IDENT,NOMBRE,APELLIDO_1,APELLIDO_2,TARJETA,DNI,ESTRUC,CATEGORIA,ESCALAFON,AÑOS from empleadosportal where num_ident=seq; reg c1%rowtype; controlcursor number; seqw number; seqw2 number; begin select nvl(min(NUM_IDENT),0) into seqw from empleadosportal where num_ident>seq; select nvl(max(NUM_IDENT),0) into seqw2 from empleadosportal where num_ident < seq; if seqw=0 then seqw:=seq; end if; if seqw2=0 then seqw2:=seq; end if; controlcursor:=0; open c1; fetch c1 into reg; htp.print(' Empresa Malagueña de Transportes.

Buscar: Pulsa en el icono empleado para iniciar la búsqueda.
Introduce el dato por el que deseas buscar, y vuelve a pulsar el icono.
Utiliza las flechas adelante y atrás para navegar por la selección.
Para la sección de tráfico,el número de sección es el de inspector o agente.


NºEmpresa: Categoría:
Nombre: NºSección:
Apellido 1: Años en EMT:
Apellido 2:


'); select nvl(count(*),0) into controlexis from wwsec_person$ where user_name=to_char(reg.num_ident); if controlexis=1 then select nvl(OTROSDATOS,null),nvl(AFP,null),nvl(INT,null) into datosw,afpw,intw from wwsec_person$ where user_name=to_char(reg.num_ident); end if; htp.print(''); if controlexis=1 then htp.print(''); else htp.print(''); end if; htp.print(''); if controlexis=1 then htp.print(''); else htp.print(''); end if; htp.print(' '); if controlexis=1 then htp.print(''); else htp.print(''); end if; htp.print('
Otros datos
'||datosw||'
'||chr(38)||'nbsp;
Aficiones Principales:
'||afpw||'
'||chr(38)||'nbsp;
Estoy interesado en comunicarme con otros compañeros:
'||intw||'
'||chr(38)||'nbsp;
'); end; end if; htp.print('
Usuarios Online '); declare nombre varchar2(60); apell1 varchar2(60); apell2 varchar2(60); nameperson varchar2(30); person wwsec_person%rowtype; cursor c1 is SELECT distinct id, user_name FROM (SELECT COUNT (*) cuantos, b.id, a.user_name, a.ip_address FROM wwctx_sso_session$ a, wwsec_person$ b, wwsec_group$ c WHERE TRUNC (session_start_time) = TRUNC (SYSDATE) and active = 1 and is_logged_on = 1 and a.user_name = b.user_name and a.user_name <> 'PORTAL' and c.ID(+) = b.default_group GROUP BY b.id, b.default_group, a.user_name, a.ip_address ORDER BY a.user_name ); fechamenu varchar2(30); begin nameperson :=portal.wwctx_api.get_user; select to_char(sysdate,'DD - Month - YYYY') into fechamenu from dual; htp.print('
'||chr(38)||'nbsp;'||chr(38)||'nbsp;'||chr(38)||'nbsp;Usuarios Conectados:
'); for reg in c1 loop person := wwsec_api.person_info(reg.id); select distinct nombre,apellido_1,apellido_2 into nombre,apell1,apell2 from info_portal_empleados where num_ident = person.user_name; htp.print(chr(38)||'nbsp;'||chr(38)||'nbsp;'||chr(38)||'nbsp;'||nombre||' '|| apell1||' '|| apell2||''); htp.print('
'); end loop; end; htp.print('

'); END; /