当前位置: 首页>>代码示例>>PHP>>正文


PHP get_rank_list函数代码示例

本文整理汇总了PHP中get_rank_list函数的典型用法代码示例。如果您正苦于以下问题:PHP get_rank_list函数的具体用法?PHP get_rank_list怎么用?PHP get_rank_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_rank_list函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: admin_priv

 //        {
 //            sys_msg($_LANG['disable_ok'], 0, $link);
 //        }
 //        else
 //        {
 //            sys_msg($_LANG['disable_error'], 1, $link);
 //        }
 //
 //        break;
 /* 显示短信发送界面,如果尚未注册或启用短信服务则显示注册界面。 */
 case 'display_send_ui':
     /* 检查权限 */
     admin_priv('sms_send');
     if ($sms->has_registered()) {
         $smarty->assign('ur_here', $_LANG['03_sms_send']);
         $special_ranks = get_rank_list();
         $send_rank['1_0'] = $_LANG['user_list'];
         foreach ($special_ranks as $rank_key => $rank_value) {
             $send_rank['2_' . $rank_key] = $rank_value;
         }
         assign_query_info();
         $smarty->assign('send_rank', $send_rank);
         $smarty->display('sms_send_ui.htm');
     } else {
         $smarty->assign('ur_here', $_LANG['register_sms']);
         $smarty->assign('sms_site_info', $sms->get_site_info());
         assign_query_info();
         $smarty->display('sms_register_ui.htm');
     }
     break;
     /* 发送短信 */
开发者ID:a494008974,项目名称:bzbshop,代码行数:31,代码来源:sms.php

