Pomoc - Szukaj - U¿ytkownicy - Kalendarz
Pe³na wersja: glosowanie i sprawdzenie ip
Forum PHP.pl > Forum > Przedszkole
matx132
witam
mam strone i chce zrobic na nie takie cos ze gdy ktos wchodzi wyskakuja linki do glosowania zanim nie przejdzie sie dalej
ale to latwo iminac:)
chce zrobic tak ze jest sprawdzane czy dane ip g³osowan³o juz dzis jesli tak to zostaje wpuszczony dalej jesli nie
musi zagloswac jak idze to zrobic?
glosnwanie takie takie cos
  1.  
  2. <meta http-equiv="Content-type" content="text/html; charset=windows-1250">
  3. <script language="JavaScript1.1">
  4.  
  5. <!-- Original: Martin Webb (martin@irt.org) -->
  6.  
  7. <!-- This script and many more are available free online at -->
  8. <!-- The JavaScript Source!! http://javascript.internet.com -->
  9.  
  10. <!-- Begin
  11. function right(e) {
  12. if (navigator.appName == 'Netscape' &&
  13. (e.which == 3 || e.which == 2))
  14. return false;
  15. else if (navigator.appName == 'Microsoft Internet Explorer' &&
  16. (event.button == 2 || event.button == 3)) {
  17. alert("BLOKADA PRAWEGO PRZYCISKU MYSZY !");
  18. return false;
  19. }
  20. return true;
  21. }
  22.  
  23. document.onmousedown=right;
  24. document.onmouseup=right;
  25. if (document.layers) window.captureEvents(Event.MOUSEDOWN);
  26. if (document.layers) window.captureEvents(Event.MOUSEUP);
  27. window.onmousedown=right;
  28. window.onmouseup=right;
  29. // End -->
  30.  
  31. </script></head><body bgcolor="black">
  32. <div align="center">
  33. <table style="border-collapse: collapse;" id="AutoNumber1" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" height="600" width="800">
  34. <tbody><tr>
  35. <img src="http://1.blurg.com/i/0/3/9/8/4/039846500ner0rq.gif">
  36. </center><br><br>
  37.  
  38.  
  39. t = 9000;
  40. function timer1(){
  41. setTimeout('adview.submit2.disabled = false' , t)
  42. }
  43.  
  44. function vote1(){
  45. window.open('http://war3z.topka.pl/?we=ewcom',"Toplista","toolbar=0,location=0, directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0 width=800,height=200")
  46. }
  47.  
  48. function timer2(){
  49. setTimeout('adview.submit3.disabled = false' , t)
  50. }
  51.  
  52. function vote2(){
  53. window.open('http://warez.top-100.pl/?we=pkcbtm',"Toplista","toolbar=0,location=0, directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0 width=800,height=200")
  54. }
  55.  
  56. function timer3(){
  57. setTimeout('adview.submit4.disabled = false' , t)
  58. }
  59.  
  60. function vote3(){
  61. window.open('http://warez.topka.pl/?we=elitewarez',"Toplista","toolbar=0,location=0, directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0 width=800,height=200")
  62. }
  63.  
  64. function go(){
  65. self.location="http://elitewarez.com.pl/vb/index.php";
  66. }
  67.  
  68.  
  69. <form name="adview">
  70. <p align="center">
  71. <input class="input2" style="border-style: solid; border-color: rgb(167, 206, 233); font-weight: bold; font-size: 10px; color: rgb(165, 214, 87); font-family: verdana; background-color: rgb(72, 113, 135);" onclick="timer1();vote1()" value="G³osowanie I" name="submit1" type="button"><br>
  72. <br>
  73. <input class="input2" style="border-style: solid; border-color: rgb(167, 206, 233); font-weight: bold; font-size: 10px; color: rgb(165, 214, 87); font-family: verdana; background-color: rgb(72, 113, 135);" disabled="disabled" onclick="timer2();vote2()" value="G³osowanie II" name="submit2" type="button"><br>
  74. <br>
  75. <input class="input2" style="border-style: solid; border-color: rgb(167, 206, 233); font-weight: bold; font-size: 10px; color: rgb(165, 214, 87); font-family: verdana; background-color: rgb(72, 113, 135);" disabled="disabled" onclick="timer3();vote3()" value="G³osowanie III" name="submit3" type="button"><br>
  76. <br>
  77.  
  78. <input class="input2" style="border-style: solid; border-color: rgb(167, 206, 233); font-weight: bold; font-size: 10px; color: rgb(204, 51, 0); font-family: Verdana; background-color: rgb(72, 113, 135);" disabled="disabled" onclick="go()" value=" --= Wejscie =--" name="submit4" type="button"></p>
  79. </form>
  80.  
  81. <font color="silver"><b>Kliknij na przycisk <u>"Glosowanie 1"</u>, zeby uaktywnic przycisk <u>"Glosowanie 2"</u> <br>kliknij na niego aby uaktywnic <u>"Glosowanie 3"</u> po czym kliknij <u>"Wejscie"</u> <br>zeby wejsc na forum.</b></font></center>
  82.  
  83.  
  84. </td>
  85.  
  86. </tr>
  87. </tbody></table>
  88. </center></div>
  89.  
  90.  
  91.  
  92. </body></html>
