#!/usr/bin/perl
print "content-type:text/html";
require '../get.cgi';
&read_cgi;
$uuser=$FORM{'username'};
$password=$FORM{'password'};
$uuser2=$FORM{'username2'};
$password2=$FORM{'password2'};
$B1=$FORM{'B1'};
$err=$FORM{'err'};
require '../cookie.lib';
$cook=$FORM{'text'};
&SetCookies('name',$cook);
if ($B1 eq "确定修改") {
open(FD,"adm.dat");
@info2=;
close(FD);
$row=@info2[0];
@info=split(/:/,$row);
if ((!$uuser)||(!$password)||(!$uuser2)||(!$password2)){
print "\n";
open(GUEST,"./header.htm");
@title=;
close(GUEST);
print "@title";
print "
你没有填写所有栏目!点击这里返回!
\n\n";
}
elsif ($uuser ne @info[0] or $password ne @info[1]) {
print "\n";
open(GUEST,"./header.htm");
@title=;
close(GUEST);
print "@title";
print "
错误的用户名和密码!点击这里返回!
\n\n";
}
#chop($password2);
#chop($uuser2);
else {
$str=$uuser2.":".$password2;
open (FD,">adm.dat");
print FD "$str";
close(FD);
&SetCookies('user',$uuser2);
&SetCookies('pass',$password2);
print "\n";
print "\n";
open(GUEST,"./header.htm");
@title=;
close(GUEST);
print "@title";
print "
帐号修改完成,点击这里重新登陆!
";
}
}
else{
print "\n";
print "\n";
open(GUEST,"./header.htm");
@title=;
close(GUEST);
print "@title";
print <<"FOF";
change
$err
FOF
}
print "";
open(GUEST,"./footer.htm");
@title=;
close(GUEST);
print "@title";