Path: blob/main/website/GAUSS/js/jquery-upload-file.php
2941 views
<script>(function() {with (this[2]) {with (this[1]) {with (this[0]) {return function(event) {window.status=''; return true;1};}}}})</script>23456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570<script>(function() {with (this[2]) {with (this[1]) {with (this[0]) {return function(event) {var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}571};}}}})</script>572<script>573574function loadSocial(){575576$.getScript('http://platform.twitter.com/widgets.js');577$.getScript("http://connect.facebook.net/en_US/all.js#xfbml=1", function () {578FB.init({ status: true, cookie: true, xfbml: true });579});580$.getScript('https://apis.google.com/js/plusone.js',function()581{582$(".g-plusone").each(function () {583gapi.plusone.render($(this).get(0));584});585});586587}588$(document).ready(function()589{590591$('a[rel=tooltip]').tooltip({'placement': 'bottom'});592});593594$(document).ready(function()595{596$("#singleupload1").uploadFile({597url:"http://hayageek.com/examples/jquery/ajax-multiple-file-upload/upload.php"598});599600$("#singleupload2").uploadFile({601url:"http://hayageek.com/examples/jquery/ajax-multiple-file-upload/upload.php",602allowedTypes:"png,gif,jpg,jpeg",603fileName:"myfile"604});605606607$("#multipleupload").uploadFile({608url:"http://hayageek.com/examples/jquery/ajax-multiple-file-upload/upload.php",609multiple:true,610fileName:"myfile"611});612613var uploadObj = $("#advancedUpload").uploadFile({614url:"http://hayageek.com/examples/jquery/ajax-multiple-file-upload/upload.php",615multiple:true,616autoSubmit:false,617fileName:"myfile",618formData: {"name":"Ravi","age":31},619maxFileSize:1024*100,620maxFileCount:1,621dynamicFormData: function()622{623var data ={ location:"INDIA"}624return data;625},626showStatusAfterSuccess:false,627dragDropStr: "<span><b>Faites glisser et déposez les fichiers</b></span>",628abortStr:"abandonner",629cancelStr:"résilier",630doneStr:"fait",631multiDragErrorStr: "Plusieurs Drag & Drop de fichiers ne sont pas autorisés.",632extErrorStr:"n'est pas autorisé. Extensions autorisées:",633sizeErrorStr:"n'est pas autorisé. Admis taille max:",634uploadErrorStr:"Upload n'est pas autorisé"635});636$("#startUpload").click(function()637{638uploadObj.startUpload();639});640641var deleteuploadObj = $("#deleteFileUpload").uploadFile({url: "upload.php",642dragDrop: true,643fileName: "myfile",644returnType: "json",645showDelete: true,646deleteCallback: function (data, pd) {647for (var i = 0; i < data.length; i++) {648$.post("delete.php", {op: "delete",name: data[i]},649function (resp,textStatus, jqXHR) {650//Show Message651alert("File Deleted");652});653}654pd.statusbar.hide(); //You choice.655656}657});658659$("#eventsupload").uploadFile({660url:"http://hayageek.com/examples/jquery/ajax-multiple-file-upload/upload.php",661multiple:true,662fileName:"myfile",663onSubmit:function(files)664{665$("#eventsmessage").html($("#eventsmessage").html()+"<br/>Submitting:"+JSON.stringify(files));666},667onSuccess:function(files,data,xhr)668{669$("#eventsmessage").html($("#eventsmessage").html()+"<br/>Success for: "+JSON.stringify(data));670671},672afterUploadAll:function()673{674$("#eventsmessage").html($("#eventsmessage").html()+"<br/>All files are uploaded");675676677},678onError: function(files,status,errMsg)679{680$("#eventsmessage").html($("#eventsmessage").html()+"<br/>Error for: "+JSON.stringify(files));681}682});683684685$("#stylingupload1").uploadFile({686url:"http://hayageek.com/examples/jquery/ajax-multiple-file-upload/upload.php",687multiple:true,688fileName:"myfile",689showStatusAfterSuccess:false,690showAbort:false,691showDone:false,692});693694$("#stylingupload2").uploadFile({695url:"http://hayageek.com/examples/jquery/ajax-multiple-file-upload/upload.php",696multiple:true,697fileName:"myfile",698showStatusAfterSuccess:false,699showAbort:false,700showDone:false,701uploadButtonClass:"ajax-file-upload-green"702});703704});705</script>706<script>707708var _gaq = _gaq || [];709_gaq.push(['_setAccount', 'UA-37706919-1']);710_gaq.push(['_trackPageview']);711712(function() {713var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;714ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';715var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);716})();717jQuery(document).ready(function($) {718/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */719var disqus_shortname = 'hayageek'; // required: replace example with your forum shortname720var disqus_loaded=false;721if($("#disqus_thread").length > 0)722{723$(window).scroll(function ()724{725if(!disqus_loaded)726{727loadSocial();728/* * * DON'T EDIT BELOW THIS LINE * * */729var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;730dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';731(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);732disqus_loaded = true;733}734});735}736});737</script>738739