Bonjour ,
mon problème comment désactiver une image cliquable :
echo("<td><a href='modifierTexte.php?id=$data[0]' ><img src='images/edit-icon.gif' width='16' height='16' alt='' /></a></td> ");
cela c'est un morceau de mon code.
pourquoi je veux désactiver une image cliquable ?
- si vous remarquez dans mon code j'ai un lien vers une page "modifierText.php" et se que je voudrais faire c'est que lorsque l'utilisateur n'a pas les droit de modification il peux pas modifier le texte pour les autre texte ou il a les droit le lien reste sans changement .
voici un bout de code de ma page un peux détaillé si vous voulez savoir plus sur mon problème :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| $sql=mysql_query('select * from text limit ' .$debut. ',10');
echo ("<div class='table'>");
echo ("<table class='listing' cellpadding='0' cellspacing='0'>");
echo ("<tr>");
echo ("<th width='20%'>titre du texte</th>");
echo ("<th width='25%' >description</th>");
echo ("<th width='10%' >ordre du texte</th>");
echo ("<th width='10%'>voir les details du projet</th>");
echo ("<th width='10%' >modifier le texte</th>");
echo ("<th width='10%' >ajouter un sous texte</th>");
echo ("<th width='10%' >supprimer le texte</th>");
echo ("</tr>");
while($data=mysql_fetch_array($sql)){
echo ("<tr >");
echo ("<td > $data[1] </td>");
echo ("<td > $data[3] </td>");
echo ("<td >
<TABLE >
<TR>
<TD rowspan='2'> <input type='number' name='ordre' style='width:30px; height:25px;' /> </TD>
<TD style='width:16px; height:10px;' > <input type='image' src='images/fleche-hausse-de-icone.png' name='image1' width='16' alt='' > </TD>
</TR>
<TR>
<TD style='width:16px; height:10px;' >
<input type='image' src='images/fleche-baisse-de-icone.png' name='image1' width='16' alt='' > </TD>
</TR>
</TABLE>
</td>");
echo("<td><a href='detailTexte.php?id=$data[0]' ><img src='images/oeil-icon.png' width='16' height='16' alt='' /></a></td> ");
echo("<td><a href='modifierTexte.php?id=$data[0]' ><img src='images/edit-icon.gif' width='16' height='16' alt='' /></a></td> ");
echo("<td><a href='creationSousTexte.php?id=$data[0]' ><img src='images/add-icon.gif' width='16' height='16' alt='' /></a></td> ");
echo("<td><a onclick=confirmSubmit('supprimerTexte.php?id=$data[0]') href='#' ><img src='images/hr.gif' width='16' height='16' alt='' /></a></td> ");
echo ("</tr>");
}
echo ("</table>"); |
Merci
Partager