summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TCaptcha/Home.php
blob: 4d54ce8725b97ee73a9b0c91dc6235998427d5c8 (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,31);
			$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!";
	}
}

?>