Esempio n. 1
0
     // run the compare with no linepadding set
     $diff = new diff();
     $text = $diff->inline($path_a, $path_b);
     $count = count($diff->changes) . ' changes';
     // send output to the report
     $report->eachData($device['deviceName'], $count, $text);
     // log to report
 }
 // End Data insert loop
 // script endTime
 $endTime = date('h:i:s A');
 $time_end = microtime(true);
 $time = round($time_end - $time_start) . " Seconds";
 $report->findReplace('<taskEndTime>', $endTime);
 $report->findReplace('<taskRunTime>', $time);
 $report->footer();
 if ($taskRow['mailConnectionReport'] == '1') {
     require "/home/rconfig/classes/phpmailer/class.phpmailer.php";
     $q = $db->q("SELECT smtpServerAddr, smtpFromAddr, smtpRecipientAddr, smtpAuth, smtpAuthUser, smtpAuthPass FROM settings");
     $result = mysql_fetch_assoc($q);
     $smtpServerAddr = $result['smtpServerAddr'];
     $smtpFromAddr = $result['smtpFromAddr'];
     $smtpRecipientAddr = $result['smtpRecipientAddr'];
     if ($result['smtpAuth'] == 1) {
         $smtpAuth = $result['smtpAuth'];
         $smtpAuthUser = $result['smtpAuthUser'];
         $smtpAuthPass = $result['smtpAuthPass'];
     }
     $mail = new PHPMailer();
     $report = $config_reports_basedir . $reportDirectory . "/" . $reportFilename;
     $body = file_get_contents($report);