CREATE OR REPLACE PROCEDURE muestra_noticias AS CURSOR c1 IS SELECT seq_noticias,titular,cuerpo,foto,enlace,n_enlace,f_publicacion FROM noticiasw WHERE sysdate between f_publicacion and f_baja order by f_publicacion desc; temp NUMBER; cont NUMBER; aux VARCHAR2(1); col NUMBER(1); fondocol varchar2(7); raizwww varchar2(30); BEGIN raizwww:='webserver.emtsam.net'; col :=1; htp.print(' Boletin de Noticias de EMT '); SELECT nvl(COUNT(*),0) INTO cont FROM noticiasw WHERE sysdate between f_publicacion and f_baja; IF cont > 0 THEN htp.print('
'); FOR reg IN c1 LOOP if col = 1 then fondocol:='#F2F2F2'; col:=2; else fondocol:='#D6EFF0'; col:=1; end if; htp.print(' '); END LOOP; htp.print('
'||to_char(sysdate,'dd-mm-yy')||'
Boletin de Noticias
Ir al Historico
'||to_char(reg.f_publicacion,'dd-mm-yy')||' - '||reg.titular||'
'||reg.cuerpo||'
'); ELSE htp.print('
Actualmente no existen Noticias en este Boletin
'); END IF; htp.print(' '); END; /