<?php


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

if($_REQUEST['update'] == "success")
{
	$message = "Path 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[ffmpeg])."' where setting='ffmpeg'";
		$conn->execute($sql);
	$sql = "update config set value='".mysql_real_escape_string($_REQUEST[mplayer])."' where setting='mplayer'";
		$conn->execute($sql);
	$sql = "update config set value='".mysql_real_escape_string($_REQUEST[mencoder])."' where setting='mencoder'";
		$conn->execute($sql);
	$sql = "update config set value='".mysql_real_escape_string($_REQUEST[metainject])."' where setting='metainject'";
		$conn->execute($sql);
	$sql = "update config set value='".mysql_real_escape_string($_REQUEST[phppath])."' where setting='phppath'";
		$conn->execute($sql);
	
	header("location: pathsettings.php?update=success");
}

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