ziedinjsh Posted April 5, 2010 Report Share Posted April 5, 2010 vai nav kāds parasts upload scripts kurš procentuāli rāda cik tālu ir progress?? Paldies iepriekš :) Quote Link to comment Share on other sites More sharing options...
m8t Posted April 5, 2010 Report Share Posted April 5, 2010 (edited) http://www.ultramegatech.com/blog/2008/12/creating-upload-progress-bar-php/all/1/ Viens no pirmajiem rezultātiem google Edited April 5, 2010 by m8t Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted April 5, 2010 Author Report Share Posted April 5, 2010 (edited) tur ir parāk daudz failu, vajag kko mazāku :) Edited April 5, 2010 by ziedinjsh Quote Link to comment Share on other sites More sharing options...
Cibiņš Posted April 5, 2010 Report Share Posted April 5, 2010 Kā būs ar šiem? http://www.uploadify.com/demo/ Quote Link to comment Share on other sites More sharing options...
m8t Posted April 5, 2010 Report Share Posted April 5, 2010 tur ir parād daudz failu, vajag ko mazāku :) Tikai pēdējo daļu sapratu... Quote Link to comment Share on other sites More sharing options...
Kemito Posted April 5, 2010 Report Share Posted April 5, 2010 m8t - Viņu atbaida failu daudzums, kas tur ir! :D 32 - .php faili :D NEder jāņem kautkas mazāks! Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted April 5, 2010 Author Report Share Posted April 5, 2010 es jau lietoju uzpload scriptu, bet viņam ir tikai loader.gif bilde :D php <?php session_start(); if(isset($_SESSION['email'])){ include "html.php"; include "header.php"; include "menu.php"; $row = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE email = '{$_SESSION['email']}'")); if (isset($_POST['song'])){ $user_id = $row['user_id']; $folder = "mp3/"; $result = 0; $file = $folder . basename( $_FILES['song']['name']); $song = basename($_FILES['song']['name']); sleep(1); echo "<script language='javascript' type='text/javascript'>window.top.window.stopUpload(".$result.");</script>"; } echo "<form method='post' action='".$_SERVER['PHP_SELF']."' enctype='multipart/form-data' target='upload_target' onsubmit='startUpload();' >"; echo "<div id='loader-proces'><img src='misc/loader.gif' /><br>luudzu uzgaidiet kameer dziesma augshupielaadeejas</div>"; echo "<div id='form-proces'>"; echo "<input name='song' type='file' size='30' class='login-box'/><input type='submit' name='song' class='login-button' value='Upload' />"; echo "</div>"; echo "<iframe id='upload_target' name='upload_target' src='#' style='width:0;height:0;border:0px solid #fff;'></iframe>"; echo "</form>"; include "footer.php"; }else{ header("Location:index.php"); } ?> JS function startUpload(){ document.getElementById('loader-proces').style.visibility = 'visible'; document.getElementById('form-proces').style.visibility = 'hidden'; return true; } function stopUpload(success){ var result = ''; if (success == 1){ result = '<span class="msg">The file was uploaded successfully!<\/span><br/><br/>'; } else { result = '<span class="emsg">There was an error during file upload!<\/span><br/><br/>'; } document.getElementById('loader-proces').style.visibility = 'hidden'; document.getElementById('form-proces').innerHTML = result + '<meta http-equiv="refresh" content="2">'; document.getElementById('form-proces').style.visibility = 'visible'; return true; } varbūt var kāds pielāgot kādu JS rindu lai ir arī progresbar kas skaita prcentuāli vai nk kāds krāsu stabiņš kas atbilst progresam ?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.