$lmonth_visitors = modVisitCounterHelper::getVisitors($local_lmonthstart, $local_monthstart); } } // Count Online in 20 minutes $online_time = ONLINE_TIME_DEFAULT; if ($s_online) { $online_visitors = modVisitCounterHelper::getVisitors($now - $online_time * 60); } // END: CACULATE VISITORS /* ------------------------------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------------------------------ */ // BEGIN: Delete old records if today is the 7th, 14th, 21th or 28th of the month. $time =& JFactory::getDate(); $time->setOffset($offset); if ($s_delrecords) { $day = (int) $time->toFormat("%d"); $minute = (int) $time->toFormat("%M"); if ($day % 7 == 0) { if ($minute % 20 == 0) { $temp = $daystart - $deldays * 24 * 60 * 60; modVisitCounterHelper::delVisitors(0, $temp); } } } // END: Delete old records /* ------------------------------------------------------------------------------------------------ */ $template = $params->get('template'); if ($template == 1) { $layoutname = $params->get('layoutname'); require JModuleHelper::getLayoutPath('mod_vvisit_counter', $layoutname); }