Changeset 24:dceaaefb1946
- Timestamp:
- 05/31/09 17:46:11 (15 years ago)
- Author:
- František Kučera <franta-hg@…>
- Branch:
- default
- Message:
-
Přechod ze servletu na JSP – přidání JSPX.
- Location:
- java/sql-vyuka
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
r14
|
r24
|
|
58 | 58 | Ajax a = new Ajax(); |
59 | 59 | |
60 | | Uzivatel uzivatel = new Uzivatel(request.getRequestedSessionId(), request.getRemoteHost()); |
| 60 | Uzivatel uzivatel = new Uzivatel(request.getRequestedSessionId(), request.getRemoteAddr()); |
61 | 61 | |
62 | 62 | switch (parametrAkce) { |
-
r16
|
r24
|
|
61 | 61 | String[] zahlavi = {"Kdy", "SQL příkaz"}; |
62 | 62 | t.setZahlavi(zahlavi); |
63 | | |
| 63 | /** TODO: lokalizace */ |
| 64 | t.setZahlaviTip("TODO: Překlad"); |
64 | 65 | |
65 | 66 | Connection db = getSpojeni(DATABAZE.APLIKACE); |
-
r12
|
r24
|
|
11 | 11 | private String text; |
12 | 12 | private Typ typ; |
13 | | private boolean escapovat; |
| 13 | private boolean escapovat = true; |
14 | 14 | |
15 | 15 | /** |
-
r16
|
r24
|
|
12 | 12 | |
13 | 13 | private String[] zahlavi; |
| 14 | private String zahlaviTip; |
14 | 15 | private Collection<Object[]> hodnoty = new ArrayList<Object[]>(); |
15 | 16 | |
… |
… |
|
68 | 69 | } |
69 | 70 | |
| 71 | public String getZahlaviTip() { |
| 72 | return zahlaviTip; |
| 73 | } |
| 74 | |
| 75 | public void setZahlaviTip(String zahlaviTip) { |
| 76 | this.zahlaviTip = zahlaviTip; |
| 77 | } |
| 78 | |
70 | 79 | public Collection<Object[]> getHodnoty() { |
71 | 80 | return hodnoty; |
-
r13
|
r24
|
|
13 | 13 | this.idSezeni = idSezeni; |
14 | 14 | this.ipAdresa = ipAdresa; |
| 15 | } |
| 16 | |
| 17 | public Uzivatel() { |
15 | 18 | } |
16 | 19 | |
-
r23
|
r24
|
|
19 | 19 | js.probihaHistorie=Na\u010D\u00EDt\u00E1 se historie\u2026 |
20 | 20 | |
21 | | licence.program=Program je vyd\u00E1n pod licenc\u00ED: |
| 21 | licence.program=Program je vyd\u00E1n pod licenc\u00ED: |
22 | 22 | licence.agpl=GNU Affero GPL |
23 | | licence.zdrojaky=Zdrojov\u00E9 k\u00F3dy ke sta\u017Een\u00ED: |
| 23 | licence.zdrojaky=Zdrojov\u00E9 k\u00F3dy ke sta\u017Een\u00ED: |
| 24 | |
| 25 | vysledek.razeniTip=Chce\u0161 set\u0159\u00EDdit v\u00FDsledek podle n\u011Bjak\u00E9ho sloupce? Co takhle ORDER BY sloupec. |
| 26 | historie.kdy=Kdy |
| 27 | historie.prikaz=SQL p\u0159\u00EDkaz |
| 28 | historie.zahlaviTip=Posledn\u00ED proveden\u00E9 SQL p\u0159\u00EDkazy. |
-
r22
|
r24
|
|
55 | 55 | if (ajax.readyState == 4 || ajax.readyState == 0) { |
56 | 56 | zobraz(document.lokalizace.probihaSQL.value, stavovePole); |
57 | | ajax.open("POST", 'ajax?akce=vykonat&sql=' + encodeURIComponent(getSQL()), true); |
| 57 | ajax.open("POST", 'ajax.jspx?akce=vykonat&sql=' + encodeURIComponent(getSQL()), true); |
58 | 58 | ajax.onreadystatechange = function() { |
59 | 59 | if (ajax.readyState == 4) { |
… |
… |
|
71 | 71 | if (ajax.readyState == 4 || ajax.readyState == 0) { |
72 | 72 | zobraz(document.lokalizace.probihaHistorie.value, stavovePole); |
73 | | ajax.open("POST", 'ajax?akce=historie', true); |
| 73 | ajax.open("POST", 'ajax.jspx?akce=historie', true); |
74 | 74 | ajax.onreadystatechange = function() { |
75 | 75 | if (ajax.readyState == 4) { |