<?php


include("../include/config.php");
include_once("../include/functions/import.php");
verify_login_admin();

if($_REQUEST['update'] == "success")
{
	$message = "Search Settings Updated Successfully";
	Stemplate::assign('message',$message);
	STemplate::display("administrator/show_message.tpl");
}

if($_REQUEST['submit'])
{
	$max_search_phrases = htmlentities(strip_tags($_REQUEST[max_search_phrases]));
	$sql = "update config set value='".mysql_real_escape_string($max_search_phrases)."' where setting='max_search_phrases'";
	$conn->execute($sql);
	
	header("location: searchsettings.php?update=success");
}

        Stemplate::assign('error',$error);
        STemplate::display("administrator/searchsettings.tpl");
?>