Просмотр файла gallery/protect.php

Размер файла: 1.83Kb
  1. <?php
  2. #-----------------------------------------------------#
  3. # ********* WAP-MOTORS ********* #
  4. # Made by : VANTUZ #
  5. # E-mail : visavi.net@mail.ru #
  6. # Site : http://pizdec.ru #
  7. # WAP-Site : http://visavi.net #
  8. # ICQ : 36-44-66 #
  9. # Вы не имеете право вносить изменения в код скрипта #
  10. #-----------------------------------------------------#
  11. require_once"../template/start.php";
  12. require_once"../template/regglobals.php";
  13. require_once"../template/config.php";
  14. require_once"../template/functions.php";
  15.  
  16.  
  17. if($pkod!=""){
  18.  
  19. $pkod=xoft_decode($pkod,$config_keypass);
  20.  
  21. $kod1=substr($pkod, 0, 1);
  22. $kod2=substr($pkod, 1, 1);
  23. $kod3=substr($pkod, 2, 1);
  24. $kod4=substr($pkod, 3, 1);
  25.  
  26. $img=imagecreate(42,18);
  27. $fon=imagecolorallocate($img,255,255,255);
  28. imagefill($img,0,0,$fon);
  29.  
  30. $color1 = imagecolorallocate($img,rand(0,204),rand(0,204),rand(0,204));
  31. $color2 = imagecolorallocate($img,rand(0,204),rand(0,204),rand(0,204));
  32. $color3 = imagecolorallocate($img,rand(0,204),rand(0,204),rand(0,204));
  33. $color4 = imagecolorallocate($img,rand(0,204),rand(0,204),rand(0,204));
  34.  
  35. ImageString($img, 5, rand(2,3), rand(0,3), $kod1, $color1);
  36. ImageString($img, 5, rand(11,12), rand(0,3), $kod2, $color2);
  37. ImageString($img, 5, rand(20,21), rand(0,3), $kod3, $color2);
  38. ImageString($img, 5, rand(29,30), rand(0,3), $kod4, $color3);
  39.  
  40. if($config_protectdef==1){
  41. for ($i=0; $i<5; $i++){
  42. $temp_color=imagecolorallocate($img,204,204,204);
  43. $pos=array(rand(0,42),rand(0,18),rand(0,42),rand(0,18));
  44. imageline($img,$pos[0],$pos[1],$pos[2],$pos[3],$temp_color);
  45. }
  46. }
  47.  
  48. Header("Content-type: image/gif");
  49. ImageGIF($img);
  50. ImageDestroy($img);
  51.  
  52. }
  53. ?>