<?php
/*
 *      Patrick Bores - WebUserPrefs - SpamAssassin user_prefs file editor
 *      Copyright (C) 2003  Patrick Bores
 *      This program is free software; you can redistribute it and/or
 *      modify it under the terms of the GNU General Public License
 *      as published by the Free Software Foundation; either version 2
 *      of the License, or (at your option) any later version.
 *
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 *	Author: Patrick Bores
 *
 */
	function required_pts_keys(){
		return array("required_hits");
	}

	function required_pts_html(){

		$init_hits = (get_pref("required_hits") != "") ? get_pref("required_hits") : "5";

		echo "<b>Required Points:</b><br />";
		echo "Messages are assigned a certain number of points for each spam test matched.
			Here, you can change the number of points a message must receive before it
			is considered spam. The default setting is 5.0.<br /><br />";

		echo "Required Points: <input type=\"text\" name=\"points_control\" size=\"4\" value=\"$init_hits\" />";

	}

	function required_pts_apply(){
		set_pref("required_hits",$_POST[points_control]);
	}

?>
