home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Bila Vrana
/
BILA_VRANA.iso
/
018A
/
NO2F16XL.ZIP
/
NO2F16XL.EXE
/
t2.z
/
deleteMessage.cgi
< prev
next >
Wrap
Text File
|
1997-01-20
|
940b
|
61 lines
$PARENT=1;
sub lock{
if ($flock_exists == 1){
local ($file_handle);
foreach $file_handle (@_){
flock($file_handle, 2);
}
}
}
sub unlock{
if ($flock_exists == 1){
local ($file_handle);
foreach $file_handle (@_){
flock($file_handle, 8);
}
}
}
sub cleanMessage{
select(STDOUT);
print "Content-type: text/html\n\n";
if ($ENV{'QUERY_STRING'} == ''){
select(STDOUT);
print "<html><head>oh no!</head>Must provide an argument!</html>";
}
$inp = "../message/".$ENV{'QUERY_STRING'};
$inp2 = "message/".$ENV{'QUERY_STRING'};
unlink $inp;
open(IND,"+ ../message/bbs-data.html");
lock(IND);
#locate string position
# while($cool = <IND>){
while(<IND>){
# if (<IND> =~ $inp2){
# }
# else {
print;
# }
}
#delete line from file
close(IND);
}
&cleanMessage;
select(STDOUT);
print <<"END";
END