summaryrefslogtreecommitdiff
path: root/demos/helloworld/protected/pages/Home.php
blob: 9722a782df4181cf17e1103f9ac1109e0382b969 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

class Home extends TPage
{
	public function onPreRender($param)
	{
		echo "token is |".$this->Captcha->Token."|";
	}

	public function buttonClicked($sender,$param)
	{
		if($this->Captcha->validate($this->Input->Text))
			$sender->Text="ok";
		else
			$sender->Text="no!";
		$this->Captcha->regenerateToken();
	}
}

?>