Code Duplication    Length = 12-15 lines in 34 locations

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

@@ 102-114 (lines=13) @@
99
		redirect(base_url() . 'animap/animap_detail/');
100
	}
101
102
	function  animap_detail_search() {
103
		$ajax_search = $this->input->post('ajax_search', 0);
104
		if ($this->input->post('advance_search', TRUE) == 1) {
105
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
106
			$action = $this->input->post();
107
			unset($action['action']);
108
			unset($action['advance_search']);
109
			$this->session->set_userdata('animap_list_search', $action);
110
		}
111
		if (@$ajax_search != 1) {
112
			redirect(base_url() . 'animap/animap_list/');
113
		}
114
	}
115
116
	function animap_detail_clearsearchfilter() {
117
		$this->session->set_userdata('advance_search', 0);

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

@@ 263-275 (lines=13) @@
260
		echo json_encode($json_data);
261
	}
262
263
	function did_list_search() {
264
		$ajax_search = $this->input->post('ajax_search', 0);
265
		if ($this->input->post('advance_search', TRUE) == 1) {
266
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
267
			$action = $this->input->post();
268
			unset($action['action']);
269
			unset($action['advance_search']);
270
			$this->session->set_userdata('did_list_search', $action);
271
		}
272
		if (@$ajax_search != 1) {
273
			redirect(base_url() . 'did/did_list/');
274
		}
275
	}
276
277
	function did_list_clearsearchfilter() {
278
		$this->session->set_userdata('advance_search', 0);

web_interface/astpp/application/modules/freeswitch/controllers/freeswitch.php 4 locations

@@ 101-114 (lines=14) @@
98
		}
99
	}
100
    
101
	function fsgateway_search() {
102
		$ajax_search = $this->input->post('ajax_search', 0);
103
        
104
		if ($this->input->post('advance_search', TRUE) == 1) {
105
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
106
			$action = $this->input->post();
107
			unset($action['action']);
108
			unset($action['advance_search']);
109
			$this->session->set_userdata('fsgateway_list_search', $action);
110
		}
111
		if (@$ajax_search != 1) {
112
			redirect(base_url() . 'freeswitch/fsgateway/');
113
		}
114
	}
115
	function fssipprofile_search() {
116
		$ajax_search = $this->input->post('ajax_search', 0);
117
        
@@ 115-128 (lines=14) @@
112
			redirect(base_url() . 'freeswitch/fsgateway/');
113
		}
114
	}
115
	function fssipprofile_search() {
116
		$ajax_search = $this->input->post('ajax_search', 0);
117
        
118
		if ($this->input->post('advance_search', TRUE) == 1) {
119
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
120
			$action = $this->input->post();
121
			unset($action['action']);
122
			unset($action['advance_search']);
123
			$this->session->set_userdata('fssipprofile_list_search', $action);
124
		}
125
		if (@$ajax_search != 1) {
126
			redirect(base_url() . 'freeswitch/fssipprofile/');
127
		}
128
	}
129
	function fssipdevices_clearsearchfilter() {
130
		$this->session->set_userdata('advance_search', 0);
131
		$this->session->set_userdata('account_search', "");
@@ 232-244 (lines=13) @@
229
		}
230
	}
231
232
	function fssipdevices_search() {
233
		$ajax_search = $this->input->post('ajax_search', 0);
234
		if ($this->input->post('advance_search', TRUE) == 1) {
235
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
236
			$action = $this->input->post();
237
			unset($action['action']);
238
			unset($action['advance_search']);
239
			$this->session->set_userdata('fssipdevices_list_search', $action);
240
		}
241
		if (@$ajax_search != 1) {
242
			redirect(base_url() . 'freeswitch/fssipdevices/');
243
		}
244
	}
245
246
247
	function fssipdevices() {
@@ 1010-1023 (lines=14) @@
1007
		exit;
1008
	}
1009
1010
	function fsserver_list_search() {
1011
		$ajax_search = $this->input->post('ajax_search', 0);
1012
1013
		if ($this->input->post('advance_search', TRUE) == 1) {
1014
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
1015
			$action = $this->input->post();
1016
			unset($action['action']);
1017
			unset($action['advance_search']);
1018
			$this->session->set_userdata('fsserver_list_search', $action);
1019
		}
1020
		if (@$ajax_search != 1) {
1021
			redirect(base_url() . 'freeswitch/fsserver_list/');
1022
		}
1023
	}
