$file, 'size' => $size, 'type' => $type); $log_files_short[] = $file; } } closedir($handle); } $log_browser_enabled = ( $video_object->debug && !empty($log_files_short) ); if( $task=="version" ) { $result = NULL; exec($setting['setting_video_ffmpeg_path'].' -version 2>&1', $result); $smarty->assign('version_output', join("\n", $result)); } elseif( $task=="formats" ) { $result = NULL; exec($setting['setting_video_ffmpeg_path'].' -formats 2>&1', $result); $smarty->assign('format_output', join("\n", $result)); } elseif( $task=="logbrowse" ) { // Moved } elseif( $task=="logfile" ) { $file = str_replace('/', '', $file); $file = str_replace('\\', '', $file); $file = str_replace('..', '', $file); if( in_array($file, $log_files_short) ) $log_content = file('../uploads_video/encoding/debug/'.$file); else $log_content = "Invalid file"; $smarty->assign('log_output', join("\n", $log_content)); $smarty->assign('log_filename', $file); } $smarty->assign('task', $task); $smarty->assign('log_browser_enabled', $log_browser_enabled); $smarty->assign_by_ref('log_files', $log_files); $smarty->assign_by_ref('video_object', $video_object); include "admin_footer.php"; ?>