, January 2003. $Id: rot13.hack,v 1.2 2004/03/29 13:27:25 cky Exp $ Copyright (c) 2003, 2004 Chris K. Young. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licence as published by the Free Software Foundation; either version 2 of the Licence, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licence for more details. You should have received a copy of the GNU General Public Licence along with this program; if not, write to Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ class rot13 { var $tmpl; function common_form($text) { ?>

tmpl = new template('The rot13 gimmick'); $this->tmpl->set_rcsid('$Id: rot13.hack,v 1.2 2004/03/29 13:27:25 cky Exp $'); $this->tmpl->print_header(); } function validate_input() { return isset($_POST['text']); } function process_input() { $text = $_POST['text']; ?>

The original text was:

common_form($text); ?>

The converted text is:

The rot13 gimmick converts the input text using rot13, and displays the result.

common_form(''); } function print_footer() { $this->tmpl->print_footer(); } } ?>