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


PHP auth::getMemberById方法代码示例

本文整理汇总了PHP中auth::getMemberById方法的典型用法代码示例。如果您正苦于以下问题:PHP auth::getMemberById方法的具体用法?PHP auth::getMemberById怎么用?PHP auth::getMemberById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在auth的用法示例。


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

示例1: show

 public function show($condition = '')
 {
     $sql = "SELECT * FROM " . DB_PREFIX . "bill_record WHERE 1 " . $condition;
     $q = $this->db->query($sql);
     $data = array();
     $user_id_array = array();
     $user_id = $space = '';
     $bill_id = 0;
     //目前取记录,根据某个订单的来检索
     include_once CUR_CONF_PATH . 'lib/bill.class.php';
     $this->bill = new bill();
     while ($row = $this->db->fetch_array($q)) {
         $checkbool = $row['bill_id'] ? $this->bill->checkLocked($row['bill_id']) : 0;
         $row['locked'] = $checkbool ? 1 : 0;
         if ($row['user_id']) {
             $user_id_array[$row['user_id']] = $row['user_id'];
         }
         $data[] = $row;
     }
     if ($user_id_array) {
         $user_id = implode(',', $user_id_array);
         include_once ROOT_PATH . 'lib/class/auth.class.php';
         $auth = new auth();
         $tmp = $auth->getMemberById($user_id);
         $user_info = array();
         foreach ($tmp as $k => $v) {
             $user_info[$v['id']] = $v['user_name'];
         }
         foreach ($data as $k => $v) {
             $data[$k]['user_name'] = $user_info[$v['user_id']];
         }
     }
     return $data;
 }
开发者ID:h3len,项目名称:Project,代码行数:34,代码来源:bill_record.class.php

