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

   }

   //note 获取标签 API 接口
   $rs = $this->db->ExecuteNoneQuery2("UPDATE `dede_member` SET userid='$usernamenew' WHERE userid='$usernamenew' AND matt<>10 limit 1");
   if($rs > 0)
   {
    $this->db->ExecuteNoneQuery("UPDATE `dede_archives` SET writer='$usernamenew' WHERE writer='$usernamenew'");
    $this->db->ExecuteNoneQuery("UPDATE `dede_member_pms` SET floginid=REPLACE(floginid, '\t$usernameold', '\t$usernamenew'),tologinid=REPLACE(tologinid, '\t$usernameold', '\t$usernamenew')");
   
   
    $row = $this->db->GetOne("SHOW TABLE STATUS");
    $db_tables = $row['Name']; unset($row);
   
    if(in_array($this->tablepre.'guestbook',$db_tables))

内容来自织梦模板团

    {
     $this->db->ExecuteNoneQuery("UPDATE `dede_guestbook` SET uname='$usernamenew' WHERE uname='$usernamenew'");
    }
   
    if(in_array($this->tablepre.'story_books',$db_tables))
    {
     $this->db->ExecuteNoneQuery("UPDATE `dede_story_books` SET author='$usernamenew' WHERE author='$usernamenew'");
    }
   
    if(in_array($this->tablepre.'groups',$db_tables))
    {
     $this->db->ExecuteNoneQuery("UPDATE `dede_groups` SET creater='$usernamenew' WHERE creater='$usernamenew'");
     $this->db->ExecuteNoneQuery("UPDATE `dede_group_threads` SET author='$usernamenew' WHERE author='$usernamenew'");
     $this->db->ExecuteNoneQuery("UPDATE `dede_group_user` SET username='$usernamenew' WHERE username='$usernamenew'"); 织梦模板
     $this->db->ExecuteNoneQuery("UPDATE `dede_group_posts` SET author='$usernamenew' WHERE author='$usernamenew'");
     $this->db->ExecuteNoneQuery("UPDATE `dede_group_guestbook` SET uname='$usernamenew' WHERE uname='$usernamenew'");
     $this->db->ExecuteNoneQuery("UPDATE `dede_groups` SET ismaster=REPLACE(ismaster, '\t$usernameold', '\t$usernamenew')");
    }
   
    return API_RETURN_SUCCEED;
   }
   else
   {
    return API_RETURN_FORBIDDEN;
   }
}
本文来自织梦模板团

function gettag($get, $post)
{
   $name = $get['id'];
   if(!API_GETTAG)
   {
    return API_RETURN_FORBIDDEN;
   }
本文来自织梦模板团

   //note 获取标签 API 接口 copyright www.dedecmsmuban.com

   $name = trim($name);
   if(empty($name) || !preg_match('/^([\x7f-\xff_-]|\w|\s)+$/', $name) || strlen($name) > 20)
   {
    return API_RETURN_FAILED;
   }
织梦模板

   $row = $this->db->GetOne("SELECT `total`,`id` FROM `dede_tagindex` WHERE `tag`='$name'");
   if(!is_array($row))
   {
    return API_RETURN_FAILED;
   }
  
   $tpp = $row['total'] > 10 ? 10 : $row['total'];  
  
   $ids = array();
  
   $this->db->SetQuery("SELECT aid FROM `dede_taglist` WHERE `tid`='$row[id]' AND arcrank>-1");
   $this->db->Execute();
   while($row = $this->db->GetArray())
   {
    $ids[] = $row['aid'];   
   }
  
   if(empty($ids))
   {
    return API_RETURN_FAILED;
   }
  
   $aids = implode(",", $ids); copyright www.dedecmsmuban.com
  
   include_once DEDEINC.'/channelunit.func.php';
  
   $archives_list = array();  
   $this->db->SetQuery("SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
FROM `dede_archives` arc LEFT JOIN `dede_arctype` tp ON arc.typeid=tp.id WHERE arc.id IN($aids) ORDER BY id DESC LIMIT $tpp");


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