Exemplo n.º 1
0
function prepare_user_name($p_user_id)
{
    # Catch a user_id of NO_USER (like when a handler hasn't been assigned)
    if (NO_USER == $p_user_id) {
        return '';
    }
    $t_username = user_get_name($p_user_id);
    if (user_exists($p_user_id) && user_get_field($p_user_id, 'enabled')) {
        $t_email = user_get_email($p_user_id);
        if (!is_blank($t_email)) {
            return prepare_email_link($t_email, $t_username);
        } else {
            return string_display($t_username);
        }
    } else {
        $t_result = '<font STYLE="text-decoration: line-through">';
        $t_result .= string_display($t_username);
        $t_result .= '</font>';
        return $t_result;
    }
}
Exemplo n.º 2
0
function get_email_link($p_email, $p_text)
{
    return prepare_email_link($p_email, $p_text);
}
Exemplo n.º 3
0
function print_sql_error($p_query)
{
    global $g_administrator_email;
    $error = error_string(ERROR_SQL);
    $error .= lang_get('word_separator');
    $error .= sprintf(lang_get('please_report'), prepare_email_link($g_administrator_email, lang_get('administrator')));
    $error .= "<br />{$p_query};<br />";
    echo $error;
}