这是其他cms可以使用的代码的通用集成。
DEDE5.5的申请注册一部分拿来用,能够用于对接别的系统软件和DEDE整合<?php
/*
只必须准备好$userinfo=array(
"username"=>"XXXX",
"password"=>"YYYYY",
"email"=>"KKKKKK",
"mtype"=>"公司",
);
*/
$charset2="gbk";
$link2=mysql_connect("host","user","password");
mysql_query("setnames$charset2,$link2);
$dedeuser=array(
"mtype"=>$userinfo["mtype"],
"userid"=>$userinfo[username],
"userpwd"=>$userinfo[password],
"uname"=>$userinfo[username],
"sex"=>"0",
"email"=>$userinfo[email],
"safequestion"=>0,
"safeanswer"=>'',
);
extract($dedeuser,EXTR_PREFIX_ALL,'DEDE');
//vip会员的默认设置点卷
$dfscores=0;
$dfmoney=0;
$dfrank=mysql_fetch_assoc(mysql_query("Selectmoney,scoresFromi_linkmall_cn.dede_arcrankwhererank='10'",$link2));
if(is_array($dfrank))
{
$dfmoney=$dfrank['money'];
$dfscores=$dfrank['scores'];
}
$jointime=time();
$logintime=time();
$joinip=$_SERVER["REMOTE_ADDR";
$loginip=$_SERVER["REMOTE_ADDR";
$pwd=$DEDE_userpwd;
$spaceSta=($cfg_mb_spacesta<0?$cfg_mb_spacesta:0);
$inQuery="INSERTINTOi_linkmall_cn.dede_member(`mtype`,`userid`,`pwd`,`uname`,`sex`,`rank`,`money`,`email`,`scores`,
`matt`,`spacesta`,`face`,`safequestion`,`safeanswer`,`jointime`,`joinip`,`logintime`,`loginip`)
VALUES('$DEDE_mtype','$DEDE_userid','$pwd','$DEDE_uname','$DEDE_sex','10','$dfmoney','$DEDE_email','$dfscores',
'0','$spaceSta','','$DEDE_safequestion','$DEDE_safeanswer','$jointime','$joinip','$logintime','$loginip');";
//print$inQuery;
if(mysql_query($inQuery,$link2)ordie(mysql_error()))
{
$mid=mysql_insert_id();
//载入默认设置vip会员详细信息
if($DEDE_mtype=='本人')
{
$infosquery="INSERTINTOi_linkmall_cn.dede_member_person(`mid`,`onlynet`,`sex`,`uname`,`qq`,`msn`,`tel`,`mobile`,`place`,`oldplace`,
`birthday`,`star`,`income`,`education`,`height`,`bodytype`,`blood`,`vocation`,`smoke`,`marital`,`house`,
`drink`,`datingtype`,`language`,`nature`,`lovemsg`,`address`,`uptime`)
VALUES('$mid','1','{$DEDE_sex}','{$DEDE_uname}','','','','','0','0',
'1980-01-01','1','0','0','160','0','0','0','0','0','0','0','0','','','','','0');";
$space='person';
}
elseif($DEDE_mtype=='公司')
{
$infosquery="INSERTINTOi_linkmall_cn.dede_member_company(`mid`,`company`,`product`,`place`,`vocation`,`cosize`,`tel`,`fax`,`linkman`,`address`,`mobile`,`email`,`url`,`uptime`,`checked`,`introduce`)
VALUES('{$mid}','{$DEDE_uname}','product','0','0','0','','','','','','{$DEDE_email}','','0','0','');";
$space='company';
}
else
{
$infosquery='';
$space='person';
}
/**这里提升不一样类型vip会员的独特数据处理方法sql语句**/
//echo$infosquery;
mysql_query($infosquery,$link2);
//载入默认设置数据统计
$membertjquery="INSERTINTOi_linkmall_cn.`dede_member_tj`(`mid`,`article`,`album`,`archives`,`homecount`,`pagecount`,`feedback`,`friend`,`stow`)
VALUES('$mid','0','0','0','0','0','0','0','0');";
mysql_query($membertjquery,$link2);
//载入默认设置室内空间配备数据信息
$spacequery="InsertIntoi_linkmall_cn.`dede_member_space`(`mid`,`pagesize`,`matt`,`spacename`,`spacelogo`,`spacestyle`,`sign`,`spacenews`)
Values('{$mid}','10','0','{$DEDE_uname}的室内空间','','$space','','');";
mysql_query($spacequery,$link2);
}
如果是整合discuz能够参靠DEDECMSV5.5顺向整合Discuz6.0(无Ucenter)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)