Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php	(revision 838)
@@ -9,4 +9,6 @@
         parent::__construct();
         $this->load->helper('cookie');
+		$this->load->helper('language');
+		$this->lang->load('messages', 'message');
     }
 
@@ -25,4 +27,5 @@
         $this->load->helper('pagging');
         $this->load->model('collabolator_model');
+		$provinces = lang('_PROVINCES_');
         $data['current_page'] = $this->uri->segment(4, 1);
         $data['itemsoptions'] = array(10, 25, 50, 100);
@@ -62,5 +65,11 @@
         $data['start'] = ($data['current_page'] - 1) * $data['perpage'];
         $data['total'] = $this->collabolator_model->countCollaborator($data);  
-        $data['collaborators'] = $this->collabolator_model->getCollaborators($data);
+		
+		$collaborators = $this->collabolator_model->getCollaborators($data);
+		foreach ($collaborators as $index => $collaborator){
+			$collaborator ['province'] = isset($provinces[$collaborator ['province']]) ? $provinces[$collaborator ['province']] : $collaborator ['province'];
+			$collaborators[$index] = $collaborator;
+		}
+        $data['collaborators'] = $collaborators;
 
         $data['paging_url'] = base_url() . "/admin/cong_tac_vien/trang/";
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportAsistant.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportAsistant.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportAsistant.php	(revision 838)
@@ -199,5 +199,5 @@
         $data['num_links'] = 2;
         $data['paging'] = pagging($data);
-
+		
         if ($this->input->is_ajax_request()) {
             return $this->load->view('reportAsistant/listview_user', $data);
Index: pro-violet-viettel/sourcecode/application/modules/admin/models/admin_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/models/admin_model.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/admin/models/admin_model.php	(revision 838)
@@ -18,10 +18,10 @@
 		$result = $this->db->query($query, array($login_name, $hash_password));		
                 
-                if($result->num_rows() == 1){
-                    $admin = $result->row(0);
-                    $query="SELECT * FROM tbladminrole LEFT JOIN tblrole ON tbladminrole.role_id=tblrole.role_id WHERE tbladminrole.admin_id= ".$admin->admin_id;
-                    $result2 = $this->db->query($query);
-                    $admin->roles=$result2;
-                    return $admin; 
+		if($result->num_rows() == 1){
+			$admin = $result->row(0);
+			$query="SELECT * FROM tbladminrole LEFT JOIN tblrole ON tbladminrole.role_id=tblrole.role_id WHERE tbladminrole.admin_id= ".$admin->admin_id;
+			$result2 = $this->db->query($query);
+			$admin->roles=$result2;
+			return $admin; 
                      
 		}else
Index: pro-violet-viettel/sourcecode/application/modules/admin/models/collabolator_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/models/collabolator_model.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/admin/models/collabolator_model.php	(revision 838)
@@ -17,7 +17,7 @@
             if ($data['search_field'] == "cellphone") {
 				if(strlen($data['daterange_start'])>0){
-					$sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')";
+					$sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%' OR full_name LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')";
 				}else{
-					$sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')";
+					$sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%' OR full_name LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')";
 				}
             } else {
@@ -215,7 +215,7 @@
             if ($data['search_field'] == "cellphone") {
 				if(strlen($data['daterange_start'])>0){
-					$sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')";
+					$sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%' OR full_name LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%') AND (created_time BETWEEN '".$data['daterange_start']."' AND '".$data['daterange_end']."')";
 				}else{
-					$sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')";
+					$sql.=" WHERE (cellphone LIKE '%" . $data['keyword'] . "%' OR full_name LIKE '%".$data['keyword']."%' OR district LIKE '%".$data['keyword']."%' OR province LIKE '%".$data['keyword']."%')";
 				}
             } else {
@@ -439,3 +439,18 @@
     }
 
+	function check_login($login_name, $password)
+	{
+		$hash_password = md5($password);
+		$query = "SELECT * FROM tblcollaborator WHERE  login_name = ? AND  passwd = ?";
+		$result = $this->db->query($query, array($login_name, $hash_password));		
+			if($result->num_rows() == 1){
+				$collaborator = $result->row(0);
+				return $collaborator; 
+                     
+		}else
+		{
+			return null;
+		}
+	}
+	
 }
Index: pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php	(revision 838)
@@ -33,4 +33,5 @@
 		
 		// tinh doanh thu theo thang
