<%@page language="java" import="java.net.*,java.io.*,java.util.*,oracle.br.afrodite.parser.TemplateParser,java.util.Calendar, rbs.vinagreti.FrontPageUtil" contentType="text/html;charset=ISO-8859-1" %> <% response.setHeader("Surrogate-Control", "content=\"ORAESI/9.0.4\""); %> <% //################# VARIAVEIS COM VALORES FIXOS ########################### // ### NOME DO PRODUTO EX: cidadeeletrica ### String produto = "eleicoes2006"; // ### NOME DO XML DA CAPA EX: cidade_eletrica ### String homeName = "eleicoes2006"; // ### ID DO MENU DO PRODUTO EX: 142 ### // ### MENU RS String menu_id_rs = "233"; // PROD 233 / DESENV 255 // ### MENU SC String menu_id_sc = "235"; // PROD 235 / DESENV 259 // ### CANAL_ID DO PRODUTO EX: 57 ### String canal_id = "73"; // PROD 73 / DESENV 73 // ### TAB DO PRODUTO EX: 00056 ### String tab = "00074"; // PROD 74 / DESENV 74 // ### TEMPLATE DA MOLDURA EX: 2197.dwt ### String moldura = "3200.dwt"; // ### TEMPLATE DE MATERIA EX: 2503.dwt ### String template_materia = "3208.dwt"; // ### TEMPLATE DE MATERIA EX: 2503.dwt ### String capaId_RS = "21"; String capaId_SC = "22"; //################# VARIAVEIS COM VALORES FIXOS ########################### Cookie[] cookiesTemp = request.getCookies(); String cookieValueTemp = null; String userRegionNameTemp = null; String userRegionIdTemp = null; String userStateNameTemp = null; String userStateIdTemp = null; boolean cookieFind = false; String semBarra = request.getParameter("b"); String template = request.getParameter("template"); String capaId = ""; String newsId = request.getParameter( "newsID" ); if( newsId == null ) newsId = "0"; String naviBarInclude = "http://www.clicrbs.com.br/jsp/novabarra.jsp?product="+produto+"&uf="; String uf = ""; String local = ""; String sigla = ""; String userName = ""; String parmName = ""; String source = null; if ( cookiesTemp != null ) { for(int i=0;i0){ oPage = FrontPageUtil.getLastSectionFrontPage(Integer.parseInt(request.getParameter("pSection")),Integer.parseInt(uf),true); } } catch (Exception ex) {} // SETA A SIGLA DO ESTADO NA NAVIBAR if ( sigla != null && sigla.trim().length() > 0 ) { naviBarInclude = naviBarInclude.concat(sigla); } // COLOCA TODOS PARAMETROS DA URL NA HASHTABLE Hashtable oParms = new Hashtable(); Enumeration e = request.getParameterNames(); if( e != null ){ while( e.hasMoreElements() ){ parmName = (String)e.nextElement(); oParms.put(parmName,request.getParameter(parmName)); } } // TESTA capaID if (request.getParameter("capaId") == null){ if ( uf.equals("2") ) capaId = capaId_SC; else capaId = capaId_RS; } else { capaId = request.getParameter("capaId"); } // TESTA SE NEWSID = 0 ( CAPA ) if( newsId.equals("0") ){ if ( request.getParameter("source") == null ) { if(template == null) template = "3397.dwt"; }else{ source = request.getParameter("source"); } }else{ int news = 0; try{news = Integer.parseInt( newsId.substring( 1, newsId.indexOf( "." ) ) );} catch( Exception nfe ){news = -1;} // TESTA SE NEWSID = STATIC if( !newsId.startsWith("DYNAMIC,") ){ if( newsId.startsWith( "a" ) && ( news != -1 ) && newsId.trim().endsWith( ".htm" ) ){ newsId = newsId.substring( 0, newsId.indexOf( "." ) ) + ".xml"; }else if( newsId.startsWith( "col" ) ){ newsId = newsId.substring( 0, newsId.indexOf( "." ) ) + ".xml"; }else if( newsId.startsWith( "fp" ) ){ newsId = newsId.substring( 0, newsId.indexOf( "." ) ) + ".xml"; } File fileTest = new File( "/shared/html/" + newsId ); if( fileTest.exists() ){ if( newsId.endsWith( ".xml" ) ){ source = "STATIC,/shared/html/" + newsId; if ( ((template!=null)&&(template.trim().length()==0)) || (template==null) ){ template = template_materia; } } }else{ source = null; if( newsId.endsWith( ".dwt" ) ){ template = newsId; } } // TESTA SE NEWSID = DYNAMIC }else{ source = newsId; } } // COLOCA DATA ATUAL NA LISTAGEM DE PARAMETROS Calendar hoje = Calendar.getInstance(); String data_atual = ""; int dayofweek = hoje.get(Calendar.DAY_OF_WEEK); int day = hoje.get(Calendar.DAY_OF_MONTH); int month = hoje.get(Calendar.MONTH)+1; int year = hoje.get(Calendar.YEAR); switch(dayofweek){ case 1: data_atual = "Domingo, "; break; case 2: data_atual = "Segunda, "; break; case 3: data_atual = "Terça, "; break; case 4: data_atual = "Quarta, "; break; case 5: data_atual = "Quinta, "; break; case 6: data_atual = "Sexta, "; break; case 7: data_atual = "Sábado, "; break; } if( day < 10 ){ data_atual += "0" + day + "/"; }else{ data_atual += day + "/"; } if( month < 10 ){ data_atual += "0" + month + "/"; }else{ data_atual += month + "/"; } data_atual += year; oParms.put("pdate",data_atual); // PARAMETROS DA PAGINACAO DAS NOTICIAS String pageSize = request.getParameter("pagesize"); String start = request.getParameter("start"); String numberOfPages = request.getParameter("numberofpages"); if (pageSize == null) pageSize = "70"; if (start == null) start = "1"; if (numberOfPages == null) numberOfPages = "10"; oParms.put("pagesize",pageSize); oParms.put("start",start); oParms.put("numberofpages",numberOfPages); // PARAMETRO PARA VEICULACAO DE PROPAGANDA NA CAPA if ("Home".equals(request.getParameter("section"))){ oParms.put("subTab","20000"); } oParms.put("site", "eleicoes2006"); oParms.put("cartola_noticias", "Notícias"); oParms.put("cartola_galeria", "Galeria de Fotos"); oParms.put("cartola_calendario", "Calendário"); oParms.put("cartola_promocoes", ""); oParms.put("cartola_votacao", "Votação"); // PARAMETROS DA HASHTABLE oParms.put("capaId",capaId); oParms.put("rootdir","/shared"); oParms.put("uf",uf); oParms.put("local",local); oParms.put("tab",tab); oParms.put("l",moldura); oParms.put("username",userName); if( uf.equals("1") ){ oParms.put("idmenu",menu_id_rs); } else { oParms.put("idmenu",menu_id_sc); } oParms.put("canalid",canal_id); oParms.put("canal_id",canal_id); if (request.getParameter("chanid") == null) oParms.put("chanid",canal_id); oParms.put("channel",canal_id); oParms.put("channel_id",canal_id); // TESTA SE É PARA COLOCAR OU NÃO NAVIBAR if (semBarra == null) { oParms.put("navibar",naviBarInclude); } try{ TemplateParser oParser; if(oPage != null){ oParser = new TemplateParser("STATIC,/shared/html/" + oPage,null,oParms); } else { oParser = new TemplateParser(source,template,oParms); } out.print( oParser.getStream() ); }catch(Exception oParserException){ oParserException.printStackTrace(); } %>
clicTempo
Patrocínio
<%@page language="java" import="java.net.URLEncoder,oracle.br.afrodite.parser.TemplateParser,java.util.Hashtable,java.util.Enumeration,java.util.StringTokenizer,java.util.Calendar,java.io.File" contentType="text/html;charset=ISO-8859-1" %> <% response.setHeader("Surrogate-Control", "content=\"ESI/1.0\""); %> <% Cookie[] cookiesTemp = request.getCookies(); String sCookieValueTemp = null; String sUserRegionNameTemp = null; String sUserRegionIdTemp = null; String sUserStateNameTemp = null; String sUserStateIdTemp = null; boolean bFind = false; String oUsername = ""; String sUF = "", sLocal = "", sSigla = ""; if (cookiesTemp != null){ for(int i=0;i 0 ) oTemplate = request.getParameter("template"); if( oNewsId == null ) oNewsId = "0"; if( sUF != null ) state = Integer.parseInt( sUF ); if( oNewsId.trim().length() > 0){ switch( state ){ case 1: oSource = "STATIC,/shared/destaques/destaque_73_1.xml"; break; case 2: oSource = "STATIC,/shared/destaques/destaque_73_2.xml"; break; } }else{ oSource = "STATIC,/shared/destaques/destaque_73_1.xml"; //destaque_canal_estado.xml } Calendar oToday = Calendar.getInstance(); String oTodayDate = ""; int dayofweek = oToday.get(Calendar.DAY_OF_WEEK); int day = oToday.get(Calendar.DAY_OF_MONTH); int month = oToday.get(Calendar.MONTH)+1; int year = oToday.get(Calendar.YEAR); switch(dayofweek){ case 1: oTodayDate = "Domingo, "; break; case 2: oTodayDate = "Segunda, "; break; case 3: oTodayDate = "Terça, "; break; case 4: oTodayDate = "Quarta, "; break; case 5: oTodayDate = "Quinta, "; break; case 6: oTodayDate = "Sexta, "; break; case 7: oTodayDate = "Sábado, "; break; } if( day < 10 ) oTodayDate += "0" + day + "/"; else oTodayDate += day + "/"; if( month < 10 ) oTodayDate += "0" + month + "/"; else oTodayDate += month + "/"; oTodayDate += year; Hashtable oParms = new Hashtable(); Enumeration e = request.getParameterNames(); if( e != null ){ while( e.hasMoreElements() ){ String oParmName = (String)e.nextElement(); oParms.put(oParmName,request.getParameter(oParmName)); } } oParms.put("rootdir","/shared"); oParms.put("uf",sUF); oParms.put("local",sLocal); oParms.put("pdate",oTodayDate); oParms.put("section","Notícias");// Notícias/Últimas conforme menu. oParms.put("tab","00074"); // Desenv 63 prod: 63 oParms.put("chanid","73"); // Desenv 62 prod: 62 oParms.put("site","eleicoes2006"); try{ TemplateParser oParser = new TemplateParser(oSource,oTemplate,oParms); out.print(oParser.getStream()); }catch(Exception oParserException){} %>
Repercussão
Amin fala sobre a derrota Candidato se considera vitorioso com a conquista de um novo eleitorado em SC
O dia seguinte de Amin
Reações
Heloísa espera maior
fiscalização da sociedade
Para senadora, decisão das urnas é soberana
Cristovam diz que educação
não será prioridade de Lula
Pedetista critica discurso de vitória
Game
Vença as etapas Enfrente os problemas e faça do seu candidato um campeão na administração pública
Blog
Dever de casa uma reforma estrutural ampla, principalmente na Previdência Diários de Brasília: confira
mais comentários no blog
Guia do Eleitor
Não votou? Você tem 60 dias para justificar em um cartório eleitoral da sua cidade A contagem de brancos e nulos
Infográficos
Todos os presidentes Linha do tempo traz história de todos os chefes do Executivo
Entendendo Política Entenda as atribuições dos executivos e legislativos municipais, estaduais e federal