All hi (excuse for my English him badly I know), I have such trouble - do the website, on it there is a filtering field, and so if the person is authorized on the website the filter filters if isn't present, then filtering doesn't happen (for authorization I use addition of login). The filter to be on the homepage, the page is available to all (to a t.a doesn't consist in any group and generally groups aren't set up though there are authorized and not authorized users, meanwhile it didn't turn out to make it).
Filtering happens thus:
The user enters the necessary fields (meanwhile only the State field), GET all this is sent by request to the server (when clicking the button getUser=true is always sent what filtering would work) - the request turns out following
http://mysite.ru/?getUser=true&State=one
if (isset($_GET['getUser'])) {
$state = $_GET['State'];
$q = $modx->newQuery('modUser');
$q->innerJoin('modUserProfile', 'Profile');
$q->where(array(
'Profile.fax:LIKE' => "%$state%"
));
$q->select(array(
"Profile.*",
"modUser.*",
));
$s = $q->prepare();
$s->execute();
while($row = $s->fetch(PDO::FETCH_ASSOC)){
print ' <div class="col-md-6">
<div class="panel panel-success">
<div class="panel-heading">';
print $row['fullname'];
print '</div>
<div class="panel-body">';
print "<img alt='Banner' class='img-thumbnail' src=". '"' . $row['photo'] . '"' . ">";
print "<hr align='center' style='width: 100%;' />";
print "<button type='button' class='btn btn-primary' data-toggle='modal' data-target=". "#" . $row['id'] . ">Button</button>";
print '</div>
</div>
</div>';
}
}
don't prompt in what there can be a problem? I use MODX Revo.