You are here

function ad_report_admin_submit in Advertisement 5.2

Same name and namespace in other branches
  1. 6.3 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 209
Provides comprehensive charts and reports about advertising statistics.

Code

function ad_report_admin_submit($form_id, $form_values) {
  if ($_POST['op'] == t('Generate report')) {
    $start = date('YmdHi', strtotime($form_values['start']));
    $end = date('YmdHi', strtotime($form_values['end']));
    $group = $form_values['group'];
    $_SESSION['ad_report_start'] = $start;
    $_SESSION['ad_report_end'] = $end;
    $_SESSION['ad_report_group'] = $group;
    drupal_goto('admin/content/ad/report/display');
  }
}