summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TCaptcha/Home.php
blob: 6965bbbddd8b89171e25e7df4e159ccee5d2b450 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

class Home extends TPage
{
	public function onInit($param)
	{
		if(!$this->IsPostBack)
		{
			$this->CaptchaList->DataSource=range(0,63);
			$this->CaptchaList->dataBind();
		}
	}

	public function regenerateToken($sender,$param)
	{
		$this->Captcha->regenerateToken();
		$this->SubmitButton->Text="Submit";
	}

	public function buttonClicked($sender,$param)
	{
		if($this->IsValid)
			$sender->Text="You passed!";
	}
}

?>