<?php


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

if($_REQUEST['update'] == "success")
{
	$message = "Conversion 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[keep_original_video])."' where setting='keep_original_video'";
		$conn->execute($sql);
	$sql = "update config set value='".mysql_real_escape_string($_REQUEST[vbitrate])."' where setting='vbitrate'";
		$conn->execute($sql);
	$sql = "update config set value='".mysql_real_escape_string($_REQUEST[sbitrate])."' where setting='sbitrate'";
		$conn->execute($sql);
	$sql = "update config set value='".mysql_real_escape_string($_REQUEST[resize_video])."' where setting='resize_video'";
		$conn->execute($sql);
	$sql = "update config set value='".mysql_real_escape_string($_REQUEST[vresize_x])."' where setting='vresize_x'";
		$conn->execute($sql);
	$sql = "update config set value='".mysql_real_escape_string($_REQUEST[vresize_y])."' where setting='vresize_y'";
		$conn->execute($sql);
	
	header("location: conversionsettings.php?update=success");
}

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