Code Duplication    Length = 10-10 lines in 2 locations

web_interface/astpp/application/libraries/astpp/form.php 2 locations

@@ 652-661 (lines=10) @@
649
				if ($field_arr[0] == gettext("Action")) {
650
				if(isset($field_arr[5]) && isset($field_arr[5]->EDIT) && isset($field_arr[5]->DELETE)){
651
		             
652
					  if($field_arr[5]->EDIT->url == 'accounts/customer_edit/' || $field_arr[5]->EDIT->url == 'accounts/provider_edit/' || $field_arr[5]->DELETE->url == 'accounts/provider_delete/' ||$field_arr[5]->DELETE->url == 'accounts/customer_delete/'){
653
					   if( $row['type'] == '0'|| strtolower($row['type']) == 'customer'){
654
						$field_arr[5]->EDIT->url ='accounts/customer_edit/';
655
						$field_arr[5]->DELETE->url ='accounts/customer_delete/';
656
					   }
657
					   if($row['type'] == 3 || strtolower($row['type']) == 'provider'){
658
						$field_arr[5]->EDIT->url ='accounts/provider_edit/';
659
						$field_arr[5]->DELETE->url ='accounts/provider_delete/';
660
					   }
661
					  }
662
					  if($field_arr[5]->EDIT->url == 'accounts/admin_edit/' || $field_arr[5]->EDIT->url == 'accounts/subadmin_edit/' || $field_arr[5]->DELETE->url == 'accounts/admin_delete/' ||$field_arr[5]->DELETE->url == 'accounts/subadmin_delete/'){
663
					   if($row['type'] == 2 || strtolower($row['type']) == 'administrator'){
664
						$field_arr[5]->EDIT->url ='accounts/admin_edit/';
@@ 662-671 (lines=10) @@
659
						$field_arr[5]->DELETE->url ='accounts/provider_delete/';
660
					   }
661
					  }
662
					  if($field_arr[5]->EDIT->url == 'accounts/admin_edit/' || $field_arr[5]->EDIT->url == 'accounts/subadmin_edit/' || $field_arr[5]->DELETE->url == 'accounts/admin_delete/' ||$field_arr[5]->DELETE->url == 'accounts/subadmin_delete/'){
663
					   if($row['type'] == 2 || strtolower($row['type']) == 'administrator'){
664
						$field_arr[5]->EDIT->url ='accounts/admin_edit/';
665
						$field_arr[5]->DELETE->url ='accounts/admin_delete/';
666
					   }
667
					   if($row['type'] == 4 || strtolower($row['type']) == 'sub admin'){
668
						$field_arr[5]->EDIT->url ='accounts/subadmin_edit/';
669
						$field_arr[5]->DELETE->url ='accounts/subadmin_delete/';
670
					   }
671
					}
672
			   }
673
/*
674
ASTPP  3.0