织梦模板团_DEDECMS模板_织梦企业模板_织梦免费模板下载_DEDE仿站_织梦建站
SOSO您喜欢的模板
当前位置: 织梦模板团 > 安装使用 >
织梦DEDECMS网站的注册会员自动激活discuz会员的方法(4)
更多
admin / 2012-05-16 00:54

   $this->db->Execute();
   while($row = $this->db->GetArray())
   {
    $row['url'] = GetFileUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],$row['arcrank'],$row['namerule'],$row['typedir'],$row['money'],$row['filename'],$row['moresite'],$row['siteurl'],$row['sitepath']); 内容来自织梦模板团

    $row['url'] = !ereg('http:',$row['url']) ? $GLOBALS['cfg_basehost'].$row['url'] : $row['url'];
   
    if(!empty($row['url']))
    {
     $archives_list[] = array('title' => $row['title'],'writer' => $row['writer'],'pubdate' => $row['pubdate'],'url' => $row['url']);
    }
   }
织梦模板团

   $return = array($name, $archives_list);
   return $this->_serialize($return, 1);
}
本文来自织梦模板团

function synlogin($get, $post)
{
   $uid = $get['uid'];
   $username = $get['username'];
   if(!API_SYNLOGIN)
   {
    return API_RETURN_FORBIDDEN;
   }

织梦模板团

   //note 同步登录 API 接口
   header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
   $result = $this->db->GetOne("SELECT mid,pwd FROM `dede_member` WHERE `userid` like '$username' AND matt<>10");
   if(is_array($result))
   {
    include_once DEDEINC.'/memberlogin.class.php';
    $cfg_ml = new MemberLogin(86400);
    $cfg_ml->PutLoginInfo($result['mid']);
   }
   else
   {   
    //如果没有激活,则自动添加该用户到数据库,并设置已激活状态的cookie
    //会员的默认金币
    $dfscores = 0;
    $dfmoney = 0;
    $dfrank = $this->db->GetOne("Select money,scores From `dede_arcrank` where rank='10' "); 织梦模板
    if(is_array($dfrank))
    {
     $dfmoney = $dfrank['money'];
     $dfscores = $dfrank['scores'];
    }
    $jointime = time();
    $logintime = time();
    $joinip = $get['regip'];
    $loginip = $get['regip'];
    $pwd = $get['password'];
   
    $spaceSta = ($cfg_mb_spacesta < 0 ? $cfg_mb_spacesta : 0);
    $mtype='个人';
    $email=$get['email'];
   
    $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','$username','$pwd','$username','保密','10','$dfmoney','$email','$dfscores',

copyright www.dedecmsmuban.com

     '0','$spaceSta','','','','$jointime','$joinip','$logintime','$loginip'); ";
   
    if($this->db->ExecuteNoneQuery($inQuery))
    {    
     $mid = $this->db->GetLastID();
  
     //写入默认会员详细资料
     $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'); ";
     $this->db->ExecuteNoneQuery($membertjquery);
  
     //写入默认空间配置数据
织梦模板团

     $spacequery = "Insert Into `dede_member_space`(`mid` ,`pagesize` ,`matt` ,`spacename` ,`spacelogo` ,`spacestyle`, `sign` ,`spacenews`)
               Values('$mid','10','0','$username的空间','','$space','',''); ";
     $this->db->ExecuteNoneQuery($spacequery);
  
     //写入其它默认数据
     $this->db->ExecuteNoneQuery("INSERT INTO `dede_member_flink`(mid,title,url) VALUES('$mid','织梦内容管理系统','http://www.dedecms.com'); ");

DedeCMS(467)
  • 上一篇:织梦DEDECMS5.7网站软件登记替换成图标显示的方法
  • 下一篇:织梦DEDECMS网站怎么调用TAG关键字文章列表