$searchkey = strtr($searchkey, '*?', '%_');
    # Save the search keyword for eventual pagination routines
    if ($mode == 'search') {
        $_SESSION['sess_searchkey'] = $searchkey;
    }
    $search_result =& $pers_obj->searchLimitPersonellBasicInfo($searchkey, $pagen->MaxCount(), $pgx, $oitem, $odir);
    //echo $pers_obj->getLastQuery();
    # Get the resulting record count
    $linecount = $pers_obj->LastRecordCount();
    //$linecount=$address_obj->LastRecordCount();
    $pagen->setTotalBlockCount($linecount);
    # Count total available data
    if (isset($totalcount) && $totalcount) {
        $pagen->setTotalDataCount($totalcount);
    } else {
        @$pers_obj->searchPersonellBasicInfo($searchkey, '');
        # The second param is empty to prevent sorting
        $totalcount = $pers_obj->LastRecordCount();
        $pagen->setTotalDataCount($totalcount);
    }
    $pagen->setSortItem($oitem);
    $pagen->setSortDirection($odir);
}
# Load the common icons
$img_options_contact = createComIcon($root_path, 'violet_phone.gif', '0');
$img_options_delete = createComIcon($root_path, 'delete2.gif', '0');
# Prepare page title
$sTitle = "{$LDDocsList} :: ";
$LDvar = $dept_obj->LDvar();
if (isset(${$LDvar}) && ${$LDvar}) {
    $sTitle = $sTitle . ${$LDvar};
        $stitle = 'I';
        break;
    case 'rotating':
        $stitle = 'O';
        break;
    case 'ana':
        $element = 'an_doctor';
        //$maxelement=10;
        break;
    default:
        header('Location:' . $root_path . '/language/' . $lang . '/lang_' . $lang . '_invalid-access-warning.php');
        exit;
}
$thisfile = basename($_SERVER['PHP_SELF']);
$forwardfile = "op-pflege-log-getinfo.php?sid={$sid}&lang={$lang}&winid={$winid}&mode=save&enc_nr={$enc_nr}&dept_nr={$dept_nr}&saal={$saal}&pyear={$pyear}&pmonth={$pmonth}&pday={$pday}&op_nr={$op_nr}";
$search = $pers_obj->searchPersonellBasicInfo($inputdata);
?>

<?php 
html_rtl($lang);
?>
<HEAD>
<?php 
echo setCharSet();
?>
<TITLE><?php 
echo $title;
?>
</TITLE>

<script language="javascript">