<?php


session_start();
include("include/config.php");
include("include/functions/import.php");
$thebaseurl = $config['baseurl'];

if ($_SESSION[USERID] != "" && $_SESSION[USERID] >= 0 && is_numeric($_SESSION[USERID]))
{
    $query = "SELECT * FROM members WHERE USERID='".mysql_real_escape_string($_SESSION[USERID])."'";
    $executequery = $conn->execute($query);
    $memberarray = $executequery->getarray();
	STemplate::assign('memberarray',$memberarray);
		
	if($_REQUEST[change]!="")
	{
		$famfilter = htmlentities(strip_tags($_REQUEST[famfilter]));
		$famfilter = escape($famfilter);
		
		if (is_numeric($famfilter))
		{
			
			$query="UPDATE members SET familyfilter ='".mysql_real_escape_string($famfilter)."' WHERE USERID='$_SESSION[USERID]'";
			$conn->execute($query);
			$message = "$lang[557] <a href=\"$thebaseurl/familyfilter.php\">$lang[558]</a>";
		}

			
	}
	$templateselect = "familyfilter.tpl";
}
else
{
	header("Location:$config[baseurl]/login.php");exit;
}

$pagetitle = "$lang[10]";
STemplate::assign('pagetitle',$pagetitle);

//TEMPLATES BEGIN
STemplate::assign('error',$error);
STemplate::assign('message',$message);
STemplate::display('header.tpl');
STemplate::display($templateselect);
STemplate::display('footer.tpl');
//TEMPLATES END
?>