Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php]Odliczenie
matik000
post 5.07.2010, 14:32:51
Post #1





Grupa: Zarejestrowani
Postów: 78
Pomógł: 0
Dołączył: 23.06.2007

Ostrzeżenie: (10%)
X----


Jest możliwość wykonać skrypt w php
który będzię odliczał 5 minut i dopiero po tym czasie będzie wykonywać dalszą cześć skryptu
np

echo "Zostalo $czas minut";
Go to the top of the page
+Quote Post
amii
post 5.07.2010, 14:35:22
Post #2





Grupa: Zarejestrowani
Postów: 728
Pomógł: 76
Dołączył: 12.06.2009

Ostrzeżenie: (0%)
-----


http://pl2.php.net/manual/en/function.sleep.php


--------------------
gry flash online
Dobry hosting i tanie odnowienia domen firma: masternet.
Zarabianie bez wysiłku na domenach bez ruchu: prolink.
Go to the top of the page
+Quote Post
wookieb
post 5.07.2010, 14:41:39
Post #3





Grupa: Moderatorzy
Postów: 8 989
Pomógł: 1550
Dołączył: 8.08.2008
Skąd: Słupsk/Gdańsk




Coś takiego to bardziej w javascript. google -> javascript countdown

Ten post edytował wookieb 5.07.2010, 14:41:51


--------------------
Go to the top of the page
+Quote Post
matik000
post 5.07.2010, 15:05:12
Post #4





Grupa: Zarejestrowani
Postów: 78
Pomógł: 0
Dołączył: 23.06.2007

Ostrzeżenie: (10%)
X----


  1.  
  2.  
  3. countdown = function(){
  4. /*
  5. configuration of script, properties with
  6. values and labels will become form elements!
  7. */
  8. var cfg = {
  9. displayID:'display',
  10. preferencesID:'preferences',
  11. finalClass:'final',
  12. overClass:'over',
  13. initialText:{
  14. value:'1:00',
  15. label:'Initial Text'
  16. },
  17. seconds:{
  18. value:1*60,
  19. label:'Time in Seconds'
  20. },
  21. finalCountdown:{
  22. value:30,
  23. label:'Warning start'
  24. },
  25. pauseLabel:{
  26. value:'pause',
  27. label:'Pause Text'
  28. },
  29. resumeLabel:{
  30. value:'resume',
  31. label:'Resume Text'
  32. },
  33. resetLabel:{
  34. value:'reset',
  35. label:'Reset Text'
  36. },
  37. startLabel:{
  38. value:'start',
  39. label:'Start Text'
  40. }
  41. };
  42.  
  43. /* presets */
  44. var seconds = cfg.seconds.value;
  45. var interval = null;
  46. var secs = null;
  47. var startTime = null;
  48. var realsecs = null;
  49.  
  50. /* create display */
  51. var display = document.createElement('div');
  52. display.id = cfg.displayID;
  53. document.body.appendChild(display);
  54. display.innerHTML = cfg.initialText.value;
  55.  
  56.  
  57. function startCountDown(){
  58. pauseButton.disabled = false;
  59. startButton.disabled = true;
  60. startTime = new Date();
  61. interval = setInterval(countdown.doCountDown, 100);
  62. }
  63. startCountDown()
  64. //return {doCountDown:doCountDown};
  65. }();
  66. </script>

Jest tu jakiś programista js ? Mógłby poprawić . wyświetla 1:00
ale nie odlicza .. chce zrobić tak by po odliczeniu do 0:00 przenosił do danej witryny..
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 18.07.2025 - 06:53