You are here

function uc_reports_products_custom_form_submit in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_reports/uc_reports.admin.inc \uc_reports_products_custom_form_submit()
  2. 7.3 uc_reports/uc_reports.admin.inc \uc_reports_products_custom_form_submit()

File

uc_reports/uc_reports.module, line 700
Displays reports on sales, customers, and products to store admin

Code

function uc_reports_products_custom_form_submit($form_id, $form_values) {
  $timezone_offset = _uc_reports_timezone_offset();

  // Build the start and end dates from the form.
  $start_date = gmmktime(0, 0, 0, $form_values['start_date']['month'], $form_values['start_date']['day'], $form_values['start_date']['year']);
  $end_date = gmmktime(23, 59, 59, $form_values['end_date']['month'], $form_values['end_date']['day'], $form_values['end_date']['year']);
  $args = array(
    $start_date,
    $end_date,
    urlencode(implode(',', array_keys($form_values['status']))),
  );
  drupal_goto('admin/store/reports/products/custom/' . implode('/', $args));
}