Changeset 2172

Show
Ignore:
Timestamp:
08/28/2007 10:15:30 PM (15 months ago)
Author:
xue
Message:

revert.

Location:
trunk/demos/helloworld/protected/pages
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/demos/helloworld/protected/pages/Home.page

    r2171 r2172  
    88 
    99<com:TForm> 
    10 <com:TCaptcha ID="Captcha" CaseSensitive="true" MaxTokenLength="5" /> 
    11 <com:TTextBox ID="Input" /> 
    1210<com:TButton Text="Click me" OnClick="buttonClicked" /> 
    13 <com:TCaptchaValidator EnableClientScript="true" ControlToValidate="Input" CaptchaControl="Captcha" Text="invalid" /> 
    1411</com:TForm> 
    1512 
  • trunk/demos/helloworld/protected/pages/Home.php

    r2171 r2172  
    33class Home extends TPage 
    44{ 
    5         public function onPreRender($param) 
    6         { 
    7                 echo "token is |".$this->Captcha->Token."|"; 
    8         } 
    9  
    105        public function buttonClicked($sender,$param) 
    116        { 
    12                 if($this->Captcha->validate($this->Input->Text)) 
    13                         $sender->Text="ok"; 
    14                 else 
    15                         $sender->Text="no!"; 
    16                 $this->Captcha->regenerateToken(); 
     7                $sender->Text='Hello world!'; 
    178        } 
    189}