$post_value){
if(preg_match("/^upfile_/i", $post_key)){
$uploaded_file_name = $post_value;
$uploaded_file_path = $_POST_DATA['upload_dir'] . $uploaded_file_name;
if(is_file($uploaded_file_path)){
$file_size = @filesize($uploaded_file_path);
} //end if(is_file...
} //end if(preg_match...
if($post_key == "vid"){
$videoID = $post_value;
}
} //end foreach($_POST_DATA...
echo $uploaded_file_name."
".$uploaded_file_path;
function converttoflv( $in, $out ){
@unlink( $out );
$cmd = "ffmpeg -v 0 -i $in -ar 11025 $out 2>&1";
$fh = popen( $cmd, "r" );
while( fgets( $fh ) ) { }
pclose( $fh );
}
function getthumbnail( $in, $out ){
@unlink( $out );
$cmd = "ffmpeg -i $in -pix_fmt rgb24 -vframes 1 -s 320x480 $out 2>&1";
$fh = popen( $cmd, "r" );
while( fgets( $fh ) ) { }
pclose( $fh );
}
function flv_import( $upfile, $fname ){
$fname = preg_replace( '/\..*$/', '', basename( $fname ) );
$flvpath = "$fname.flv";
$thumbpath = "$fname.gif";
converttoflv( $upfile, "uploads/".$flvpath );
getthumbnail( $upfile, "uploads/".$thumbpath );
}
flv_import( $uploaded_file_path, $videoID );
$result = dbquery("UPDATE ".$db_prefix."videos SET video_activated='1' WHERE video_id='$videoID'");
} elseif(isset($_POST['goStep2'])){
$error = "";
$title = addslashes(stripinput($_POST['title']));
$description = addslashes(stripinput($_POST['description']));
$tags = addslashes(stripinput($_POST['tags']));
$cat_id = (isNum($_POST['cat_id']) ? $_POST['cat_id'] : "1");
$comments = (isNum($_POST['allow_comments']) ? $_POST['allow_comments'] : "1");
$ratings = (isNum($_POST['allow_ratings']) ? $_POST['allow_ratings'] : "1");
if($title == ""){ $error .= $locale['error100']."
\n"; }
if($description == ""){ $error .= $locale['error101']."
\n"; }
if($tags == ""){ $error .= $locale['error102']."
\n"; }
if($error == ""){
$videoID = randomKey(8);
$result = dbquery("INSERT INTO ".$db_prefix."videos (cat_id, video_id, video_title, video_description, video_tags, video_file, video_thumb, video_owner, video_timestamp, video_views, video_activated, video_comments, video_ratings) VALUES('$cat_id', '$videoID', '$title', '$description', '$tags', '".$videoID.".flv', '".$videoID.".gif', '".$userdata['user_id']."', '".time()."', '0', '0', '$comments', '$ratings')");
/* UberUpload Script */
require_once BASEDIR."uu_conlib.php";
$THIS_VERSION = "2.3";
$tmp_sid = md5(uniqid(mt_rand(), true));
$config_file = $default_config_file;
$path_to_upload_script .= '?tmp_sid=' . $tmp_sid;
$path_to_ini_status_script .= '?tmp_sid=' . $tmp_sid;
?>
print "\n"; ?>