<?php
 if (isset($R['idOffice'])) $S['adminReport']['accessUsersFilters']['idOffice']=$R['idOffice']; if (isset($R['idDepartment'])) $S['adminReport']['accessUsersFilters']['idDepartment']=$R['idDepartment']; if (is_array($R['userAccess'])) { foreach($R['userAccess'] as $idUser=>$checked) { if ($checked) $S['adminReport']['accessUsers'][$idUser]=1; else unset($S['adminReport']['accessUsers'][$idUser]); } } ?>