Continue the xhtml-ification of cgi scripts.
Assisted by: simon@, validator.w3.org
This commit is contained in:
parent
7ffcf3794c
commit
8b20d224d9
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=26092
3 changed files with 28 additions and 29 deletions
|
|
@ -6,7 +6,7 @@
|
|||
# by John Fieber
|
||||
# February 26, 1998
|
||||
#
|
||||
# $FreeBSD: www/en/cgi/getmsg.cgi,v 1.37 2004/04/04 21:49:38 phantom Exp $
|
||||
# $FreeBSD: www/en/cgi/getmsg.cgi,v 1.38 2005/03/29 20:43:20 simon Exp $
|
||||
#
|
||||
|
||||
require "./cgi-lib.pl";
|
||||
|
|
@ -99,7 +99,6 @@ sub Fetch
|
|||
print &short_html_header("FreeBSD Mail Archives");
|
||||
print $message;
|
||||
print &html_footer;
|
||||
print "</BODY></HTML>\n";
|
||||
}
|
||||
|
||||
sub EscapeHTML
|
||||
|
|
@ -154,41 +153,41 @@ sub MessageToHTML
|
|||
if ($hdr{'message-id:'}) {
|
||||
$tmid = $hdr{'message-id:'};
|
||||
$hdr{'message-id:'} =~
|
||||
s%;([^&]+)&%;<a href="$mid?db=irt&id=$1">$1</a>&%oi;
|
||||
s%;([^&]+)&%;<a href="$mid?db=irt&id=$1">$1</a>&%oi;
|
||||
$message .= "<strong>Message-ID: </strong> $hdr{'message-id:'}\n";
|
||||
}
|
||||
|
||||
if ($hdr{'resent-message-id:'}) {
|
||||
$hdr{'resent-message-id:'} =~
|
||||
s%;([^&]+)&%;<a href="$mid?db=irt&id=$1">$1</a>&%oi;
|
||||
s%;([^&]+)&%;<a href="$mid?db=irt&id=$1">$1</a>&%oi;
|
||||
$message .= "<strong>Resent-Message-ID: </strong>$hdr{'resent-message-id:'}\n";
|
||||
}
|
||||
|
||||
if ($hdr{'in-reply-to:'}) {
|
||||
$tirt = $hdr{'in-reply-to:'};
|
||||
$hdr{'in-reply-to:'} =~
|
||||
s%;([^&]+)&%;<a href="$mid?db=mid&id=$1">$1</a>&%oi;
|
||||
s%;([^&]+)&%;<a href="$mid?db=mid&id=$1">$1</a>&%oi;
|
||||
$message .= "<strong>In-Reply-To: </strong>$hdr{'in-reply-to:'}\n";
|
||||
}
|
||||
|
||||
if ($hdr{'references:'}) {
|
||||
$tref = $hdr{'references:'};
|
||||
$hdr{'references:'} =~
|
||||
s%;([^&\s]+)&%;<a href="$mid?db=mid&id=$1">$1</a>&%goi;
|
||||
s%;([^&\s]+)&%;<a href="$mid?db=mid&id=$1">$1</a>&%goi;
|
||||
$message .= "<strong>References: </strong> $hdr{'references:'}\n";
|
||||
}
|
||||
|
||||
|
||||
$message .= "</pre>\n";
|
||||
$message .= "<HR NOSHADE>\n";
|
||||
$message .= "<hr noshade=\"noshade\"/>\n";
|
||||
|
||||
if ($tmid =~ m%;([^&]+)&%) {
|
||||
$message .= qq{<a href="$mid?db=irt&id=$1">Next in thread</a>\n};
|
||||
$message .= qq{<a href="$mid?db=irt&id=$1">Next in thread</a>\n};
|
||||
}
|
||||
|
||||
if ($tirt =~ m%;([^&]+)&% ||
|
||||
$tref =~ m%;([^&]+)&%) {
|
||||
$message .= qq{| <a href="$mid?db=mid&id=$1">Previous in thread</a>\n};
|
||||
$message .= qq{| <a href="$mid?db=mid&id=$1">Previous in thread</a>\n};
|
||||
}
|
||||
$message .= qq{| <a href="$ENV{'REQUEST_URI'}+raw">Raw E-Mail</a>\n};
|
||||
my $file2 = $file;
|
||||
|
|
@ -203,14 +202,14 @@ sub MessageToHTML
|
|||
$tid =~ s/^<//;
|
||||
$tid =~ s/\@.*//;
|
||||
|
||||
$message .= "<HR NOSHADE>\n";
|
||||
#$message .= qq{<div onclick="document.location='$mid_full_url?db=irt&id=$tid'">\n};
|
||||
$message .= "<p><pre>\n$body\n</pre>\n";
|
||||
$message .= "<hr noshade=\"noshade\"/>\n";
|
||||
#$message .= qq{<div onclick="document.location='$mid_full_url?db=irt&id=$tid'">\n};
|
||||
$message .= "<pre>\n$body\n</pre>\n";
|
||||
#$message .= qq{</div>\n};
|
||||
|
||||
$message .= qq{<hr>\nWant to link to this message? Use this URL: <};
|
||||
$message .= qq{<hr/>\n<p>Want to link to this message? Use this URL: <};
|
||||
$message .= qq{<a href="} . $mid_full_url . '?' . $tid;
|
||||
$message .= qq{">$mid_full_url} . '?' . $tid . qq{</a>>};
|
||||
$message .= qq{">$mid_full_url} . '?' . $tid . qq{</a>></p>};
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#
|
||||
# Search a mail by Message-ID, References or In-Reply-To field
|
||||
#
|
||||
# $FreeBSD: www/en/cgi/mid.cgi,v 1.11 2000/12/28 13:16:39 wosch Exp $
|
||||
# $FreeBSD: www/en/cgi/mid.cgi,v 1.12 2002/04/22 05:08:41 kuriyama Exp $
|
||||
|
||||
$hsty_base = '';
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ sub get_id {
|
|||
exec("$lookCommand", $query, "$lookupdir/mid-current.$db") ||
|
||||
do {
|
||||
print &midheader .
|
||||
"Cannot connect to Message-ID database.<p>\n" . &foot;
|
||||
"<p>Cannot connect to Message-ID database.</p>\n" . &foot;
|
||||
exit;
|
||||
};
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ sub get_id {
|
|||
exec("$lookCommand", $query, "$lookupdir/mid.$db") ||
|
||||
do {
|
||||
print &midheader .
|
||||
"Cannot connect to Message-ID database.<p>\n" . &foot;
|
||||
"<p>Cannot connect to Message-ID database.</p>\n" . &foot;
|
||||
exit;
|
||||
};
|
||||
|
||||
|
|
@ -100,27 +100,27 @@ sub get_id {
|
|||
} else { # more than one hit
|
||||
local($id, $file, $start, $name);
|
||||
print &midheader;
|
||||
print "<UL>\n";
|
||||
print "<ul>\n";
|
||||
foreach (@idlist) {
|
||||
($id, $file, $start) = split;
|
||||
$name = $file;
|
||||
$name =~ s%.*/%%;
|
||||
$name =~ s%(....)(..)(..)\.%$1-$2-$3 %;
|
||||
print qq{<LI><A HREF="getmsg.cgi?fetch=$start+0+} .
|
||||
print qq{<li><a href="getmsg.cgi?fetch=$start+0+} .
|
||||
($file =~ /^current/ ? '' : "$prefix/") .
|
||||
qq{$file">$name $start</A>\n};
|
||||
qq{$file">$name $start</a></li>\n};
|
||||
}
|
||||
print "</UL>\n<p>\n";
|
||||
print "</ul>\n<p></p>\n";
|
||||
print &foot;
|
||||
}
|
||||
}
|
||||
|
||||
sub midheader {
|
||||
return &short_html_header("FreeBSD Message-ID Mail Archives") .
|
||||
qq{<p><a href="../search/search.html">Back to the search interface</a><p>\n};
|
||||
qq{<p><a href="$hsty_base/search/search.html">Back to the search interface</a></p>\n};
|
||||
}
|
||||
|
||||
sub foot { return &html_footer . "</BODY></HTML>\n"; }
|
||||
sub foot { return &html_footer; }
|
||||
|
||||
###
|
||||
# Main
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
# Disclaimer:
|
||||
# This is pretty ugly in places.
|
||||
#
|
||||
# $FreeBSD: www/en/cgi/search.cgi,v 1.22 2001/10/30 07:26:27 kuriyama Exp $
|
||||
# $FreeBSD: www/en/cgi/search.cgi,v 1.23 2002/04/22 05:08:41 kuriyama Exp $
|
||||
|
||||
|
||||
$server_root = '/usr/local/www';
|
||||
|
|
@ -119,7 +119,7 @@ sub do_wais {
|
|||
print "The archive <em>@AVAIL_source</em> contains ";
|
||||
}
|
||||
print " the following items relevant to \`@FORM_words\':\n";
|
||||
print "<OL>\n";
|
||||
print "<ol>\n";
|
||||
|
||||
&open2(WAISOUT, WAISIN, $waisq, "-g");
|
||||
print WAISIN $w_question;
|
||||
|
|
@ -193,7 +193,7 @@ sub do_wais {
|
|||
}
|
||||
#print qq[in: $in{'sort'}\n];
|
||||
|
||||
print "</OL>\n";
|
||||
print "</ol>\n";
|
||||
|
||||
print "<p>Didn't get what you expected? ";
|
||||
print "<a href=\"$hints\">Look here for searching hints</a>.</p>";
|
||||
|
|
@ -240,10 +240,10 @@ sub docdone {
|
|||
if ($file eq "www" || $file eq 'pkgdescr') {
|
||||
print "<li><a href=\"$headline\">$headline</a>\n";
|
||||
} else {
|
||||
print "<li><A HREF=\"getmsg.cgi?fetch=${docid}\">$headline</A>\n";
|
||||
print "<li><a href=\"getmsg.cgi?fetch=${docid}\">$headline</a>\n";
|
||||
}
|
||||
print "<br>";
|
||||
# print "<input type=\"checkbox\" name=\"rf\" value=\"$docnum\">";
|
||||
print "<br/>";
|
||||
# print "<input type=\"checkbox\" name=\"rf\" value=\"$docnum\"/>";
|
||||
print "Score: <em>$score</em>; ";
|
||||
$_ = $date;
|
||||
/(...?)(..)(..)/ && ($yr = $1 + 1900, $mo = $months[$2 - 1], $dy = $3);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue