Code Duplication    Length = 3-3 lines in 4 locations

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

@@ 625-627 (lines=3) @@
622
				$row[$field_arr[2]] = $jsn_tmp[$field_key];
623
			} if(array_search("EDITABLE", $field_arr)){
624
				$ActionArr = $grid_fields[$Actionkey];
625
				if($ActionArr[5]->EDIT->url =="accounts/customer_edit/" || $ActionArr[5]->EDIT->url =="accounts/provider_edit/"){
626
				   $ActionArr[5]->EDIT->url=$row['type']==0 ?  "accounts/customer_edit/"  : "accounts/provider_edit/";
627
				}
628
				if($ActionArr[5]->EDIT->url =="accounts/admin_edit/" || $ActionArr[5]->EDIT->url =="accounts/subadmin_edit/"){
629
				   $ActionArr[5]->EDIT->url=$row['type']==4 ?  "accounts/subadmin_edit/"  : "accounts/admin_edit/";
630
				}
@@ 628-630 (lines=3) @@
625
				if($ActionArr[5]->EDIT->url =="accounts/customer_edit/" || $ActionArr[5]->EDIT->url =="accounts/provider_edit/"){
626
				   $ActionArr[5]->EDIT->url=$row['type']==0 ?  "accounts/customer_edit/"  : "accounts/provider_edit/";
627
				}
628
				if($ActionArr[5]->EDIT->url =="accounts/admin_edit/" || $ActionArr[5]->EDIT->url =="accounts/subadmin_edit/"){
629
				   $ActionArr[5]->EDIT->url=$row['type']==4 ?  "accounts/subadmin_edit/"  : "accounts/admin_edit/";
630
				}
631
				$acctype = "";
632
				if(isset($row["type"]) && ($row["type"] == '0' || $row["type"] == '1' || $row["type"] == '3')){
633
					$acctype = (isset($row["posttoexternal"]) && $row["posttoexternal"] != '')? "<span class='label label-default pull-right'>".$this->CI->common->get_account_type("","",$row["posttoexternal"])."</span>":"";
@@ 726-728 (lines=3) @@
723
 			$row[$field_arr[2]] = $jsn_tmp[$field_key];
724
					  } if(array_search("EDITABLE", $field_arr)){
725
				$ActionArr = $grid_fields[$Actionkey];
726
				if($ActionArr[5]->EDIT->url =="accounts/customer_edit/" || $ActionArr[5]->EDIT->url =="accounts/provider_edit/"){
727
				   $ActionArr[5]->EDIT->url=$row['type']==0 ?  "accounts/customer_edit/"  : "accounts/provider_edit/";
728
				}
729
				if($ActionArr[5]->EDIT->url =="accounts/admin_edit/" || $ActionArr[5]->EDIT->url =="accounts/subadmin_edit/"){
730
				   $ActionArr[5]->EDIT->url=$row['type']==4 ?  "accounts/subadmin_edit/"  : "accounts/admin_edit/";
731
				}
@@ 729-731 (lines=3) @@
726
				if($ActionArr[5]->EDIT->url =="accounts/customer_edit/" || $ActionArr[5]->EDIT->url =="accounts/provider_edit/"){
727
				   $ActionArr[5]->EDIT->url=$row['type']==0 ?  "accounts/customer_edit/"  : "accounts/provider_edit/";
728
				}
729
				if($ActionArr[5]->EDIT->url =="accounts/admin_edit/" || $ActionArr[5]->EDIT->url =="accounts/subadmin_edit/"){
730
				   $ActionArr[5]->EDIT->url=$row['type']==4 ?  "accounts/subadmin_edit/"  : "accounts/admin_edit/";
731
				}
732
				$jsn_tmp[$field_key] = $this->CI->common->build_custome_edit_button($ActionArr[5]->EDIT,$row[$field_arr[2]],$row["id"]);
733
/*******************************/
734
			}else {