java/HrisniciSpameri/web/souhrn.jspx
author František Kučera <franta-hg@frantovo.cz>
Sun, 01 Mar 2009 13:04:10 +0100
changeset 40 fd29fd5a8e29
parent 29 f8d3d7914d9a
child 41 d41dc2f3380d
permissions -rw-r--r--
Graf zobrazuje skutečná data – Počty útoků za den
franta-hg@4
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@4
     2
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
franta-hg@4
     3
          xmlns:c="http://java.sun.com/jsp/jstl/core"
franta-hg@5
     4
          xmlns:f="http://java.sun.com/jsp/jstl/functions"
franta-hg@4
     5
          version="2.0">
franta-hg@4
     6
franta-hg@4
     7
    <jsp:useBean id="denniSouhrn" class="cz.frantovo.hrisniciSpameri.DenniSouhrn" scope="page"/>
franta-hg@26
     8
    <jsp:setProperty name="denniSouhrn" property="zacatekString" value="${param.zacatek}"/>
franta-hg@26
     9
    <jsp:setProperty name="denniSouhrn" property="konecString" value="${param.konec}"/>
franta-hg@20
    10
    <jsp:setProperty name="denniSouhrn" property="cilString" value="${param.cil}"/>
franta-hg@4
    11
franta-hg@4
    12
franta-hg@20
    13
    <p><a onclick="JavaScript: zobrazNeboSkryj('seznamCilu')" href="#">Seznam cílů</a></p>
franta-hg@20
    14
    <div id="seznamCilu">
franta-hg@20
    15
        <ul>
franta-hg@20
    16
            <c:forEach var="c" items="${denniSouhrn.seznamCilu}">
franta-hg@20
    17
                <li>
franta-hg@20
    18
                    <c:choose>
franta-hg@20
    19
                        <c:when test="${c.url == null}">
franta-hg@20
    20
                            <c:out value="${c.nazev}"/>
franta-hg@20
    21
                        </c:when>
franta-hg@20
    22
                        <c:otherwise>
franta-hg@20
    23
                            <a href="${f:escapeXml(c.url)}"><c:out value="${c.nazev}"/></a>
franta-hg@20
    24
                        </c:otherwise>
franta-hg@20
    25
                    </c:choose>
franta-hg@20
    26
                </li>
franta-hg@20
    27
            </c:forEach>
franta-hg@20
    28
        </ul>
franta-hg@20
    29
    </div>
franta-hg@4
    30
franta-hg@4
    31
franta-hg@20
    32
    <h2>Denní souhrn</h2>
franta-hg@20
    33
    <form action="#" method="get">
franta-hg@27
    34
        <fieldset>
franta-hg@27
    35
            <label>Začátek: <input name="zacatek" type="text" value="${denniSouhrn.zacatek}"/></label><br/>
franta-hg@27
    36
            <label title="Pokud konec nezadáte, zobrazí se souhrn za jeden den – začátek">Konec: <input name="konec" type="text" value="${denniSouhrn.konec}"/></label><br/>
franta-hg@27
    37
            <label>Cíl: <select name="cil">
franta-hg@40
    38
                    <option value="0">Všechny cíle</option>
franta-hg@40
    39
                    <c:forEach var="c" items="${denniSouhrn.seznamCilu}">
franta-hg@40
    40
                        <c:choose>
franta-hg@40
    41
                            <c:when test="${c.id == denniSouhrn.cil}">
franta-hg@40
    42
                                <option value="${c.id}" selected="selected"><c:out value="${c.nazev}"/></option>
franta-hg@40
    43
                            </c:when>
franta-hg@40
    44
                            <c:otherwise>
franta-hg@40
    45
                                <option value="${c.id}"><c:out value="${c.nazev}"/></option>
franta-hg@40
    46
                            </c:otherwise>
franta-hg@40
    47
                        </c:choose>
franta-hg@40
    48
                    </c:forEach>
franta-hg@27
    49
            </select></label><br/>
franta-hg@40
    50
            <input name="graf" type="hidden" value="${param.graf}"/>
franta-hg@27
    51
            <button>Zobrazit</button>
franta-hg@27
    52
        </fieldset>
franta-hg@20
    53
    </form>
franta-hg@6
    54
franta-hg@7
    55
    <table class="sortable" id="seznamHrisniku">
franta-hg@4
    56
        <thead>
franta-hg@7
    57
            <tr>
franta-hg@29
    58
                <td title="Zaznamenaná IP">IP adresa</td>
franta-hg@29
    59
                <td title="Dodatečně přeložené jméno">Doména</td>
franta-hg@29
    60
                <td title="Kolikrát spamoval">Počet pokusů</td>
franta-hg@29
    61
                <td title="Den (posledního) pokusu">Datum</td>
franta-hg@29
    62
                <td title="Kde spamoval">Cíl útoku</td>
franta-hg@7
    63
            </tr>
franta-hg@4
    64
        </thead>
franta-hg@4
    65
        <tbody>
franta-hg@4
    66
            <c:forEach var="s" items="${denniSouhrn.souhrn}">
franta-hg@4
    67
                <tr>
franta-hg@5
    68
                    <td><c:out value="${s.adresa.ip}"/></td>
franta-hg@5
    69
                    <td><c:out value="${s.adresa.domena}"/></td>
franta-hg@29
    70
                    <td class="cislo"><c:out value="${s.pocet}"/></td>
franta-hg@29
    71
                    <td><c:out value="${s.den}"/></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@40
    84
    </table>   
franta-hg@4
    85
franta-hg@4
    86
</jsp:root>