You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
1.1 KiB

<?php
if (!defined('_ECRIRE_INC_VERSION')) return;
function formulaires_spipr_educ_recherche_educnat_charger_dist() {
$req_sql=sql_select('*','spip_spipr_educ',"nom='recherche_educnat' AND type='gestion bloc' AND nom_sauvegarde='en_cours_d_utilisation_SPIPr'");
$tab_sql=sql_fetch($req_sql);
$valeurs['rechercheEducnat']= ($tab_sql['parametre1'] ? $tab_sql['parametre1'] : '');
return $valeurs;
}
function formulaires_spipr_educ_recherche_educnat_traiter_dist() {
$decompte=0;
$tab_request=array();
if (_request('hidden_recherche_educnat')=='ok') {
$req_mots_cles=sql_select('id_mot','spip_mots','','titre');
while ($mot = sql_fetch($req_mots_cles)){
if (_request('mot'.$mot['id_mot'])=='on') {
$tab_request[]=$mot['id_mot'];
$decompte++;
}
};
if ($decompte>10) {$res['message_erreur']="Merci de choisir moins de 10 mots-clés";}
else {
$res['message_ok'] = _T('config_info_enregistree');
sql_updateq('spip_spipr_educ',array('parametre1' => implode(",",$tab_request)),"nom='recherche_educnat' AND type='gestion bloc' AND nom_sauvegarde='en_cours_d_utilisation_SPIPr'");
}
}
return $res;
}
?>