You are here

function ad_report_admin_submit in Advertisement 6.3

Same name and namespace in other branches
  1. 5.2 report/ad_report.module \ad_report_admin_submit()
  2. 6.2 report/ad_report.module \ad_report_admin_submit()
  3. 7 report/ad_report.module \ad_report_admin_submit()

Redirect to a path to generate the requested report.

File

report/ad_report.module, line 203
Provides comprehensive charts and reports about advertising statistics.

Code

function ad_report_admin_submit($form, $form_state) {
  if ($form_state['clicked_button']['#value'] == t('Generate report')) {
    $start = date('YmdHi', strtotime($form_state['values']['start']));
    $end = date('YmdHi', strtotime($form_state['values']['end']));
    $group = $form_state['values']['group'];
    $_SESSION['ad_report_start'] = $start;
    $_SESSION['ad_report_end'] = $end;
    $_SESSION['ad_report_group'] = $group;
    drupal_goto('admin/content/ad/report/display');
  }
}