$jointime = time();
$logintime = time();
$joinip = GetIP();
$loginip = GetIP();
$pwd = md5($userpwd);
$spaceSta = ($cfg_mb_spacesta < 0 ? $cfg_mb_spacesta : 0);
$inQuery = "INSERT INTO `dede_member` (`mtype` ,`userid` ,`pwd` ,`uname` ,`sex` ,`rank` ,`money` ,`email` ,`scores` ,
`matt`, `spacesta` ,`face`,`safequestion`,`safeanswer` ,`jointime` ,`joinip` ,`logintime` ,`loginip` )
VALUES ('$mtype','$userid','$pwd','$uname','$sex','10','$dfmoney','$email','$dfscores',
'0','$spaceSta','','$safequestion','$safeanswer','$jointime','$joinip','$logintime','$loginip'); ";
if($dsql->ExecuteNoneQuery($inQuery))
{
$mid = $dsql->GetLastID();
//写入默认会员详细资料
if($mtype=='个人'){
$space='person';
}else if($mtype=='企业'){
$space='company';
}else{
$space='person';
}
//写入默认统计数据
$membertjquery = "INSERT INTO `dede_member_tj` (`mid`,`article`,`album`,`archives`,`homecount`,`pagecount`,`feedback`,`friend`,`stow`)
VALUES ('$mid','0','0','0','0','0','0','0','0'); ";
$dsql->ExecuteNoneQuery($membertjquery);
//写入默认空间配置数据
$spacequery = "Insert Into `dede_member_space`(`mid` ,`pagesize` ,`matt` ,`spacename` ,`spacelogo` ,`spacestyle`, `sign` ,`spacenews`)
Values('{$mid}','10','0','{$uname}的空间','','$space','',''); ";
$dsql->ExecuteNoneQuery($spacequery);
//写入其它默认数据
$dsql->ExecuteNoneQuery("INSERT INTO `dede_member_flink`(mid,title,url) VALUES('$mid','织梦内容管理系统','http://www.dedecms.com'); ");