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

   $fp = fopen($cachefile, 'w');
   $s = "<?php\r\n";
   $s .= '$_CACHE[\'hosts\'] = '.var_export($post, TRUE).";\r\n";
   fwrite($fp, $s);
   fclose($fp);
   return API_RETURN_SUCCEED;
} 本文来自织梦模板团

function updateapps($get, $post)
{
   if(!API_UPDATEAPPS)
   {
    return API_RETURN_FORBIDDEN;
   }
   $UC_API = $post['UC_API'];

内容来自织梦模板团

   //note 写 app 缓存文件
   $cachefile = UC_CLIENT_ROOT.'/data/cache/apps.php';
   $fp = fopen($cachefile, 'w');
   $s = "<?php\r\n";
   $s .= '$_CACHE[\'apps\'] = '.var_export($post, TRUE).";\r\n";
   fwrite($fp, $s);
   fclose($fp);
本文来自织梦模板团

   return API_RETURN_SUCCEED;
}

内容来自织梦模板团

function updateclient($get, $post)
{
   if(!API_UPDATECLIENT)
   {
    return API_RETURN_FORBIDDEN;
   }
   $cachefile = UC_CLIENT_ROOT.'/data/cache/settings.php';
   $fp = fopen($cachefile, 'w');
   $s = '<?php'."\r\n";
   $s .= '$_CACHE[\'settings\'] = '.var_export($post, TRUE).";\r\n";
   fwrite($fp, $s);
   fclose($fp);
  
   return API_RETURN_SUCCEED;
}

内容来自织梦模板团

function updatecredit($get, $post)
{
   if(!API_UPDATECREDIT)
   {
    return API_RETURN_FORBIDDEN;
   }
   /*
   note 更新积分
   discuz 默认8个积分表达,而DedeCMS只有一个积分字段,scores.注意money不能做积分来用.
   extcredits1 extcredits2 extcredits3 extcredits4 extcredits5 extcredits6 extcredits7 extcredits8
   */
    
   $credit = intval($get['credit']);
   $fileds = $credit > 1 ? 'money' : 'scores';
   $amount = $get['amount'];
   $uid = $get['uid'];
   include UC_CLIENT_ROOT.'/client.php';
   $data = uc_get_user($uid,1);
   $username = $data[1];
  
   $result = $this->db->GetOne("SELECT mid FROM `dede_member` WHERE userid='$username'");

copyright www.dedecmsmuban.com

   if(is_array($result))
   {
    $this->db->ExecuteNoneQuery("UPDATE `dede_member` SET `$fileds`=`$fileds`+'$amount' WHERE mid='$result[mid]'");
   }
  
   return API_RETURN_SUCCEED;
}

function getcredit($get, $post)
{
   if(!API_GETCREDIT)
   {
    return API_RETURN_FORBIDDEN;
   }
  
   include UC_CLIENT_ROOT.'/client.php';
   $data = uc_get_user($uid,1);
   $username = $data[1];
   $credit = intval($get['credit']);
   $fileds = $credit > 1 ? 'money' : 'scores';
   $result = $this->db->GetOne("SELECT `$fileds` AS credit FROM `dede_member` WHERE userid='$username'");
  
   echo is_array($result) ? $result['credit'] : 0;  
}

本文来自织梦模板团

function getcreditsettings($get, $post)
{
   if(!API_GETCREDITSETTINGS)
   {
    return API_RETURN_FORBIDDEN;
   }
  
   //这里支持DedeCMS积分,金币设置
   $credits[1] = array(strip_tags('积分'), '分');
   $credits[2] = array(strip_tags('金币'), '枚');
   return $this->_serialize($credits);
}

本文来自织梦模板团

function updatecreditsettings($get, $post)
{
   if(!API_UPDATECREDITSETTINGS)
   {
    return API_RETURN_FORBIDDEN;
   }
   $credit = $get['credit'];
   $outextcredits = array();
   if($credit && is_array($credit)) {
    foreach($credit as $appid => $credititems) {
     foreach($credititems as $value) {
      if($value['appiddesc']!=UC_APPID) continue;
      $outextcredits[$appid][] = array(


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