<?php


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

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

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

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