示例2: get_regions

        }
    }
    $smarty->assign('lang', $_LANG);
    $smarty->assign('country_list', get_regions());
    $province_list = get_regions(1, $row['country']);
    $city_list = get_regions(2, $row['province']);
    $district_list = get_regions(3, $row['city']);
    $smarty->assign('province_list', $province_list);
    $smarty->assign('city_list', $city_list);
    $smarty->assign('district_list', $district_list);
    assign_query_info();
    $smarty->assign('ur_here', $_LANG['users_edit']);
    $smarty->assign('action_link', array('text' => $_LANG['01_users_list'], 'href' => 'distributor.php?act=list&' . list_link_postfix()));
    $smarty->assign('user', $user);
    $smarty->assign('form_action', 'update');
    $smarty->assign('special_ranks', get_rank_list(true));
    $smarty->display('distributor_info.htm');
} elseif ($_REQUEST['act'] == 'update') {
    /* 检查权限 */
    admin_priv('users_manage');
    $username = empty($_POST['username']) ? '' : trim($_POST['username']);
    $password = empty($_POST['password']) ? '' : trim($_POST['password']);
    $email = empty($_POST['email']) ? '' : trim($_POST['email']);
    $sex = empty($_POST['sex']) ? 0 : intval($_POST['sex']);
    $sex = in_array($sex, array(0, 1, 2)) ? $sex : 0;
    $birthday = $_POST['birthdayYear'] . '-' . $_POST['birthdayMonth'] . '-' . $_POST['birthdayDay'];
    $rank = empty($_POST['user_rank']) ? 0 : intval($_POST['user_rank']);
    $credit_line = empty($_POST['credit_line']) ? 0 : floatval($_POST['credit_line']);
    $real_name = empty($_POST['real_name']) ? '' : trim($_POST['real_name']);
    $card = empty($_POST['card']) ? '' : trim($_POST['card']);
    $country = $_POST['country'];
开发者ID:moonlight-wang,项目名称:feilun,代码行数:31,代码来源:distributor.php

示例3: user_list


//.........这里部分代码省略.........
            $filter['page_size'] = 20;
        }
        $filter['page_count'] = $filter['record_count'] > 0 ? ceil($filter['record_count'] / $filter['page_size']) : 1;
        // 设置分页
        $page_set = array(1, 2, 3, 4, 5, 6, 7);
        if ($filter['page'] > 4) {
            foreach ($page_set as &$val) {
                $val += $filter['page'] - 4;
            }
        }
        if (end($page_set) > $filter['page_count']) {
            $page_set = array();
            for ($i = 7; $i >= 0; $i--) {
                if ($filter['page_count'] - $i > 0) {
                    $page_set[] = $filter['page_count'] - $i;
                }
            }
        }
        //$sql = 'SELECT u.age_group,u.admin_name,u.user_id,u.is_black,e.eff_name,c.bind_time,u.user_name,u.sex,'.
        //    'u.is_validated,u.add_time,u.remarks,u.service_time,u.assign_time FROM '
        //    .$GLOBALS['ecs']->table('users').' u LEFT JOIN '.
        //    $GLOBALS['ecs']->table('memship_number').' c ON c.user_id=u.user_id LEFT JOIN '.$GLOBALS['ecs']->table('effects').
        //    ' e ON e.eff_id=u.eff_id';
        $sql = 'SELECT u.age_group,u.admin_name,u.user_id,u.is_black,u.user_name,u.sex,u.user_rank,' . 'u.is_validated,u.add_time,u.remarks,u.service_time,u.assign_time FROM ' . $GLOBALS['ecs']->table('users') . ' u ';
        //判断一个月内转移的顾客
        $_REQUEST['transfer_time'] && ($filter['transfer_time'] = $_REQUEST['transfer_time']);
        if ($filter['transfer_time']) {
            $ex_where .= ' AND u.transfer_time>' . $filter['transfer_time'];
        }
        if ($filter['district']) {
            $sql .= ', ' . $GLOBALS['ecs']->table('region') . ' r, ' . $GLOBALS['ecs']->table('user_address') . ' a ';
            $ex_where .= " AND u.user_id=a.user_id AND a.district=r.region_id AND a.district={$filter['district']}";
        } elseif ($filter['city']) {
            $sql .= ', ' . $GLOBALS['ecs']->table('region') . ' r, ' . $GLOBALS['ecs']->table('user_address') . ' a ';
            $ex_where .= " AND u.user_id=a.user_id AND a.city=r.region_id AND a.city={$filter['city']}";
        } elseif ($filter['province']) {
            $sql .= ', ' . $GLOBALS['ecs']->table('region') . ' r, ' . $GLOBALS['ecs']->table('user_address') . ' a ';
            $ex_where .= " AND u.user_id=a.user_id AND a.province=r.region_id AND a.province={$filter['province']}";
        }
        $ex_where .= $service_where . ' ORDER by service_time ASC LIMIT ' . ($filter['page'] - 1) * $filter['page_size'] . ', ' . $filter['page_size'];
        $sql .= $ex_where;
        $filter['keywords'] = stripslashes($filter['keywords']);
        set_filter($filter, $sql);
    } else {
        $sql = $result['sql'];
        $filter = $result['filter'];
    }
    $user_list = $GLOBALS['db']->getAll($sql);
    // 正常查询
    if (in_array($filter['keyfields'], array('home_phone', 'mobile_phone', 'qq', 'wechat', 'aliww'))) {
        // 客服
        if (admin_priv('all', '', false) && empty($filter['admin_id'])) {
            $where = ' u.admin_id>0';
        } elseif ($filter['admin_id']) {
            if (admin_priv('all', '', false)) {
                $where = " u.admin_id={$filter['admin_id']} ";
            } elseif (admin_priv('user_part_view', '', false)) {
                $sql_select_admin = 'SELECT user_id FROM ' . $GLOBALS['ecs']->table('admin_user') . " WHERE user_id={$filter['admin_id']} AND role_id={$_SESSION['role_id']}";
                $admin_id = $GLOBALS['db']->getOne($sql_select_admin);
                if ($admin_id) {
                    $where = " u.admin_id={$filter['admin_id']} ";
                }
            } elseif (admin_priv('user_group_view', '', false)) {
                //$where = " u.group_id={$_SESSION['group_id']}";
                $where = " u.role_id={$_SESSION['role_id']}";
                if ($filter['admin_id']) {
                    $where .= " AND u.admin_id={$filter['admin_id']} ";
                }
            }
        } else {
            $where = " u.admin_id={$_SESSION['admin_id']}";
        }
        $sql_select = 'SELECT u.age_group,u.admin_name,u.user_id,u.is_black,u.user_name,u.sex,u.user_rank,' . 'u.is_validated,u.add_time,' . 'u.remarks,u.service_time FROM ' . $GLOBALS['ecs']->table('users') . ' u LEFT JOIN ' . $GLOBALS['ecs']->table('user_contact') . " uc ON u.user_id=uc.user_id WHERE {$where} AND u.customer_type IN ({$filter['type']})" . ' AND uc.contact_name="%s" AND uc.contact_value="%s"';
        switch ($filter['keyfields']) {
            case 'home_phone':
                $user_info = $GLOBALS['db']->getAll(sprintf($sql_select, 'tel', $filter['keywords']));
                break;
            case 'mobile_phone':
                $user_info = $GLOBALS['db']->getAll(sprintf($sql_select, 'mobile', $filter['keywords']));
                break;
            default:
                $user_info = $GLOBALS['db']->getAll(sprintf($sql_select, $filter['keyfields'], $filter['keywords']));
        }
        $user_list += $user_info;
    }
    $user_rank = get_rank_list();
    foreach ($user_list as &$val) {
        $val['add_time'] = date('Y-m-d', $val['add_time']);
        //$val['transfer_time'] = $val['transfer_time'] ? date('Y-m-d', $val['transfer_time']) : '-';
        $val['transfer_time'] = $val['assign_time'] ? date('Y-m-d', $val['assign_time']) : '-';
        $val['service_time'] = date('Y-m-d', $val['service_time']);
        $val['bind_time'] = date('Y-m-d', $val['bind_time']);
        $val['bind_time'] = date('Y-m-d', $val['bind_time']);
        if ($val['is_black'] == 1) {
            $val['user_name'] = '<font class="font_blacklist" >' . $val['user_name'] . '</font>';
        }
    }
    $arr = array('user_list' => $user_list, 'filter' => $filter, 'page_count' => $filter['page_count'], 'record_count' => $filter['record_count'], 'page_size' => $filter['page_size'], 'page' => $filter['page'], 'page_set' => $page_set, 'condition' => $condition, 'start' => ($filter['page'] - 1) * $filter['page_size'] + 1, 'end' => $filter['page'] * $filter['page_size']);
    return $arr;
}
开发者ID:554119220,项目名称:kjrscrm,代码行数:101,代码来源:users.php

