From: x2000bedo Date: Sat, 27 Nov 2004 12:01:54 +0000 (+0000) Subject: Closes FS#189 X-Git-Tag: xorg/old~775 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=48f4b39d639b7c32589ebd71728b9fdd2b2580ae;p=platal.git Closes FS#189 + correct xhtml problem on "recherche trop générale" --- diff --git a/htdocs/advanced_search.php b/htdocs/advanced_search.php index fa6c0be..56f2658 100644 --- a/htdocs/advanced_search.php +++ b/htdocs/advanced_search.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: advanced_search.php,v 1.33 2004-11-22 20:04:35 x2000habouzit Exp $ + $Id: advanced_search.php,v 1.34 2004-11-27 12:01:54 x2000bedo Exp $ ***************************************************************************/ require_once("xorg.inc.php"); @@ -42,11 +42,18 @@ function form_prepare() { $page->mysql_assign($sql,'choix_sections'); $sql = 'SELECT id,text FROM applis_def ORDER BY text'; $page->mysql_assign($sql,'choix_schools'); - $sql = 'DESCRIBE applis_def type'; + if (empty($_REQUEST['school'])) + $sql = 'DESCRIBE applis_def type'; + else + $sql = 'SELECT type FROM applis_def WHERE id='.$_REQUEST['school']; $result = $globals->db->query($sql); $row = mysql_fetch_row($result); - $types = explode('(',$row[1]); - $types = str_replace("'","",substr($types[1],0,-1)); + if (empty($_REQUEST['school'])) { + $types = explode('(',$row[1]); + $types = str_replace("'","",substr($types[1],0,-1)); + } + else + $types = $row[0]; $page->assign('choix_diplomas',explode(',',$types)); $sql = 'SELECT id,label FROM emploi_secteur ORDER BY label'; $page->mysql_assign($sql,'choix_secteurs'); @@ -139,6 +146,7 @@ else { new ThrowError('il n\'existe personne correspondant à ces critères dans la base !'); } if($page->get_template_vars('nb_resultats_total')>800) { + form_prepare(); new ThrowError('Recherche trop générale'); } diff --git a/templates/search.adv.form.tpl b/templates/search.adv.form.tpl index 4f4180b..bdb9955 100644 --- a/templates/search.adv.form.tpl +++ b/templates/search.adv.form.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: search.adv.form.tpl,v 1.1 2004-11-04 13:50:45 x2000habouzit Exp $ + $Id: search.adv.form.tpl,v 1.2 2004-11-27 12:01:57 x2000bedo Exp $ ***************************************************************************}

Recherche avancée

@@ -212,7 +212,7 @@ Formation - {section name=school loop=$choix_schools}