[[catalogFilter?
&tpl=`engineer-card-preview`
&limit=`18`
&parents=`8`
&fields=`
surname,
name,
patronymic,
snils,
fullname,
certificate_number,
registry_number`,
availability_of_valid_qualification_certificate,
certificate_date,
certificate_date_cancellation
]]
$filter = array();
if($_GET['surname']) {
$filter[] = 'surname LIKE '.'"%'.$_GET['surname'].'%"';
}
if($_GET['name']) {
$filter[] = 'name LIKE '.'"%'.$_GET['name'].'%"';
}
if($_GET['patronymic']) {
$filter[] = 'patronymic LIKE '.'"%'.$_GET['patronymic'].'%"';
}
if($_GET['registry_number']) {
$filter[] = 'registry_number LIKE '.'"%'.$_GET['registry_number'].'%"';
}
if($_GET['snils']) {
$filter[] = 'snils LIKE '.'"%'.$_GET['snils'].'%"';
}
if($_GET['certificate_number']) {
$filter[] = 'certificate_number LIKE '.'"%'.$_GET['certificate_number'].'%"';
}
$offset = 0;
if($_GET['offset']){
$offset = $_GET['offset'];
}
if($filter) {
$where = $modx->toJSON(array($filter));
} else {
$where = '';
}
$params = array(
'parents' => $parents,
'limit' => $limit,
'offset' => $offset,
'tpl' => $tpl,
'&cache' => '1',
'select' => 'id,pagetitle,introtext,content,uri',
'includeTVs' => $fields,
'showHidden' => '0',
'pageLinkScheme'=>'[[+pageVarKey]]-[[+page]]',
'sortby' => $sortby,
'sortdir' => $sortdir,
'showLog'=> '0',
'where' => $where,
'pageLimit'=>'7',
'maxLimit'=>'18',
);
return $modx->runSnippet('pdoPage',$params).$button;