Code Duplication    Length = 31-33 lines in 2 locations

programs/utilit/agent.ui.php 2 locations

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