java/nekurak.net-web/web/index.jsp
author František Kučera <franta-hg@frantovo.cz>
Fri, 26 Feb 2010 18:24:10 +0100
changeset 47 10cd7f54f9f5
parent 44 74bded83c0eb
child 49 9b2a597cc862
permissions -rw-r--r--
Oprava XHTML validity.
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
     3 	  xmlns:c="http://java.sun.com/jsp/jstl/core"
     4 	  xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
     5 	  version="2.0">
     6     <jsp:directive.page contentType="application/xhtml+xml"/>
     7     <jsp:output doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd"
     8 		doctype-root-element="html"
     9 		omit-xml-declaration="false"/>
    10 
    11     <!-- <lokalizace> -->
    12     <c:if test="${param.jazyk != null}">
    13 	<fmt:setLocale value="${param.jazyk}" scope="session"/>
    14     </c:if>
    15     <fmt:setBundle basename="cz.frantovo.nekurak.preklady" scope="application"/>
    16     <!-- </lokalizace> -->
    17 
    18     <!-- <autentizace> -->
    19     <c:set var="prihlasenyUzivatel" scope="request" value="${pageContext.request.userPrincipal.name}"/>
    20     <c:if test="${param.akce == 'prihlaseni' &amp;&amp; param.odhlasit == 'ano'}">
    21 	<!--
    22 	    Uživatele musíme odhlásit dřív, než vykreslíme nabídku,
    23 	    která závisí na tom, zda je uživatel přihlášený nebo ne.
    24 	    „prihlaseni.jsp?odhlasit=ano“ už vypíše jen hlášku, že byl odhlášen.
    25 	-->
    26 	<jsp:scriptlet>session.invalidate();</jsp:scriptlet>
    27 	<c:set var="prihlasenyUzivatel" scope="request" value="${null}"/>
    28     </c:if>
    29     <!-- </autentizace> -->
    30 
    31 
    32     <html xmlns="http://www.w3.org/1999/xhtml"
    33 	  xmlns:svg="http://www.w3.org/2000/svg"
    34 	  xmlns:xlink="http://www.w3.org/1999/xlink">
    35 	<head>
    36 	    <title><fmt:message key="nazev"/></title>
    37 	    <link href="styl.css" type="text/css" rel="StyleSheet"/>
    38 	</head>
    39 	<body>
    40 	    <div class="body">
    41 
    42 		<div id="horniPruh">
    43 		    <h1><fmt:message key="nazev"/></h1>
    44 		</div>
    45 
    46 		<ul id="nabidka">
    47 		    <li><a href="?"><fmt:message key="uvod"/></a></li>
    48 
    49 		    <c:choose>
    50 			<c:when test="${prihlasenyUzivatel == null}">
    51 			    <li><a href="?akce=prihlaseni"><fmt:message key="prihlasitSe"/></a></li>
    52 			</c:when>
    53 			<c:otherwise>
    54 			    <li><a href="?akce=pridatPodnik"><fmt:message key="pridatPodnik"/></a></li>
    55 			    <li id="prihlasenyUzivatel"><fmt:message key="prihlasenyUzivatel"/>: ${prihlasenyUzivatel}</li>
    56 			    <li><a href="?akce=prihlaseni&amp;amp;odhlasit=ano"><fmt:message key="odhlasitSe"/></a></li>
    57 			</c:otherwise>
    58 		    </c:choose>
    59 
    60 		</ul>
    61 
    62 		<jsp:include page="/WEB-INF/casti/prepinaniJazyku.jsp" flush="false"/>
    63 
    64 		<div id="obsah">
    65 
    66 		    <c:choose>
    67 			<c:when test="${param.akce == 'detail'}">
    68 			    <jsp:include page="/WEB-INF/casti/detail.jsp" flush="false"/>
    69 			</c:when>
    70 			<c:when test="${param.akce == 'pridatPodnik'}">
    71 			    <jsp:include page="/WEB-INF/casti/pridatPodnik.jsp" flush="false"/>
    72 			</c:when>
    73 			<c:when test="${param.akce == 'prihlaseni'}">
    74 			    <jsp:include page="/WEB-INF/casti/prihlaseni.jsp" flush="false"/>
    75 			</c:when>
    76 			<c:otherwise>
    77 			    <jsp:include page="/WEB-INF/casti/uvod.jsp" flush="false"/>
    78 			</c:otherwise>
    79 		    </c:choose>
    80 
    81 		</div>
    82 
    83 		<div id="paticka">
    84 		    <p>
    85 			<fmt:message key="licence"/>&amp;#160;
    86 			<a href="nekurak.net-src.zip">nekurak.net-src.zip</a>
    87 			<a href="nekurak.net-src.zip.SHA-512">.</a>
    88 		    </p>
    89 		</div>
    90 
    91 	    </div>
    92 	</body>
    93     </html>
    94 
    95 </jsp:root>