Location: PHPKode > projects > phpMyOrdering > phpMyOrdering-0.1.7-alpha/phpMyPurchasing-0.1.2-alpha/scripts/classes/class.menu.php
<?PHP

/*
 * phpMyAuth
 * Jason Gerfen [hide@address.com]
 *
 * class.menu.php - Determines which menu template to load based on permissions
 */

class GenerateNavMenu
{
 var $menu;
 var $level;
 var $id;
 var $skin;

 function CreateNav( $token, $skin ) {
  global $handles;

  if( empty( $token ) ) {
   $data->menu = 'menu.default.tpl';
  } else {
   if( $handles['auth']->DecideAuth( $token, NULL, NULL, $_SERVER ) !== 0 ) {
    $data->menu = 'menu.default.tpl';
   } else {
    if( $handles['level']->ChkLevel( $token ) === "admin" ) {
     $data->menu = 'menu.admin.tpl';
    } elseif( $handles['level']->ChkLevel( $token ) === "user" ) {
     $data->menu = 'menu.user.tpl';
    } elseif( $handles['level']->ChkLevel( $token ) === "view" ) {
     $data->menu = 'menu.view.tpl';
    } else {
     $data->menu = 'menu.default.tpl';
    }
   }
  }
  return $data->menu;
 }

}
?>
Return current item: phpMyOrdering