This commit is contained in:
Olivier Sirol 2000-06-06 15:34:49 +00:00
parent 31f3ed7c2e
commit f4403a8c66
5 changed files with 42 additions and 21 deletions

View File

@ -36,7 +36,7 @@ then
cat << EOF
<Center>
<A href=${URI_DOC}.fr.html><img src="http://www-asim.lip6.fr/ssi/flag_fr.gif" alt="[FRENCH]" width="34" height="27" border=0 ></A> <A href=${URI_DOC}.gb.html><img src="http://www-asim.lip6.fr/ssi/flag_gb.gif" alt="[ENGLISH]" width="34" height="27" border=0></A>
<A href=${URI_DOC}.fr.html><img src="http://www-asim.lip6.fr/ssi/img/flag_fr.gif" alt="[FRENCH]" width="34" height="27" border=0 ></A> <A href=${URI_DOC}.gb.html><img src="http://www-asim.lip6.fr/ssi/img/flag_gb.gif" alt="[ENGLISH]" width="34" height="27" border=0></A>
<br clear=all>
</Center>

View File

@ -1,10 +1,10 @@
#!/usr/local/bin/perl -w
#!/usr/bin/perl -w
use Fcntl ':flock'; # import LOCK_* constants
$res=flock("/tmp/my.lock", LOCK_EX);
print $res;
system ("ls -alrt /tmp");
print $res . "\n";
# system ("ls -alrt /tmp");
sleep 10;
exit 0

View File

@ -2,7 +2,8 @@
$TMP=">/tmp/toto.123" ;
open sotie, $TMP ;
print "Content-type: text/html\n\n";
print "PrintEnv:\n\n<PRE>\n";
while (($key, $val) = each %ENV) {
print "$key = $val<BR>\n";
}
print "</PRE>\n";

View File

@ -354,3 +354,5 @@
1999/12/10 15:59:53 132.227.67.64 "Whole Asim Site" "dpr" 54
1999/12/12 19:32:55 212.216.138.4 "Whole Asim Site" "Nti" 0
1999/12/12 19:32:59 212.216.138.4 "Whole Asim Site" "Ntie" 12
2000/05/12 17:12:29 "" ""
2000/05/12 17:13:05 "" "gen"

View File

@ -1,6 +1,21 @@
#!/usr/local/bin/perl
# (C) Copyright 1997,98 Czo <mailto:Olivier.Sirol@asim.lip6.fr>
# Parts (C) A.Fenyo
BEGIN {
# Use the CGI::Carp module and import the carpout() function.
#
use CGI::Carp qw(carpout);
# Send warnings and die messages to the browser.
#
carpout(STDOUT);
}
use CGI;
use POSIX;
@ -8,17 +23,19 @@ use POSIX;
# SCRIPT_FILENAME = /users/largo2/webmastr/wwwroot/cgi-bin/printenv.cgi
$ASIM_HEADER=`/bin/cat /users/largo2/webmastr/wwwroot/ssi/asim.header/index.gb.html`;
$ASIM_FOOTER=`/bin/cat /users/largo2/webmastr/wwwroot/ssi/asim.footer/index.gb.html`;
$SEARCH_HEADER=`/bin/cat /users/largo2/webmastr/wwwroot/ssi/search.header/index.gb.html`;
$SEARCH_MIDDLE=`/bin/cat /users/largo2/webmastr/wwwroot/ssi/search.middle/index.gb.html`;
$SEARCH_FOOTER=`/bin/cat /users/largo2/webmastr/wwwroot/ssi/search.footer/index.gb.html`;
$ASIM_HEADER=`/bin/cat /users/largo2/webmastr/wwwroot/slash/ssi/asim_header.html`;
$ASIM_FOOTER=`/bin/cat /users/largo2/webmastr/wwwroot/slash/ssi/asim_footer.html`;
$SEARCH_HEADER=`/bin/cat /users/largo2/webmastr/wwwroot/slash/ssi/search_header.html`;
$SEARCH_MIDDLE=`/bin/cat /users/largo2/webmastr/wwwroot/slash/ssi/search_middle.html`;
$SEARCH_FOOTER=`/bin/cat /users/largo2/webmastr/wwwroot/slash/ssi/search_footer.html`;
$lock = "/tmp/search.lock";
$log = "/users/largo2/webmastr/wwwroot/cgi-bin/private/search.log";
$log = "/users/largo2/webmastr/wwwroot/slash/cgi-bin/private/search.log";
print "Content-type: text/html\n\n";
#unlink("$lock");
$query = new CGI;
$str = $query->param('searchstring');
@ -45,20 +62,20 @@ foreach $word (@words) {
$scope = $query->param('ComboSearchList');
if ( $scope eq "Alliance Mailling Lists" ) {
$scopefile = "/users/largo2/webmastr/wwwroot/cgi-bin/alml.dat";
$scopefile = "/users/largo2/webmastr/wwwroot/slash/cgi-bin/alml.dat";
} elsif ( $scope eq "Alliance" ) {
$scopefile = "/users/largo2/webmastr/wwwroot/cgi-bin/alliance.dat";
$scopefile = "/users/largo2/webmastr/wwwroot/slash/cgi-bin/alliance.dat";
} elsif ( $scope eq "Education" ) {
$scopefile = "/users/largo2/webmastr/wwwroot/cgi-bin/education.dat";
$scopefile = "/users/largo2/webmastr/wwwroot/slash/cgi-bin/education.dat";
} elsif ( $scope eq "Mpc" ) {
$scopefile = "/users/largo2/webmastr/wwwroot/cgi-bin/mpc.dat";
$scopefile = "/users/largo2/webmastr/wwwroot/slash/cgi-bin/mpc.dat";
} elsif ( $scope eq "Multimedia" ) {
$scopefile = "/users/largo2/webmastr/wwwroot/cgi-bin/multimedia.dat";
$scopefile = "/users/largo2/webmastr/wwwroot/slash/cgi-bin/multimedia.dat";
} elsif ( $scope eq "Publications" ) {
$scopefile = "/users/largo2/webmastr/wwwroot/cgi-bin/publications.dat";
$scopefile = "/users/largo2/webmastr/wwwroot/slash/cgi-bin/publications.dat";
} elsif ( $scope eq "Personal pages" ) {
$scopefile = "/users/largo2/webmastr/wwwroot/cgi-bin/users.dat";
} else { $scopefile = "/users/largo2/webmastr/wwwroot/cgi-bin/allsite.dat";
$scopefile = "/users/largo2/webmastr/wwwroot/slash/cgi-bin/users.dat";
} else { $scopefile = "/users/largo2/webmastr/wwwroot/slash/cgi-bin/allsite.dat";
}
@ -169,6 +186,7 @@ close(RESULT);
print "$SEARCH_FOOTER\n$ASIM_FOOTER\n";
# REMOTE_ADDR = 132.227.103.10
# HTTP_X_FORWARDED_FOR = 132.227.103.10
@ -180,12 +198,12 @@ $CLIENT = $ENV{"REMOTE_ADDR"};
$TIME=strftime("%Y/%m/%d %H:%M:%S",localtime());
open(LOCK,">$lock") || die "Can't open lock : $!";
open(LOCK,">$lock") || warn "Can't open lock : $!";
close (LOCK);
open(SORTIE, ">>$log") || die "Can't open log : $!";
print SORTIE "$TIME $CLIENT \"$scope\" \"$str\" $nmatch\n";;
close (SORTIE);
unlink("$lock") || die "Can't delete lock : $!";
unlink("$lock") || warn "Can't delete lock : $!";
}