fiszol
A co z dynamicznymi adresami? lepiej wepchn±æ ciastko...
matx132
mzona spróbowac:)
tylko jak:D
fiszol
po oddaniu g³osu dajesz setcookie" title="Zobacz w manualu php" target="_manual a sam± sondê pakujesz w warunek:

  1. <?php
  2. if (!$_COOKIE['sonda']){
  3. //wyswietl sonde
  4. }
  5. else{
  6. //przekierowanie jakies czy cos
  7. }
  8. ?>
matx132
zrobilem takie cos
  1. <?php
  2. setcookie ("sonda", $value);
  3. setcookie ("sonda", $value,time()+3600); /* traci wa¿no¶æ za godzinê */
  4.  
  5. if (!$_COOKIE['sonda']){
  6.  
  7. <meta http-equiv="Content-type" content="text/html; charset=windows-1250">
  8. <script language="JavaScript1.1">
  9.  
  10. <!-- Original: Martin Webb (martin@irt.org) -->
  11.  
  12. <!-- This script and many more are available free online at -->
  13. <!-- The JavaScript Source!! <a href="http://javascript.internet.com" target="_blank">http://javascript.internet.com</a> -->
  14.  
  15. <!-- Begin
  16. function right(e) {
  17. if (navigator.appName == 'Netscape' &&
  18. (e.which == 3 || e.which == 2))
  19. return false;
  20. else if (navigator.appName == 'Microsoft Internet Explorer' &&
  21. (event.button == 2 || event.button == 3)) {
  22. alert("BLOKADA PRAWEGO PRZYCISKU MYSZY !");
  23. return false;
  24. }
  25. return true;
  26. }
  27.  
  28. document.onmousedown=right;
  29. document.onmouseup=right;
  30. if (document.layers) window.captureEvents(Event.MOUSEDOWN);
  31. if (document.layers) window.captureEvents(Event.MOUSEUP);
  32. window.onmousedown=right;
  33. window.onmouseup=right;
  34. // End -->
  35.  
  36. </script></head><body bgcolor="black">
  37. <div align="center">
  38.  <center>
  39.  <table style="border-collapse: collapse;" id="AutoNumber1" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" height="600" width="800">
  40.  <tbody><tr>
  41.  <td><center>
  42. <img src="http://1.blurg.com/i/0/3/9/8/4/039846500ner0rq.gif">
  43. </center><br><br>
  44.  
  45. <script>
  46.  
  47. = 9000;
  48. function timer1(){
  49. setTimeout('adview.submit2.disabled = false' , t)
  50. }
  51.  
  52. function vote1(){
  53.  window.open('http://war3z.topka.pl/?we=ewcom',"Toplista","toolbar=0,location=0, directories=0,status=0,menubar=0,scrollbars=1,resizab
    le=1,copyhistory=0 width=800,height=200"
    )
  54. }
  55.  
  56. function timer2(){
  57.  setTimeout('adview.submit3.disabled = false' , t)
  58. }
  59.  
  60. function vote2(){
  61.  window.open('http://warez.top-100.pl/?we=pkcbtm',"Toplista","toolbar=0,location=0, directories=0,status=0,menubar=0,scrollbars=1,resizab
    le=1,copyhistory=0 width=800,height=200"
    )
  62. }
  63.  
  64.  
  65. function go(){
  66. self.location="http://teamz.info/news.php";
  67. }
  68.  
  69. </script>
  70.  
  71. <form name="adview">
  72. <p align="center">
  73. <input class="input2" style="border-style: solid; border-color: rgb(167, 206, 233); font-weight: bold; font-size: 10px; color: rgb(165, 214, 87); font-family: verdana; background-color: rgb(72, 113, 135);" onclick="timer1();vote1()" value="G³osowanie I" name="submit1" type="button"><br>
  74. <br>
  75. <input class="input2" style="border-style: solid; border-color: rgb(167, 206, 233); font-weight: bold; font-size: 10px; color: rgb(165, 214, 87); font-family: verdana; background-color: rgb(72, 113, 135);" disabled="disabled" onclick="timer2();vote2()" value="G³osowanie II" name="submit2" type="button"><br>
  76.  
  77. <input class="input2" style="border-style: solid; border-color: rgb(167, 206, 233); font-weight: bold; font-size: 10px; color: rgb(204, 51, 0); font-family: Verdana; background-color: rgb(72, 113, 135);" disabled="disabled" onclick="go()" value=" --= Wejscie =--" name="submit3" type="button"></p>
  78. </form>
  79.  
  80. <br><center>
  81. <font color="silver"><b>Kliknij na przycisk <u>"Glosowanie 1"</u>, zeby uaktywnic przycisk <u>"Glosowanie 2"</u> <br> po czym kliknij <u>"Wejscie"</u> <br>zeby wejsc na Strone.</b></font></center>
  82.  
  83.  
  84. </td>
  85.  
  86.  </tr>
  87.  </tbody></table>
  88. </center></div>
  89.  
  90.  
  91. }
  92. else{
  93.  www.teamz.info/news.php
  94. }
  95. ?>


