Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.216.10.195
Current Path : /var/www/html/oums/src/ |
| Current File : /var/www/html/oums/src/mcf_status.php |
<?php
include("sys_session.php");
include("sys_mainphp.php");
include("sys_connect.php");
include("api_sendmail.php");
$resp_stat = "";
$resp_file = "";
$mail_fil1 = "";
$mail_fil2 = "";
$mail_fil3 = "";
$mail_main = "";
$mail_copy = "";
$mail_bccy = "";
$mail_subj = "";
$mail_file = "";
$mail_text = "";
$univ_code = "";
//MCF MAIL / REPORT
$mysql = "select funivcode,date_format(fdate,'%d/%m/%Y') as fdate,time_format(ftime,'%H:%i:%s %p') as ftime,fremarks,fcompname,flogname,fclientid,fdbname,fregemail
from logisys3_empty.daylog lg
inner join logisys3_oums.masdept dp on lg.funivcode = dp.fdeptcode and ifnull(fregemail,'')<>''
where fdate=date_sub(current_date, interval 1 day) and dp.fmaillogs='T'
order by lg.funivcode,lg.fslno;";
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) == 0) {
$mail_text = "
<div style='background-color:#CCC; float:left; padding:10px;'>
<table cellpadding='5' cellspacing='0' border='1' align='center' style='border:1px solid #BBB;border-collapse: collapse;background-color:#FFF;width:1024px;'>
<tr>
<th colspan=99> Daily Activity Logs not found!</th>
</tr></table></div>";
} else {
$mail_text = "
<div style='background-color:#CCC; float:left; padding:10px;'>
<table cellpadding='5' cellspacing='0' border='1' align='center' style='border:1px solid #BBB;border-collapse: collapse;background-color:#FFF;width:1024px;'>
<tr style='color:#0000FF;'>
<th colspan=99> Daily Activity Logs</th>
</tr>
<tr style='color:#0000FF;'>
<th width='4%' align='center'>#</th>
<th width='10%' align='center'>Clt ID</th>
<th width='10%' align='center'>Date</th>
<th width='10%' align='center'>Time</th>
<th width='50%' align='center'>Description</th>
<th width='10%' align='center'>User Name</th>
<th width='10%' align='center'>Comp Name</th>
<th width='10%' align='center'>Client ID</th>
</tr>";
$i = 1;
while ($myrow = mysqli_fetch_assoc($myres)) {
$mail_text .= "<tr>
<td align='center'> $i</td>
<td align='center'> $myrow[funivcode]</td>
<td align='center'> $myrow[fdate]</td>
<td align='center'> $myrow[ftime]</td>
<td align='left'> $myrow[fremarks]</td>
<td align='center'> $myrow[flogname]</td>
<td align='center'> $myrow[fcompname]</td>
<td align='center'> $myrow[fclientid]</td>
</tr>";
$i++;
}
$mail_text .= "</table></div>";
$mail_main = "hnramesh@logisys.org";
$mail_copy = "raghu.s@logisys.org,mohan.s@logisys.org,chetan.sn@logisys.org";
$mail_bccy = "";
$mail_subj = "Daily Activity Logs - " . date('d/m/Y',strtotime("-1 days"));
$mail_file = $mail_fil1 . ',' . $mail_fil2 . ',' . $mail_fil3;
$resp_stat = send_mail($mail_main, $mail_copy, $mail_bccy, $mail_subj, $mail_text, $mail_file);
}
|