日期:2014-03-27  浏览次数:20615 次

6、登出文件logout.php3
<?
setcookie("login",false,time()+31536000);
header("location:login.php3");
?>

7、修改信息文件modify.php3
<?
require("common.php3");
$id=$login;
if($submit){
if($name=="")error("请填写您的名字!");
elseif($mail=="")error("请填写您的邮件地址!");
else{
$dbm=dbmopen("class","w");
$intro=nl2br($intro);
$data="$name|!:!|$nickname|!:!|$mail|!:!|$home|!:!|$oicq|!:!|$icq|!:!|$add|!:!|$tel|!:!|$birth|!:!|$job|!:!|$intro|!:!|$sex";
dbmreplace($dbm,$id,$data);
dbmclose($dbm);
header("Location:index.php3");
}
}else{
$dbm=dbmopen("class","r");
$data=dbmfetch($dbm,$login);
$info=explode("|!:!|",$data);
dbmclose($dbm);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>同学录用户修改信息</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link rel="stylesheet" href="style.css">
</HEAD><BODY bgcolor="#FFFFFF" topMargin=0>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%"><BR>
<DIV align=center></DIV><CENTER><TBODY></TBODY></center>
</TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="60%" align="center">
<TBODY> <TR vAlign=top>
<TD bgColor=#000000 width="100%" height="336">
<DIV align=center>
<TABLE border=0 cellPadding=4 cellSpacing=1 height=390 width=586>
<TBODY>
<TR>
<TD align=middle bgColor=#2f5e8c colSpan=2 height=14 vAlign=top><form method="POST" action="modify.php3"> <FONT color=#ffffff>修改信息-同学录<?echo$login;?></FONT></TD>
</TR>
<tr>
<td align=middle bgcolor=#ffffff height=25 width=121>NickName: </td>
<td align=left bgcolor=#ffffff height=25 width=486>
<input class=stedit maxlength=20 name=nickname size=23 value=<?echo$info[1];?>>
</td>
</tr>
<TR>
<TD align=middle bgColor=#ffffff height=25 width=121>电子邮件: </TD>
<TD align=left bgColor=#ffffff height=25 width=486>
<INPUT class=stedit maxLength=30 name=mail size=23 value=<?echo$info[2];?>>
*必须填写 </TD>
</TR>
<tr>
<td align=middle bgcolor=#ffffff height=25 width=121>您的OICQ: </td>
<td align=left bgcolor=#ffffff height=25 width=486>
<input class=stedit maxlength=9 name=oicq size=23 value=<?echo$info[4];?>>
</td>
</tr>
<tr>
<td align=middle bgcolor=#ffffff height=25 width=121>您的主页: </td>
<td align=left bgcolor=#ffffff height=25 width=486>
<input class=stedit maxlength=50 name=home size=23 value="<?echo$info[3];?>">
</td>
</tr>
<tr>
<td align=middle bgcolor=#ffffff height=25 width=121>您的 ICQ: </td>
<td align=left bgcolor=#ffffff height=25 width=486>
<input class=stedit maxlength=10 name=icq size=23 value=<?echo$info[5];?>>