1
I have a custom built block where I have inserted the 'user' type functions (View Account, Edit Account, etc.). I have added the Administration link, however I'd like to wrap it in conditional code so the menu only appears if the current user IS an Administrator.
I have tried numerous approaches and cant seem to find the right one. My latest code is below. Can anyone assist?
<?php
include("../../mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;
?>
<li><a href={X_SITEURL}user.php>View My Account</a></li>
<li><a href={X_SITEURL}edituser.php>Edit My Account</a></li>
<li><a href={X_SITEURL}viewpmsg.php>Private Messages</a></li>
<li><a href={X_SITEURL}notifications.php>Notifications</a></li>
<li><a href={X_SITEURL}modules/xoopsmembers>Search Members</a></li>
<?php
<{if $xoopsUserIsAdmin}>
echo "<li><a href={X_SITEURL}admin.php>Administration</a></li>";
<{/if}>
?>
<li><a href={X_SITEURL}user.php?op=logout>Logout</a></li>