Exemplo n.º 1
0
		$this->arrBest = $tb->fetch(PDO::FETCH_ASSOC);
		return $this->arrBest;
	}
}

$getData = new mainpage_query($pagiPage,$limit,$typePage,$_POST['staff_option'],$searchData);

$getter = $getData ->getDatafromtable($_POST['valComp_filt'],$_POST['valDep_filt'],$_POST['valLoca_filt']);

$counter = 0;
foreach($getter as $arItMs){
$companyName = $getData -> getCompanyById($arItMs['staff_company_id']);
$depName = $getData -> getDepById($arItMs['staff_depart_id']);
$grName = $getData -> getGroupyById($arItMs['staff_group_id']);
//$avatar = $getData -> getAvatar($arItMs['staff_lastname'],$arItMs['staff_name'],$arItMs['staff_secondname']);
$locaName = $getData -> getLocation($arItMs['staff_location']);
$UserMail = $getData -> getMail($arItMs['staff_id']);
	$getter[$counter]['staff_company_id'] = $companyName['company_name'];
	$getter[$counter]['staff_depart_id'] = $depName['department_name'];
	if($arItMs['staff_ats']=='0'){$getter[$counter]['staff_ats'] = '';}
	if($arItMs['staff_group_id']=='0'){$getter[$counter]['staff_group_id'] = '';}else{
		$getter[$counter]['staff_group_id'] = $grName['group_name'];
	}
	if($arItMs['staff_avatar']){$getter[$counter]['staff_avatar'] = $arItMs['staff_avatar'];}else{$getter[$counter]['staff_avatar']='no-image.jpg';}
	$getter[$counter]['staff_location'] = $locaName['location_name'];
	if($arItMs['staff_active'] == '0'){$getter[$counter]['staff_status'] = 'В ожидании';}
	if($arItMs['staff_typedeactive']=='0'){$getter[$counter]['staff_status'] = 'Уволен';}
	if($arItMs['staff_typedeactive']=='1'){$getter[$counter]['staff_status'] = 'Декрет';}
	if($UserMail['email']){$getter[$counter]['staff_email'] = $UserMail['email'];}
$counter ++;
}