Code Duplication    Length = 8-8 lines in 4 locations

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

@@ 902-909 (lines=8) @@
899
900
	/************************************ */
901
902
	function build_edit_button_restore($button_params, $linkid) {
903
		$link = base_url() . $button_params->url . "" . $linkid;
904
		if ($button_params->mode == 'popup') {
905
			return '<a href="' . $link . '" class="btn btn-royelblue btn-sm" rel="facebox" title="Restore" onClick="return get_alert_msg();"><i class="fa fa-reorder fa-fw"></i></a>&nbsp;';
906
		} else {
907
			return '<a href="' . $link . '" class="btn btn-royelblue btn-sm" title="Restore" onClick="return get_alert_msg_restore();"><i class="fa fa-reorder fa-fw"></i></a>&nbsp;';
908
		}
909
	}
910
911
	function build_delete_button($url, $linkid) {
912
		$flag='0';
@@ 971-978 (lines=8) @@
968
		}
969
	}
970
971
	function build_add_taxes_button($button_params, $linkid) {
972
		$link = base_url() . $button_params->url . "" . $linkid;
973
		if ($button_params->mode == 'popup') {
974
			return '<a href="' . $link . '" class="btn btn-royelblue btn-sm" rel="facebox" title="Add Account Taxes"><i class="fa fa-reorder fa-fw"></i></a>&nbsp;';
975
		} else {
976
			return '<a href="' . $link . '" class="btn btn-royelblue btn-sm" title="Add Account Taxes"><i class="fa fa-reorder fa-fw"></i></a>&nbsp;';
977
		}
978
	}
979
980
	function build_add_download_database_button($url, $linkid) {
981
		$link = base_url() . $url . "" . $linkid;
@@ 985-992 (lines=8) @@
982
		return '<a href="' . $link . '" class="btn btn-royelblue btn-sm "  title="Download Database" ><i class="fa-fw fa fa-file-archive-o"></i></a>&nbsp;';
983
	}
984
985
	function build_add_callerid_button($button_params, $linkid) {
986
		$link = base_url() . $button_params->url . "" . $linkid;
987
		if ($button_params->mode == 'popup') {
988
			return '<a href="' . $link . '" class="btn btn-royelblue btn-sm" rel="facebox" title="Force Caller Id"><i class="fa fa-mobile-phone fa-fw"></i></a>&nbsp;';
989
		} else {
990
			return '<a href="' . $link . '" class="btn btn-royelblue btn-sm" title="CallerID"><i class="fa fa-mobile-phone fa-fw"></i></a>&nbsp;';
991
		}
992
	}
993
994
	function build_start_button($url, $linkid) {
995
		$link = base_url() . $url . "" . $linkid;
@@ 1030-1037 (lines=8) @@
1027
     * Version 2.1
1028
     */
1029
1030
	function build_edit_button_resend($button_params, $linkid) {
1031
		$link = base_url() . $button_params->url . "" . $linkid;
1032
		if ($button_params->mode == 'popup') {
1033
			return '<a href="' . $link . '" class="btn btn-royelblue btn-sm" rel="facebox" title="Resend Mail"><i class="fa fa-repeat"></i></a>&nbsp;';
1034
		} else {
1035
			return '<a href="' . $link . '" class="btn btn-royelblue btn-sm" title="Resend Mail"><i class="fa fa-repeat"></i></a>&nbsp;';
1036
		}
1037
	}
1038
1039
	/*
1040
     * ----------------------------------------------------------------------------