<?php
/**************************************************************************\
* book class as sample class lowbatCMS
* *
* Written and (c) 2006 by Samuel Talleux <hide@address.com>
*
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
***************************************************************************/
require_once (CMS_PATH.'/inc/entry.class.php');
/**
* A book
* *
* Samuel Talleux <hide@address.com>
* @license http://opensource.org/licenses/gpl-license.php
* GPL - GNU General Public License
*/
class Book extends Entry{
function Book ($id = 0, $usePost = false) {
$this->setTable('t_book');
parent::Entry(array (
'Title' => 'TextField',
'Author' => 'TextField',
'ISBN' => 'TextField',
'Date' => 'IntField',
'Description' => 'TextField',
'SoldOut' => 'BoolField'),
$id, $usePost);
//$descField = $this->getField('Description');
//$descField ->setTextarea(true); // for XTextField only
DEBUG('$this->getField(\'Description\')'.print_r($this->getField('Description'), 1) , 3);
// Set default values
/* $this->getField('SoldOut')->setValue(false);
DEBUG($this->getField('SoldOut')->getValue('ISBN').", $id)", 1);
echo $this->getField('SoldOut')->getValue();
*/ }
}
?>