コード例 #1
0
ファイル: ajax2.php プロジェクト: mrimran/dashboard
         //echo $_POST['share_report_period_from']."-".$_POST['share_report_period_to'];exit;
         $calls->setCustomPeriod($_POST['share_report_period_from'], $_POST['share_report_period_to']);
     }
     $report_file = $calls->savePDFReport();
 } elseif ($report_type == 'emails') {
     $report_period = $_POST['share_report_period'];
     if (trim($report_period) == '') {
         $report_period = 'lifetime';
     }
     require '../classes/dashboard/Emails.php';
     $emails = new Emails();
     $emails->setPeriod($report_period);
     if ($report_period == 'custom') {
         $emails->setCustomPeriod($_POST['share_report_period_from'], $_POST['share_report_period_to']);
     }
     $report_file = $emails->savePDFReport();
 } elseif ($report_type == 'sms') {
     $report_period = $_POST['share_report_period'];
     if (trim($report_period) == '') {
         $report_period = 'lifetime';
     }
     require '../classes/dashboard/SMS.php';
     $sms = new SMS();
     $sms->setPeriod($report_period);
     if ($report_period == 'custom') {
         $sms->setCustomPeriod($_POST['share_report_period_from'], $_POST['share_report_period_to']);
     }
     $report_file = $sms->savePDFReport();
 }
 $admins = getAdminEmails();
 $admin_emails = implode(',', $admins);