Exemple #1
0
        if (count($groupList) == 1) {
            Showmsg('没有可以合并的群组!');
        }
        require_once PrintEot('thread_set');
        footer();
    } else {
        S::gp(array('tocid'));
        S::gp(array('password'));
        if (!threadSetCheckOwnerPassword($winduid, $password)) {
            Showmsg('您输入的密码不正确!');
        }
        if (!($toColony = $colonyServer->getColonyById($tocid)) || $toColony['admin'] != $colony['admin']) {
            Showmsg('undefined_action');
        }
        require_once R_P . 'require/functions.php';
        if (PwColony::calculateCredit($colony) > PwColony::calculateCredit($toColony)) {
            Showmsg('只允许群积分低的群组并入群积分高的群组!');
        }
        $colonyServer->mergeColony($tocid, $cyid);
        refreshto("thread.php?cyid={$tocid}", 'operate_success');
    }
} elseif ($t == 'attorn') {
    if (!($windid == $colony['admin'] && $groupRight['allowattorn'] || $groupid == '3')) {
        Showmsg('您没有权限进行转让操作!');
    }
    if (empty($_POST['step'])) {
        $groupManager = array();
        $query = $db->query("SELECT c.uid,m.username,m.groupid,m.memberid,m.icon FROM pw_cmembers c LEFT JOIN pw_members m ON c.uid=m.uid WHERE c.ifadmin='1' AND c.colonyid=" . S::sqlEscape($cyid));
        while ($rt = $db->fetch_array($query)) {
            $rt['groupid'] == '-1' && ($rt['groupid'] = $rt['memberid']);
            if ($rt['username'] == $colony['admin'] || $o_groups && strpos($o_groups, ',' . $rt['groupid'] . ',') === false) {
 function get_colony($uid, $num = 20)
 {
     require_once R_P . 'require/bbscode.php';
     require_once R_P . 'apps/groups/lib/colony.class.php';
     $o_styledb = L::config('o_styledb', 'o_config');
     $array = array();
     $query = $this->_db->query("SELECT c.* FROM pw_cmembers cm LEFT JOIN pw_colonys c ON cm.colonyid=c.id WHERE cm.uid=" . S::sqlEscape($uid) . " AND cm.ifadmin <> '-1' ORDER BY cm.colonyid DESC " . S::sqlLimit($num));
     while ($rt = $this->_db->fetch_array($query)) {
         if ($rt['cnimg']) {
             list($rt['cnimg']) = geturl("cn_img/{$rt['cnimg']}", 'lf');
         } else {
             $rt['cnimg'] = $GLOBALS['imgpath'] . '/g/groupnopic.gif';
         }
         $rt['descrip'] && ($rt['descrip'] = convert($rt['descrip'], array()));
         $rt['stylename'] = $o_styledb[$rt['styleid']]['cname'];
         $rt['colonyNums'] = PwColony::calculateCredit($rt);
         $rt['createtime'] = get_date($rt['createtime'], 'Y-m-d');
         $array[] = $rt;
     }
     return $array;
 }
Exemple #3
0
$isGM = S::inArray($windid, $manager);
!$isGM && $groupid == 3 && ($isGM = 1);
if (!$isGM && $winduid != $space['uid']) {
    $userdb = $db->get_one("SELECT index_privacy FROM pw_ouserdata WHERE uid=" . S::sqlEscape($uid));
    list($isU, $privacy) = pwUserPrivacy($uid, $userdb);
    if (!$privacy['index']) {
        Showmsg('mode_o_index_right');
    }
}
$group = array();
$count = $db->get_value("SELECT COUNT(DISTINCT c.id) AS count FROM pw_cmembers cm LEFT JOIN pw_colonys c ON cm.colonyid=c.id WHERE cm.uid=" . S::sqlEscape($uid) . " AND cm.ifadmin<>'-1'");
if ($count) {
    $db_perpage = 4;
    $page = (int) S::getGP('page');
    $pageurl = 'apps.php?q=groups&uid=' . $uid . "&";
    list($pages, $limit) = pwLimitPages($count, $page, "{$pageurl}");
    $query = $db->query("SELECT DISTINCT c.* FROM pw_cmembers cm LEFT JOIN pw_colonys c ON cm.colonyid=c.id WHERE cm.uid=" . S::sqlEscape($uid) . " AND cm.ifadmin <> '-1' ORDER BY cm.colonyid DESC {$limit}");
    while ($rt = $db->fetch_array($query)) {
        if ($rt['cnimg']) {
            list($rt['cnimg']) = geturl("cn_img/{$rt['cnimg']}", 'lf');
        } else {
            $rt['cnimg'] = $GLOBALS['imgpath'] . '/g/groupnopic.gif';
        }
        $rt['colonyNums'] = PwColony::calculateCredit($rt);
        //$rt['addtime'] = get_date($rt['addtime'], 'Y-m-d');
        $rt['createtime'] = get_date($rt['createtime'], 'Y-m-d');
        $group[] = $rt;
    }
}
require_once PrintEot('m_space_groups');
pwOutPut();
Exemple #4
0
        Showmsg('data_error');
    }
    $ifadmin = $newColony->getIfadmin();
    //当群组视图关闭状态下
    $colony['viewtype'] == 2 && $newColony->jumpToColony($showtype, $cyid);
    $fid = $colony['classid'];
    $tmpUrlAdd .= '&a=thread';
    if ($showtype && in_array($showtype, array('galbum', 'member', 'active', 'write', 'set'))) {
        $tmpUrlAdd = '';
        require_once S::escapePath(R_P . "require/thread_{$showtype}.php");
    }
    require_once R_P . 'require/bbscode.php';
    require_once R_P . 'require/functions.php';
    $colony['descrip'] = convert($colony['descrip'], array());
    $annouce = convert(nl2br($colony['annouce']), $db_windpost);
    $colonyNums = PwColony::calculateCredit($colony);
    $magdb = $newColony->getManager();
}
$viewcolony = $cyid ? "cyid={$cyid}" : "fid={$fid}";
//读取版块信息
empty($fid) && Showmsg('data_error');
/*The app client*/
if ($db_siteappkey && $db_apps_list['17']['status'] == 1) {
    $forumappinfo = array();
    $appclient = L::loadClass('appclient');
    $forumappinfo = $appclient->showForumappinfo($fid, 'thread', '17');
}
/*The app client*/
$pwforum = new PwForum($fid);
if (!$pwforum->isForum(true)) {
    Showmsg('data_error');