-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.cgi
executable file
·96 lines (86 loc) · 2.35 KB
/
index.cgi
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
95
96
#!/usr/bin/env perl
use strict;
use CGI;
our ($rootdir, $annot_path, $image_path);
require './cgi/cgi.conf';
my $cgi = new CGI;
print $cgi->header({type => 'text/html', charset => 'utf-8', expires => '-1d'});
use File::Basename qw/basename dirname/;
my $options = "";
for my $dir (sort({$a <=> $b} glob("$rootdir/*"))) {
if (-d $dir){
my $dirname = basename $dir;
$options .= "<option value='$dirname'>$dirname</option>";
}
};
print <<EOF;
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>関係コーパス ログイン</title>
<style>
th, td {
padding: 5px;
}
th {
text-align: left;
}
</style>
<script type="text/javascript" src="./js/login_default.js"></script>
</head>
<body>
<h3>関係コーパス ログイン</h3>
<br>
<form method=POST action="cgi/list.cgi">
<table>
<tr>
<th>
名前
</th>
<td>
<select name="annotator_id">
<option value="annotator_a">annotator_a</option>
<option value="annotator_b">annotator_b</option>
</select>
<!--<input name="annotator_id" size="10">-->
</td>
</tr>
<tr>
<th>
パスワード
</th>
<td>
<input type="password" name="password" size="10" maxlength="8">
</td>
</tr>
<tr>
<th>
記事セット
</th>
<td>
<select name="corpus_set_id">
$options
</select>
</td>
</tr>
<tr>
<th>
記事セット
</th>
<td>
<input TYPE="checkbox" NAME="skip" VALUE="skip">不適記事を表示しない
</td>
</tr>
<tr>
<th>
</th>
<td>
<input type="submit" value="送信">
</td>
</tr>
</table>
</form>
</body>
</html>
EOF
print $cgi->end_html;