-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkorpus.php
94 lines (85 loc) · 3.08 KB
/
korpus.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
session_start();
include_once("functions.php");
include_once("db.php");
pageStart($_SERVER['PHP_SELF']);
echo "<h2>Korpusabfrage</h2>";
$searchform = printSimpleSearch();
if(isset($_REQUEST['searchform']) && $_REQUEST['searchform']=="advanced") {
$searchform = printAdvancedSearch();
}
$result = "";
if(isset($_REQUEST['search'])) {
// DO AN ADVANCED SEARCH
$result = "Die Suchfunktion ist noch nicht implementiert.";
}
echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"GET\">
".$searchform."
</from><br/>".
$result;
pageEnd();
function printSimpleSearch() {
return "<table class=\"searchform\">
<tr>
<td align=\"right\">Suchbegriff:</td>
<td><input type=\"text\" name=\"searchQuery\" class=\"searchform\" /></td>
<td align=\"right\">
<a href=\"?searchform=advanced\"><nobr>Erweiterte Suche</nobr></a>
</td>
</tr>
<tr>
<td></td>
<td>
<input type=\"submit\" name=\"search\" value=\"Korpus durchsuchen\" class=\"searchform\" />
</td>
<td></td>
</tr>
</table>
<input type=\"hidden\" name=\"searchform\" value=\"simple\" />";
}
function printAdvancedSearch() {
return " <table class=\"searchform\">
<tr>
<td align=\"right\">Suchbegriff:</td>
<td colspan=\"6\" width=\"100%\"><input type=\"text\" name=\"searchQuery\" class=\"searchform\" /></td>
<td colspan=\"2\" align=\"right\">
<a href=\"?searchform=simple\"><nobr>Einfache Suche</nobr></a>
</td>
</tr>
<tr>
<td class=\"sf_r\" rowspan=\"4\" valign=\"top\" align=\"right\">Filter:</td>
<td class=\"sf_tr\" colspan=\"4\" bgcolor=\"#DDDDDD\" align=\"center\"><i>Dokument</i></td>
<td class=\"sf_tr\" colspan=\"4\" bgcolor=\"#DDDDDD\" align=\"center\"><i>Autor</i></td>
</tr>
<tr>
<td>Dokumenttyp</td>
<td class=\"sf_r\" colspan=\"3\">".getDocumentTypeSelect("docType", "", "searchform")."</td>
<td>Alter zw.</td>
<td>".getAgeSelect("ageStartSelectName", "", "searchform")."</td>
<td>und</td>
<td class=\"sf_r\">".getAgeSelect("ageEndSelectName", "", "searchform")."</td>
</tr>
<tr>
<td>Abgabe zw.</td>
<td>".getYearSelect("yearStartSelectName", "", "searchform")."</td>
<td>und</td>
<td class=\"sf_r\">".getYearSelect("yearEndSelectName", "", "searchform")."</td>
<td>Gender</td>
<td class=\"sf_r\" colspan=\"3\">".getGenderSelect("genderSelectName", "", "searchform")."</td>
</tr>
<tr>
<td class=\"sf_b\">Sprache</td>
<td class=\"sf_br\"colspan=\"3\">".getLanguageSelect("lang", "", "searchform")."</td>
<td class=\"sf_b\">Studium</td>
<td class=\"sf_br\" colspan=\"3\">niy</td>
</tr>
<tr>
<td></td>
<td colspan=\"8\">
<input type=\"submit\" name=\"search\" value=\"Korpus durchsuchen\" class=\"searchform\" />
</td>
</tr>
</table>
<input type=\"hidden\" name=\"searchform\" value=\"advanced\" />";
}
?>