1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
| <html>
<head>
<!--css du site -->
<link rel="stylesheet" title="Standard" href="/upload/web/css/css.css" type="text/css" media="screen" />
<!--appel du modtools-->
<script type="text/javascript" src="/upload/web/js/mootools.js"></script>
<script type="text/javascript" src="/upload/web/js/Swiff.Uploader.js"></script>
<script type="text/javascript" src="/upload/web/js/Fx.ProgressBar.js"></script>
<script type="text/javascript" src="/upload/web/js/FancyUpload2.js"></script>
<script language="javascript">
window.addEvent('load', function() {
var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
url: $('form-demo').action,
fieldName: 'photoupload',
path: '/upload/web/js/Swiff.Uploader.swf',
limitSize: 8 * 1024 * 1024, // 8Mb
onLoad: function() {
$('demo-status').removeClass('hide');
$('demo-fallback').destroy();
},
// The changed parts!
debug: true, // enable logs, uses console.log
target: 'demo-browse' // the element for the overlay (Flash 10 only)
});
filter = {'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'};
swiffy.options.typeFilter = filter;
/**
* Various interactions
*/
$('demo-browse').addEvent('click', function() {
/**
* Doesn't work anymore with Flash 10: swiffy.browse();
* FancyUpload moves the Flash movie as overlay over the link.
* (see opeion "target" above)
*/
swiffy.browse();
return false;
});
/**
* The *NEW* way to set the typeFilter, since Flash 10 does not call
* swiffy.browse(), we need to change the type manually before the browse-click.
*/
$('demo-select-images').addEvent('change', function() {
var filter = null;
if (this.checked) {
filter = {'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'};
}
swiffy.options.typeFilter = filter;
});
$('demo-clear').addEvent('click', function() {
swiffy.removeFile();
return false;
});
$('demo-upload').addEvent('click', function() {
swiffy.upload();
return false;
});
});
</script>
<!--image viens de moi ou de vous ?-->
<?php
$id_article = intval($_GET['id_article']);
$id_type_article = intval($_GET['id_type_article']);
$u_id = intval($_GET['u_id']);
?>
</head>
<body>
<form action="doUpload.php" method="post" enctype="multipart/form-data" id="form-demo">
<fieldset id="demo-fallback">
<label for="demo-photoupload">
<!--variables hidden -->
<input type="hidden" name="id_article" value="<?php echo $id_article; ?>" />
<input type="hidden" name="id_type_article" value="<?php echo $id_type_article; ?>" />
<input type="hidden" name="u_id" value="<?php echo $u_id; ?>" />
Upload images:
<input type="file" name="photoupload" id="demo-photoupload" />
</label>
</fieldset>
<div id="demo-status" class="hide">
<p>
<a href="#" id="demo-browse">Explorer les fichiers</a> |
<input type="checkbox" id="demo-select-images" checked /> Images uniquement |
<a href="#" id="demo-clear">Effacer la liste</a> |
<a href="#" id="demo-upload">Envoyer !</a>
</p>
<div>
<strong class="overall-title">Progression totale</strong><br />
<img src="/upload/web/images/assets/progress-bar/bar.gif" class="progress overall-progress" />
</div>
<div>
<strong class="current-title">Progression du fichier</strong><br />
<img src="/upload/web/images/assets/progress-bar/bar.gif" class="progress current-progress" />
</div>
<div class="current-text"></div>
</div>
<ul id="demo-list"></ul>
</form>
</body>
</html> |
Partager