From ffdffb3e1a7711c962ddbb233b84063abc407de6 Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 29 Aug 2007 03:14:14 +0000 Subject: fixed a small bug. --- demos/helloworld/protected/pages/Home.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'demos/helloworld/protected/pages/Home.php') diff --git a/demos/helloworld/protected/pages/Home.php b/demos/helloworld/protected/pages/Home.php index 432c2ee7..9722a782 100644 --- a/demos/helloworld/protected/pages/Home.php +++ b/demos/helloworld/protected/pages/Home.php @@ -2,9 +2,18 @@ class Home extends TPage { + public function onPreRender($param) + { + echo "token is |".$this->Captcha->Token."|"; + } + public function buttonClicked($sender,$param) { - $sender->Text="Hello World!"; + if($this->Captcha->validate($this->Input->Text)) + $sender->Text="ok"; + else + $sender->Text="no!"; + $this->Captcha->regenerateToken(); } } -- cgit v1.2.3