Code Duplication    Length = 31-33 lines in 2 locations

programs/utilit/agent.ui.php 2 locations

@@ 777-809 (lines=33) @@
774
775
776
777
	public function previoususer() {
778
779
		static $i = 0;
780
781
		if (0 === $i) {
782
783
			$id_user = $this->getUserInManagerList('<','DESC');
784
			if (!$id_user) {
785
				return false;
786
			}
787
788
			$this->previous = bab_toHtml(bab_getUserName($id_user));
789
790
			require_once $GLOBALS['babInstallPath'] . 'utilit/urlincl.php';
791
			$url = bab_url::request_gp();
792
793
			if (bab_rp('idu')) {
794
				$url = bab_url::mod($url, 'idu', $id_user);
795
			}
796
797
			if (bab_rp('id_user')) {
798
				$url = bab_url::mod($url, 'id_user', $id_user);
799
			}
800
801
			$this->previousurl = bab_toHtml($url);
802
803
804
			$i++;
805
			return true;
806
		}
807
808
		return false;
809
	}
810
811
	public function nextuser() {
812
@@ 811-841 (lines=31) @@
808
		return false;
809
	}
810
811
	public function nextuser() {
812
813
		static $i = 0;
814
815
		if (0 === $i) {
816
817
			$id_user = $this->getUserInManagerList('>','ASC');
818
			if (!$id_user) {
819
				return false;
820
			}
821
822
			$this->next = bab_toHtml(bab_getUserName($id_user));
823
824
			require_once $GLOBALS['babInstallPath'] . 'utilit/urlincl.php';
825
			$url = bab_url::request_gp();
826
			if (bab_rp('idu')) {
827
				$url = bab_url::mod($url, 'idu', $id_user);
828
			}
829
830
			if (bab_rp('id_user')) {
831
				$url = bab_url::mod($url, 'id_user', $id_user);
832
			}
833
			$this->nexturl = bab_toHtml($url);
834
835
836
			$i++;
837
			return true;
838
		}
839
840
		return false;
841
	}
842
843
}
844