diff --git a/admin/donors.php b/admin/donors.php index cc5b608..68f0d50 100644 --- a/admin/donors.php +++ b/admin/donors.php @@ -125,29 +125,54 @@ switch($_GET['action']) { break; case 'newcontactsearch': - $searchstr="1 "; - if($_POST['firstname']) - $searchstr.=" AND firstname LIKE '%".$_POST['firstname']."%'"; - if($_POST['lastname']) - $searchstr.=" AND lastname LIKE '%".$_POST['lastname']."%'"; - if($_POST['email']) - $searchstr.=" AND email LIKE '%".$_POST['email']."%'"; - $q=mysql_query("SELECT *,MAX(year) FROM users WHERE $searchstr GROUP BY uid HAVING deleted='no'"); - $num=mysql_num_rows($q); - if($num==0) { - echo i18n("No existing users match, will create a new user"); - } - else if($num<15) { - echo i18n("Did you mean one of these existing users? (click to choose one)")."
"; - echo ""; + + ?> + + + + "; + echo ""; + } + else { + echo i18n("There are %1 existing users that match, please enter more details",array($num)); + } } echo "
"; exit; @@ -337,6 +362,7 @@ function draw_contact_form($sponsor_id, $contact = null){ if($id == "new"){ echo "\n"; $newcontactsearch="onkeypress=\"return newcontactsearch()\""; + $newcontactsave="id=\"contactnewsave\""; }else{ echo "\n"; echo "\n"; @@ -392,7 +418,7 @@ function draw_contact_form($sponsor_id, $contact = null){ "; + echo ""; echo ""; if($id != "new") echo "";