Guest User

Untitled

a guest
Jan 17th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <?php
  2. /* Include Requerie d files */
  3. define("PREPEND_PATH", "../");
  4. $hooks_dir = dirname(__FILE__);
  5. include("{$hooks_dir}/../defaultLang.php");
  6. include("{$hooks_dir}/../language.php");
  7. include("{$hooks_dir}/../lib.php");
  8. include("{$hooks_dir}/SummaryReport.php");
  9. include_once("{$hooks_dir}/../header.php");
  10.  
  11. $from = makeSafe($_POST['from']);
  12. $to = makeSafe($_POST['to']);
  13. if(!$from) $from = date('m-01-Y');
  14. if(!$to) $to = date('m-d-Y');
  15.  
  16. $config_array = array(
  17. 'title' => 'Orders By Country',
  18. 'table' => 'orders',
  19. 'label'=>'Country',
  20. 'group_function'=>'count',
  21. 'caption1'=>'Country',
  22. 'caption2'=>'Count of Orders',
  23. 'group_function_field' =>'',
  24. 'parent_table' =>'customers',
  25. 'join_statment' =>'orders join customers on orders.CustomerID=customers.id',
  26. 'date_field' =>'OrderDate',
  27. 'start_date' =>$from,
  28. 'end_date' =>$to,
  29. 'look_up_table' =>'',
  30. 'look_up_value' =>''
  31. );
  32. $new_report = new SummaryReport($config_array);
  33. $new_report->get_picker($from,$to,"mm-dd-yyyy");
  34. $new_report->render_report();
  35.  
  36. include_once("{$hooks_dir}/../footer.php");
Add Comment
Please, Sign In to add comment