Location: PHPKode > projects > phpMyOrdering > phpMyOrdering-0.1.7-alpha/scripts/classes/class.levels.php
<?PHP
/*
 * phpMyAuth
 * Jason Gerfen [hide@address.com]
 *
 * class.levels.php - Returns access level of authentication token
 */

class AccessLevels
{
 function ChkLevel( $token )
 {
  global $handles;

  if( empty( $token ) ) {
   $level->value = -1;
  } else {
   $array = $handles['encrypt']->DecodeAuthTokenHeavy( $token );
   $level->value = $array[2];
  }
  return $level->value;
 }

 function GenDropMenuWSelectedLevels( $array, $selected, $name )
 {
  global $handles;
  if( count( $array[0] ) !== 0 ) {
   $list .= "<select id=\"" . $name . "\" name=\"". $name . "\" style=\"width: 100%\">";
   if( !empty( $selected ) ) {
    $list .= "<option value=\"" . $selected . "\">" . $selected . "</option>";
   }
   $list .= "<option>---------------</option>";
   foreach( $array as $key => $value ) {
    $value['level'] = $handles['misc']->TrimString( $value['level'], 25 );
    $list .= "<option value=\"" . $value['level'] . "\">" . $value['level'] . "</option>";
   }
   $list .= "</select>";
  }
  return $list;
 }
}

?>
Return current item: phpMyOrdering