$dtSelisih = $dtAkhir - $dtAwal; //exit("Error:".$dtSelisih."___".$dtAkhir."___".$dtAwal."___".$mth."__".$dy."__".$thn); $totalmenit = $dtSelisih / 60; $jam = explode(".", $totalmenit / 60); $sisamenit = $totalmenit / 60 - $jam[0]; $sisamenit2 = $sisamenit * 60; $jml_jam = $jam[0]; //end ambil selisih waktu $sUpdate = "update " . $dbname . ".it_request set jumlah='" . $jml_jam . "',waktuselesai='" . $tlgjmskrng . "',saranpelaksana='" . $saran . "'\r\n where notransaksi='" . $notransaksi . "'"; if (mysql_query($sUpdate)) { #send an email to incharge person $to = getUserEmail($rGet['karyawanid']); $namakaryawan = getNamaKaryawan($rGet['karyawanid']); $subject = "[Notifikasi]Permintaan layanan " . $rGet['keterangan'] . " a/n " . $namakaryawan; $body = "<html>\r\n <head>\r\n <body>\r\n <dd>Dengan Hormat,</dd><br>\r\n <p align=justify>\r\n Permintaan layanan " . $rGet['keterangan'] . " pada tanggal " . tanggalnormal($rGet['tanggal']) . " oleh saudara ke departemen IT\r\n dengan deskripsi " . $rGet['deskripsi'] . ".\r\n <br>\r\n <br>\r\n Telah selesai dilaksanakan pada tanggal " . tanggalnormald($tlgjmskrng) . ", mohon kesediaan saudara untuk memberi penilaian terhadap layanan kami dari menuIT->Permintaan Layanan\r\n <br>\r\n <br>\r\n Regards,<br>\r\n Owl-Plantation System.\r\n </body>\r\n </head>\r\n </html>\r\n "; $kirim = kirimEmail($to, '', $subject, $body); #this has return but disobeying; } break; case 'getDetail': $sData = "select distinct * from " . $dbname . ".it_request where notransaksi='" . $notransaksi . "' "; $qData = mysql_query($sData) or die(mysql_error($conn)); $rData = mysql_fetch_assoc($qData); $dataTab .= "<div style=overflow:auto;width:420px;height:880px;>"; $dataTab .= "<fieldset><legend>" . $_SESSION['lang']['desc'] . "</legend>"; $dataTab .= "<div align=justify>" . $rData['deskripsi'] . "</p>"; $dataTab .= "</fieldset><br />"; $dataTab .= "<fieldset><legend>" . $_SESSION['lang']['saran'] . " " . $arrNmkary[$rData['karyawanid']] . " [user] </legend>"; $dataTab .= "<div align=justify>" . $rData['saranuser'] . "</p>"; $dataTab .= "</fieldset><br />"; $dataTab .= "<fieldset><legend>" . $_SESSION['lang']['saran'] . " " . $arrNmkary[$rData['pelaksana']] . " [pelaksana] </legend>";
<?php require_once 'config/connection.php'; include 'lib/nangkoelib.php'; $subject = "[Notifikasi] user nonaktif"; $body = "<html>\r\n <head>\r\n <body>\r\n <dd>Dengan Hormat,</dd><br>\r\n <br>\r\n test <br>\r\n Regards,<br>\r\n Owl-Plantation System.\r\n </body>\r\n </head>\r\n </html>\r\n "; //$to='*****@*****.**','*****@*****.**'; $to = '*****@*****.**'; $cc = ''; //$to='*****@*****.**'; if ($to != '') { $kirim = kirimEmail($to, $cc, $subject, $body); #this has return but disobeying; } echo $kirim;
function mailCoy($userid) { #send an email to incharge person $to = getUserEmail($userid); $namakaryawan = getNamaKaryawan($_SESSION['standard']['userid']); if ($_SESSION['language'] == 'EN') { $subject = "[Notifikasi] PR Submission for approval, submitted by: " . $namakaryawan; $body = "<html>\r\n <head>\r\n <body>\r\n <dd>Dear Sir/Madam,</dd><br>\r\n <br>\r\n Today, " . date('d-m-Y') . ", on behalf of " . $namakaryawan . " submit a PR, requesting for your approval. To follow up, please follow the link below.\r\n <br>\r\n <br>\r\n <br>\r\n Regards,<br>\r\n Owl-Plantation System.\r\n </body>\r\n </head>\r\n </html>\r\n "; } else { $subject = "[Notifikasi]Persetujuan PP a/n " . $namakaryawan; $body = "<html>\r\n <head>\r\n <body>\r\n <dd>Dengan Hormat,</dd><br>\r\n <br>\r\n Pada hari ini, tanggal " . date('d-m-Y') . " karyawan a/n " . $namakaryawan . " mengajukan Permintaan Pembelian Barang\r\n kepada bapak/ibu. Untuk menindak-lanjuti, silahkan ikuti link dibawah.\r\n <br>\r\n <br>\r\n <br>\r\n Regards,<br>\r\n Owl-Plantation System.\r\n </body>\r\n </head>\r\n </html>\r\n "; } $kirim = kirimEmail($to, '', $subject, $body); #this has return but disobeying; }
$warna1 = " bgcolor=red"; } @($selisih = abs($janjangtaksasi[$nilai] - $janjangpanen[$nilai]) / $janjangtaksasi[$nilai] * 100); if ($selisih > 10) { $warna = " bgcolor=red"; } $tab .= "<tr>"; $tab .= "<td>" . $nilai . "</td>"; $tab .= "<td align=right>" . number_format($janjangtaksasi2[$nilai]) . "</td>\r\n <td align=right>" . number_format($janjangpanen2[$nilai]) . "</td>\r\n <td align=right" . $warna2 . ">" . number_format($selisih2, 2) . "</td>"; $tab .= "<td align=right>" . number_format($janjangtaksasi1[$nilai]) . "</td>\r\n <td align=right>" . number_format($janjangpanen1[$nilai]) . "</td>\r\n <td align=right" . $warna1 . ">" . number_format($selisih1, 2) . "</td>"; $tab .= "<td align=right>" . number_format($janjangtaksasi[$nilai]) . "</td>\r\n <td align=right>" . number_format($janjangpanen[$nilai]) . "</td>\r\n <td align=right" . $warna . ">" . number_format($selisih, 2) . "</td>"; $tab .= "</tr>"; } } } $mess4 = "<html>\r\n <head>\r\n </head>\r\n <body>\r\n <br>"; if ($tab != '') { $subject4 = " Reminder Varian Taksasi dan Realisasi Panen (On: " . tanggalnormal($tanggalkeluar2) . " - " . tanggalnormal($tanggalkeluar) . ")"; $mess4 .= "Dear All,<br>Berikut ini adalah data realisasi panen pada " . tanggalnormal($tanggalkeluar2) . " - " . tanggalnormal($tanggalkeluar) . " dengan toleransi realisasi vs taksasi +/- 10%:\r\n <table border=1 cellspacing=0>\r\n <thead>\r\n <tr><td rowspan=2>Afdeling</td><td colspan=3 align=center>" . tanggalnormal($tanggalkeluar2) . "</td><td colspan=3 align=center>" . tanggalnormal($tanggalkeluar1) . "</td><td colspan=3 align=center>" . tanggalnormal($tanggalkeluar) . "</td></tr>\r\n <tr>\r\n <td>Taksasi (JJG)</td>\r\n <td>Panen (JJG)</td>\r\n <td>Selisih (%)</td>\r\n <td>Taksasi (JJG)</td>\r\n <td>Panen (JJG)</td>\r\n <td>Selisih (%)</td>\r\n <td>Taksasi (JJG)</td>\r\n <td>Panen (JJG)</td>\r\n <td>Selisih (%)</td>\r\n </tr> \r\n </thead> \r\n <tbody>"; $mess4 .= $tab; $mess4 .= "</tbody><tfoot></tfoot></table><br>\r\n Demikian informasi ini disampaikan, semoga berguna.<br>\r\n <br>Regards, <br>OWL-Plantation System<br>The Best and Proven ERP For Palm Oil Plantation Solutions</body></html>"; #kirim email if ($to2 != '') { $kirim = kirimEmail($to2, '', $subject4, $mess4); #this has return but disobeying; } // echo $mess4; } #update no.kounter jurnal $str = "update " . $dbname . ".keu_5kelompokjurnal set nokounter=1 where nokounter>999"; @mysql_query($str);