<?php
 

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

if (is_numeric($_REQUEST[vid]))
{
	$vid = $_REQUEST[vid];
}

$query = "SELECT * from videos where public='1' AND active='1' AND VIDEOID='".mysql_real_escape_string($vid)."' limit 1";

$db=mysql_connect ($DBHOST,$DBUSER,$DBPASSWORD) or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ($DBNAME); 
  
$result = mysql_query($query) or die ('Query Error: ' . mysql_error()); 
while ($results = mysql_fetch_array($result)) 
{ 
  $seotitle = seo_clean_titles_sendmail($results['title']); 
  $title = str_replace ("&amp","",htmlspecialchars(stripslashes($results['title'])));
  $description = str_replace ("&amp","",htmlspecialchars(stripslashes($results['description']))); 
		;
	print "&title1=".$title;
	print "&title2=".$seotitle; 
	print "&title_2=".$seotitle;
	print "&vnum=".$vid;  
	print "&desc".$count."=".$description; 
	if($results['allowembeds'] == "1")
	{
		print "&embed=enabled"; 
	}
	print "&vkey=".$vid; 
	print "&wmid=inv_wm/.jpg"; 
	$count++;
} 

?>
