示例#1
0
文件: albums.php 项目: h3len/Project
        $this->addItem(true);
        $this->output();
    }
    /**
     * 设置相册属于哪个分类
     */
    public function setAlbumCate()
    {
        if (!isset($this->input['cate_id']) || !$this->input['cate_id']) {
            $this->errorOutput(NO_CATE_ID);
        }
        if (!isset($this->input['id']) || !$this->input['id']) {
            $this->errorOutput(NO_ID);
        }
        $id = $this->input['id'];
        $cond = " WHERE id={$id}";
        $params['cate_id'] = $this->input['cate_id'];
        include CUR_CONF_PATH . 'lib/Core.class.php';
        $obj = new Core();
        $datas = $obj->update('albums', $params, $cond);
        $this->addItem($datas);
        $this->output();
    }
    /**
	 * 获取会员信息
	 * @param Int|String $user_id
	 */
    private function getMemberInfo($user_id)
    {
        if ($this->input['latest']) {
            //新会员
            include_once ROOT_PATH . 'lib/class/members.class.php';
示例#2
0
 private function fetch_member_info()
 {
     /***从会员接口取会员相关信息和拓展信息****/
     if ($this->settings['App_members'] && $this->user['user_id']) {
         $members = new members();
         $info = $members->get_members(0, 'detail', $this->user['token']);
         $info = $info[0];
         if ($info['extension'] && is_array($info['extension'])) {
             foreach ($info['extension'] as $v) {
                 $extension[$v['field']] = $v['value'];
             }
         }
         if ($info) {
             $forms = $this->mode->get_forms($id);
             if ($forms && is_array($forms)) {
                 foreach ($forms as $k => $v) {
                     if ($v['fixed_id'] == 4 && $v['member_field_addr'] && is_array($v['member_field_addr'])) {
                         foreach ($v['member_field_addr'] as $ele => $elev) {
                             if ($extension[$elev]) {
                                 if ($ele == -1) {
                                     $address = $extension[$elev];
                                     $address_info = explode(',', $address);
                                     $address_info[0] ? $prov_name = $data['field']['form[' . $v['type'] . '_' . $v['id'] . '][8]'] = $address_info[0] : false;
                                     $address_info[1] ? $city_name = $data['field']['form[' . $v['type'] . '_' . $v['id'] . '][9]'] = $address_info[1] : false;
                                     $address_info[2] ? $area_name = $data['field']['form[' . $v['type'] . '_' . $v['id'] . '][10]'] = $address_info[2] : false;
                                     $address_info[3] ? $data['field']['form[' . $v['type'] . '_' . $v['id'] . '][11]'] = $address_info[3] : false;
                                 }
                                 if ($ele == 8) {
                                     $prov_name = $extension[$elev];
                                 }
                                 if ($ele == 9) {
                                     $city_name = $extension[$elev];
                                 }
                                 if ($ele == 10) {
                                     $area_name = $extension[$elev];
                                 }
                                 $data['field']['form[' . $v['type'] . '_' . $v['id'] . '][' . $ele . ']'] = $extension[$elev];
                             }
                         }
                         if ($prov_name) {
                             $sql = 'SELECT c.id as city_id,c.city FROM ' . DB_PREFIX . 'province p LEFT JOIN ' . DB_PREFIX . 'city c ON c.province_id = p.id WHERE p.name = "' . $prov_name . '"';
                             $q = $this->db->query($sql);
                             while ($r = $this->db->fetch_array($q)) {
                                 $data['address']['city'][$r['city_id']] = $r['city'];
                             }
                         }
                         if ($city_name) {
                             $sql = 'SELECT a.id as area_id,a.area FROM ' . DB_PREFIX . 'city c LEFT JOIN ' . DB_PREFIX . 'area a ON c.id = a.city_id  WHERE c.city = "' . $city_name . '"';
                             $q = $this->db->query($sql);
                             while ($r = $this->db->fetch_array($q)) {
                                 $data['address']['area'][$r['area_id']] = $r['area'];
                             }
                         }
                     }
                     if ($v['member_field'] == 'mobile' || $v['member_field'] == 'email') {
                         if ($info[$v['member_field']]) {
                             $data['field']['form[' . $v['type'] . '_' . $v['id'] . ']'] = $info[$v['member_field']];
                         }
                     } elseif ($v['member_field'] && $extension[$v['member_field']]) {
                         $data['field']['form[' . $v['type'] . '_' . $v['id'] . ']'] = $extension[$v['member_field']];
                     }
                 }
             }
         }
     }
     /***从会员接口取会员相关信息和拓展信息****/
     return $data;
 }
示例#3
0
<?php

/**
 * Interface to get the member list
 *
 * @author morrow
 * @version Alpha
 *
 */
// enable error reporting
error_reporting(E_ALL);
// preliminaries
define('IN_EVO', true);
include 'common.php';
// get all members with access
$members_tools_object = new members(TOOLS_GROUP);
$members_tools = $members_tools_object->get_members();
//echo "<html><head></head><body>";
echo "p_nick,username,phone,planet_coords\n";
foreach ($members_tools as $key => $user_id) {
    $member = new member($user_id);
    echo $member->get_p_nick() . "," . $member->get_username() . "," . $member->get_phone() . "," . $member->get_planet_coords() . "\n";
}
//echo "</body></html>";