'$nom' AND empr_prenom <> '$prenom' LIMIT 1 "; $res = pmb_mysql_query($requete); $nbr_lignes = pmb_mysql_num_rows($res); if ($nbr_lignes) { $empr_login .= $num_login ; $num_login++; } else $pb = 0 ; } return $empr_login; } public static function gestion_groupe($lib_groupe, $empr_cb) { $lib_groupe = trim($lib_groupe); if(!$lib_groupe) { return; } $sel = pmb_mysql_query("SELECT id_groupe from groupe WHERE libelle_groupe = '".addslashes($lib_groupe)."'"); $nb_enreg_grpe = pmb_mysql_num_rows($sel); if (!$nb_enreg_grpe) { //insertion dans la table groupe pmb_mysql_query("INSERT INTO groupe(libelle_groupe) VALUES('".addslashes($lib_groupe)."')"); $groupe=pmb_mysql_insert_id(); } else { $grpobj = pmb_mysql_fetch_object($sel) ; $groupe = $grpobj->id_groupe ; } //insertion dans la table empr_groupe $sel_empr = pmb_mysql_query("SELECT id_empr FROM empr WHERE empr_cb = '".addslashes($empr_cb)."'"); $empr = pmb_mysql_fetch_array($sel_empr); pmb_mysql_query("INSERT INTO empr_groupe(empr_id, groupe_id) VALUES ('$empr[id_empr]','$groupe')"); } public static function get_update_type_radio() { return " (ajoute ou modifie les lecteurs présents dans le fichier)
(modifie les lecteurs présents, supprime les lecteurs absents du fichier) "; } public static function get_locations_selector($name) { global $msg; global $pmb_lecteurs_localises; global $deflt2docs_location; $selector = ""; if ($pmb_lecteurs_localises) { $selector .= " "; $selector .= ""; } else { $selector .= ""; } return $selector; } public static function get_categories_selector($name) { global $msg; $selector = " "; $selector .= ""; return $selector; } public static function get_codestat_selector($name) { global $msg; $selector = " "; $selector .= ""; return $selector; } public static function get_encoded_buffer($buffer) { global $charset; global $encodage_fic_source; if(isset($encodage_fic_source)){ $_SESSION["encodage_fic_source"]=$encodage_fic_source; }elseif(isset($_SESSION["encodage_fic_source"])){ $encodage_fic_source=$_SESSION["encodage_fic_source"]; } if($encodage_fic_source){//On a forcé l'encodage switch ($encodage_fic_source) { case 'iso8859': if($charset == 'utf-8') { if(function_exists("mb_convert_encoding") && ((strpos($buffer,chr(0x92)) !== false) || (strpos($buffer,chr(0x93)) !== false) || (strpos($buffer,chr(0x9c)) !== false) || (strpos($buffer,chr(0x8c)) !== false))){//Pour les caractères windows $buffer = mb_convert_encoding($buffer,"UTF-8","Windows-1252"); }else{ $buffer = utf8_encode($buffer); } } break; case 'iso5426': $buffer=iso2709_record::ISO_646_5426_decode($buffer); if($charset == 'utf-8') { if(function_exists("mb_convert_encoding") && ((strpos($buffer,chr(0x92)) !== false) || (strpos($buffer,chr(0x93)) !== false) || (strpos($buffer,chr(0x9c)) !== false) || (strpos($buffer,chr(0x8c)) !== false))){//Pour les caractères windows $buffer = mb_convert_encoding($buffer,"UTF-8","Windows-1252"); }else{ $buffer = utf8_encode($buffer); } } break; case 'utf-8': if($charset == 'iso-8859-1') { $buffer = utf8_decode($buffer); } break; } } return $buffer; } }