Esempio n. 1
0
 function Main()
 {
     $role_type = in_array($this->Get['type'], array('admin', 'normal')) ? $this->Get['type'] : 'normal';
     $sql = "\r\n\t\t\tSELECT\r\n\t\t\t\t*\r\n\t\t\tFROM\r\n\t\t\t\t" . TABLE_PREFIX . 'role' . "\r\n\t\t\tWHERE\r\n\t\t\t\t`type`='{$role_type}'\r\n\t\t\tORDER BY\r\n\t\t\t\t`creditshigher` ASC, `creditslower` ASC, `rank` ASC, `id` ASC";
     $query = $this->DatabaseHandler->Query($sql);
     $role_list = array();
     $role_ids = array();
     while (false != ($row = $query->GetRow())) {
         $role_list[] = $row;
         $role_ids[] = $row['id'];
     }
     $this->_experience();
     if ('admin' == $role_type) {
         $p = array('role_id' => $role_ids, 'count' => 9999);
         $rets = jsg_member_get($p, 0);
         $admin_users = $rets['list'];
     }
     if ($this->Config['jishigou_founder']) {
         $p = array('uid' => explode(',', $this->Config['jishigou_founder']), 'count' => 999);
         $rets = jsg_member_get($p);
         $founder_users = $rets['list'];
     }
     include template('admin/role_list');
 }
Esempio n. 2
0
function jsg_member_info($uid, $is = 'uid', $fields = '*', $cache = 1)
{
    if (!$uid) {
        return array();
    }
    $iss = array('uid' => 1, 'username' => 1, 'nickname' => 1, 'email' => 1, 'phone' => 1);
    if (empty($is) || !isset($iss[$is])) {
        $uid = jsg_member_nickname($uid, $cache);
        if ($uid) {
            $is = 'nickname';
        } else {
            return array();
        }
    }
    $p = array('fields' => $fields, $is => $uid, 'count' => 1);
    $rets = jsg_member_get($p, 1, $cache);
    if ($rets && is_array($rets['list'][0])) {
        $mall_config = jconf::get('mall');
        if ($mall_config) {
            $rets['list'][0]['mall_credits_name'] = $mall_config['credits_name'];
            $rets['list'][0]['mall_credits'] = $rets['list'][0][$mall_config['credits']];
        }
    }
    return $rets['list'][0];
}