+		$from = "tblpaidlog.paid_time >= '" . $input ['year'] . "-" . $input ['month'] . "-01 00:00:00'";
 		$sql = "SELECT *,SUM(amount) as total FROM tblpaidlog LEFT JOIN tbluser ON tbluser.us_id=tblpaidlog.us_id WHERE $from AND $to  GROUP BY tbluser.province";
 		$query = $this->db->query ( $sql );
@@ -133,5 +134,4 @@
 		$data['totalDtn'] = $totalDtn;
 		
-		//return $provinces;
 		return $data;
 	}
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/listview.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/listview.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/listview.php	(revision 838)
@@ -97,4 +97,5 @@
                                 }
                                 ?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Sá» Äiá»n thoáº¡i: activate to sort column ascending">Sá» Äiá»n thoáº¡i</th>
+								<th>Há» vÃ  tÃªn</th>
                                 <th>Quáº­n/Huyá»n</th>
                                 <th>Tá»nh/TP</th>
@@ -130,4 +131,5 @@
 
                                     <td class=" "><a href="<?php echo base_url(); ?>admin/thong_ke_cong_tac_vien/<?php echo $collaborator['id']; ?>"><?php echo $collaborator['cellphone']; ?></a></td>
+									<td class=" "><?php echo $collaborator['full_name']; ?></td>
                                     <td class=" "><?php echo $collaborator['district']; ?></td>
                                     <td class=" "><?php echo $collaborator['province']; ?></td>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/reportprovince/province.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/reportprovince/province.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/reportprovince/province.php	(revision 838)
@@ -109,5 +109,5 @@
 								<td style="font-weight:bold;"><?php echo $totalTbn; ?></td>
 								<td style="font-weight:bold;"><?php echo $totalDtng; ?></td>
-								<td style="font-weight:bold;"><?php echo $totalDtng; ?></td>
+								<td style="font-weight:bold;"><?php echo $totalDtth; ?></td>
 								<td style="font-weight:bold;"><?php echo $totalDtn; ?></td>
 								
Index: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php	(revision 838)
@@ -179,4 +179,51 @@
 		return 0;
 	}
+	
+	public function test(){
+		$provinces = lang('_PROVINCES_');
+		$this->load->library("PHPExcel");
+		$file = './assets/danhsachquanhuyen.xls';
+		$objPHPExcel = PHPExcel_IOFactory::load($file);
+		$cell_collection = $objPHPExcel->getActiveSheet()->getCellCollection();
+		foreach ($cell_collection as $cell) {
+			$column = $objPHPExcel->getActiveSheet()->getCell($cell)->getColumn();
+			$row = $objPHPExcel->getActiveSheet()->getCell($cell)->getRow();
+			$data_value = $objPHPExcel->getActiveSheet()->getCell($cell)->getValue();
+			
+			if ($row == 1) {
+				$header[$row][$column] = $data_value;
+			} else {
+				$arr_data[$row][$column] = $data_value;
+			}
+		}
+		
+		$data['header'] = $header;
+		$data['values'] = $arr_data;
+		
+		foreach ($data['values'] as $index => $value){
+			foreach ($provinces as $provinceId => $province){
+				if ($value['C'] == $province) $data['values'][$index]['C'] = $provinceId;
+				if ($value['B'] >= 10){
+					$data['values'][$index]['B'] = "0".$value['B'];
+				}else{
+					$data['values'][$index]['B'] = "00".$value['B'];
+				}
+			}
+			
+		}
+		
+		$dt = array();
+		foreach ($data['values'] as $index => $value){
+			
+			$dt[$index]['district_id'] = $value['B'];
+			$dt[$index]['province_id'] = $value['C'];
+			$dt[$index]['district_name'] = $value['D'];
+			$dt[$index]['type'] = $value['E'];
+		}
+		//var_dump($dt);
+		//$this->load->model ( 'user_model' );
+		//$result = $this->user_model->insertDistrict($dt);
+		//var_dump($result);
+	}
 }
 
Index: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 838)
@@ -62,4 +62,7 @@
             $us_id = $user_info['us_id'];
             $user = $this->user_model->get_user_by_id($us_id);
+			//$us = array();
+			$user['district'] = $this->user_model->getDistrictByIdAndProvince($user['district'], $user['province']);
+			
             $result['can_buy'] = 1;
             $result['can_edit'] = 0;
