Ignore:
Timestamp:
Apr 23, 2015 12:00:06 PM (10 years ago)
Author:
namnd
Message:
 
Location:
pro-violet-viettel/sourcecode/application/modules/frontend/controllers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php

    r884 r906  
    136136       
    137137        public function test(){
    138                 $aryMatch = array();
    139                 $phoneNumber = '987133325';
    140                 $regex = '/^[1,9][0-9]{8,9}$/';
    141                 if (preg_match('/^[1,9]([0-9]{8,9})$/', $phoneNumber, $aryMatch)){
    142                         $phoneNumber = "0".$phoneNumber;
    143                         echo $phoneNumber;
    144                 }else{
    145                         echo "Not match";
    146                 }
     138                $this->load->model('collaborator/collaborator_model');
     139                $province = ' Hà nội';
     140                //$str = trim(ucwords($str));
     141                $district = 'Quận Hai bà trưng';
     142                $str = $this->collaborator_model->getProvinceAndDistict($province, $district);
     143                var_dump($str);
     144                //echo "Result: ".$str;
    147145        }
    148146}
  • pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php

    r884 r906  
    5353            }
    5454                       
    55                         if ($u['province'] == '' && $u['p_id'] != ''){
     55                        if ((!$u['province'] || !$u['district']) && $u['p_id'] != ''){
    5656                                $update_user_info=1;
    5757                        }
  • pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php

    r884 r906  
    286286                                if (strlen($input['province']) == 0) {
    287287                    $result['errors'][] = array("content"=>lang('_SBG_PROVINCE_REQUIRED_MSG'),"field"=>"province");
     288                }
     289                                if (strlen($input['district']) == 0) {
     290                    $result['errors'][] = array("content"=>lang('_SBG_DISTRICT_REQUIRED_MSG'),"field"=>"district");
    288291                }
    289292                $input['password'] = '';
Note: See TracChangeset for help on using the changeset viewer.