Пример #1
0
/**
 * Get an appropriate enumeration. (Should become an internal function.)
 *
 * @param string $p_username  The name of the user trying to access the enumeration.
 * @param string $p_password  The password of the user.
 * @param string $p_enumeration  The enumeration to get.
 * @return string  The requested enumeration.
 */
function mc_enum_get($p_username, $p_password, $p_enumeration)
{
    if (!mci_validate_enum_access($p_username, $p_password)) {
        return new soap_fault('Client', '', 'Access Denied');
    }
    // safe to call directly after login checks
    $t_user_id = auth_get_current_user_id();
    $t_lang = mci_get_user_lang($t_user_id);
    return lang_get($p_enumeration . '_enum_string', $t_lang);
}
Пример #2
0
/**
 * Get an appropriate enumeration. (Should become an internal function.)
 *
 * @param string $p_username    The name of the user trying to access the enumeration.
 * @param string $p_password    The password of the user.
 * @param string $p_enumeration The enumeration to get.
 * @return string  The requested enumeration.
 */
function mc_enum_get($p_username, $p_password, $p_enumeration)
{
    if (!mci_validate_enum_access($p_username, $p_password)) {
        return mci_soap_fault_login_failed();
    }
    # safe to call directly after login checks
    $t_user_id = auth_get_current_user_id();
    $t_lang = mci_get_user_lang($t_user_id);
    return lang_get($p_enumeration . '_enum_string', $t_lang);
}