<?php
// $Id: discuss.php 93 2006-09-10 18:30:31Z yosha_01 $
require '../../../include/cp_header.php';
require '../class/discuss.php';
require_once '../class/xoopssimplecontroller.php';

class DiscussDiscussAdminList extends XoopsTableObjectList
{
	function DiscussDiscussAdminList() {
		$this->addElement('discuss_id', 'id', 20, array('sort'=>true));
		$this->addElement('subject', 'agenda', 120, array('sort'=>true));
		$this->addElement('description',  'description', 500);
		$this->addElement('count_message_id_','message',50, array('extraVar'=>'__ExtraVar__','sort'=>true,'filter'=>true));
		$this->addElement('__SimpleEditLink__','',50);
		$this->addElement('__SimpleDeleteLink__','',50);
	}
}

class DiscussDiscussAdminForm extends XoopsTableObjectForm
{
	function DiscussDiscussAdminForm() {
		$this->setPrefix('discuss');
		$this->addElement('discuss_id', 'Hidden', '', 0);
		$this->addElement('subject', 'Text', 'agenda');
        $this->addElement('description', 'Textarea', 'description', array('rows'=>3, 'cols'=>30));
	}
}

$simpleAdmin =& new XoopsSimpleAdminController('DiscussDiscuss', _AD_DISCUSS_LANG_DISCUSS);
$simpleAdmin->setJoin2List('discuss_message', 'discuss_id', 'discuss_id');
$simpleAdmin->groupby = $xoopsDB->prefix('discuss').'.discuss_id';
$simpleAdmin->execute();
?>