<%@page import="sintrainagro.*"%> <%@page import="java.util.*"%> <%@page import="java.io.*"%> <%@page contentType="text/html"%> <% String respuesta_b = request.getParameter("respuesta"); if (respuesta_b!=null){ RespuestaQuery rq = new RespuestaQuery(); Respuesta respuesta = new Respuesta(); respuesta.setEncuesta_id(1); respuesta.setValor(Integer.parseInt(respuesta_b)); rq.InsertarRespuesta(respuesta);//650//750 } %>
<% NoticiaQuery nqA = new NoticiaQuery(); Noticia noticiaA = new Noticia(); noticiaA = (Noticia) nqA.getNoticia(0); %>


<%=noticiaA.getTitulo()%>
<%=noticiaA.getDescripcion()%>


<% EncuestaQuery eq = new EncuestaQuery(); RespuestaQuery rq = new RespuestaQuery(); Encuesta encuesta = eq.getEncuesta(1);//bgcolor="#DEEFE5" %>
Encuesta

<%="¿ "+encuesta.getPregunta()+" ?"%>

<%=encuesta.getRes1()%>

<%=encuesta.getRes2()%>

<%=encuesta.getRes3()%>

Resultados





<% NoticiaQuery noticiaQ = new NoticiaQuery(); Vector noticias = noticiaQ.getNoticiasId(1); Collections.sort(noticias); int j = 0; int m=1; while (j <%}%>


Noticia del Dia


<%=noticia.getFecha()%>

picture

<%=noticia.getTitulo()%>
<%=noticia.getDescripcion()%>
Noticia

<% if(m==1){%> Actualidad

<%m=0;%> <%}%>


<% Fecha fecha = new Fecha(); %> <%=fecha.getFecha()%>




<% BannerQuery bq = new BannerQuery(); Vector publicidades = bq.getBanners(); Collections.sort(publicidades); int f=0; while (f


<%=publicidad.getNombre()%>
<% } %>


<% int contador=0; try{ BufferedReader datos=new BufferedReader(new FileReader(new File("C:/Documents and Settings/Javier/Escritorio/Archivos/Archivos de NetBeans/sintrainagro/contador/cont.con"))); String x=datos.readLine(); if(x!=null) contador=Integer.parseInt(x); PrintStream salida = new PrintStream(new File("C:/Documents and Settings/Javier/Escritorio/Archivos/Archivos de NetBeans/sintrainagro/contador/cont.con")); salida.print(contador+1); salida.close(); datos.close(); }catch(IOException ex){ System.out.println("Error contador : "+ex); } %> <% Vector vec=new Vector(); while(contador!= 0){ vec.add(new Integer(contador%10)); contador=contador/10; } %>

Contador de Vistas <% for(int i=vec.size()-1;i>=0;i--){ %> "> <%}%>


DeveloperSoft http://DeveloperSoft.com.co/
Derechos y Publicación 2005 DeveloperSoft DanielAlvarado@DeveloperSoft.com.co
Mauricio@DeveloperSoft.com.co