, October 2002. $Id: template.hack,v 1.4 2002/11/02 12:24:51 cky Exp $ Copyright (c) 2002 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 template { var $title; var $rcsid; function template($title = 'The template gimmick') { $this->set_title($title); } function doctype() { return array('root' => 'html', 'pubid' => '-//W3C//DTD XHTML 1.0 Strict//EN', 'sysid' => 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'); } function set_title($title) { $this->title = $title; } function set_rcsid($rcsid) { $this->rcsid = $rcsid; } function print_header() { $doctype = $this->doctype(); printf("\n", $doctype['root'], $doctype['pubid'], $doctype['sysid']); ?> rcsid)) printf("\n", $this->rcsid); ?>
The template gimmick generates the default header and footer used by gimmicks.hedgee.com. Other gimmicks can use this script if they wish to make a page that follows the same design.
'html', 'pubid' => '-//W3C//DTD XHTML 1.0 Transitional//EN', 'sysid' => 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'); } } ?>