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

Размер файла: 4.35Kb
  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. #-----------------------------------------------------#
  12. require_once "../includes/start.php";
  13. require_once "../includes/functions.php";
  14.  
  15. if (isset($_GET['rat']) && $_GET['rat']!="") {$rat = (int)$_GET['rat'];} else {$rat = 0;}
  16. if (isset($_GET['imgs']) && $_GET['imgs']!="") {$imgs = (int)$_GET['imgs'];} else {$imgs = 1;}
  17. if (isset($_GET['limit']) && $_GET['limit']!="") {$limit = (int)$_GET['limit'];} else {$limit = 50;}
  18.  
  19.  
  20. if ($rat<0 || $rat>100){$rat=0;}
  21. if ($limit<0 || $limit>100){$limit=0;}
  22. if ($rat==100){$rats=99;} else {$rats=$rat;}
  23.  
  24. if ($imgs==1){
  25. header("Content-type: image/gif");
  26. $im = imageCreateFromGif ("../images/img/grafic.gif");
  27.  
  28. $color = imagecolorallocate($im, 255, 204, 204);
  29. $color2 = imagecolorallocate($im, 255, 153, 153);
  30. $color3 = imagecolorallocate($im, 255, 102, 102);
  31. $color4 = imagecolorallocate($im, 255, 51, 51);
  32. $color5 = imagecolorallocate($im, 255, 102, 102);
  33. $color6 = imagecolorallocate($im, 0, 0, 0);
  34.  
  35. if ($rat>0){
  36. imagefilledrectangle ($im, 2, 1, $rats, 2, $color);
  37. imagefilledrectangle ($im, 1, 3, $rat, 4, $color2);
  38. imagefilledrectangle ($im, 1, 5, $rat, 6, $color3);
  39. imagefilledrectangle ($im, 1, 7, $rat, 8, $color4);
  40. imagefilledrectangle ($im, 2, 9, $rats, 10, $color5);
  41. }
  42.  
  43. ImageString($im, 1, 78, 2, "$rat%", $color6);
  44. ImageGif ($im);
  45. }
  46.  
  47. if ($imgs==2){
  48. header("Content-type: image/gif");
  49. $im = imageCreateFromGif ("../images/img/grafic.gif");
  50.  
  51. //--------------- Уровень ограничения ----------------------//
  52.  
  53. $colorfon = imagecolorallocate($im, 218, 219, 219);
  54. $colorfon2 = imagecolorallocate($im, 197, 198, 198);
  55. $colorfon3 = imagecolorallocate($im, 175, 176, 176);
  56. $colorfon4 = imagecolorallocate($im, 153, 154, 154);
  57. $colorfon5 = imagecolorallocate($im, 175, 176, 176);
  58.  
  59.  
  60. imagefilledrectangle ($im, 2, 1, $limit, 2, $colorfon);
  61. imagefilledrectangle ($im, 1, 3, $limit, 4, $colorfon2);
  62. imagefilledrectangle ($im, 1, 5, $limit, 6, $colorfon3);
  63. imagefilledrectangle ($im, 1, 7, $limit, 8, $colorfon4);
  64. imagefilledrectangle ($im, 2, 9, $limit, 10, $colorfon5);
  65.  
  66. //-----------------------------------------------------------//
  67. $color = imagecolorallocate($im, 201, 201, 253);
  68. $color2 = imagecolorallocate($im, 153, 153, 255);
  69. $color3 = imagecolorallocate($im, 102, 102, 255);
  70. $color4 = imagecolorallocate($im, 51, 51, 255);
  71. $color5 = imagecolorallocate($im, 102, 102, 255);
  72. $color6 = imagecolorallocate($im, 0, 0, 0);
  73.  
  74. if ($rat>0){
  75. imagefilledrectangle ($im, 2, 1, $rats, 2, $color);
  76. imagefilledrectangle ($im, 1, 3, $rat, 4, $color2);
  77. imagefilledrectangle ($im, 1, 5, $rat, 6, $color3);
  78. imagefilledrectangle ($im, 1, 7, $rat, 8, $color4);
  79. imagefilledrectangle ($im, 2, 9, $rats, 10, $color5);
  80. }
  81.  
  82.  
  83. ImageString($im, 1, 78, 2, "$rat%", $color6);
  84. ImageGif ($im);
  85. }
  86.  
  87.  
  88. if ($imgs==3){
  89. header("Content-type: image/gif");
  90. $im = imageCreateFromGif ("../images/img/grafic.gif");
  91.  
  92. $color = imagecolorallocate($im, 204, 255, 204);
  93. $color2 = imagecolorallocate($im, 153, 255, 153);
  94. $color3 = imagecolorallocate($im, 102, 255, 102);
  95. $color4 = imagecolorallocate($im, 0, 255, 0);
  96. $color5 = imagecolorallocate($im, 102, 255, 102);
  97. $color6 = imagecolorallocate($im, 0, 0, 0);
  98.  
  99.  
  100. if ($rat>0){
  101. imagefilledrectangle ($im, 2, 1, $rats, 2, $color);
  102. imagefilledrectangle ($im, 1, 3, $rat, 4, $color2);
  103. imagefilledrectangle ($im, 1, 5, $rat, 6, $color3);
  104. imagefilledrectangle ($im, 1, 7, $rat, 8, $color4);
  105. imagefilledrectangle ($im, 2, 9, $rats, 10, $color5);
  106. }
  107.  
  108. ImageString($im, 1, 78, 2, "$rat%", $color6);
  109. ImageGif ($im);
  110. }
  111.  
  112. /* if ($imgs==4){
  113. header("Content-type: image/gif");
  114. $im = ImageCreate (102, 12);
  115.  
  116. $color = ImageColorAllocate ($im, 239, 244, 245);
  117. $color2 = imagecolorallocate($im, 51, 255, 0);
  118. $color3 = imagecolorallocate($im, 153, 153, 153);
  119.  
  120. imagefilledrectangle ($im, 1, 1, $rat, 10, $color2);
  121. imagerectangle ($im, 0, 0, 101, 11, $color3);
  122. ImageGif ($im);
  123. } */
  124.  
  125. ?>