<?php

if (!defined('XOOPS_ROOT_PATH')) exit();

class User_AbstractFilterForm
{
	var $mSort = 0;
	var $mSortKeys = array();
	var $_mCriteria = null;
	var $_mNavi = null;

	function User_AbstractFilterForm(&$navi)
	{
		$this->_mNavi =& $navi;
		$this->_mCriteria =& new CriteriaCompo();
	}

	function fetch()
	{
	}

	function getSort()
	{
		$sortkey = abs($this->mSort);
		return isset($this->mSortKeys[$sortkey]) ? $this->mSortKeys[$sortkey] : 0;
	}

	function getOrder()
	{
		return ($this->mSort < 0) ? "DESC" : "ASC";
	}

	function getCriteria($start = 0, $limit = 0)
	{
		$criteria = $this->_mCriteria;
		
		$criteria->setStart($start);
		$criteria->setLimit($limit);
		
		return $criteria;
	}
}

?>
