-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshowsentence
executable file
·74 lines (53 loc) · 1.34 KB
/
showsentence
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
#!/usr/bin/perl
# CGI script shows sentences that are suppressed in the
# search page of Textpresso system because they appear scrambled
#
# Copyright (c) Arun Rangarajan & Hans-Michael Muller 2007.
use strict;
# The following line needs adjustments for each implementation
use lib "/usr/local/lib/textpresso/displaying/ecoli/";
# end line that needs adjustments
use CGI;
use TextpressoDatabaseGlobals;
### globals
#
# handle to this CGI and own address
my $query = new CGI;
my $absmyself = $query->url(absolute=>1);
### process form
#
#
###
PrintHeader($query);
### first part of output goes here
#
my $file_name = $query->param('filename');
my $file_name = DB_TMP . '/' . $file_name;
open (IN, "<$file_name") || die ("Could not open $file_name for reading.");
my $sen = "";
while (<IN>)
{ $sen .= $_;
}
close (IN);
print $query->start_b;
print $query->font("Sentence: ");
print $query->end_b;
print $query->start_a;
print "$sen";
print $query->end_a;
#
###
### end form here
#
PrintBottom($query);
#
###
sub PrintHeader { # begin PrintHeader
my $query = shift;
print $query->header;
print $query->start_html(-title=>'Show Sentence', -author=>'adapted by Arun Rangarajan from Hans-Michael Muller');
} # end PrintHeader
sub PrintBottom { # begin PrintBottom
my $query = shift;
print $query->end_html;
} # end PrintBottom