protected function cal_b_value()
 {
     foreach ($this->ambassador_list as $v) {
         $b_value = b_value_calculator::static_run($v);
         //            print_r($b_value);
         $this->ekey_b_list[] = array('ekey' => $v, 'b_value' => $b_value);
     }
     //        print_r($this->ekey_b_list);
 }
 protected function get_ambass_list()
 {
     $this->local_db->query('SET NAMES GBK');
     $this->list = $this->local_db->select('ambassador', array('name', 'ekey', 'province', 'school'));
     foreach ($this->list as &$v) {
         $v['b_value'] = b_value_calculator::static_run($v['ekey'], $this->time_begin, $this->time_end);
         $v['reg'] = $this->remote_db->count('p_user', '*', array('AND' => array('invite' => $v['ekey'], 'reg_time[>]' => $this->time_begin, 'reg_time[<]' => $this->time_end)));
         $v['auth'] = $this->remote_db->count('p_user', '*', array('AND' => array('auth' => 1, 'invite' => $v['ekey'], 'auth_time[>]' => $this->time_begin, 'auth_time[<]' => $this->time_end)));
     }
 }