function get_email_link_with_subject($p_email, $p_text, $p_summary) { global $g_show_user_email, $g_anonymous_account; switch ($g_show_user_email) { case NONE: return "{$p_text}"; case ALL: return "<a href=\"mailto:{$p_email}?subject={$p_summary}\">{$p_text}</a>"; case NO_ANONYMOUS: if (get_current_user_field("username") != $g_anonymous_account) { return "<a href=\"mailto:{$p_email}?subject={$p_summary}\">{$p_text}</a>"; } else { return "{$p_text}"; } case ADMIN_ONLY: if (ADMINISTRATOR == get_current_user_field("access_level")) { return "<a href=\"mailto:{$p_email}?subject={$p_summary}\">{$p_text}</a>"; } else { return "{$p_text}"; } default: return "{$p_text}"; } }
function get_current_user_access_level() { global $g_string_cookie_val; $t_access_level = get_current_user_field("access_level"); $t_access_level2 = get_project_access_level(); if ($t_access_level >= ADMINISTRATOR) { return $t_access_level; } if (-1 == $t_access_level2) { return $t_access_level; } else { return $t_access_level2; } }