Oto jak wygląda fragment kodu template'a (fikcyjne linki):
Kod
[start_if_admin]
<td><a href="[przyklej_link]">[przyklej]</a></td>
<td><a href="news.php?edytuj=[news_id]">[edytuj]</a></td>
<td><a href="news.php?usun=[news_id]">[usun]</a></td>
<td><a href="news.php?komentarze=[news_id]">komentarze: [news_komentarze_ile]</a></td>
[end_if_admin]
[start_if_not_admin]
<td colspan="4"><a href="news.php?komentarze=[news_id]">komentarze: [news_komentarze_ile]</a></td>
[end_if_not_admin]
<td><a href="[przyklej_link]">[przyklej]</a></td>
<td><a href="news.php?edytuj=[news_id]">[edytuj]</a></td>
<td><a href="news.php?usun=[news_id]">[usun]</a></td>
<td><a href="news.php?komentarze=[news_id]">komentarze: [news_komentarze_ile]</a></td>
[end_if_admin]
[start_if_not_admin]
<td colspan="4"><a href="news.php?komentarze=[news_id]">komentarze: [news_komentarze_ile]</a></td>
[end_if_not_admin]
Jeśli user zalogowany jest jako admin, system template powinien wyświetlić tylko to z pomiędzy [start_if_admin], a [end_if_admin]. Powinien pominąć zawartość [start_if_not_admin] [end_if_not_admin]. Niestety tak się nie dzieje. Wyświetlane są oba kody. Oto php:
<? if ( $user_level =='admin' ) { } else { } ?>
Co z tym zrobić?