#!/usr/bin/perl
require 'parse.pl';
&parse_form;
print"Content-type:text/html\n\n";
$filename = join '.',$v{'id'},'txt';
$result = "Password incorrect or file not found";
if (substr($v{'passwd'},0,5) eq "thaia" && stat $filename) {
open(myfile,$filename);
@rec = <myfile>;
close(myfile);
@r = split(":",$rec[0]);
if ($r[2] eq "thaiall\@thaiabc.com" && $v{'passwd'} ne "thaiabc") {
$result = "Can not detele of thaiall\@thaiabc.com";
} else {
unlink("$filename");
$result="Delete file : ok";
}
}
print $result;
จำนวน : 19 บรรทัด