function getDataForAdmin($creator_id, $limit, $limitstart, $showrepeats = false, $orderby = "") { $data = array(); $is_event_editor = JEVHelper::isEventCreator(); $user =& JFactory::getUser(); $Itemid = JEVHelper::getItemid(); $user =& JFactory::getUser(); $db =& JFactory::getDBO(); $cfg =& JEVConfig::getInstance(); include_once JPATH_ADMINISTRATOR . "/components/" . JEV_COM_COMPONENT . "/libraries/colorMap.php"; // Note that these are the vevents not the repeats if (!$showrepeats) { $total = $this->queryModel->countIcalEventsByCreator($creator_id); } else { $total = $this->queryModel->countIcalEventRepeatsByCreator($creator_id); } $data['total'] = $total; $data['limit'] = $limit; if ($data["total"] <= $data["limit"]) { $limitstart = 0; } $data["limitstart"] = $limitstart; // Note that these are the vevents not the repeats if (!$showrepeats) { $rows = $this->queryModel->listIcalEventsByCreator($creator_id, $limitstart, $limit, $orderby); } else { $rows = $this->queryModel->listIcalEventRepeatsByCreator($creator_id, $limitstart, $limit, $orderby); } $adminView = true; $num_events = count($rows); if ($num_events > 0) { for ($r = 0; $r < $num_events; $r++) { $row =& $rows[$r]; $row->catname($row->getCategoryName()); $row->contactlink(JEventsHTML::getUserMailtoLink($row->id(), $row->created_by(), true)); $row->bgcolor = JEV_CommonFunctions::setColor($row); $row->fgcolor = JevMapColor($row->bgcolor); } } $data['rows'] = $rows; return $data; }
function contactLink($val = "", $admin = false) { if (JString::strlen($val) == 0) { if (!isset($this->_contactLink) || $this->_contactLink == "") { $this->_contactLink = JEventsHTML::getUserMailtoLink($this->id(), $this->created_by(), $admin, $this); } } else { $this->_contactLink = $val; } // New Joomla code for mail cloak only works once on a page !!! // Random number $rand = rand(1, 100000); return preg_replace("/cloak[0-9]*/i", "cloak" . $rand, $this->_contactLink); //return $this->_contactLink; }
function contactLink($val = "", $admin = false) { if (strlen($val) == 0) { if (!isset($this->_contactLink) || $this->_contactLink == "") { $this->_contactLink = JEventsHTML::getUserMailtoLink($this->id(), $this->created_by(), $admin); } } else { $this->_contactLink = $val; } return $this->_contactLink; }