// LIBRARY函数文件INCLUDED
include "lib.html";
if(getenv("REQUEST_METHOD") == 'GET' ) Error("请使用正确的方法","");
// DB连接
if(!$connect) $connect=dbConn();
// 读取会员信息;;; 有会员时
$member=member_info();
if(!$member[no]) Error("会员信息不存在");
$group=group_info($member[group_no]);
$name = str_replace(" ","",$name);
if(isblank($name)) Error("必须输入名字");
if(eregi("<",$name)||eregi(">",$name)) Error("名字上不能使用TAG");
if($password&&$password1&&$password!=$password1) Error("密码不一致");
$birth=mktime(0,0,0,$birth_2,$birth_3,$birth_1);
$check=mysql_fetch_array(mysql_query("select count(*) from $member_table where email='$email' and no <> ".$member[no],$connect));
if($check[0]>0) Error("已被登陆的电子邮件");
$name = addslashes($name);
$job = addslashes($job);
$email = addslashes($email);
if($_zbDefaultSetup[check_email]=="true"&&!mail_mx_check($email)) Error("您输入的$email是不存在的电子邮件地址.
请再确认一次.");
if(!eregi("http://",$homepage)&&$homepage) $homepage="http://$homepage";
$homepage = addslashes($homepage);
$birth = addslashes($birth);
$hobby = addslashes($hobby);
$icq = addslashes($icq);
$msn = addslashes($msn);
$home_address = addslashes($home_address);
$home_tel = addslashes($home_tel);
$office_address = addslashes($office_address);
$office_tel = addslashes($office_tel);
$handphone = addslashes($handphone);
$comment = addslashes($comment);
$que="update $member_table set name='$name'";
if($password&&$password1&&$password==$password) $que.=" ,password=password('$password') ";
if($birth_1&&$birth_2&&birth_3&&$group[use_birth]) $que.=",birth='$birth'";
if($email) $que.=",email='$email'";
$que.=",homepage='$homepage'";
if($group[use_job]) $que.=",job='$job'";
if($group[use_hobby]) $que.=",hobby='$hobby'";
if($group[use_icq]) $que.=",icq='$icq'";
if($group[use_aol]) $que.=",aol='$aol'";
if($group[use_msn]) $que.=",msn='$msn'";
if($group[use_home_address]) $que.=",home_address='$home_address'";
if($group[use_home_tel]) $que.=",home_tel='$home_tel'";
if($group[use_office_address]) $que.=",office_address='$office_address'";
if($group[use_office_tel]) $que.=",office_tel='$office_tel'";
if($group[use_handphone]) $que.=",handphone='$handphone'";
if($group[use_mailing]) $que.=",mailing='$mailing'";
$que.=",openinfo='$openinfo'";
if($group[use_comment]) $que.=",comment='$comment'";
$que.=",openinfo='$openinfo',open_email='$open_email',open_homepage='$open_homepage',open_icq='$open_icq',open_msn='$open_msn',open_comment='$open_comment',open_job='$open_job',open_hobby='$open_hobby',open_home_address='$open_home_address',open_home_tel='$open_home_tel',open_office_address='$open_office_address',open_office_tel='$open_office_tel',open_handphone='$open_handphone',open_birth='$open_birth',open_picture='$open_picture',open_aol='$open_aol' ";
$que.=" where no='$member[no]'";
@mysql_query($que) or Error("修改会员信息时发生了错误".mysql_error());
if($del_picture) {
@mysql_query("update $member_table set picture='' where no='$member[no]'") or Error("上传照片文件时发生了错误");
}
if($HTTP_POST_FILES[picture]) {
$picture = $HTTP_POST_FILES[picture][tmp_name];
$picture_name = $HTTP_POST_FILES[picture][name];
$picture_type = $HTTP_POST_FILES[picture][type];
$picture_size = $HTTP_POST_FILES[picture][size];
}
if($picture_name) {
if(!is_uploaded_file($picture)) Error("请用正确的方法上传文件");
if(!eregi(".gif",$picture_name)&&!eregi(".jpg",$picture_name)) Error("照片文件格式为GIF或JPG格式");
$size=GetImageSize($picture);
if($size[0]>200||$size[1]>200) Error("相片大小要在 200*200 素像以下.");
$kind=array("","gif","jpg");
$n=$size[2];
$path="icon/member_".time().".".$kind[$n];
if(!move_uploaded_file($picture,$path)) Error("上传照片时失败");
@mysql_query("update $member_table set picture='$path' where no='$member[no]'") or Error("上传照片文件时发生了错误");
}
mysql_close($connect);
?>