lecz to nie dziala czemu?
fiszol
Nie mo¿esz ¿wycem w kod php wk³adaæ htmla i javacsriptu
matx132
ale tu mi tylko setcookie nie dzia³a
fiszol
Czy¿by? to co pokaza³e¶ w ogóle nie ma prawa dzia³aæ w ¿aden sposób, a w³a¶ciwa ma prawo - wywaliæ parse error ...

samo ciastko:
  1. <?php
  2. setcookie ("sonda", "glosowal", time()+3600*3600);
  3. ?>
matx132
wiec jak moge zrobic to??
chodzi mi o takie g³osowanie jakby:)
czy mozecie mi pomóc?
fiszol
poprzez echo, np:

  1. <?
  2. echo '<meta http-equiv="Content-type" content="text/html; charset=windows-1250">';
  3. ?>


albo w kod html w odpowiednich miejscach powstawiać części kodu php, np:
  1. <meta http-equiv="Content-type" content="text/html; charset=windows-1250">
  2. <?
  3. setcookie ('sonda', 'glosowal', time()+3600*3600);
  4. ?>



W tym dziale masz podwieszony temat o kursach pisania w php, zgłęb go, bo mi już sił do Ciebie zaczyna brakować winksmiley.jpg
matx132
jakos czasu nie mam:D
moze po sylwku:D
a ktry najlepszy
smile.gif
To jest wersja lo-fi g³ównej zawarto¶ci. Aby zobaczyæ pe³n± wersjê z wiêksz± zawarto¶ci±, obrazkami i formatowaniem proszê kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.