<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" session="true" import="ar.com.acbs.stds.*, ar.com.acbs.util.*, com.ciessa.framework.util.*, java.util.Vector" %> <% long categoryId; Category category = null; Article mainArticle = null; Pager pgMainArticle = new Pager((long)1); Pager pg = new Pager((long)4); ApplicationAcBs app1 = ApplicationAcBs.getInstance(); String siteName = null; String siteUrl = null; String text = null; String name = null; String image = null; String shortText = null; String contentUrl = null; boolean isFlash = false; boolean noImage = false; Pager pgCenter = new Pager((long)20); java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("dd/MM/yyyy"); java.util.Vector contents = new java.util.Vector(); Content content = null; long dtId; long pageNumber; long BLOCKS = 8; DataType dt; Category cCategory; boolean tab = false; boolean startedPreviousContents = false; String description = new String(); try { siteName = (String)app1.getParameters().getParam("SITE_NAME"); siteUrl = (String)app1.getParameters().getParam("SITE_URL"); } catch (Exception e ) { siteName = new String(); siteUrl = new String("/"); } // Obtiene la categoria try { categoryId = Long.parseLong((String)request.getParameter("category")); category = Category.getInstance(categoryId); request.getSession().setAttribute("categoryId", String.valueOf(categoryId)); } catch( Exception e ) { e.printStackTrace(); categoryId = 0; category = new Category(); } String imgUrl = (String)ApplicationAcBs.getInstance().getParameters().getParam("URL_IMG"); try { pageNumber = Long.parseLong(request.getParameter("page")); } catch(Exception e) { pageNumber = 1; } try { description = category.getDescription(); pgCenter = new Pager(category.getContentsPerPage()); BLOCKS = category.getBlockSize(); dtId = category.getDataType(); dt = DataType.getInstance(dtId); if( dt.getTableName().equalsIgnoreCase("articles")) { contents = Article.getProdInstance(pageNumber, pgCenter, categoryId); } else if( dt.getTableName().equalsIgnoreCase("events")) { contents = Event.getProdInstance(pageNumber, pgCenter, categoryId); } else if( dt.getTableName().equalsIgnoreCase("downloads")) { contents = Download.getProdInstance(pageNumber, pgCenter, categoryId); } else if( dt.getTableName().equalsIgnoreCase("links")) { contents = Link.getProdInstance(pageNumber, pgCenter, categoryId); } else { contents = Content.getProdInstance(pageNumber, pgCenter, categoryId); } } catch (Exception e) { e.printStackTrace(); } String css = category.getStyleSheet(); if( css.equals("")) css = "stylex.css"; //Setea atributos para el módulo de Historial if( category != null ) { request.getSession().setAttribute("pageName", category.getName()); request.getSession().setAttribute("pageUrl", request.getRequestURL().toString()); } request.getSession().setAttribute("language", String.valueOf(category.getLanguageId())); %> <%= siteName + " - " + category.getName() %> <% // Revision de Categoria if( categoryId == 0 ) { %> <% } %>
<%@ include file="/includes/header.jsp"%> <%@ include file="/includes/footer.jsp"%>
<% name = category.getName(); image = imgUrl + category.getLargePicture(); text = category.getDescription(); isFlash = image.toLowerCase().endsWith(".swf"); noImage = (image.equals(imgUrl)); %>
<%@include file="/includes/modules-left.jsp" %> <%= name %>
<% if (!noImage ) { %> <% if( !isFlash ) { %> <% } else { %> <% } %> <% } %>

<%= text %>

<% for( int i = 0; i < contents.size(); i++ ) { %> <% } %>
<% content = (Content)contents.elementAt(i); name = content.getName(); image = imgUrl + content.getImage(); shortText = content.getFeatures(); isFlash = image.toLowerCase().endsWith(".swf"); noImage = content.getImage().trim().equals(""); contentUrl = category.getContentFormat() + "?idx=" + String.valueOf(content.getId()); %>
<% if( !noImage ) { %> <% } else { %> <% } %>

<%= name %>

<%= shortText %>



<%@include file="/includes/modules-right.jsp" %>