示例4: array

    $link[] = array('text' => $_LANG['back_list'], 'href' => 'bonus.php?act=list&' . list_link_postfix());
    sys_msg($_LANG['edit'] . ' ' . $_POST['type_name'] . ' ' . $_LANG['attradd_succed'], 0, $link);
}
/*------------------------------------------------------ */
//-- 红包发送页面
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'send') {
    admin_priv('bonus_manage');
    /* 取得参数 */
    $id = !empty($_REQUEST['id']) ? intval($_REQUEST['id']) : '';
    assign_query_info();
    $smarty->assign('ur_here', $_LANG['send_bonus']);
    $smarty->assign('action_link', array('href' => 'bonus.php?act=list', 'text' => $_LANG['04_bonustype_list']));
    if ($_REQUEST['send_by'] == SEND_BY_USER) {
        $smarty->assign('id', $id);
        $smarty->assign('ranklist', get_rank_list());
        $smarty->display('bonus_by_user.htm');
    } elseif ($_REQUEST['send_by'] == SEND_BY_GOODS) {
        /* 查询此红包类型信息 */
        $bonus_type = $db->GetRow("SELECT type_id, type_name FROM " . $ecs->table('bonus_type') . " WHERE type_id='{$_REQUEST['id']}'");
        /* 查询红包类型的商品列表 */
        $goods_list = get_bonus_goods($_REQUEST['id']);
        /* 查询其他红包类型的商品 */
        $sql = "SELECT goods_id FROM " . $ecs->table('goods') . " WHERE bonus_type_id > 0 AND bonus_type_id <> '{$_REQUEST['id']}'";
        $other_goods_list = $db->getCol($sql);
        $smarty->assign('other_goods', join(',', $other_goods_list));
        /* 模板赋值 */
        $smarty->assign('cat_list', cat_list());
        $smarty->assign('brand_list', get_brand_list());
        $smarty->assign('bonus_type', $bonus_type);
        $smarty->assign('goods_list', $goods_list);
开发者ID:norain2050,项目名称:mhFault,代码行数:31,代码来源:bonus.php

示例5: action_edit


//.........这里部分代码省略.........
        $user['mobile_phone'] = $row['mobile_phone'];
        /* 代码增加2014-12-23 by www.68ecshop.com _star */
        $user['real_name'] = $row['real_name'];
        $user['card'] = $row['card'];
        $user['face_card'] = $row['face_card'];
        $user['back_card'] = $row['back_card'];
        $user['country'] = $row['country'];
        $user['province'] = $row['province'];
        $user['city'] = $row['city'];
        $user['district'] = $row['district'];
        $user['address'] = $row['address'];
        $user['status'] = $row['status'];
        /* 代码增加2014-12-23 by www.68ecshop.com _end */
    } else {
        $link[] = array('text' => $_LANG['go_back'], 'href' => 'users.php?act=list');
        sys_msg($_LANG['username_invalid'], 0, $links);
        // $user['sex'] = 0;
        // $user['pay_points'] = 0;
        // $user['rank_points'] = 0;
        // $user['user_money'] = 0;
        // $user['frozen_money'] = 0;
        // $user['credit_line'] = 0;
        // $user['formated_user_money'] = price_format(0);
        // $user['formated_frozen_money'] = price_format(0);
    }
    /* 取出注册扩展字段 */
    $sql = 'SELECT * FROM ' . $ecs->table('reg_fields') . ' WHERE type < 2 AND display = 1 AND id != 6 ORDER BY dis_order, id';
    $extend_info_list = $db->getAll($sql);
    $sql = 'SELECT reg_field_id, content ' . 'FROM ' . $ecs->table('reg_extend_info') . " WHERE user_id = {$user['user_id']}";
    $extend_info_arr = $db->getAll($sql);
    $temp_arr = array();
    foreach ($extend_info_arr as $val) {
        $temp_arr[$val['reg_field_id']] = $val['content'];
    }
    foreach ($extend_info_list as $key => $val) {
        switch ($val['id']) {
            case 1:
                $extend_info_list[$key]['content'] = $user['msn'];
                break;
            case 2:
                $extend_info_list[$key]['content'] = $user['qq'];
                break;
            case 3:
                $extend_info_list[$key]['content'] = $user['office_phone'];
                break;
            case 4:
                $extend_info_list[$key]['content'] = $user['home_phone'];
                break;
            case 5:
                $extend_info_list[$key]['content'] = $user['mobile_phone'];
                break;
            default:
                $extend_info_list[$key]['content'] = empty($temp_arr[$val['id']]) ? '' : $temp_arr[$val['id']];
        }
    }
    $smarty->assign('extend_info_list', $extend_info_list);
    /* 当前会员推荐信息 */
    $affiliate = unserialize($GLOBALS['_CFG']['affiliate']);
    $smarty->assign('affiliate', $affiliate);
    empty($affiliate) && ($affiliate = array());
    if (empty($affiliate['config']['separate_by'])) {
        // 推荐注册分成
        $affdb = array();
        $num = count($affiliate['item']);
        $up_uid = "'{$_GET['id']}'";
        for ($i = 1; $i <= $num; $i++) {
            $count = 0;
            if ($up_uid) {
                $sql = "SELECT user_id FROM " . $ecs->table('users') . " WHERE parent_id IN({$up_uid})";
                $query = $db->query($sql);
                $up_uid = '';
                while ($rt = $db->fetch_array($query)) {
                    $up_uid .= $up_uid ? ",'{$rt['user_id']}'" : "'{$rt['user_id']}'";
                    $count++;
                }
            }
            $affdb[$i]['num'] = $count;
        }
        if ($affdb[1]['num'] > 0) {
            $smarty->assign('affdb', $affdb);
        }
    }
    /* 代码增加2014-12-23 by www.68ecshop.com _star */
    $smarty->assign('lang', $_LANG);
    $smarty->assign('country_list', get_regions());
    $province_list = get_regions(1, $row['country']);
    $city_list = get_regions(2, $row['province']);
    $district_list = get_regions(3, $row['city']);
    $smarty->assign('province_list', $province_list);
    $smarty->assign('city_list', $city_list);
    $smarty->assign('district_list', $district_list);
    /* 代码增加2014-12-23 by www.68ecshop.com _end */
    assign_query_info();
    $smarty->assign('ur_here', $_LANG['users_edit']);
    $smarty->assign('action_link', array('text' => $_LANG['03_users_list'], 'href' => 'users.php?act=list&' . list_link_postfix()));
    $smarty->assign('user', $user);
    $smarty->assign('form_action', 'update');
    $smarty->assign('special_ranks', get_rank_list(true));
    $smarty->display('user_info.htm');
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:101,代码来源:users.php


注:本文中的get_rank_list函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。