Closes FS #22
authorx2000bedo <x2000bedo>
Tue, 31 Aug 2004 21:02:10 +0000 (21:02 +0000)
committerx2000bedo <x2000bedo>
Tue, 31 Aug 2004 21:02:10 +0000 (21:02 +0000)
Sex in search

htdocs/advanced_search.php
templates/search.form.tpl

index 8d0f28a..19c02a5 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: advanced_search.php,v 1.5 2004-08-31 10:03:28 x2000habouzit Exp $
+        $Id: advanced_search.php,v 1.6 2004-08-31 21:02:10 x2000bedo Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -43,6 +43,7 @@ if (array_key_exists('rechercher', $_REQUEST)) {
     }
     $promo1Field = new PromoSField('promo1','egal1',array('u.promo'),'');
     $promo2Field = new PromoSField('promo2','egal2',array('u.promo'),'');
+    $womanField = new RefSField('woman',array('FIND_IN_SET(i.flags,\'femme\')+1'),'','','');
    
     $townField = new RefSField('ville',array('av.ville'),'adresses','av','u.user_id=av.uid',false);
     $countryField = new RefSField('pays',array('ap.pays'),'adresses','ap','u.user_id=ap.uid');
@@ -60,7 +61,8 @@ if (array_key_exists('rechercher', $_REQUEST)) {
     $schoolField = new RefSField('school',array('as.aid'),'applis_ins','as','u.user_id=as.uid');
     $diplomaField = new RefSField('diploma',array('ad.type'),'applis_ins','ad','u.user_id=ad.uid');
    
-    $fields = new SFieldGroup(true,array($nameField,$firstnameField,$promo1Field,$promo2Field,
+    $fields = new
+    SFieldGroup(true,array($nameField,$firstnameField,$promo1Field,$promo2Field,$womanField,
     $townField,$countryField,$regionField,
     $entrepriseField,$posteField,$secteurField,$cvField,
     $nationaliteField,$binetField,$groupexField,$sectionField,$schoolField,$diplomaField));
index 8884596..05b85d7 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: search.form.tpl,v 1.11 2004-08-31 11:25:39 x2000habouzit Exp $
+        $Id: search.form.tpl,v 1.12 2004-08-31 21:02:12 x2000bedo Exp $
  ***************************************************************************}
 
 <div class="rubrique">
       </tr>
 {if $advanced eq "1"}
       <tr>
+        <td>Sexe</td>
+        <td>
+          <input type="radio" name="woman" value="0" checked="checked" />Homme ou femme&nbsp;
+          <input type="radio" name="woman" value="1" />Homme&nbsp;
+          <input type="radio" name="woman" value="2" />Femme
+        </td>
+      </tr>
+      <tr>
         <th colspan="2">GĂ©ographie</th>
       </tr>
       <tr>