"; }else{ $caddie=""; } print pmb_bidi("
${msg[929]} 

$caddie $msg[919] $groupID : ".$myGroup->libelle."   

"); if($myGroup->libelle_resp && $myGroup->id_resp) print pmb_bidi("
$msg[913] : ".$myGroup->libelle_resp." "); print "
"; if($myGroup->nb_members) { print ""; $parity=1; while(list($cle, $membre) = each($myGroup->members)) { if ($parity % 2) { $pair_impair = "even"; } else { $pair_impair = "odd"; } $parity += 1; $nb_pret=get_nombre_pret($membre['id']); $nb_resa=get_nombre_resa($membre['id']); $tr_javascript=" onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='$pair_impair'\" onmousedown=\"document.location='./circ.php?categ=pret&form_cb=".rawurlencode($membre['cb'])."&groupID=$groupID';\" "; print pmb_bidi(""); } print '
".$msg["nom_prenom_empr"]." ".$msg["code_barre_empr"]." ".$msg["empr_nb_pret"]." ".$msg["empr_nb_resa"]."
".$membre['nom']); if($membre['prenom'])print pmb_bidi(", ${membre['prenom']}"); print pmb_bidi(" ${membre['cb']} ".$nb_pret." ".$nb_resa."

'; } else { print "

$msg[922]

"; } // pour que le formulaire soit OK juste après la création du groupe $group_form_add_membre = str_replace("!!groupID!!", $groupID, $group_form_add_membre); print $group_form_add_membre ; function get_nombre_pret($id_empr) { $requete = "SELECT count( pret_idempr ) as nb_pret FROM pret where pret_idempr = $id_empr"; $res_pret = mysql_query($requete); if (mysql_num_rows($res_pret)) { $rpret=mysql_fetch_object($res_pret); $nb_pret=$rpret->nb_pret; } return $nb_pret; } function get_nombre_resa($id_empr) { $requete = "SELECT count( resa_idempr ) as nb_resa FROM resa where resa_idempr = $id_empr"; $res_resa = mysql_query($requete); if (mysql_num_rows($res_resa)) { $rresa=mysql_fetch_object($res_resa); $nb_resa=$rresa->nb_resa; } return $nb_resa; }