1024
1025
	function fsserver_list_clearsearchfilter() {
1026
		$this->session->set_userdata('advance_search', 0);

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

@@ 135-147 (lines=13) @@
132
		/*********************************************************************/
133
	}
134
135
	function ipmap_detail_search() {
136
		$ajax_search = $this->input->post('ajax_search', 0);
137
		if ($this->input->post('advance_search', TRUE) == 1) {
138
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
139
			$action = $this->input->post();
140
			unset($action['action']);
141
			unset($action['advance_search']);
142
			$this->session->set_userdata('ipmap_list_search', $action);
143
		}
144
		if (@$ajax_search != 1) {
145
			redirect(base_url() . 'ipmap/ipmap_list/');
146
		}
147
	}
148
149
	function ipmap_detail_clearsearchfilter() {
150
		$this->session->set_userdata('advance_search', 0);

web_interface/astpp/application/modules/opensips/controllers/opensips.php 2 locations

@@ 258-272 (lines=15) @@
255
		echo json_encode($json_data);
256
	}
257
258
	 function opensips_list_search() {
259
//alert('hgjgh');
260
		$ajax_search = $this->input->post('ajax_search', 0);
261
//alert();
262
		if ($this->input->post('advance_search', TRUE) == 1) {
263
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
264
			$action = $this->input->post();
265
			unset($action['action']);
266
			unset($action['advance_search']);
267
			$this->session->set_userdata('opensipsdevice_list_search', $action);
268
		}
269
		if (@$ajax_search != 1) {
270
			redirect(base_url() . 'opensips/opensips_list/');
271
		}
272
	}
273
	function opensips_list_clearsearchfilter() {
274
			$this->session->set_userdata('advance_search','');
275
			$this->session->set_userdata('opensipsdevice_list_search','');
@@ 363-374 (lines=12) @@
360
		echo json_encode($json_data);
361
	}
362
363
	function dispatcher_list_search() {
364
		$ajax_search = $this->input->post('ajax_search', 0);
365
		if ($this->input->post('advance_search', TRUE) == 1) {
366
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
367
			unset($_POST['action']);
368
			unset($_POST['advance_search']);
369
			$this->session->set_userdata('opensipsdispatcher_list_search', $this->input->post());
370
		}
371
		if (@$ajax_search != 1) {
372
			redirect(base_url() . 'opensips/dispatcher_list/');
373
		}
374
	}
375
376
	function dispatcher_list_clearsearchfilter() {
377
		$this->session->set_userdata('advance_search', 0);

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

@@ 79-92 (lines=14) @@
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
82
		if ($this->input->post('advance_search', TRUE) == 1) {
83
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
84
			$action = $this->input->post();
85
			unset($action['action']);
86
			unset($action['advance_search']);
87
			$this->session->set_userdata('package_list_search', $action);
88
		}
89
		if (@$ajax_search != 1) {
90
			redirect(base_url() . 'package/package_list/');
91
		}
92
	}
93
    
94
	function package_list_clearsearchfilter() {
95
		$this->session->set_userdata('advance_search', 0);

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

@@ 113-126 (lines=14) @@
110
	  $this->db->insert("routing",$routing_arr);
111
	}
112
	}
113
	function price_list_search() {
114
		$ajax_search = $this->input->post('ajax_search', 0);
115
116
		if ($this->input->post('advance_search', TRUE) == 1) {
117
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
118
			$action = $this->input->post();
119
			unset($action['action']);
120
			unset($action['advance_search']);
121
			$this->session->set_userdata('price_list_search', $action);
122
		}
123
		if (@$ajax_search != 1) {
124
			redirect(base_url() . 'accounts/customer_list/');
125
		}
126
	}
127
128
	function price_list_clearsearchfilter() {
129
		$this->session->set_userdata('advance_search', 0);

web_interface/astpp/application/modules/rates/controllers/rates.php 6 locations

@@ 462-475 (lines=14) @@
459
		}
460
	}
