From db52e4d66d60184d53a27ba4d6772461daacc03d Mon Sep 17 00:00:00 2001 From: tknall Date: Fri, 22 Mar 2013 08:57:51 +0000 Subject: Maintenance update (bugfixes, new features, cleanup...) Refer to /dok/RELEASE_NOTES-3.3.txt for further information. git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/pdf-as/trunk@931 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- pdf-as-web/src/main/webapp/sitemesh/standalone.jsp | 234 ++------------------- 1 file changed, 17 insertions(+), 217 deletions(-) (limited to 'pdf-as-web/src/main/webapp/sitemesh/standalone.jsp') diff --git a/pdf-as-web/src/main/webapp/sitemesh/standalone.jsp b/pdf-as-web/src/main/webapp/sitemesh/standalone.jsp index 4bb19ff..4116890 100644 --- a/pdf-as-web/src/main/webapp/sitemesh/standalone.jsp +++ b/pdf-as-web/src/main/webapp/sitemesh/standalone.jsp @@ -1,227 +1,27 @@ - + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%> + -<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %> - -<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %> +<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%> <%@ page import="at.gv.egiz.pdfas.web.helper.LocalRequestHelper" %> -<%@ page import="java.net.URL" %> -<%@ page import="java.net.URLConnection" %> -<%@ page import="java.io.InputStream" %> -<%@ page import="java.io.InputStreamReader" %> -<%@ page import="java.io.BufferedReader" %> -<%@ page import="net.htmlparser.jericho.Source" %> -<%@ page import="net.htmlparser.jericho.Element" %> -<%@ page import="net.htmlparser.jericho.Attributes" %> -<%@ page import="net.htmlparser.jericho.Attribute" %> -<%@ page import="java.util.List" %> -<%@ page import="java.util.Iterator" %> -<%@ page import="java.util.Locale" %> -<%@ page import="at.gv.egiz.pdfas.web.i18n.LocaleParamFilter" %> -<%@ page import="java.nio.charset.Charset" %> -<%@ page import="at.gv.egiz.pdfas.web.session.SessionAttributes" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> + -<%@page import="java.nio.charset.Charset"%> - - - - - - <% - - String headerUrl="http://www.buergerkarte.at/header.php?lang="; - //String headerUrl="http://www.buergerkarte.at/header.php"; - String serverUrl=LocalRequestHelper.getLocalServerAddress(request,response); - String baseUrl=LocalRequestHelper.getLocalContextAddress(request,response); - - String requestLang = (String)session.getAttribute(SessionAttributes.LANGUAGE); - - String language = ""; - - URL urlHeader = new URL(headerUrl); - - if (requestLang!=null) { - if (requestLang.equals("de")) { - urlHeader = new URL(headerUrl+"de"); - language="de"; - } - else { - urlHeader = new URL(headerUrl+"en"); - language="en"; - } - } - else { - requestLang = request.getParameter("lang"); - if (requestLang!=null) { - if (requestLang.equals("de")) { - urlHeader = new URL(headerUrl+"de"); - language="de"; - } - else { - urlHeader = new URL(headerUrl+"en"); - language="en"; - } - } - else { - urlHeader = new URL(headerUrl+"de"); - language="de"; - } - } - - URLConnection ucHeader = urlHeader.openConnection(); - - InputStream isHeader = ucHeader.getInputStream(); - - //Read the header php files from the server - BufferedReader brHeader = new BufferedReader(new InputStreamReader(isHeader, Charset.forName("UTF-8"))); - - String phpLine=""; - String phpHeader=""; - while ((phpLine=brHeader.readLine())!=null) { - phpHeader += phpLine; - } - - phpHeader = phpHeader.substring(phpHeader.indexOf("Sie sind hier: Startseite > PDF-Signatur > PDF-Signatur \n"; - } - else { - replaceString = "
You are here: Start page > PDF-Signatures > PDF-Signature \n
"; - } - phpHeader = phpHeader.replace(breadcrumbsDiv, replaceString); - } - - - - //Insert a hidden language fake link, that is shown when the change of language is disabled - source = new Source(phpHeader); - - Element element = source.getElementById("sprachlinkneu"); - - if (element!=null) { - String languagelink; - int positionToInsertLangLink = 0; - int positionToEndLangLink = 0; - positionToInsertLangLink=element.getBegin(); - positionToEndLangLink=element.getEnd(); - if (!language.equals("de")) { - languagelink = "
  • Deutsch
  • "; - } - else { - languagelink = "
  • English
  • "; - } - String firstPart = phpHeader.substring(0, positionToInsertLangLink); - String secondPart = phpHeader.substring(positionToEndLangLink, phpHeader.length()); - phpHeader = firstPart+languagelink+secondPart; - } - else { - int positionToEnd=0; - list = source.getAllElements("li"); - it = list.iterator(); - int i=0; - while (it.hasNext()) { - element = (Element)it.next(); - if (i==5) { - positionToEnd = element.getEnd(); - } - i++; - } - String languagelink; - if (!language.equals("de")) { - languagelink = "
  • Deutsch
  • "; - } - else { - languagelink = "
  • English
  • "; - } - String firstPart = phpHeader.substring(0, positionToEnd); - String secondPart = phpHeader.substring(positionToEnd, phpHeader.length()); - phpHeader = firstPart+languagelink+secondPart; - } - - - - - %> - PDF Signature - - <% - if (language.equals("de")) { %> - - <% } else { %> - - <% } %> - - - - - - - + + <fmt:message key="common.title" /> + - - <%= phpHeader %> - -
    - -
    - -
    - -
    -
    -
    - + + + + -- cgit v1.2.3