Пример #1
0
 switch ($_GET["showLoad"]) {
     case "captcha":
         CTM_Captcha::$number = 8;
         CTM_Captcha::$size = 18;
         CTM_Captcha::$words = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
         CTM_Captcha::$bg = PUBLIC_DIRECTORY . "/style_captcha/backgrounds/{rand}.gif";
         CTM_Captcha::$fontDir = PUBLIC_DIRECTORY . "/style_captcha/fonts/";
         CTM_Captcha::$fonts = array(0 => array("constan.ttf", 8), 1 => array("FRABK.ttf", 8), 2 => array("MAIAN.ttf", 8));
         CTM_Captcha::$colors = array(0 => array(131, 7, 124), 1 => array(70, 138, 239), 2 => array(30, 30, 30), 3 => array(118, 106, 0), 4 => array(157, 10, 79), 5 => array(72, 104, 33), 6 => array(214, 0, 0), 7 => array(48, 71, 160));
         CTM_Captcha::$border = array(0 => true, 1 => array(0, 0, 0));
         CTM_Captcha::$setLines = array(0 => true, 1 => array(0 => array(70, 120, 278), 1 => array(0, 0, 0), 2 => array(48, 71, 160)));
         CTM_Captcha::CaptchaImage(186, 27);
         exit;
         break;
     case "gmark":
         GuildMark::getMark($_GET['hexa'], 100);
         exit;
         break;
     case "jslang":
         if ($_GET['lang']) {
             if (file_exists(CTM_ROOT_PATH . "cache/lang_cache/" . $_GET['lang'] . "/web_" . CTM_ROOT_AREA . ".js")) {
                 header("Content-type: text/javascript");
                 readfile(CTM_ROOT_PATH . "cache/lang_cache/" . $_GET['lang'] . "/web_" . CTM_ROOT_AREA . ".js");
             }
         }
         exit;
         break;
     default:
         exit("showLoad Error");
         break;
 }
Пример #2
0
 /**
  * Cria a imagem e define o tamanho dos pixels
  * @internal
  * @access private
  * @return void
  */
 private static function createImage()
 {
     self::$px = self::$size / 8;
     self::$image = imagecreate(self::$size, self::$size);
     imagecolorallocatealpha(self::$image, 255, 255, 255, 127);
 }