Example #1
0
function P($group, $power)
{
    $powerlist = UserCacheModel::getPowerList($_SESSION['userId']);
    if (array_key_exists($group, $powerlist) && in_array($power, $powerlist[$group])) {
        return TRUE;
    } else {
        return FALSE;
    }
}