File size: 3.07Kb
<?php
$url = basename($_SERVER['SCRIPT_FILENAME']);
//Get file upload progress information.
if(isset($_GET['progress_key'])) {
$status = apc_fetch('upload_'.$_GET['progress_key']);
echo $status['current']/$status['total']*100;
die;
}
//
?>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.js" type="text/javascript"></script>
<link href="http://file1.cs-kukmor.org/style_progress.css" rel="stylesheet" type="text/css" />
<script>
$(document).ready(function() {
//
setInterval(function()
{
$.get("<?php echo $url; ?>?progress_key=<?php echo $_GET['up_id']; ?>&randval="+ Math.random(), {
//get request to the current URL (upload_frame.php) which calls the code at the top of the page. It checks the file's progress based on the file id "progress_key=" and returns the value with the function below:
},
function(data) //return information back from jQuery's get request
{
$('#progress_container').fadeIn(100); //fade in progress bar
$('#progress_bar').width(data +"%"); //set width of progress bar based on the $status value (set at the top of this page)
$('#progress_completed').html(parseInt(data) +"%"); //display the % completed within the progress bar
}
)},500); //Interval is set at 500 milliseconds (the progress bar will refresh every .5 seconds)
});
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>FileStash - бесплатный хостинг файлов, изображений, файлообменник бесрочным хранением, бесплатный файлообменник, анонимный хостинг файлов, удобный хостинг файлов </title>
<meta content="FileStash - бесплатный хостинг файлов, изображений, файлообменник бесрочным хранением, бесплатный файлообменник, анонимный хостинг файлов, удобный хостинг файлов" name="description">
<meta content="FileStash - бесплатный хостинг файлов, изображений, файлообменник бесрочным хранением, бесплатный файлообменник, анонимный хостинг файлов, удобный хостинг файлов" name="keywords">
</head>
<body style="margin:0px"><center>
<table style="text-align: left; width: 139px; height: 41px;" border="0"
cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="vertical-align: middle;"><img
style="" alt=""
src="http://file.cs-kukmor.org/file_hosting/files/9375785150533540ad2.gif">
</td>
<td style="vertical-align: middle;"><font
style="color: rgb(0, 0, 205); font-size: 10pt;" face="Arial" size="2"></font> </td>
</tr>
</tbody>
</table>
</center>
</body></html>