summaryrefslogtreecommitdiff
path: root/demos/helloworld/protected/pages/Home.php
diff options
context:
space:
mode:
authorxue <>2007-08-29 03:14:14 +0000
committerxue <>2007-08-29 03:14:14 +0000
commitffdffb3e1a7711c962ddbb233b84063abc407de6 (patch)
tree53d00781a306d5eeac2c60e5536c23ba9452e9bb /demos/helloworld/protected/pages/Home.php
parent491d3956a4f1bc6ce5501bcc0449007a16514288 (diff)
fixed a small bug.
Diffstat (limited to 'demos/helloworld/protected/pages/Home.php')
-rw-r--r--demos/helloworld/protected/pages/Home.php11
1 files changed, 10 insertions, 1 deletions
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();
}
}