461
462
	function origination_rates_list_search() {
463
		$ajax_search = $this->input->post('ajax_search', 0);
464
465
		if ($this->input->post('advance_search', TRUE) == 1) {
466
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
467
			$action = $this->input->post();
468
			unset($action['action']);
469
			unset($action['advance_search']);
470
			$this->session->set_userdata('origination_rate_list_search', $action);
471
		}
472
		if (@$ajax_search != 1) {
473
			redirect(base_url() . 'rates/origination_rates_list/');
474
		}
475
	}
476
477
	function origination_rates_list_clearsearchfilter() {
478
		$this->session->set_userdata('advance_search', 0);
@@ 595-608 (lines=14) @@
592
		$this->load->view('view_termination_rate_add_edit', $data);
593
	}
594
595
	function termination_rates_list_search() {
596
		$ajax_search = $this->input->post('ajax_search', 0);
597
598
		if ($this->input->post('advance_search', TRUE) == 1) {
599
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
600
			$action = $this->input->post();
601
			unset($action['action']);
602
			unset($action['advance_search']);
603
			$this->session->set_userdata('termination_rates_list_search', $action);
604
		}
605
		if (@$ajax_search != 1) {
606
			redirect(base_url() . 'rates/termination_rates_list/');
607
		}
608
	}
609
610
	function termination_rates_list_clearsearchfilter() {
611
		$this->session->set_userdata('advance_search', 0);
@@ 673-686 (lines=14) @@
670
		echo json_encode($json_data);
671
	}
672
673
	function user_origination_rate_list_search() {
674
		$ajax_search = $this->input->post('ajax_search', 0);
675
676
		if ($this->input->post('advance_search', TRUE) == 1) {
677
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
678
			$action = $this->input->post();
679
			unset($action['action']);
680
			unset($action['advance_search']);
681
			$this->session->set_userdata('origination_rate_list_search', $action);
682
		}
683
		if (@$ajax_search != 1) {
684
			redirect(base_url() . 'user/user_rates_list/');
685
		}
686
	}
687
688
	function user_origination_rate_list_clearsearchfilter() {
689
		$this->session->set_userdata('advance_search', 0);
@@ 967-981 (lines=15) @@
964
//        $json_data['rows'] = $this->form->build_grid($query, $grid_fields);
965
		echo json_encode($json_data);
966
	}
967
	function resellersrates_list_search() {
968
		$ajax_search = $this->input->post('ajax_search', 0);
969
970
		if ($this->input->post('advance_search', TRUE) == 1) {
971
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
972
			$action = $this->input->post();
973
            
974
			unset($action['action']);
975
			unset($action['advance_search']);
976
			$this->session->set_userdata('resellerrates_list_search', $action);
977
		}
978
		if (@$ajax_search != 1) {
979
			redirect(base_url() . 'rates/resellersrates_list/');
980
		}
981
	}
982
	function resellersrates_list_clearsearchfilter() {
983
		$this->session->set_userdata('advance_search', 0);
984
		$this->session->set_userdata('resellerrates_list_search', "");
@@ 1022-1034 (lines=13) @@
1019
ASTPP  3.0 
1020
Batch delete
1021
***********/
1022
	function termination_rates_list_batch_delete() {
1023
		$ajax_search = $this->input->post('ajax_search', 0);
1024
		if ($this->input->post('advance_search', TRUE) == 1) {
1025
			$this->session->set_userdata('advance_batch_delete', $this->input->post('advance_search'));
1026
			$action = $this->input->post();
1027
			unset($action['action']);
1028
			unset($action['advance_search']);
1029
			$this->session->set_userdata('termination_rates_list_search', $action);
1030
		}
1031
		if (@$ajax_search != 1) {
1032
			redirect(base_url() . 'rates/termination_rates_list/');
1033
		}
1034
	}
1035
	function origination_rates_list_batch_delete() {
1036
		$ajax_search = $this->input->post('ajax_search', 0);
1037
		if ($this->input->post('advance_search', TRUE) == 1) {
@@ 1035-1047 (lines=13) @@
1032
			redirect(base_url() . 'rates/termination_rates_list/');
1033
		}
1034
	}
1035
	function origination_rates_list_batch_delete() {
1036
		$ajax_search = $this->input->post('ajax_search', 0);
1037
		if ($this->input->post('advance_search', TRUE) == 1) {
1038
			$this->session->set_userdata('advance_batch_delete', $this->input->post('advance_search'));
1039
			$action = $this->input->post();
1040
			unset($action['action']);
1041
			unset($action['advance_search']);
1042
			$this->session->set_userdata('origination_rate_list_search', $action);
1043
		}
1044
		if (@$ajax_search != 1) {
1045
			redirect(base_url() . 'rates/origination_rates_list/');
1046
		}
1047
	}
1048
/*************************/
1049
}
1050
?>