示例2: getMemberById

 public function getMemberById()
 {
     $id = $this->input['id'] ? trim($this->input['id']) : 0;
     $data = array();
     if (!empty($id)) {
         include_once ROOT_PATH . 'lib/class/auth.class.php';
         $auth = new auth();
         $data = $auth->getMemberById($id);
     }
     $this->addItem($data);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:12,代码来源:user.php

示例3: show

 public function show($condition = '')
 {
     $sql = "SELECT * FROM " . DB_PREFIX . "bill WHERE 1 " . $condition;
     $q = $this->db->query($sql);
     $data = array();
     $user_id = $space = '';
     $project_id = $space_second = '';
     while ($row = $this->db->fetch_array($q)) {
         if ($row['user_id']) {
             $user_id .= $space . $row['user_id'];
             $space = ',';
         }
         if ($row['project_id']) {
             $project_id .= $space_second . $row['project_id'];
             $space_second = ',';
         }
         $row['cost_capital'] = hg_cny($row['cost']);
         $row['advice_capital'] = hg_cny($row['advice']);
         $data[] = $row;
     }
     if ($user_id) {
         include_once ROOT_PATH . 'lib/class/auth.class.php';
         $auth = new auth();
         $tmp = $auth->getMemberById($user_id);
         $user_info = array();
         foreach ($tmp as $k => $v) {
             $user_info[$v['id']] = $v['user_name'];
         }
     }
     if ($project_id) {
         include_once CUR_CONF_PATH . 'lib/project.class.php';
         $project = new project();
         $project_info = $tmp = array();
         $tmp = $project->show(' AND id IN(' . $project_id . ')');
         foreach ($tmp as $k => $v) {
             $project_info[$v['id']] = $v['name'];
         }
     }
     foreach ($data as $k => $v) {
         if ($user_info) {
             $data[$k]['user_name'] = $user_info[$v['user_id']];
         }
         if ($project_info) {
             $data[$k]['project_name'] = $project_info[$v['project_id']];
         }
         if (!$v['title']) {
             $data[$k]['title'] = date('Y-m-d', $v['business_time']) . '-' . $data[$k]['project_name'];
         }
     }
     return $data;
 }
开发者ID:h3len,项目名称:Project,代码行数:51,代码来源:bill.class.php

示例4: getOrgByUserid

 public function getOrgByUserid()
 {
     $user_id = $this->input['user_id'] ? intval($this->input['user_id']) : 0;
     $data = array();
     if ($user_id) {
         include_once ROOT_PATH . 'lib/class/auth.class.php';
         $auth = new auth();
         $user_info = $auth->getMemberById($user_id);
         if ($user_info) {
             $user_info = $user_info[0];
             $ret = $this->getTopFatherOrgid($user_info['org_id']);
             if ($ret) {
                 $this->addItem($ret);
             }
         }
     }
     $this->addItem($data);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:19,代码来源:company.php

示例5: create

 public function create($data)
 {
     if ($data) {
         $sql = 'INSERT INTO ' . DB_PREFIX . 'churu SET ';
         $p = '';
         foreach ($data as $k => $v) {
             $sql .= $p . $k . "='" . $v . "'";
             $p = ',';
         }
         $re = $this->db->query($sql);
         $data['id'] = $this->db->insert_id();
         include_once ROOT_PATH . 'lib/class/auth.class.php';
         $auth = new auth();
         $arr = $auth->getMemberById($data['uid']);
         $data['user_name'] = $arr[0]['user_name'];
         $data['org_name'] = $arr[0]['org_name'];
         //print_r($data);die;
         return $data;
     } else {
         return false;
     }
 }
开发者ID:h3len,项目名称:Project,代码行数:22,代码来源:churu.class.php

示例6: show_audit

 public function show_audit($bill_id)
 {
     $sql = "SELECT * FROM " . DB_PREFIX . "bill WHERE id=" . $bill_id;
     $f = $this->db->query_first($sql);
     $sql = "SELECT * FROM " . DB_PREFIX . "audit_queue WHERE bill_id=" . $bill_id;
     $q = $this->db->query($sql);
     $audit_record_id = $space = "";
     while ($row = $this->db->fetch_array($q)) {
         $audit_record_id .= $space . $row["audit_record_id"];
         $space = ",";
     }
     //还有下一级审批则获取下一级审批人 若打回或审批完成获取报销人
     if ($audit_record_id != "" && $f['is_approve'] != 2) {
         $sql = "SELECT * FROM " . DB_PREFIX . "audit_record WHERE id IN(" . $audit_record_id . ")";
         $q = $this->db->query($sql);
         while ($row = $this->db->fetch_array($q)) {
             if ($row['audit_level'] == $f['audit_level']) {
                 $audit_user_name = $row['user_name'];
                 $audit_user_id = $row['user_id'];
             }
         }
         $state = 1;
     } else {
         $audit_user_id = $f['user_id'];
         include_once ROOT_PATH . 'lib/class/auth.class.php';
         $auth = new auth();
         $tmp = $auth->getMemberById($audit_user_id);
         foreach ($tmp as $k => $v) {
             $audit_user_name = $v['user_name'];
         }
         $state = 2;
     }
     return array('id' => $id, 'audit_user_name' => $audit_user_name, 'audit_user_id' => $audit_user_id, 'state' => $state);
 }
开发者ID:h3len,项目名称:Project,代码行数:34,代码来源:audit_record.class.php

示例7: qingjia_count

 public function qingjia_count($condition, $start_time = '', $end_time = '')
 {
     $sql = "SELECT * FROM " . DB_PREFIX . "qingjia_record WHERE 1 ";
     $q = $this->db->query($sql);
     while ($row = $this->db->fetch_array($q)) {
         $data[] = $row;
     }
     $data2 = array();
     $sql2 = "SELECT * FROM " . DB_PREFIX . "xiaojia_record where 1 " . $condition;
     $q = $this->db->query($sql2);
     while ($row = $this->db->fetch_array($q)) {
         foreach ($data as $key => $vo) {
             if ($row['record_id'] == $vo['id']) {
                 $data2[$vo['user_id']][] = $row;
             }
         }
     }
     $user_id = $space = '';
     foreach ($data2 as $key => $vo) {
         foreach ($vo as $k => $v) {
             if ($start_time == '' && $end_time == '') {
                 $data2[$key]['time'] += $v['end_time'] - $v['start_time'];
             } elseif ($v['end_time'] >= $end_time && $v['start_time'] <= $start_time) {
                 $data2[$key]['time'] += $end_time - $start_time + 60 * 60 * 24;
             } elseif ($v['end_time'] <= $end_time && $v['start_time'] >= $start_time) {
                 $data2[$key]['time'] += $v['end_time'] - $v['start_time'];
             } elseif ($v['end_time'] <= $end_time && $v['start_time'] <= $start_time && $v['end_time'] >= $start_time) {
                 $data2[$key]['time'] += $v['end_time'] - $start_time;
             } elseif ($v['end_time'] >= $end_time && $v['start_time'] >= $start_time && $v['start_time'] <= $end_time) {
                 $data2[$key]['time'] += $end_time - $v['start_time'];
             }
             $sort_id[] = $v['sort_id'];
         }
         $user_id .= $space . $key;
         $space = ',';
     }
     if ($user_id) {
         include_once ROOT_PATH . 'lib/class/auth.class.php';
         $auth = new auth();
         $tmp = $auth->getMemberById($user_id);
         $user_info = array();
         foreach ($tmp as $k => $v) {
             $user_info[$v['id']] = $v['user_name'];
         }
     }
     if ($sort_id) {
         include_once CUR_CONF_PATH . 'lib/qingjia_sort.class.php';
         $sort = new qingjia_sort();
         $sort_tmp = $sort_info = array();
         $sort_tmp = $sort->get_sort_name($sort_id);
         foreach ($sort_tmp as $k => $v) {
             $sort_info[$v['id']] = $v['name'];
         }
     }
     foreach ($data2 as $k => $v) {
         if ($user_info) {
             $data2[$k]['user_name'] = $user_info[$k];
         }
         if ($sort_info) {
             foreach ($v as $key => $vo) {
                 $data2[$k][$key]['sort_name'] = $sort_info[$vo['sort_id']];
             }
         }
     }
     return $data2;
 }
开发者ID:h3len,项目名称:Project,代码行数:66,代码来源:qingjia_record.class.php

示例8: auth

 function get_avatar($id)
 {
     include_once ROOT_PATH . 'lib/class/auth.class.php';
     $auth = new auth();
     $userinfo = $auth->getMemberById($id);
     return $userinfo[0]['avatar'];
 }
开发者ID:h3len,项目名称:Project,代码行数:7,代码来源:attach.class.php


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