示例#1
0
 public function __construct($method = 'post', $action = '', $name = '')
 {
     parent::__construct();
     $this->csfrCheckName = Hash::r();
     $this->csfrCheckValue = Hash::r3();
     $this->action = $action;
     $this->method = $method;
     $this->formData[] = '<form method="' . $this->method . '" action="' . $this->action . '" name="' . $name . '">';
     $this->formData[] = '<input type="hidden" name="' . $this->csfrCheckName . '" value="' . $this->csfrCheckValue . '">';
     $this->select = NULL;
 }
示例#2
0
 public function __construct($width = 400, $height = 200)
 {
     parent::__construct();
     if (!Validator::isNumber($width) || Validator::isNumber($height)) {
         throw new IllegalArgumentException();
     }
     $this->captcha = new Images($width, $height);
     $this->captcha->setBackgroundColor(new Color(0, 0, 0));
     $this->captcha->setTextColor(new Color(255, 255, 255));
     $string = new StringW(Hash::r());
     $this->text = $string->subString(0, Math::randomInterval(6, 8));
     $this->captcha->setText(Math::randomInterval(2, 6), new Point(0, 0), $string, FALSE);
 }
示例#3
0
 public function __construct()
 {
     parent::__construct();
     $this->hash = Hash::r();
 }