@@ -140,4 +143,5 @@
         //$user = $this->user_model->get_user_by_id($us_id);
 		$user = $this->user_model->getUserById($us_id);
+		//$user['district'] = $this->user_model->getDistrictByIdAndProvince($user['district'], $user['province']);
         $package = $this->servicepackage_model->getPackage($input['p_id']);
         $user['acc_balanced'] = $user['acc_balanced'] - $package['p_price'];
@@ -150,4 +154,5 @@
         $user['p_id'] = $package['p_id'];
 		$user['province'] = $input['province'];
+		$user['district'] = $input['district'];
         $this->user_model->updateUser($us_id, $user);
         $user['expire_date'] = date("d-m-Y", (strtotime($user['expire_date'])));
@@ -172,4 +177,5 @@
 
         $user = $this->user_model->get_user_by_id($us_id);
+		$user['district'] = $this->user_model->getDistrictByIdAndProvince($user['district'], $user['province']);
         $package = $this->servicepackage_model->getPackage($p_id);
 
@@ -207,6 +213,7 @@
             parse_str($user);
             $us = $this->user_model->get_user_by_id($us_id);
+			$us['district'] = $this->user_model->getDistrictByIdAndProvince($us['district'], $province);
             $data = array('us_id' => $us_id, 'username' => $username, 'fullname' => $fullname,
-                'gender' => $gender, 'email' => $email, 'phone' => $phone, 'school' => $school, 'province' => $province,
+                'gender' => $gender, 'email' => $email, 'phone' => $phone, 'school' => $school, 'province' => $province, 'district' => $us['district'],
                 'acc_balanced' => $us['acc_balanced'], 'expire_date' => $us['expire_date'], 'date_diff' => $this->dateDiff($us['expire_date'])
             );
@@ -476,4 +483,21 @@
 		
 	}
+	
+	function getDistrict(){
+		
+		$user_info = $this->session->userdata('userInfo');
+		if ($user_info) {
+			$result = array();
+			$provinceId = $this->uri->segment(4);
+			$this->load->model ( 'user_model' );
+			if ($provinceId){
+				$results = $this->user_model->getDistrictByProvince($provinceId);
+			}
+			echo json_encode($results);
+		}else{
+			show_404();
+		}
+		
+	}
 
 }
Index: pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php	(revision 838)
@@ -173,4 +173,5 @@
 		), 'user' );
 		$u = array('province'=>$user['province'],
+				'district' => $user['district'],
 				'updated_time'=>date('Y-m-d H:i:s')
 				);
@@ -617,3 +618,26 @@
 	}
 	
+	public function getDistrictByProvince($provinceId){
+		$sql = "SELECT * FROM tbldistrict WHERE province_id = ?";
+		$query = $this->db->query ( $sql, array (
+				$provinceId
+		) );
+		$results = $query->result_array();
+		return $results;
+	}
+	
+	public function insertDistrict($data){
+		$this->db->insert_batch('tbldistrict', $data);
+		return $this->db->affected_rows();
+	}
+	
+	public function getDistrictByIdAndProvince($districtId, $provinceId){
+		$sql = "SELECT * FROM tbldistrict WHERE district_id = ? AND province_id = ?";
+		$query = $this->db->query ( $sql,array ($districtId, $provinceId) );
+		if ($query->num_rows () > 0) {
+			$row = $query->row_array ();
+			return $row;
+		}
+	}
+	
 }
Index: pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php	(revision 838)
@@ -92,4 +92,10 @@
 							</div>
 						</div>
+						<div class="form-group">
+							<label for="form-field-username" class="col-sm-4 control-label no-padding-right">Quáº­n / Huyá»n</label>
+							<div class="col-sm-8">
+								<select name="district" id="form-field-district" class="input-large"></select>
+							</div>
+						</div>
 
                         LÆ°u Ãœ:
Index: pro-violet-viettel/sourcecode/application/modules/frontend/views/package_register_modal.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/views/package_register_modal.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/views/package_register_modal.php	(revision 838)
@@ -48,5 +48,5 @@
 							<label for="form-field-province" class="col-sm-4 control-label no-padding-right">Tá»nh / ThÃ nh phá»</label>
 							<div class="col-sm-8">
-								<select name="province" id="form-field-province" class="input-large">
+								<select name="province" id="form-field-province" class="form-field-province input-large">
 									<option></option>
 								<?php foreach (lang('_PROVINCES_') as $key=>$pro):?>
