Code Duplication    Length = 15-16 lines in 6 locations

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

@@ 110-125 (lines=16) @@
107
		redirect(base_url() . 'charges/periodiccharges/');
108
	}
109
110
	function periodiccharges_search() {
111
		$ajax_search = $this->input->post('ajax_search', 0);
112
		if ($this->input->post('advance_search', TRUE) == 1) {
113
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
114
			$action = $this->input->post();
115
			unset($action['action']);
116
			unset($action['advance_search']);
117
			if (isset($action['charge']['charge']) && $action['charge']['charge'] != '') {
118
				$action['charge']['charge'] = $this->common_model->add_calculate_currency($action['charge']['charge'], "", '', true, false);
119
			}
120
			$this->session->set_userdata('charges_list_search', $action);
121
		}
122
		if (@$ajax_search != 1) {
123
			redirect(base_url() . 'charges/periodiccharges/');
124
		}
125
	}
126
127
	function periodiccharges_clearsearchfilter() {
128
		$this->session->set_userdata('advance_search', 0);

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

@@ 62-77 (lines=16) @@
59
		$json_data['rows'] = $this->form->build_grid($query, $grid_fields);
60
		echo json_encode($json_data);
61
	}   
62
	function refill_coupon_list_search(){
63
		$ajax_search = $this->input->post('ajax_search', 0);
64
		if ($this->input->post('advance_search', TRUE) == 1) {
65
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
66
			$action = $this->input->post();
67
			unset($action['action']);
68
			unset($action['advance_search']);
69
			if (isset($action['amount']['amount']) && $action['amount']['amount'] != '') {
70
				$action['amount']['amount'] = $this->common_model->add_calculate_currency($action['amount']['amount'], "", '', true, false);
71
			}
72
			$this->session->set_userdata('refill_coupon_list_search', $action);
73
		}
74
		if (@$ajax_search != 1) {
75
			redirect(base_url() . 'refill_coupon/refill_coupon_list/');
76
		}
77
	}
78
	function refill_coupon_clearsearchfilter(){
79
	$this->session->set_userdata('advance_search', 0);
80
		$this->session->set_userdata('refill_coupon_list_search', "");

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

@@ 122-136 (lines=15) @@
119
		echo json_encode($json_data);
120
	}
121
122
	function taxes_list_search() {
123
		$ajax_search = $this->input->post('ajax_search', 0);
124
		if ($this->input->post('advance_search', TRUE) == 1) {
125
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
126
			unset($_POST['action']);
127
			unset($_POST['advance_search']);
128
			if (isset($action['taxes_amount']['taxes_amount']) && $action['taxes_amount']['taxes_amount'] != '') {
129
				$action['taxes_amount']['taxes_amount'] = $this->common_model->add_calculate_currency($action['taxes_amount']['taxes_amount'], "", '', true, false);
130
			}
131
		$this->session->set_userdata('taxes_list_search', $this->input->post());
132
		}
133
		if (@$ajax_search != 1) {
134
			redirect(base_url() . 'taxes/taxes_list/');
135
		}
136
	}
137
138
	function taxes_list_clearsearchfilter() {
139
		$this->session->set_userdata('advance_search', 0);

web_interface/astpp/application/modules/user/controllers/user.php 3 locations

@@ 762-776 (lines=15) @@
759
		echo json_encode($json_data);
760
	}
761
    
762
	function user_refill_report_search() {
763
		$ajax_search = $this->input->post('ajax_search', 0);
764
		if ($this->input->post('advance_search', TRUE) == 1) {
765
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
766
			$action = $this->input->post();
767
			unset($action['action'],$action['advance_search']);
768
			if (isset($action['credit']['credit']) && $action['credit']['credit'] != '') {
769
			 $action['credit']['credit'] = $this->common_model->add_calculate_currency($action['credit']['credit'], "", '', true, false);
770
			}
771
			$this->session->set_userdata('user_refill_report_search', $action);
772
		}
773
		if (@$ajax_search != 1) {
774
			redirect(base_url() . 'user/user_refill_report/');
775
		}
776
	}
777
    
778
	function user_refill_report_clearsearchfilter() {
779
		$this->session->set_userdata('advance_search', 0);
@@ 1465-1480 (lines=16) @@
1462
		echo json_encode($json_data);
1463
	}
1464
1465
	function user_cdrs_report_search() {
1466
		$ajax_search = $this->input->post('ajax_search', 0);
1467
		if ($this->input->post('advance_search', TRUE) == 1) {
1468
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
1469
			$action = $this->input->post();
1470
			unset($action['action']);
1471
			unset($action['advance_search']);
1472
			if (isset($action['debit']['debit']) && $action['debit']['debit'] != '') {
1473
				$action['debit']['debit'] = $this->common_model->add_calculate_currency($action['debit']['debit'], "", '', true, false);
1474
			}
1475
			$this->session->set_userdata('user_cdrs_report_search', $action);
1476
		}
1477
		if (@$ajax_search != 1) {
1478
			redirect(base_url() . 'user/user_cdrs_report/');
1479
		}
1480
	}
1481
1482
	function user_cdrs_report_clearsearchfilter() {
1483
		$this->session->set_userdata('advance_search', 0);
@@ 1861-1876 (lines=16) @@
1858
		echo json_encode($json_data);
1859
	}
1860
1861
	function user_provider_cdrs_report_search() {
1862
		$ajax_search = $this->input->post('ajax_search', 0);
1863
		if ($this->input->post('advance_search', TRUE) == 1) {
1864
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
1865
			$action = $this->input->post();
1866
			 if (isset($action['cost']['cost']) && $action['cost']['cost'] != '') {
1867
				$action['cost']['cost'] = $this->common_model->add_calculate_currency($action['cost']['cost'], "", '', true, false);
1868
			}
1869
			unset($action['action']);
1870
			unset($action['advance_search']);
1871
			$this->session->set_userdata('user_provider_cdrs_report_search', $action);
1872
		}
1873
		if ($ajax_search != 1) {
1874
			redirect(base_url() . 'user/user_provider_cdrs_report/');
1875
		}
1876
	}
1877
1878
	function user_provider_cdrs_report_clearsearchfilter() {
1879
		$this->session->set_userdata('advance_search', 0);