Code Duplication    Length = 10-13 lines in 3 locations

web_interface/astpp/application/modules/opensips/controllers/opensips.php 1 location

@@ 201-213 (lines=13) @@
198
		}
199
	}
200
201
	function customer_opensips_json($accountid,$accounttype) {
202
	
203
		$json_data = array();
204
		$count_all = $this->opensips_model->getopensipsdevice_customer_list(false, $accountid,$accounttype);
205
		$paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']);
206
		$json_data = $paging_data["json_paging"];
207
208
		$query = $this->opensips_model->getopensipsdevice_customer_list(true, $accountid,$accounttype, $paging_data["paging"]["start"], $paging_data["paging"]["page_no"]);
209
		$grid_fields = json_decode($this->opensips_form->opensips_customer_build_opensips_list($accountid));
210
		$json_data['rows'] = $this->form->build_grid($query, $grid_fields);
211
212
		echo json_encode($json_data);
213
	}
214
215
216
	function opensips_add_customer($add_data) {

web_interface/astpp/application/modules/package/controllers/package.php 1 location

@@ 69-78 (lines=10) @@
66
67
		echo json_encode($json_data);
68
	}
69
	function package_list_reseller($accountid,$accounttype){
70
	$json_data = array();
71
		$count_all = $this->package_model->get_reseller_package_list(false,$accountid,$accounttype);
72
		$paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']);
73
		$json_data = $paging_data["json_paging"];
74
		$query = $this->package_model->get_reseller_package_list(true,$accountid,$accounttype,$paging_data["paging"]["start"], $paging_data["paging"]["page_no"]);
75
		$grid_fields = json_decode($this->package_form->build_package_list_for_reseller());
76
		$json_data['rows'] = $this->form->build_grid($query, $grid_fields);
77
		echo json_encode($json_data);
78
	}
79
   function package_list_search() {
80
		$ajax_search = $this->input->post('ajax_search', 0);
81

web_interface/astpp/application/modules/email/controllers/email.php 1 location

@@ 398-407 (lines=10) @@
395
		echo json_encode($json_data);
396
	}
397
398
	function customer_mail_record($accountid,$accounttype){
399
		$json_data = array();
400
		$count_all = $this->email_model->customer_get_email_list(false,$accountid,"","");
401
		$paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']);
402
		$json_data = $paging_data["json_paging"];
403
		$query = $this->email_model->customer_get_email_list(true,$accountid,$paging_data["paging"]["start"], $paging_data["paging"]["page_no"]);
404
	$grid_fields = json_decode($this->email_form->build_list_for_email_customer($accountid,$accounttype));
405
		$json_data['rows'] = $this->form->build_grid($query, $grid_fields);
406
		echo json_encode($json_data);
407
	}    
408
	function email_delete_multiple() {
409
		$ids = $this->input->post("selected_ids", true);
410
		$where = "id IN ($ids)";