web_interface/astpp/application/modules/reports/controllers/reports.php 6 locations

@@ 169-181 (lines=13) @@
166
		exit();
167
	}
168
169
	function customerReport_search() {
170
		$ajax_search = $this->input->post('ajax_search', 0);
171
		if ($this->input->post('advance_search', TRUE) == 1) {
172
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
173
			$action = $this->input->post();
174
			unset($action['action']);
175
			unset($action['advance_search']);
176
			$this->session->set_userdata('customer_cdr_list_search', $action);
177
		}
178
		if (@$ajax_search != 1) {
179
			redirect(base_url() . 'reports/customerReport/');
180
		}
181
	}
182
183
	function customerReport_clearsearchfilter() {
184
		$this->session->set_userdata('advance_search', 0);
@@ 378-390 (lines=13) @@
375
		echo json_encode($json_data);
376
	}
377
378
	function resellerReport_search() {
379
		$ajax_search = $this->input->post('ajax_search', 0);
380
		if ($this->input->post('advance_search', TRUE) == 1) {
381
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
382
			$action = $this->input->post();
383
			unset($action['action']);
384
			unset($action['advance_search']);
385
			$this->session->set_userdata('reseller_cdr_list_search', $action);
386
		}
387
		if (@$ajax_search != 1) {
388
			redirect(base_url() . 'reports/resellerReport/');
389
		}
390
	}
391
392
	function resellerReport_clearsearchfilter() {
393
		$this->session->set_userdata('advance_search', 0);
@@ 505-517 (lines=13) @@
502
		echo json_encode($json_data);
503
	}
504
505
	function providerReport_search() {
506
		$ajax_search = $this->input->post('ajax_search', 0);
507
		if ($this->input->post('advance_search', TRUE) == 1) {
508
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
509
			$action = $this->input->post();
510
			unset($action['action']);
511
			unset($action['advance_search']);
512
			$this->session->set_userdata('provider_cdr_list_search', $action);
513
		}
514
		if (@$ajax_search != 1) {
515
			redirect(base_url() . 'reports/providerReport/');
516
		}
517
	}
518
519
	function providerReport_clearsearchfilter() {
520
		$this->session->set_userdata('advance_search', 0);
@@ 609-621 (lines=13) @@
606
		echo json_encode($json_data);
607
	}
608
609
	function user_refillreport_search() {
610
		$ajax_search = $this->input->post('ajax_search', 0);
611
		if ($this->input->post('advance_search', TRUE) == 1) {
612
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
613
			$action = $this->input->post();
614
			unset($action['action']);
615
			unset($action['advance_search']);
616
			$this->session->set_userdata('cdr_refill_search', $action);
617
		}
618
		if (@$ajax_search != 1) {
619
			redirect(base_url() . 'user/user_cdrs_report/');
620
		}
621
	}
622
623
	function user_refillreport_clearsearchfilter() {
624
		$this->session->set_userdata('advance_search', 0);
@@ 719-731 (lines=13) @@
716
		array_to_csv($customer_array, 'Refill_Report_' . date("Y-m-d") . '.csv');
717
	}
718
719
	function customer_refillreport_search() {
720
		$ajax_search = $this->input->post('ajax_search', 0);
721
		if ($this->input->post('advance_search', TRUE) == 1) {
722
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
723
			$action = $this->input->post();
724
			unset($action['action']);
725
			unset($action['advance_search']);
726
			$this->session->set_userdata('cdr_refill_search', $action);
727
		}
728
		if (@$ajax_search != 1) {
729
			redirect(base_url() . 'user/user_cdrs_report/');
730
		}
731
	}
732
733
	function customer_refillreport_clearsearchfilter() {
734
		$this->session->set_userdata('advance_search', 0);
@@ 842-854 (lines=13) @@
839
	}
840
	  echo json_encode($json_data);
841
	}
