You are here

function popup_onload_statistics_log in Popup On Load 8

Same name and namespace in other branches
  1. 7 popup_onload_statistics/popup_onload_statistics.module \popup_onload_statistics_log()

AJAX gate for popup statistics logging.

1 string reference to 'popup_onload_statistics_log'
popup_onload_statistics_menu in modules/popup_onload_statistics/popup_onload_statistics.module
Implements hook_menu().

File

modules/popup_onload_statistics/popup_onload_statistics.module, line 80
Main popup on loadvertisement statistics functions.

Code

function popup_onload_statistics_log() {
  $post = drupal_get_query_parameters($_POST);
  array_map('check_plain', $post);
  $action_type = $post['atype'];
  $popup_id = $post['popup_id'];
  $record = new stdClass();
  $record->type = $action_type;
  $record->popup_id = $popup_id;
  $record->atime = time();
  drupal_write_record('popup_onload_statistics', $record);
  drupal_json_output(array(
    'status' => 1,
  ));
}