Code Duplication    Length = 54-56 lines in 2 locations

programs/vacadmcet.php 1 location

@@ 40-93 (lines=54) @@
37
	public $altbg = true;
38
39
	
40
	public function __construct()
41
	{
42
		$this->t_user = absences_translate('User');
43
		$this->t_right_source = absences_translate('Right source');
44
	 	$this->t_quantity = absences_translate('Quantity');
45
		$this->t_status = absences_translate('Status');
46
		$this-> t_delete = absences_translate('Delete');
47
		$this->t_confirmdelete = absences_translate('Do you really want to delete this CET deposit request? the associated quantity in the time saving account will not be removed');
48
		
49
		
50
		$f = new absences_getRequestSearchForm();
51
		
52
		$this->res = new absences_CetDepositRequestIterator;
53
		$this->res->archived = (int) bab_rp('archived', 0);
54
		
55
		if ($status = $f->param('idstatus'))
56
		{
57
			if ('W' === $status)
58
			{
59
				$status = '';
60
			}
61
			$this->res->status = $status;
62
		}
63
		
64
		if ($userid = $f->param('userid'))
65
		{
66
			$this->res->users = array($userid);
67
		}
68
		
69
		if ($organization = $f->param('organization'))
70
		{
71
		    $this->res->organization = $organization;
72
		}
73
		
74
		$W = bab_Widgets();
75
		$datePicker = $W->DatePicker();
76
		
77
		if ($begin = $datePicker->getISODate($f->param('dateb', null)))
78
		{
79
			$this->res->startFrom = $begin;
80
		}
81
		
82
		if ($end = $datePicker->getISODate($f->param('datee', null)))
83
		{
84
			$this->res->startTo = $end;
85
		}
86
		$this->res->rewind();
87
		
88
		$this->paginate($this->res->count(), self::MAX);
89
		$this->res->seek($this->pos);
90
		
91
		
92
		$this->searchform = $f->getHtmlForm(array('W' => absences_translate("Waiting"), 'Y' => absences_translate("Accepted"), 'N' => absences_translate("Refused")));
93
	}
94
	
95
	
96
	public function getnext()

programs/vacadmwd.php 1 location

@@ 39-94 (lines=56) @@
36
	
37
	public $altbg = true;
38
	
39
	public function __construct()
40
	{
41
		$this->t_user = absences_translate('User');
42
		$this->t_begin = absences_translate('Begin');
43
		$this->t_end = absences_translate('End');
44
		$this->t_type = absences_translate('Type');
45
		$this->t_status = absences_translate('Status');
46
		$this-> t_delete = absences_translate('Delete');
47
		$this->t_confirmdelete = absences_translate('Do you really want to delete this working day? the generated recovery right will not be deleted');
48
		
49
		$f = new absences_getRequestSearchForm();
50
		
51
		$this->res = new absences_WorkperiodRecoverRequestIterator;
52
		$this->res->archived = (int) bab_rp('archived', 0);
53
		
54
		if ($status = $f->param('idstatus'))
55
		{
56
			if ('W' === $status)
57
			{
58
				$status = '';
59
			}
60
			$this->res->status = $status;
61
		}
62
		
63
		if ($userid = $f->param('userid'))
64
		{
65
			$this->res->users = array($userid);
66
		}
67
		
68
		if ($organization = $f->param('organization'))
69
		{
70
		    $this->res->organization = array($organization);
71
		}
72
		
73
		$W = bab_Widgets();
74
		$datePicker = $W->DatePicker();
75
		
76
		if ($begin = $datePicker->getISODate($f->param('dateb', null)))
77
		{
78
			$this->res->startFrom = $begin;
79
		}
80
		
81
		if ($end = $datePicker->getISODate($f->param('datee', null)))
82
		{
83
			$this->res->startTo = $end;
84
		}
85
		
86
		
87
		$this->res->rewind();
88
		
89
		$this->paginate($this->res->count(), self::MAX);
90
		$this->res->seek($this->pos);
91
		
92
		
93
		$this->searchform = $f->getHtmlForm(array('W' => absences_translate("Waiting"), 'Y' => absences_translate("Accepted"), 'N' => absences_translate("Refused")));
94
	}
95
96
97
	public function getnext()