/** * HTML for Show notify threshold * * @param string $p_access Access. * @param string $p_action Action. * @return string */ function show_notify_threshold($p_access, $p_action) { global $g_can_change_flags, $g_can_change_defaults; $t_flag = $p_access >= get_notify_flag($p_action, 'threshold_min') && $p_access <= get_notify_flag($p_action, 'threshold_max'); if ($g_can_change_flags || $g_can_change_defaults) { $t_flag_name = $p_action . ':' . $p_access; $t_set = $t_flag ? 'checked="checked"' : ''; return '<input type="checkbox" name="flag_threshold[]" value="' . $t_flag_name . '" ' . $t_set . ' />'; } else { return $t_flag ? '<img src="images/ok.gif" width="20" height="15" title="X" alt="X" />' : ' '; } }
function show_notify_threshold($p_access, $p_action) { global $t_can_change_flags, $t_can_change_defaults; $t_flag = $p_access >= get_notify_flag($p_action, 'threshold_min') && $p_access <= get_notify_flag($p_action, 'threshold_max'); if ($t_can_change_flags || $t_can_change_defaults) { $t_flag_name = $p_action . ':' . $p_access; $t_set = $t_flag ? "checked=\"checked\"" : ""; return "<input type=\"checkbox\" name=\"flag_threshold[]\" value=\"{$t_flag_name}\" {$t_set} />"; } else { return $t_flag ? '<img src="images/ok.gif" width="20" height="15" title="X" alt="X" />' : ' '; } }