<?php


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

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

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

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