| Autor | Zpráva | ||
|---|---|---|---|
| Pekl Profil * |
#1 · Zasláno: 14. 3. 2011, 17:43:34
Dobrý den, mám zde kód a nemůžu přijíd na proč mi to nic neuploadne. Stáhnu to z http://t.wits.sg/.
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
if (@$_GET['id']) {
echo json_encode(uploadprogress_get_info($_REQUEST['id']));
exit();
}
if (@$_POST['UPLOAD_IDENTIFIER'])
exit();
$uuid = uniqid();
?>
<!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" xml:lang="en" lang="en">
<head>
<title>Jquery WITS Form</title>
<link rel="stylesheet" type="text/css" href="http://t.wits.sg/misc/css/reset.css"/>
<link rel="stylesheet" type="text/css" href="http://t.wits.sg/misc/css/base.css"/>
<link rel="stylesheet" type="text/css" href="http://t.wits.sg/misc/css/template.css"/>
<link rel="stylesheet" type="text/css" href="http://t.wits.sg/misc/css/form.css"/>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-1120774-3");
pageTracker._trackPageview();
} catch(err) {}
</script>
<script type="text/javascript" src="http://t.wits.sg/misc/js/jQuery/jquery.js"></script>
<script type="text/javascript" src="js/jquery.progressbar.min.js"></script>
<script type="text/javascript">
var progress_key = '<?= $uuid ?>';
$(document).ready(function() {
$("#uploadprogressbar").progressBar();
});
function beginUpload() {
$("#uploadprogressbar").fadeIn();
var i = setInterval(function() {
$.getJSON("index.php?id=" + progress_key, function(data) {
if (data == null) {
clearInterval(i);
location.reload(true);
return;
}
var percentage = Math.floor(100 * parseInt(data.bytes_uploaded) / parseInt(data.bytes_total));
$("#uploadprogressbar").progressBar(percentage);
});
}, 1500);
return true;
}
</script>
<style type="text/css">
table tr { vertical-align: top; }
table td { padding: 3px; }
div.contentblock { padding-bottom: 25px; }
#uploadprogressbar { display: none; }
</style>
</head>
<body>
<div id="container">
<div class="contentblock">
<div class="edit_panel">
<form action="index.php" target="progressFrame" method="post" id="uploadform" enctype="multipart/form-data" onsubmit="beginUpload();">
<input type="hidden" name="UPLOAD_IDENTIFIER" id="progress_key" value="<?= $uuid ?>" />
<table class="form">
<tr><td class="labelcol"><label for="ulfile1">File 1</label></td>
<td><input type="file" name="ulfile1" id="ulfile1" /></td>
</tr>
<tr><td class="labelcol"></td>
<td class="inputcol"><input type="submit" value="Submit" />
<br />
<span class="progressbar" id="uploadprogressbar">0%</span>
</td></tr>
</table>
</form>
</div>
</div>
</div>
<iframe style="display: none;" name="progressFrame"></iframe>
</body>
</html>
|
||
| DoubleThink Profil * |
#2 · Zasláno: 14. 3. 2011, 18:17:14
PECL extenzi uploadprogress server nainstalovánu má?
|
||
|
Časová prodleva: 15 let
|
|||
0