842
	function charges_history_search() {
843
		$ajax_search = $this->input->post('ajax_search', 0);
844
		if ($this->input->post('advance_search', TRUE) == 1) {
845
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
846
			$action = $this->input->post();
847
			unset($action['action']);
848
			unset($action['advance_search']);
849
			$this->session->set_userdata('charges_list_search', $action);
850
		}
851
		if (@$ajax_search != 1) {
852
			redirect(base_url() . 'accounts/admin_list/');
853
		}
854
	}
855
856
	function charges_history_clearsearchfilter() {
857
		$this->session->set_userdata('advance_search', 0);

web_interface/astpp/application/modules/systems/controllers/systems.php 4 locations

@@ 51-63 (lines=13) @@
48
		$this->load->view('view_configuration_add_edit', $data);
49
	}
50
51
	function configuration_search() {
52
		$ajax_search = $this->input->post('ajax_search', 0);
53
		if ($this->input->post('advance_search', TRUE) == 1) {
54
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
55
			$action = $this->input->post();
56
			unset($action['action']);
57
			unset($action['advance_search']);
58
			$this->session->set_userdata('configuration_search', $action);
59
		}
60
		if (@$ajax_search != 1) {
61
			redirect(base_url() . 'systems/configuration/');
62
		}
63
	}
64
65
	function configuration_clearsearchfilter() {
66
		$this->session->set_userdata('advance_search', 0);
@@ 237-250 (lines=14) @@
234
		}
235
		$this->load->view('view_template_add_edit', $data);   
236
	}
237
	function template_search() {
238
		$ajax_search = $this->input->post('ajax_search', 0);
239
240
		if ($this->input->post('advance_search', TRUE) == 1) {
241
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
242
			$action = $this->input->post();
243
			unset($action['action']);
244
			unset($action['advance_search']);
245
			$this->session->set_userdata('template_search', $action);
246
		}
247
		if (@$ajax_search != 1) {
248
			redirect(base_url() . 'systems/template/');
249
		}
250
	}
251
252
	function template_clearsearchfilter() {
253
		$this->session->set_userdata('advance_search', 0);
@@ 285-298 (lines=14) @@
282
		echo json_encode($json_data);
283
	}
284
    
285
	function country_list_search() {
286
		$ajax_search = $this->input->post('ajax_search', 0);
287
	
288
		if ($this->input->post('advance_search', TRUE) == 1) {
289
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
290
			$action = $this->input->post();
291
			unset($action['action']);
292
			unset($action['advance_search']);
293
			$this->session->set_userdata('country_list_search', $action);
294
		}
295
		if (@$ajax_search != 1) {
296
			redirect(base_url() . 'systems/country_list/');
297
		}
298
	}
299
300
	function country_list_clearsearchfilter() {
301
		$this->session->set_userdata('advance_search', 0);
@@ 397-410 (lines=14) @@
394
		echo json_encode($json_data);
395
	}
396
397
	function currency_list_search() {
398
		$ajax_search = $this->input->post('ajax_search', 0);
399
	
400
		if ($this->input->post('advance_search', TRUE) == 1) {
401
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
402
			$action = $this->input->post();
403
			unset($action['action']);
404
			unset($action['advance_search']);
405
			$this->session->set_userdata('currency_list_search', $action);
406
		}
407
		if (@$ajax_search != 1) {
408
			redirect(base_url() . 'systems/currency_list/');
409
		}
410
	}
411
412
	function currency_list_clearsearchfilter() {
413
		$this->session->set_userdata('advance_search', 0);

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

@@ 109-122 (lines=14) @@
106
		}
107
	}
108
109
	function trunk_list_search() {
110
		$ajax_search = $this->input->post('ajax_search', 0);
111
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
			$this->session->set_userdata('trunk_list_search', $action);
118
		}
119
		if (@$ajax_search != 1) {
120
			redirect(base_url() . 'trunk/trunk_list/');
121
		}
122
	}
123
124
	function trunk_list_clearsearchfilter() {
125
		$this->session->set_userdata('advance_search', 0);

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

@@ 1919-1931 (lines=13) @@
1916
		$this->session->set_userdata('admin_list_search', "");
1917
	}
1918
1919
	function admin_list_search() {
1920
		$ajax_search = $this->input->post('ajax_search', 0);
1921
		if ($this->input->post('advance_search', TRUE) == 1) {
1922
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
1923
			$action = $this->input->post();
1924
			unset($action['action']);
1925
			unset($action['advance_search']);
1926
			$this->session->set_userdata('admin_list_search', $action);
1927
		}
1928
		if (@$ajax_search != 1) {
1929
			redirect(base_url() . 'accounts/admin_list/');
1930
		}
1931
	}
