<?php

/* 

 * 客户端获取微信biu分享分类接口

 * ==============================================================

 * @param auth             | 登录令牌

 * @author                 | zhangxin 

 * ==============================================================

 */

if(!defined('IN_DISCUZ')) {

	exit('Access Denied');

}

if(empty($_G['mocuz_config']['share_fid'])){

        odz_error('share_fid not exists');

}

$threadclass = array();

//每个客户端端配置文件配置不同biu分享 版块 id

$shareid = $_G['mocuz_config']['share_fid'];



$_GET['fid'] = $shareid;

require_once libfile('function/forumlist');

odz_loadforum();



$arr = !empty($_G['forum']['threadtypes']['types'])?$_G['forum']['threadtypes']['types']:odz_error('types not exists');

foreach($arr as $key => $value) {

     $value = str_replace("\r\n", '', $value);

     $value = str_replace(" ", '', $value);

     $count=count($value);

     if($count>8){

        $value = cutstr($value, 7);

     }

     $threadclass[] = array('fid'=>$_G['forum']['fid'],'typeid'=>$key, 'name'=>strip_tags($value));

}

odz_result(array('list'=>$threadclass?$threadclass:array()));