Exemplo n.º 1
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
login();
$MG['club_join_limit'] > -1 or dalert(lang('message->without_permission_and_upgrade'), 'goback');
require MD_ROOT . '/join.class.php';
$do = new djoin($moduleid);
$sql = "username='******'";
$limit_used = $limit_free = $need_password = $need_captcha = $need_question = $fee_add = 0;
if (in_array($action, array('', 'add')) && $MG['club_join_limit']) {
    $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table}_fans WHERE {$sql} AND status>1");
    $limit_used = $r['num'];
    $limit_free = $MG['club_join_limit'] > $limit_used ? $MG['club_join_limit'] - $limit_used : 0;
}
switch ($action) {
    case 'add':
        if ($MG['club_join_limit'] && $limit_used >= $MG['club_join_limit']) {
            dalert(lang($L['info_limit'], array($MG['club_join_limit'], $limit_used)), $MODULE[2]['linkurl'] . $DT['file_my'] . '?mid=' . $mid . '&job=' . $job);
        }
        $gid = isset($gid) ? intval($gid) : 0;
        $gid or message($L['my_choose_group'], $MOD['linkurl']);
        $GRP = get_group($gid);
        $GRP && $GRP['status'] == 3 or message($L['my_not_group']);
        $M = $db->get_one("SELECT * FROM {$table}_fans WHERE gid={$gid} AND username='******'");
        if ($M) {
            if ($M['status'] == 3) {
                message($L['my_join_repeat'], $MOD['linkurl'] . $GRP['linkurl']);
            }
            message($L['my_join_check']);
        }
        if ($submit) {
Exemplo n.º 2
0
*/
$moduleid = 18;
require 'common.inc.php';
require DT_ROOT . '/module/club/common.inc.php';
$gid = isset($gid) ? intval($gid) : 0;
if ($gid) {
    $GRP = get_group($gid);
    $GRP && $GRP['status'] == 3 or mobile_msg($L['my_not_group']);
    $head_title = $GRP['title'] . $MOD['seo_name'] . $DT['seo_delimiter'] . $MOD['name'] . $DT['seo_delimiter'] . $head_title;
}
$head_title = $MOD['name'] . $DT['seo_delimiter'] . $head_title;
switch ($action) {
    case 'my':
        $_userid or dheader('login.php?forward=' . urlencode('club.php?action=' . $action . '&gid=' . $gid));
        require MD_ROOT . '/join.class.php';
        $do = new djoin($moduleid);
        $lists = $do->get_list("username='******' AND status=3");
        $head_name = $L['my_group_title'];
        $head_title = $head_name . $DT['seo_delimiter'] . $head_title;
        $foot = '';
        include template('club_my', 'mobile');
        if (DT_CHARSET != 'UTF-8') {
            toutf8();
        }
        break;
    case 'user':
        $_userid or dheader('login.php?forward=' . urlencode('club.php?action=' . $action . '&username='******'';
        $username or mobile_msg($L['msg_not_user']);
        $user = userinfo($username);
        $user or mobile_msg($L['msg_not_user']);