"; print "".$msg['etagere_name']."".$msg["etagere_cart_count"]."".$msg['etagere_visible_date']."".$msg['etagere_visible_accueil'].""; $parity=1; while(list($cle, $valeur) = each($liste)) { $rqt_autorisation=explode(" ",$valeur['autorisations']); if (array_search ($PMBuserid, $rqt_autorisation)!==FALSE || $PMBuserid==1) { $link = "./catalog.php?categ=etagere&sub=$action&action=edit_etagere&idetagere=".$valeur['idetagere']; if ($parity % 2) { $pair_impair = "even"; } else { $pair_impair = "odd"; } $parity += 1; $tr_javascript=" onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='$pair_impair'\" "; $td_javascript_click=" onmousedown=\"document.location='$link';\" "; print pmb_bidi(" ".$valeur['name'].""); if ($valeur['comment']) print pmb_bidi(" (".$valeur['comment'].")"); print "" ; print $valeur['nb_paniers']; print "" ; if ($valeur['validite']) print $msg['etagere_visible_date_all'] ; else print $msg['etagere_visible_date_du']." ".$valeur['validite_date_deb_f']." ".$msg['etagere_visible_date_fin']." ".$valeur['validite_date_fin_f'] ; print "" ; if ($valeur['visible_accueil']) print "X
".$opac_url_base."index.php?lvl=etagere_see&id=".$valeur['idetagere']."" ; else print "
".$opac_url_base."index.php?lvl=etagere_see&id=".$valeur['idetagere']."" ; print " "; } } print ""; } else { print $msg['etagere_no_etagere']; } if ($bouton_ajout) print "
"; } // affichage des autorisations sur les etageres function aff_form_autorisations_etagere ($param_autorisations="1", $creation_etagere="1") { global $dbh; global $msg; global $PMBuserid; $requete_users = "SELECT userid, username FROM users order by username "; $res_users = mysql_query($requete_users, $dbh); $all_users=array(); while (list($all_userid,$all_username)=mysql_fetch_row($res_users)) { $all_users[]=array($all_userid,$all_username); } if ($creation_etagere) $param_autorisations.=" ".$PMBuserid ; $autorisations_donnees=explode(" ",$param_autorisations); for ($i=0 ; $i "; elseif ($row_data[0]) $autorisations_users.=" "; else $autorisations_users.=" "; } $autorisations_users.=""; return $autorisations_users; } function verif_droit_etagere($id) { global $msg; global $PMBuserid; global $dbh ; if ($id) { $requete = "SELECT autorisations FROM etagere WHERE idetagere='$id' "; $result = @mysql_query($requete, $dbh); if(mysql_num_rows($result)) { $temp = mysql_fetch_object($result); $rqt_autorisation=explode(" ",$temp->autorisations); if (array_search ($PMBuserid, $rqt_autorisation)!==FALSE || $PMBuserid == 1) return $id ; else return 0 ; } else return 0; } else return 0 ; }