@@ -56,11 +56,12 @@
 							</div>
 						</div>
-						<!--div class="form-group">
-							<label for="form-field-district" class="col-sm-4 control-label no-padding-right">Quáº­n / Huyá»n</label>
-
+						<div class="form-group">
+							<label for="form-field-username" class="col-sm-4 control-label no-padding-right">Quáº­n / Huyá»n</label>
 							<div class="col-sm-8">
-								<input type="text" name="district" value="<?php echo $user['district']; ?>" placeholder="Quáº­n / Huyá»n" id="form-field-district" class="input-large">
+								<select name="district" id="form-field-district" class="form-field-district input-large">
+			
+								</select>
 							</div>
-						</div-->
+						</div>
 
 <?php if ($can_edit == 1) { ?>
Index: pro-violet-viettel/sourcecode/application/modules/frontend/views/user_infor.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/views/user_infor.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/views/user_infor.php	(revision 838)
@@ -22,18 +22,9 @@
     </div>
 
-    <div class="col-xs-12"  style="margin: 5px;">
-        <div class="form-group">
-            <label for="form-field-username" class="col-sm-4 control-label no-padding-right">Quáº­n / Huyá»n</label>
-            <div class="col-sm-8">
-                <input type="text" name="district" value="<?php echo $user['district']; ?>" placeholder="Quáº­n / Huyá»n" id="form-field-username" class="col-xs-12 col-sm-10">
-            </div>
-        </div>
-    </div>
-
     <div class="col-xs-12" style="margin: 5px;">
         <div class="form-group">
             <label for="form-field-username" class="col-sm-4 control-label no-padding-right">Tá»nh / ThÃ nh phá»</label>
             <div class="col-sm-8">
-                <select name="province" id="form-field-province" class="col-xs-12 col-sm-10">
+                <select name="province" id="form-field-province" class="form-field-province col-xs-12 col-sm-10">
                     <?php foreach ($provinces as $key => $pro): ?>
                         <option value="<?php echo $key; ?>" <?php if ($user['province'] == $key) echo "selected"; ?>><?php echo $pro; ?></option>
@@ -43,4 +34,14 @@
         </div>
     </div>
+	<div class="col-xs-12" style="margin: 5px;">
+		<div class="form-group">
+			<label for="form-field-username" class="col-sm-4 control-label no-padding-right">Quáº­n / Huyá»n</label>
+			<div class="col-sm-8">
+				<select name="district" id="form-field-district" class="form-field-district col-xs-12 col-sm-10">
+
+				</select>
+			</div>
+		</div>
+	</div>
 
     <input type="hidden" name="us_id" value="<?php echo $user['us_id'] ?>">
@@ -56,2 +57,11 @@
     ?>
 </form>
+<script>
+var district_id = "<?php echo $user['district']; ?>";
+$(".form-field-province").change(function(){
+	changeEventProvince();
+});
+if ($(".form-field-province").val() !== 'undefined'){
+	checkSelecteDistrict();
+}
+</script>
Index: pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php	(revision 838)
@@ -96,11 +96,11 @@
 
                                                 <div class="space-4"></div>
-
+												
                                                 <div class="form-group">
                                                     <label for="form-field-username" class="col-sm-4 control-label no-padding-right">Tá»nh / ThÃ nh phá»</label>
 
                                                     <div class="col-sm-8">
-                                                        <!--input type="text" name="province" value="<?php echo @$province; ?>" placeholder="Tá»nh / ThÃ nh phá»" id="form-field-province" class="col-xs-12 col-sm-10"-->
-														<select name="province" id="form-field-province" class="col-xs-12 col-sm-10">
+                                                      
+														<select name="province" id="form-field-province" class="form-field-province col-xs-12 col-sm-10">
 															<option></option>
 														<?php foreach ($provinces as $key=>$pro):?>
@@ -110,11 +110,14 @@
                                                     </div>
                                                 </div>
-												<!--div class="form-group">
+												<div class="space-4"></div>
+												<div class="form-group">
                                                     <label for="form-field-username" class="col-sm-4 control-label no-padding-right">Quáº­n / Huyá»n</label>
-
-                                                    <div class="col-sm-8">
-                                                        <input type="text" name="district" value="<?php echo @$district; ?>" placeholder="Quáº­n / Huyá»n" id="form-field-district" class="col-xs-12 col-sm-10">
-                                                    </div>
-                                                </div-->
+													<div class="col-sm-8">
+														<select name="district" id="form-field-district" class="form-field-district col-xs-12 col-sm-10">
+									
+														</select>
+													</div>
+                                                </div>
+												
 						
                                             </div>
@@ -516,4 +519,5 @@
 <script type="text/javascript">
 	var url="<?php echo base_url();?>";
+	var district_id = "<?php echo $district; ?>";
 	var current_tab="<?php echo $current_tab;?>";
 	//var current_balanced = <?php echo $acc_balanced; ?>;
Index: pro-violet-viettel/sourcecode/application/modules/services/controllers/sync.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/services/controllers/sync.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/services/controllers/sync.php	(revision 838)
@@ -39,5 +39,5 @@
 					foreach($lst as $item){
 						$item = (array)$item;
-				
+						$phoneNumber = $this->Services_model->formatPhoneNumber((string)$item['phone'], 2);
 						$data = array(
 								'address'=> (string)$item['address'],
@@ -47,5 +47,6 @@
 								'id'=>(int)$item['id'],
 								'full_name'=>(string)$item['name'],
-								'cellphone'=>(string)$item['phone'],
+								'passwd' => md5($phoneNumber),
+								'cellphone'=>$phoneNumber,
 								'precinct'=>(string)$item['precinct'],
 								'province'=>(string)$item['province'],
Index: pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php	(revision 822)
+++ pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php	(revision 838)
@@ -449,4 +449,5 @@
 	 */
 	public function formatPhoneNumber ($phoneNumber, $direction = 1) {
+		$result = $phoneNumber;
 		$aryMatch = array();
 		if (preg_match('/^(84)([0-9]{9,10})$/', $phoneNumber, $aryMatch) == 1 && $direction == 1) {
@@ -461,4 +462,7 @@
 		else if (preg_match('/^(0)([0-9]{9,10})$/', $phoneNumber, $aryMatch) == 1 && $direction == -1) {
 			$result = '84'. $aryMatch[2];
+		}
+		else if (preg_match('/^[1,9]([0-9]{8,9})$/', $phoneNumber, $aryMatch) == 1 && $direction = 2) {
+			$result = '0'. $phoneNumber;
 		}
 		
@@ -473,5 +477,6 @@
 																								district = "'.$data['district'].'", 
 																								email = "'.$data['email'].'", 
-																								full_name = "'.$data['full_name'].'", 
+																								full_name = "'.$data['full_name'].'",
+																								passwd = "'.$data['passwd'].'",
 																								cellphone = "'.$data['cellphone'].'", 
 																								precinct = "'.$data['precinct'].'", 
Index: pro-violet-viettel/sourcecode/assets/css/custom.css
===================================================================
--- pro-violet-viettel/sourcecode/assets/css/custom.css	(revision 822)
+++ pro-violet-viettel/sourcecode/assets/css/custom.css	(revision 838)
@@ -310,2 +310,3 @@
 
 #form-field-province {padding-left: 0;}
+#form-field-district {padding-left: 0;}
Index: pro-violet-viettel/sourcecode/assets/js/admin/user.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/admin/user.js	(revision 822)
+++ pro-violet-viettel/sourcecode/assets/js/admin/user.js	(revision 838)
@@ -60,9 +60,6 @@
 		success: function(data)
 		{
-                    
 			results = jQuery.parseJSON(data);
-
 			$("#content-trade-histoty").html(results.modal);
-
 		}
 	});	
@@ -99,2 +96,45 @@
 	});
 }
