<?php
/*
* Layout of menu
* Created By David Cornewell
*/
?>
<table border=0 cellpadding=0 cellspacing=0 align=left width="100%">
<tr valign=top class=folder>
<td>
<?php
print "<a href=\"". $_SERVER["PHP_SELF"] ."\" style=\"padding: 2; color:black; text-decoration: none; ";
if ($f=="")
print "border: 2 inset black; \">";
else
print "\">";
?>
Home </a>
</td>
<td>
<?php
print "<a href=\"". $_SERVER["PHP_SELF"] ."?f=vmail\" style=\"padding: 2; color:black; text-decoration: none; ";
if ($f=="vmail")
print "border: 2 inset black; \">";
else
print "\">";
?>
VoiceMail </a>
</td>
<td>
<?php
print "<a href=\"". $_SERVER["PHP_SELF"] ."?f=users\" style=\"padding: 2; color:black; text-decoration: none; ";
if ($f=="users")
print "border: 2 inset black; \">";
else
print "\">";
?>
Users </a>
</td>
<?php if ($session->login_user->id==-1) { ?>
<td>
<?php
print "<a href=\"". $_SERVER["PHP_SELF"] ."?f=extensions\" style=\"padding: 2; color:black; text-decoration: none; ";
if ($f=="extensions")
print "border: 2 inset black; \">";
else
print "\">";
?>
Extensions </a>
</td>
<?php } else { ?>
<td>
<?php
print "<a href=\"". $_SERVER["PHP_SELF"] ."?f=extension_opts\" style=\"padding: 2; color:black; text-decoration: none; ";
if ($f=="extension_opts")
print "border: 2 inset black; \">";
else
print "\">";
?>
Extension options</a>
</td>
<?php } ?>
<?php if ($session->login_user->id>0) { ?>
<td>
<?php
print "<a href=\"". $_SERVER["PHP_SELF"] ."?f=showcontacts\" style=\"padding: 2; color:black; text-decoration: none; ";
if ($f=="showcontacts")
print "border: 2 inset black; \">";
else
print "\">";
?>
Contacts </a>
</td>
<?php }
//
// This will print the modules
//
$mods = Asterwebmod_GetAllModules();
foreach ($mods as $module) {
if ($session->login_user->id==-1 || $module->admin=false) {
print "<td>";
print "<a href=\"". $_SERVER["PHP_SELF"] ."?f=". $module->name ."\" style=\"padding: 2; color:black; text-decoration: none; ";
if ($f==$module->name)
print "border: 2 inset black; \">";
else
print "\">";
print " ". $module->title ."</a>";
print "</a>";
print "</td>";
}
}
?>
<td width=99% align=right>
<?php if ($session->login_user->id!=0) { ?>
<a href="<?php echo $_SERVER["PHP_SELF"]; ?>"></a>
Logged in as <?php print $session->login_user->name; ?>
<a href="<?php print $session->cgi->progname ?>?f=logout" class=folder>Logout</a>
<?php } ?>
</td>
</tr>
</table>