You are here

function visitors_set_session_date_range in Visitors 8.2

Same name and namespace in other branches
  1. 8 forms/date_filter.inc \visitors_set_session_date_range()
  2. 7.2 forms/date_filter.inc \visitors_set_session_date_range()
  3. 7 forms/date_filter.inc \visitors_set_session_date_range()
  4. 7.0 forms/date_filter.inc \visitors_set_session_date_range()

Set to session info default values for visitors date filter.

1 call to visitors_set_session_date_range()
visitors_date_filter_sql_condition in ./visitors.module
Build sql query from date filter values.

File

./visitors.module, line 247
Logs visitors for your site.

Code

function visitors_set_session_date_range() {
  if (!isset($_SESSION['visitors_from'])) {
    $_SESSION['visitors_from'] = array(
      'day' => 1,
      'month' => date('n'),
      'year' => date('Y'),
    );
  }
  if (!isset($_SESSION['visitors_to'])) {
    $_SESSION['visitors_to'] = array(
      'day' => date('j'),
      'month' => date('n'),
      'year' => date('Y'),
    );
  }
}