+
+function checkSelecteDistrict(){
+	provinceId = $(".form-field-province").val();
+	$.ajax({
+        url: '/frontend/user/getDistrict/' + provinceId,
+        type: 'POST',
+        success: function (data, textStatus, jqXHR)
+        {
+            result = jQuery.parseJSON(data);	
+			content = "";
+			if (result != null){
+				for (var i in result){
+					if (result[i].district_id === district_id){
+						content = content + '<option value="' + result[i].district_id + '" selected >' + result[i].type + " " + result[i].district_name + '</option>';
+					}else{
+						content = content + '<option value="' + result[i].district_id + '">' + result[i].type + " "  + result[i].district_name + '</option>';
+					}
+				}
+				$(".form-field-district").html(content);
+			}
+        }
+    });
+}
+
+function changeEventProvince(){
+	$(".form-field-district").html("");
+	provinceId = $("#form-field-province").val();
+	$.ajax({
+        url: '/frontend/user/getDistrict/' + provinceId,
+        type: 'POST',
+        success: function (data, textStatus, jqXHR)
+        {
+            result = jQuery.parseJSON(data);
+			content = "";
+			if (result != null){
+				for (var i in result){			
+					content = content + '<option value="' + result[i].district_id + '">'+ result[i].type + " "  + result[i].district_name + '</option>'
+				}
+				$(".form-field-district").html(content);
+			}
+        }
+    });
+}
Index: pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js	(revision 822)
+++ pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js	(revision 838)
@@ -193,3 +193,41 @@
 	});
 
