search filter absendername

This commit is contained in:
Sebijk 2023-10-14 14:43:34 +02:00
parent e3436e999a
commit d1aa868c24
2 changed files with 6 additions and 1 deletions

View file

@ -29,6 +29,9 @@
<label for="searchIn_telfaxmobile"><b>{lng p="tel"} / {lng p="fax"} / {lng p="cellphone"}</b></label></td>
</tr>
<tr>
<td><input type="checkbox" name="searchIn[absendername]" id="searchIn_absendername" checked="checked" />
<label for="searchIn_absendername"><b>{lng p="sendername"}</b></label>
</td>
<td><input type="checkbox" id="searchIn_all" checked="checked" onchange="invertSelection(document.forms.f1,'searchIn',true,this.checked)" />
<label for="searchIn_all"><b>{lng p="all"}</b></label></td>
<td colspan="2">&nbsp;</td>

View file

@ -277,7 +277,7 @@ if($_REQUEST['action'] == 'users')
// do the query!
$users = array();
$res = $db->Query('SELECT id,email,vorname,nachname,strasse,hnr,plz,ort,gruppe,gesperrt,lastlogin,profilfelder ' . $theQuery . ' '
$res = $db->Query('SELECT id,email,vorname,nachname,strasse,hnr,plz,ort,gruppe,gesperrt,lastlogin,profilfelder,absendername ' . $theQuery . ' '
. 'ORDER BY ' . $sortBy . ' '
. $sortOrder . ' '
. 'LIMIT ' . $startPos . ',' . $perPage);
@ -903,6 +903,8 @@ else if($_REQUEST['action'] == 'search')
$fields = array_merge($fields, array('strasse', 'hnr', 'plz', 'ort', 'land'));
else if($field == 'telfaxmobile')
$fields = array_merge($fields, array('tel', 'fax', 'mail2sms_nummer'));
else if($field == 'absendername')
$fields[] = 'absendername';
}
// build query string