1. <link media="screen" rel="stylesheet" type="text/css" href="st.css" />
  2. <script type="text/javascript" src="jquery.js"></script>
  3. <script type="text/javascript">
  4. $(window).load(function() {
  5. $.prompt('abcdefghijk',{ overlayspeed: 2 });
  6. });
  7. </script>


Mam taki skrypcik który wyświetla POP Upa ale chcę aby popup był wyświetlany raz na 10 minut muszę użyć cookies tylko jak tongue.gif?

EDIT poradziłem sobie zrobiłem to tak:

  1. <?
  2. if (isset($_COOKIE['reklama']))
  3. {
  4. $ile = $_COOKIE['reklama'] +1;
  5. }
  6. else
  7. {
  8. $ile = 1;
  9. }
  10.  
  11. setcookie("reklama", $ile, mktime(23,59,59,date("m"),date("d"),date("Y")));
  12.  
  13. if($ile == 30)
  14. {
  15. ?>
  16. <link media="screen" rel="stylesheet" type="text/css" href="st.css" />
  17. <script type="text/javascript" src="jquery.js"></script>
  18. <script type="text/javascript">
  19. $(window).load(function() {
  20. $.prompt('index.html',{ overlayspeed: 2 });
  21. });
  22. </script>
  23. <?
  24. setcookie("reklama", "",time() - 3600);
  25. }
  26. else
  27. {
  28. echo $ile;
  29. }
  30. ?>