tobitaz

undi.php

Jul 22nd, 2013
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.18 KB | None | 0 0
  1. <?php
  2.  
  3. $bn = $_POST["bn"];
  4. $pr = $_POST["pr"];
  5.  
  6.  
  7. if($bn <2 && $bn != null)
  8. {
  9.  
  10. $ip = $_SERVER['REMOTE_ADDR'];
  11. $checkip = file_get_contents("ip.txt");
  12. $ipc = strripos($checkip, $ip);
  13.  
  14.    if($ipc === false)
  15.     {
  16.        $ip = $_SERVER['REMOTE_ADDR'];
  17.  
  18.  
  19.        $tulis = fopen("ip.txt", "a+");
  20.        fwrite($tulis, $ip."\n");
  21.        fclose($tulis);
  22.  
  23.  
  24.  
  25.  
  26.  
  27.        $totalbn = file_get_contents("totalbn.txt");
  28.        $tulis = fopen("totalbn.txt", "w+");
  29.        fwrite($tulis, $bn+$totalbn);
  30.        fclose($tulis);
  31.  
  32.      echo "terima kasih kerana menunaikan tanggungjawab anda";
  33.       }
  34.     else
  35.       {
  36.      echo "ko dah undi la... ni mesti bangla ke nak undi bnyk2,ni anak najib eh?";
  37.       }
  38.  
  39.  
  40. }
  41. elseif($pr <2 && $pr != null)
  42. {
  43.  
  44.  
  45. $ip = $_SERVER['REMOTE_ADDR'];
  46. $checkip = file_get_contents("ip.txt");
  47. $ipc = strripos($checkip, $ip);
  48.  
  49.    if($ipc === false)
  50.     {
  51.        $ip = $_SERVER['REMOTE_ADDR'];
  52.  
  53.  
  54.        $tulis = fopen("ip.txt", "a+");
  55.        fwrite($tulis, $ip."\n");
  56.        fclose($tulis);
  57.  
  58.  
  59.  
  60.  
  61.  
  62.        $totalpr = file_get_contents("totalpr.txt");
  63.        $tulis = fopen("totalpr.txt", "w+");
  64.        fwrite($tulis, $pr+$totalpr);
  65.        fclose($tulis);
  66.  
  67.      echo "terima kasih kerana menunaikan tanggungjawab anda";
  68.       }
  69.     else
  70.       {
  71.      echo "ko dah undi la... ni mesti bangla ke nak undi bnyk2...ni anak anwar eh?";
  72.       }
  73.  
  74.  
  75.  
  76.  
  77.  
  78. }
  79. else
  80. {
  81. echo '<center><font style="font-size:40;">Pilihanraya Online</font><br />';
  82. echo "Jumlah :[<font color='red'>".file_get_contents("totalpr.txt")."</font>]";
  83. echo '
  84. <form action="" method="post">
  85. <input type="hidden" value="1" name="pr">
  86. <input type="image" value="Pakatan Rakyat" src="http://3.bp.blogspot.com/-1Y0_Rja0lPo/USMPhLXepkI/AAAAAAAACzk/SBw2B_eyZi4/s400/pkr+dap+pas.jpg" width="30%" style="border:3px red outset;">
  87. </form>';
  88. echo "<br />Jumlah :[<font color='red'>".file_get_contents("totalbn.txt")."</font>]";
  89. echo '<form action="" method="post">
  90. <input type="hidden" value="1" name="bn">
  91. <input type="image" value="Barisan Nasional" src="http://www.abc.net.au/news/image/4658472-3x2-940x627.png" width="30%" style="border:3px blue outset;">
  92. </form></center>';
  93.  
  94.  
  95.  
  96.  
  97.  
  98. }
  99.  
  100.  
  101.  
  102.  
  103. ?>
Advertisement
Add Comment
Please, Sign In to add comment