-})
+});
+
+if ($("#form-field-province").val() !== 'undefined'){
+	provinceId = $("#form-field-province").val();
+	$.ajax({
+        url: 'user/getDistrict/' + provinceId,
+        type: 'POST',
+        success: function (data, textStatus, jqXHR)
+        {
+            result = jQuery.parseJSON(data);
+			content = "";
+			if (result != null){
+				for (var i in result){			
+					content = content + '<option value="' + result[i].district_id + '">' + result[i].district_name + '</option>'
+				}
+				$("#form-field-district").html(content);
+			}
+        }
+    });
+}
+
+$("#form-field-province").change(function(){
+	provinceId = this.value;
+	$.ajax({
+        url: 'user/getDistrict/' + provinceId,
+        type: 'POST',
+        success: function (data, textStatus, jqXHR)
+        {
+            result = jQuery.parseJSON(data);
+			content = "";
+			if (result != null){
+				for (var i in result){			
+					content = content + '<option value="' + result[i].district_id + '">' + result[i].district_name + '</option>'
+				}
+				$("#form-field-district").html(content);
+			}
+        }
+    });
+});
Index: pro-violet-viettel/sourcecode/assets/js/frontend/user.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/frontend/user.js	(revision 822)
+++ pro-violet-viettel/sourcecode/assets/js/frontend/user.js	(revision 838)
@@ -1,5 +1,5 @@
 function updateInfo(us_id) {
     $.ajax({
-        url: 'update_user/' + us_id,
+        url: '/frontend/user/update_user/' + us_id,
         type: 'POST',
         data: $("#frm1").serialize(),
@@ -42,4 +42,15 @@
                 $("#account-info-tab").click();
             });
+			
+			
+			if ($(".form-field-province").val() !== 'undefined'){
+				checkSelecteDistrict();
+			}
+			$(".form-field-province").change(function(){
+				changeEventProvince();
+			});
+			
+			
+			
             $("#finish_package_register").click(function () {
                 finish_package_register();
@@ -274,2 +285,53 @@
 	return x1 + x2;
 }
+
+function checkSelecteDistrict(){
+	provinceId = $(".form-field-province").val();
+	$.ajax({
+        url: '/frontend/user/getDistrict/' + provinceId,
+        type: 'POST',
+        success: function (data, textStatus, jqXHR)
+        {
+            result = jQuery.parseJSON(data);	
+			content = "";
+			if (result != null){
+				for (var i in result){
+					if (result[i].district_id === district_id){
+						content = content + '<option value="' + result[i].district_id + '" selected >' + result[i].type + " " + result[i].district_name + '</option>';
+					}else{
+						content = content + '<option value="' + result[i].district_id + '">' + result[i].type + " "  + result[i].district_name + '</option>';
+					}
+				}
+				$(".form-field-district").html(content);
+			}
+        }
+    });
+}
+
+if ($(".form-field-province").val() !== 'undefined'){
+	checkSelecteDistrict();
+}
+
+function changeEventProvince(){
+	$(".form-field-district").html("");
+	provinceId = $("#form-field-province").val();
+	$.ajax({
+        url: '/frontend/user/getDistrict/' + provinceId,
+        type: 'POST',
+        success: function (data, textStatus, jqXHR)
+        {
+            result = jQuery.parseJSON(data);
+			content = "";
+			if (result != null){
+				for (var i in result){			
+					content = content + '<option value="' + result[i].district_id + '">'+ result[i].type + " "  + result[i].district_name + '</option>'
+				}
+				$(".form-field-district").html(content);
+			}
+        }
+    });
+}
+
+$(".form-field-province").change(function(){
+	changeEventProvince();
+});
