Ignore:
Timestamp:
Nov 10, 2014 11:07:50 AM (11 years ago)
Author:
quyenla
Message:

paidlogs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/admin/controllers/report.php

    r441 r442  
    66class Report extends MX_Controller {
    77
     8    const TOKENPW = 'violet';
    89    public function __construct() {
    910        parent::__construct();
     
    140141        $data['num_links'] = 2;
    141142        $data['paging'] = pagging($data);
    142 
     143        foreach ($data['paidlogs'] as $index=>$paidlog)
     144        {
     145        $data['paidlogs'][$index]['username']= @$this->get_username($paidlog['us_id']);
     146        }
     147     
    143148        if ($this->input->is_ajax_request()) {
    144149            return $this->load->view('report/listview', $data);
     
    146151        return $this->load->view('report/listview', $data, true);
    147152    }
     153    public function get_username($us_id)
     154        {
     155        $us_id=33;
     156                $src = 'violet';
     157                $token = md5($us_id.self::TOKENPW);
     158                $this->load->model('user_model');
     159                $data = $this->user_model->get_user_info($src, $us_id, $token);
     160                if (strlen($data) > 0){
     161                        $arr_users = explode("&", $data);
     162                        $str_username = $arr_users[1];
     163                        $arr_username = explode("=", $str_username);
     164                        return $arr_username[1];
     165                }else
     166                {
     167                        return "";
     168                }
     169
     170        }
    148171
    149172    public function addPaidlog() {
Note: See TracChangeset for help on using the changeset viewer.