|
|
|
|
<?
function display_nav_com($user_dn,$user_comm,$user,$id_dn,$id_mess)
{?>
<table align=center border=0 cellSpacing=0 cellPadding=0 width=90%>
<tr>
<td>
<div style="font-size:8pt;text-align:right;">
<?if ($user==$user_comm || $user==$user_dn){?>
<a href="all_mess.php?iddn=<?=$id_dn?>&type=2&idmess=<?=$id_mess?>" style="color:#992727;text-decoration:underline">Удалить</a> |
<?}if ($user==$user_comm){?>
<a href="edit.php?iddn=<?=$id_dn?>&idmess=<?=$id_mess?>" style="color:#992727;text-decoration:underline">Редактировать</a>
<?}?>
</div>
</td>
</tr>
</table>
<?
}
|
Есть такая функция...когда все условия совпадают на экране видим
А если не совпадает второе условие видим
Внимание вопрос! Как избавиться от разделителя? | |
|
|
|
|
|
|
|
для: P@Sol
(01.07.2005 в 16:31)
| | в данном случае можно перенести разделитель...
а если тут?
<?
function display_nav_dn($user,$valid_user,$id_dn,$id_mess,$comm_dn)
{?>
<table align=center border=0 cellSpacing=0 cellPadding=0 width=90%>
<tr>
<td>
<div style="font-size:8pt;text-align:right;">
<? if ($comm_dn > 0) {?>
<a href="read.php?iddn=<?=$id_dn?>&idmess=<?=$id_mess?>&actmess=view" style="color:#992727;text-decoration:underline">Всего(<?=$comm_dn?>)</a> |
<?}
if ($user == $valid_user){?>
<a href="all_mess.php?iddn=<?=$id_dn?>&type=2&idmess=<?=$id_mess?>" style="color:#992727;text-decoration:underline">Удалить</a> |
<a href="edit.php?iddn=<?=$id_dn?>&idmess=<?=$id_mess?>" style="color:#992727;text-decoration:underline">Изменить</a> |
<?}
if ($valid_user!=""){?>
<a href="read.php?iddn=<?=$id_dn?>&idmess=<?=$id_mess?>&actmess=comm" style="color:#992727;text-decoration:underline">Добавить</a>
<?}?>
</div>
</td>
</tr>
</table>
<?
}
|
| |
|
|
|
|
|
|
|
для: P@Sol
(01.07.2005 в 16:31)
| |
...
<?if ($user==$user_comm || $user==$user_dn){?>
<a href="all_mess.php?iddn=<?=$id_dn?>&type=2&idmess=<?=$id_mess?>" style="color:#992727;text-decoration:underline">Удалить</a>
<?}if ($user==$user_comm){?>
| <a href="edit.php?iddn=<?=$id_dn?>&idmess=<?=$id_mess?>" style="color:#992727;text-decoration:underline">Редактировать</a>
...
|
Просто нужно вынести разделитель во второе условие ;) | |
|
|
|