<?php


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

$mainmenu = "5";
STemplate::assign('mainmenu',$mainmenu);

if ($_SESSION[USERID] != "" && $_SESSION[USERID] >= 0 && is_numeric($_SESSION[USERID]))
{
	$videoid = $_REQUEST[videoid];
	if(is_numeric($videoid))
	{
		$query="SELECT USERID FROM videos WHERE VIDEOID='".mysql_real_escape_string($videoid)."'";
    	$executequery=$conn->execute($query);
    	$getuserid = $executequery->fields[USERID];
		
		if ($getuserid == $_SESSION[USERID])
		{
			$query = "SELECT * FROM videos WHERE VIDEOID='".mysql_real_escape_string($videoid)."'";
       		$executequery = $conn->execute($query);
       		$videoarray = $executequery->getarray();
			STemplate::assign('videoarray',$videoarray);
		}
		else
		{
			$error = "$lang[684]";
		}
	}
	else
	{
		$error = "$lang[650]";
	}
}
else
{
	header("Location:$config[baseurl]/login.php");exit;
}

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

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