forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added option for external users only
- Loading branch information
sunsetsystems
committed
Jul 20, 2009
1 parent
257991b
commit 14799ca
Showing
1 changed file
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
// Copyright (C) 2006-2008 Rod Roark <[email protected]> | ||
// Copyright (C) 2006-2009 Rod Roark <[email protected]> | ||
// | ||
// This program is free software; you can redistribute it and/or | ||
// modify it under the terms of the GNU General Public License | ||
|
@@ -14,11 +14,13 @@ | |
$form_fname = trim($_POST['form_fname']); | ||
$form_lname = trim($_POST['form_lname']); | ||
$form_specialty = trim($_POST['form_specialty']); | ||
$form_external = $_POST['form_external'] ? 1 : 0; | ||
|
||
$query = "SELECT * FROM users WHERE active = 1 AND ( authorized = 1 OR username = '' ) "; | ||
if ($form_lname) $query .= "AND lname LIKE '$form_lname%' "; | ||
if ($form_fname) $query .= "AND fname LIKE '$form_fname%' "; | ||
if ($form_specialty) $query .= "AND specialty LIKE '%$form_specialty%' "; | ||
if ($form_external) $query .= "AND username = '' "; | ||
$query .= "ORDER BY lname, fname, mname LIMIT 500"; | ||
$res = sqlStatement($query); | ||
?> | ||
|
@@ -63,15 +65,18 @@ function doedclick(userid) { | |
<table> | ||
<tr class='search'> <!-- bgcolor='#ddddff' --> | ||
<td> | ||
<?php xl('First Name:','e')?> | ||
<?php xl('First Name','e')?>: | ||
<input type='text' name='form_fname' size='10' value='<?php echo $form_fname; ?>' | ||
class='inputtext' title='<?php xl("All or part of the first name","e") ?>' /> | ||
<?php xl('Last Name:','e')?> | ||
<?php xl('Last Name','e')?>: | ||
<input type='text' name='form_lname' size='10' value='<?php echo $form_lname; ?>' | ||
class='inputtext' title='<?php xl("All or part of the last name","e") ?>' /> | ||
<?php xl('Specialty:','e')?> | ||
<?php xl('Specialty','e')?>: | ||
<input type='text' name='form_specialty' size='10' value='<?php echo $form_specialty; ?>' | ||
class='inputtext' title='<?php xl("Any part of the desired specialty","e") ?>' /> | ||
class='inputtext' title='<?php xl("Any part of the desired specialty","e") ?>' /> | ||
<input type='checkbox' name='form_external' value='1'<?php if ($form_external) echo ' checked'; ?> | ||
title='<?php xl("Omit internal users?","e") ?>' /> | ||
<?php xl('External Only','e')?> | ||
<input type='submit' class='button' name='form_search' value='<?php xl("Search","e")?>' /> | ||
</td> | ||
<td align='right'> | ||
|