1932
1933
	function reseller_list_clearsearchfilter() {
1934
		$this->session->set_userdata('advance_search', 0);

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

@@ 430-443 (lines=14) @@
427
		redirect(base_url() . 'email/email_history_list/');
428
429
	}
430
	function email_history_list_search() {
431
		$ajax_search = $this->input->post('ajax_search', 0);
432
433
		if ($this->input->post('advance_search', TRUE) == 1) {
434
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
435
			$action = $this->input->post();
436
			unset($action['action']);
437
			unset($action['advance_search']);
438
			$this->session->set_userdata('email_search_list', $action);
439
		}
440
		if (@$ajax_search != 1) {
441
			redirect(base_url() . 'email/email_history_list/');
442
		}
443
	}
444
445
	function email_history_list_clearsearchfilter() {
446
		$this->session->set_userdata('advance_search', 0);

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

@@ 599-610 (lines=12) @@
596
		$json_data['rows'] = $this->form->build_grid($query, $grid_fields);
597
		echo json_encode($json_data);
598
	}
599
	function user_emails_search(){
600
		$ajax_search = $this->input->post('ajax_search', 0);
601
		if ($this->input->post('advance_search', TRUE) == 1) {
602
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
603
			$action = $this->input->post();
604
			unset($action['action'],$action['advance_search']);
605
			$this->session->set_userdata('user_emails_search', $action);
606
		}
607
		if (@$ajax_search != 1) {
608
			redirect(base_url() . 'user/user_emails/');
609
		}
610
	}
611
	function user_emails_clearsearchfilter(){
612
		$this->session->set_userdata('advance_search', 0);
613
		$this->session->set_userdata('user_emails_search', "");
@@ 1194-1206 (lines=13) @@
1191
		echo json_encode($json_data);
1192
	}
1193
1194
	function user_ipmap_search(){
1195
		$ajax_search = $this->input->post('ajax_search', 0);
1196
		if ($this->input->post('advance_search', TRUE) == 1) {
1197
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
1198
			$action = $this->input->post();
1199
			unset($action['action']);
1200
			unset($action['advance_search']);
1201
			$this->session->set_userdata('user_ipmap_search', $action);
1202
		}
1203
		if (@$ajax_search != 1) {
1204
			redirect(base_url() . 'user/user_ipmap/');
1205
		}
1206
	}
1207
    
1208
	function user_ipmap_clearsearchfilter(){
1209
		$this->session->set_userdata('advance_search', 0);
@@ 1285-1297 (lines=13) @@
1282
		}
1283
		echo json_encode($json_data);
1284
	}
1285
	function user_sipdevices_search() {
1286
		$ajax_search = $this->input->post('ajax_search', 0);
1287
		if ($this->input->post('advance_search', TRUE) == 1) {
1288
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
1289
			$action = $this->input->post();
1290
			unset($action['action']);
1291
			unset($action['advance_search']);
1292
			$this->session->set_userdata('user_sipdevices_search', $action);
1293
		}
1294
		if (@$ajax_search != 1) {
1295
			redirect(base_url() . 'user/user_sipdevices/');
1296
		}
1297
	}
1298
    
1299
	function user_sipdevices_clearsearchfilter() {
1300
		$this->session->set_userdata('advance_search', 0);
@@ 1673-1686 (lines=14) @@
1670
		$this->session->set_userdata('user_opensips_search', "");
1671
	}
1672
1673
	function user_opensips_search() {
1674
		$ajax_search = $this->input->post('ajax_search', 0);
1675
1676
		if ($this->input->post('advance_search', TRUE) == 1) {
1677
			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
1678
			$action = $this->input->post();
1679
			unset($action['action']);
1680
			unset($action['advance_search']);
1681
			$this->session->set_userdata('user_opensips_search', $action);
1682
		}
1683
		if ($ajax_search != 1) {
1684
			redirect(base_url() . 'user/user_opensips/');
1685
		}
1686
	}
1687
1688
	function user_opensips_add() {
1689
	$accountinfo = $this->session->userdata("accountinfo");