java/HrisniciSpameri/web/souhrn.jspx
author František Kučera <franta-hg@frantovo.cz>
Sat, 14 Feb 2009 22:30:29 +0100
changeset 26 feb4c3774c42
parent 20 90dc76051e56
child 27 f410145eb680
permissions -rw-r--r--
Místo jednoho dne můžeme zadat období od-do. Pokud nezadáme konec, zobrazí se souhrn jen za jeden den – začátek
franta-hg@4
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@4
     2
<!-- 
franta-hg@4
     3
    Document   : souhrn
franta-hg@4
     4
    Created on : 11.2.2009, 18:54:42
franta-hg@4
     5
    Author     : fiki
franta-hg@4
     6
-->
franta-hg@4
     7
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
franta-hg@4
     8
          xmlns:c="http://java.sun.com/jsp/jstl/core"
franta-hg@5
     9
          xmlns:f="http://java.sun.com/jsp/jstl/functions"
franta-hg@4
    10
          version="2.0">
franta-hg@4
    11
franta-hg@4
    12
    <jsp:useBean id="denniSouhrn" class="cz.frantovo.hrisniciSpameri.DenniSouhrn" scope="page"/>
franta-hg@26
    13
    <jsp:setProperty name="denniSouhrn" property="zacatekString" value="${param.zacatek}"/>
franta-hg@26
    14
    <jsp:setProperty name="denniSouhrn" property="konecString" value="${param.konec}"/>
franta-hg@20
    15
    <jsp:setProperty name="denniSouhrn" property="cilString" value="${param.cil}"/>
franta-hg@4
    16
franta-hg@4
    17
franta-hg@20
    18
    <p><a onclick="JavaScript: zobrazNeboSkryj('seznamCilu')" href="#">Seznam cílů</a></p>
franta-hg@20
    19
    <div id="seznamCilu">
franta-hg@20
    20
        <ul>
franta-hg@20
    21
            <c:forEach var="c" items="${denniSouhrn.seznamCilu}">
franta-hg@20
    22
                <li>
franta-hg@20
    23
                    <c:choose>
franta-hg@20
    24
                        <c:when test="${c.url == null}">
franta-hg@20
    25
                            <c:out value="${c.nazev}"/>
franta-hg@20
    26
                        </c:when>
franta-hg@20
    27
                        <c:otherwise>
franta-hg@20
    28
                            <a href="${f:escapeXml(c.url)}"><c:out value="${c.nazev}"/></a>
franta-hg@20
    29
                        </c:otherwise>
franta-hg@20
    30
                    </c:choose>
franta-hg@20
    31
                </li>
franta-hg@20
    32
            </c:forEach>
franta-hg@20
    33
        </ul>
franta-hg@20
    34
    </div>
franta-hg@4
    35
franta-hg@4
    36
franta-hg@20
    37
    <h2>Denní souhrn</h2>
franta-hg@20
    38
    <form action="#" method="get">
franta-hg@26
    39
        <input name="zacatek" type="text" value="${denniSouhrn.zacatek}"/>
franta-hg@26
    40
        <input name="konec" type="text" value="${denniSouhrn.konec}"/>
franta-hg@20
    41
        <select name="cil">
franta-hg@20
    42
            <option value="0">Všechny cíle</option>
franta-hg@20
    43
            <c:forEach var="c" items="${denniSouhrn.seznamCilu}">
franta-hg@6
    44
                <c:choose>
franta-hg@20
    45
                    <c:when test="${c.id == denniSouhrn.cil}">
franta-hg@20
    46
                        <option value="${c.id}" selected="selected"><c:out value="${c.nazev}"/></option>
franta-hg@6
    47
                    </c:when>
franta-hg@6
    48
                    <c:otherwise>
franta-hg@20
    49
                        <option value="${c.id}"><c:out value="${c.nazev}"/></option>
franta-hg@6
    50
                    </c:otherwise>
franta-hg@7
    51
                </c:choose>
franta-hg@20
    52
            </c:forEach>
franta-hg@20
    53
        </select>
franta-hg@20
    54
        <button>Zobrazit</button>
franta-hg@20
    55
    </form>
franta-hg@6
    56
franta-hg@7
    57
    <table class="sortable" id="seznamHrisniku">
franta-hg@4
    58
        <thead>
franta-hg@7
    59
            <tr>
franta-hg@7
    60
                <td title="Jméno a příjmení">IP adresa</td>
franta-hg@7
    61
                <td title="Přihlašovací jméno">Doména</td>
franta-hg@7
    62
                <td title="Jestli může být předsedou komise">Počet pokusů</td>
franta-hg@7
    63
                <td title="Jestli může být předsedou komise">Cíl útoku</td>
franta-hg@7
    64
            </tr>
franta-hg@4
    65
        </thead>
franta-hg@4
    66
        <tbody>
franta-hg@4
    67
            <c:forEach var="s" items="${denniSouhrn.souhrn}">
franta-hg@4
    68
                <tr>
franta-hg@5
    69
                    <td><c:out value="${s.adresa.ip}"/></td>
franta-hg@5
    70
                    <td><c:out value="${s.adresa.domena}"/></td>
franta-hg@4
    71
                    <td><c:out value="${s.pocet}"/></td>
franta-hg@5
    72
                    <td><c:choose>
franta-hg@5
    73
                            <c:when test="${s.cil.url == null}">
franta-hg@5
    74
                                <c:out value="${s.cil.nazev}"/>
franta-hg@5
    75
                            </c:when>
franta-hg@5
    76
                            <c:otherwise>
franta-hg@5
    77
                                <a href="${f:escapeXml(s.cil.url)}"><c:out value="${s.cil.nazev}"/></a>
franta-hg@5
    78
                            </c:otherwise>
franta-hg@5
    79
                        </c:choose>
franta-hg@5
    80
                    </td>
franta-hg@4
    81
                </tr>
franta-hg@4
    82
            </c:forEach>
franta-hg@4
    83
        </tbody>
franta-hg@4
    84
    </table>
franta-hg@4
    85
franta-hg@4
    86
</jsp:root>