示例#1
0
 function __construct($tablename, $filterfield, $isstring = true)
 {
     // setup for all required function and classes
     $file = JPATH_SITE . '/components/com_jevents/mod.defines.php';
     if (file_exists($file)) {
         include_once $file;
     }
     $reg =& JevRegistry::getInstance("jevents");
     $this->datamodel = $reg->getReference("jevents.datamodel", false);
     if (!$this->datamodel) {
         $this->datamodel = new JEventsDataModel();
         $this->datamodel->setupComponentCatids();
     }
     $this->filterType = "category";
     $this->filterLabel = JText::_('CATEGORY');
     $this->filterNullValue = "0";
     parent::__construct($tablename, "catid", true);
     $catid = $this->filter_value;
     // NO filtering of the list att all
     $this->allAccessibleCategories = $this->datamodel->accessibleCategoryList(null, $this->datamodel->mmcatids, $this->datamodel->mmcatidList);
     if ($this->filter_value == $this->filterNullValue || $this->filter_value == "") {
         $this->accessibleCategories = $this->allAccessibleCategories;
     } else {
         $this->accessibleCategories = $this->datamodel->accessibleCategoryList(null, array($catid), $catid);
     }
 }
示例#2
0
 function __construct($tablename, $filterfield, $isstring = true)
 {
     $this->fieldset = true;
     $this->valueNum = 3;
     $this->filterNullValue = 0;
     $this->filterNullValues[0] = 0;
     // n/a, before, after
     $this->filterNullValues[1] = "";
     // the date
     $this->filterNullValues[2] = 0;
     // true means the form is submitted
     $this->filterType = "startdate";
     $this->filterLabel = "";
     $this->dmap = "rpt";
     parent::__construct($tablename, $filterfield, true);
     // This filter is special and always remembers for logged in users
     if (JFactory::getUser()->id > 0) {
         $this->filter_value = JFactory::getApplication()->getUserStateFromRequest($this->filterType . '_fv_ses', $this->filterType . '_fv', $this->filterNullValue);
         for ($v = 0; $v < $this->valueNum; $v++) {
             $this->filter_values[$v] = JFactory::getApplication()->getUserStateFromRequest($this->filterType . '_fvs_ses' . $v, $this->filterType . '_fvs' . $v, $this->filterNullValues[$v]);
         }
     }
     $this->_date = $this->filter_values[1];
     $this->_onorbefore = $this->filter_values[0];
 }
示例#3
0
 function __construct($tablename, $filterfield, $isstring = true)
 {
     $this->filterType = "search";
     $this->filterLabel = JText::_('SEARCH_EVENT');
     $this->filterNullValue = "";
     parent::__construct($tablename, $filterfield, true);
     // Should these be ignored?
     $reg =& JFactory::getConfig();
     $modparams = $reg->getValue("jev.modparams", false);
     if ($modparams && $modparams->getValue("ignorefiltermodule", false)) {
         $this->filter_value = $this->filterNullValue;
     }
 }
 function __construct($tablename, $filterfield, $isstring = true)
 {
     $this->fieldset = true;
     $this->valueNum = 3;
     $this->filterNullValue = 0;
     $this->filterNullValues[0] = 0;
     // n/a, before, after
     $this->filterNullValues[1] = "";
     // the date
     $this->filterNullValues[2] = 0;
     // true means the form is submitted
     $this->filterType = "startdate";
     $this->filterLabel = "";
     $this->dmap = "rpt";
     parent::__construct($tablename, $filterfield, true);
     $this->_date = $this->filter_values[1];
     $this->_onorbefore = $this->filter_values[0];
 }