<?php

class MacWikiCaptcha2 extends SimpleCaptcha {

        function getCaptcha() {
                $test = "いちたすには";
                $answer = "さん";

                return array('question' => $test, 'answer' => $answer);
	}

        function getForm() {
                $captcha = $this->getCaptcha();
                $index = $this->storeCaptcha( $captcha );

                return "<p><label for=\"wpCaptchaWord\">{$captcha['question']}</label> = " .
                        Xml::element( 'input', array(
                                'name' => 'wpCaptchaWord',
                                'id'   => 'wpCaptchaWord',
                                'tabindex' => 1 ) ) . // tab in before the edit textarea
                        "</p>\n" .
                        Xml::element( 'input', array(
                                'type'  => 'hidden',
                                'name'  => 'wpCaptchaId',
                                'id'    => 'wpCaptchaId',
                                'value' => $index ) );
        }
}
?>
