@mysql_query($sql); unset($_SESSION['security_token']); $security_token = randomcode(); $_SESSION['security_token'] = $security_token; $color = '#DD0000'; } $sql = "INSERT INTO pictures (file_name, user_id, todays_date, approved) VALUES ('{$new_file_name}', {$user_id}, NOW(), 'yes')"; @mysql_query($sql); if (mysql_error()) { $show_notification = 1; $color = '#DD0000'; $message = $config["error_26"]; unset($_SESSION['security_token']); $security_token = randomcode(); $_SESSION['security_token'] = $security_token; die_with_msg($message); } else { $color = '#009900'; $show_notification = 1; $message = $config["error_25"]; $show = 2; unset($_SESSION['security_token']); $security_token = randomcode(); $_SESSION['security_token'] = $security_token; } // show success and message unset($_SESSION['security_token']); $security_token = randomcode(); $_SESSION['security_token'] = $security_token; $template = "templates/inner_upload_avatar.htm"; $TBS = new clsTinyButStrong();
//___run the set cmd_____________ $output = ''; // $cmd from above switch => without b_frames @exec("{$cmd} 2>&1", $output); $cmd_1 = $cmd; $log_1 = $output; capture_output($output, $cmd); //___Conversion failed totally___________________ if (!file_exists($new_flv) || filesize($new_flv) < 10000) { @unlink($new_flv); die_with_msg("Failed to convert video"); } //___Possible hack attempt___________________ if (file_exists($new_flv) && filesize($new_flv) < 10000) { @unlink($new_flv); die_with_msg('Output file size was too small. Possible hack attempt'); } } // end conversions //______________________________________________________________________________________________ //_____________________________FLVTOOL2 - (Meta Data Injection)_________________________________ #$cmd = "$config[path_to_flvtool2] -UP $new_flv | grep duration"; #$output = ''; #@exec("$cmd 2>&1",$output); #capture_output($output,$cmd); $video_attributes = _get_video_attributes($new_flv, $config[path_to_ffmpeg]); $vid_duration = $video_attributes['hours'] * 3600; $vid_duration = $vid_duration + $video_attributes['mins'] * 60; $vid_duration = $vid_duration + $video_attributes['secs']; $duration_hours = $video_attributes['hours']; $duration_mins = $video_attributes['mins'];