Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "koneksi.php";
- include "AntiXSS.php";
- include "header.php";
- include "request_common.php";
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>Service Assurance Indosat</title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" media="screen,projection" type="text/css" href="css/reset.css" />
- <link rel="stylesheet" media="screen,projection" type="text/css" href="css/main.css" />
- <link rel="stylesheet" media="all" type="text/css" href="css/ui-lightness/jquery-ui-1.10.3.custom.css" />
- <link rel="stylesheet" media="all" type="text/css" href="css/jquery-ui-timepicker-addon.css" />
- <!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="css/main-msie.css" /><![endif]-->
- <link rel="stylesheet" media="screen,projection" type="text/css" href="css/style.css" />
- <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700' rel='stylesheet' type='text/css'>
- <link rel="stylesheet" media="print" type="text/css" href="css/print.css" />
- <link type="text/css" href="js/themes/base/ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="js/jquery-1.10.1.min.js"></script>
- <script type="text/javascript" src="js/jquery-ui.min.js"></script>
- <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script>
- <script type="text/javascript" src="js/script.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $("#time").datepicker({
- dateFormat : "yy-mm-dd",
- changeMonth : true,
- changeYear : true
- });
- });
- </script>
- <script type="text/javascript">
- $(document).ready(function(){
- $("#time2").datetimepicker({
- dateFormat : "yy-mm-dd",
- changeMonth : true,
- changeYear : true
- });
- });
- </script>
- <script type="text/javascript">
- $(document).ready(function(){
- $("#time3").datetimepicker({
- dateFormat : "yy-mm-dd",
- changeMonth : true,
- changeYear : true
- });
- });
- </script>
- <script type="text/javascript">
- $(document).ready(function(){
- $("#time4").datepicker({
- dateFormat : "yy-mm-dd",
- changeMonth : true,
- changeYear : true
- });
- });
- </script>
- <style type="text/css">
- table#gede {
- margin: 0px 0 100px 100px;
- width: 950px;
- border-collapse: collapse;
- }
- table#kecil {
- margin: 0px 0 100px 100px;
- width: 370px;
- border-collapse: collapse;
- }
- table#note {
- margin: 0px 0 100px 100px;
- width: 370px;
- height: 10px;
- border-collapse: collapse;
- }
- tbody {
- color: #000;
- }
- table th, table td {
- padding: 5px 5px;
- border: 1px solid #000;
- }
- table tr {
- font: 11px 'Open Sans',Trebuchet MS, Helvetica, sans-serif;
- background: #FFFFF;
- }
- table td {
- -webkit-transition: all 0.7s ease-in-out 0s;
- -moz-transition: all 0.7s ease-in-out 0s;
- -o-transition: all 0.7s ease-in-out 0s;
- transition: all 0.7s ease-in-out 0s;
- }
- table tr:nth-child(2n+0) {
- background: #FFFFFF;
- }
- table td:hover, table td:nth-child(2n+0):hover {
- background: white;
- }
- table th {
- background: #FDD300;
- color: #000;
- font: 13px 'Open Sans',Trebuchet MS, Helvetica, sans-serif;
- }
- @-webkit-keyframes invalid {
- from { background-color: #FDD300; }
- to { background-color: inherit; }
- }
- @-moz-keyframes invalid {
- from { background-color: #FDD300; }
- to { background-color: inherit; }
- }
- @-o-keyframes invalid {
- from { background-color: #FDD300; }
- to { background-color: white; }
- }
- @keyframes invalid {
- from { background-color: #FDD300; }
- to { background-color: inherit; }
- }
- .invalid {
- -webkit-animation: invalid 1s infinite; /* Safari 4+ */
- -moz-animation: invalid 1s infinite; /* Fx 5+ */
- -o-animation: invalid 1s infinite; /* Opera 12+ */
- animation: invalid 1s infinite; /* IE 10+ */
- }
- a:link {text-decoration: none}
- a:visited {text-decoration: none}
- a:active {text-decoration: none}
- </style>
- <script>
- function kirim_pending(x)
- {
- var ticket = $('#tiket').val();
- var time1 = $('#time').val();
- var time2 = $('#time2').val();
- var wkt1 = $('#waktu1').val();
- var wkt2 = $('#waktu2').val();
- var type = $('#type').val();
- window.location.href ='pending.php?tiket='+escape(ticket)+'&time='+escape(time1)+'&time2='+escape(time2)+'&wkt1='+escape(wkt1)+'&wkt2='+escape(wkt2)+'&type='+escape(type);
- }
- </script>
- </head>
- <?php
- $id = $_GET['id'];
- $query = "select * from plan2 where id='$id'";
- $sql = mysql_query($query);
- $data = mysql_fetch_assoc($sql);
- $ref = $data['ref'];
- // initial state
- $id = (!empty($_GET['id'])) ? $_GET['id'] : null;
- $types = '1';
- /*
- if(!isset($_POST['tes']))
- {
- $query1 = "select count(*) as jml from pending where id='$id'";
- $sql1 = mysql_query($query1);
- $data1 = mysql_fetch_assoc($sql1);
- $jml = $data1['jml'];
- if($jml>0)
- {
- $query2 = "select * from pending where id='$id'";
- $sql2 = mysql_query($query2);
- $ilk =0;
- while ($data2 = mysql_fetch_array($sql2))
- {
- $tgl1[$ilk] = $data2[1];
- $tgl2[$ilk] = $data2[2];
- $status[$ilk] = $data2[4];
- $nomor[$ilk] = $data2[5];
- $ilk++;
- }
- }
- }
- else if(isset($_POST['tes']))
- {
- $query1 = "select count(*) as jml from pending where id='$id'";
- $sql1 = mysql_query($query1);
- $data1 = mysql_fetch_assoc($sql1);
- $jml = $data1['jml'];
- if($jml>0)
- {
- $query2 = "select * from pending where id='$id'";
- $sql2 = mysql_query($query2);
- $ilk =0;
- while ($data2 = mysql_fetch_array($sql2))
- {
- $tgl1[$ilk] = $data2[1];
- $tgl2[$ilk] = $data2[2];
- $status[$ilk] = $data2[4];
- $nomor[$ilk] = $data2[5];
- $ilk++;
- }
- }
- }
- */
- ?>
- <div id="wrapper">
- <div width="100px" height="100px" id="demo" style="margin:30px 0 0 -70px">
- <center>
- <h2>Maintenance Request Form</h2>
- </center>
- </div>
- <div width="100px" height="100px" id="demo" style="margin:30px 0 0 120px">
- <table id="kecil" width="200px" height="20px">
- <tr style="background:#DDD9C4;">
- <td>Subject :</td>
- <td style="background:#fff;"><?php echo $data['subjek'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Refference No. :</td>
- <td style="background:#fff;"><?php echo $data['ref'];?></td>
- </tr>
- </table>
- </div>
- <div width="100px" height="100px" id="demo" style="margin:-80px 0 0 120px">
- <table id="kecil" width="200px" height="20px">
- <tr>
- <th colspan="3" style="background:#DDD9C4;">Requestor</td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Name :</td>
- <td style="background:#fff;"><?php echo $data['req_name'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Email :</td>
- <td style="background:#fff;"><?php echo $data['req_email'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Phone :</td>
- <td style="background:#fff;"><?php echo $data['req_phone'];?></td>
- </tr>
- </table>
- </div>
- <div width="100px" height="100px" id="demo" style="margin:-90px 0 0 120px">
- <table id="kecil" width="200px" height="20px">
- <tr>
- <th colspan="4" style="background:#DDD9C4;">Vendor (if any)</td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Company Name :</td>
- <td style="background:#fff;"><?php echo $data['v_company'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Name :</td>
- <td style="background:#fff;"><?php echo $data['v_name'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Email :</td>
- <td style="background:#fff;"><?php echo $data['v_email'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Phone :</td>
- <td style="background:#fff;"><?php echo $data['v_phone'];?></td>
- </tr>
- </table>
- </div>
- <div width="100px" height="100px" id="demo" style="margin:-90px 0 0 120px">
- <table id="kecil" width="200px" height="20px">
- <tr>
- <th colspan="3" style="background:#DDD9C4;">Indosat PIC</td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Name :</td>
- <td style="background:#fff;"><?php echo $data['pic_name'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Email :</td>
- <td style="background:#fff;"><?php echo $data['pic_email'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Phone :</td>
- <td style="background:#fff;"><?php echo $data['pic_phone'];?></td>
- </tr>
- </table>
- </div>
- <div width="100px" height="100px" id="demo" style="margin:-470px 0 400px 520px">
- <table id="kecil" width="200px" height="20px">
- <tr style="background:#DDD9C4;">
- <td>Request Date :</td>
- <td style="background:#fff;"><?php echo $data['request'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Propose PMC Date :</td>
- <td style="background:#fff;"><?php echo $data['purpose'];?></td>
- </tr>
- </table>
- </div>
- <div width="100px" height="100px" id="demo" style="margin:-390px 0 300px 520px">
- <table id="kecil" width="200px" height="20px">
- <tr>
- <th colspan="4" style="background:#DDD9C4;">Work Information</td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Maintenance Activity :</td>
- <td style="background:#fff;"><?php echo $data['activity'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Background :</td>
- <td style="background:#fff;"><?php echo $data['background'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Location :</td>
- <td style="background:#fff;"><?php echo $data['lokasi'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Equipment :</td>
- <td style="background:#fff;"><?php echo $data['equipment'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Start Activity :</td>
- <td style="background:#fff;"><?php echo $data['start'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>End Activity :</td>
- <td style="background:#fff;"><?php echo $data['finish'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Outage/Hazardous :</td>
- <td style="background:#fff;"><?php echo $data['category'];?></td>
- </tr>
- <tr style="background:#DDD9C4;">
- <td>Outage/Hazardous Duration :</td>
- <td style="background:#fff;"><?php echo $data['duration'];?> Minutes</td>
- </tr>
- </table>
- </div>
- <div width="100px" height="100px" id="demo" style="margin:-290px 0 0 520px">
- <table id="kecil" width="200px" height="20px">
- <tr>
- <th colspan="3" style="background:#DDD9C4;"> Detail Activity </td>
- </tr>
- <tr>
- <th colspan="2" height="50px" style="background:#fff;"><?php echo $data['detail'];?></th>
- </tr>
- </table>
- </div>
- <div width="100px" height="100px" id="demo" style="margin:-90px 0 0 520px">
- <table id="kecil" width="200px" height="20px">
- <tr>
- <th colspan="3" style="background:#DDD9C4;"> Impacted </td>
- </tr>
- <tr>
- <th colspan="2" height="50px" style="background:#fff;"><?php echo $data['impact'];?></th>
- </tr>
- </table>
- </div>
- <div width="100px" height="100px" id="demo" style="margin:-90px 0 0 520px">
- <table id="note" width="200px" height="10px">
- <tr>
- <th colspan="3" style="background:#DDD9C4;"> Note </td>
- </tr>
- <tr>
- <th colspan="1" height="50px" style="background:#fff;"><?php echo $data['note'];?></th>
- </tr>
- </table>
- </div>
- <div width="100px" height="100px" id="demo" style="margin:-320px 0 0 120px">
- <table id="kecil" width="200px" height="20px">
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI'];?>" enctype="multipart/form-data">
- <tr>
- <td>Status :</td>
- <td align="left"><select name="stat">
- <option><?php echo $data['status'];?> </option>
- <option value="Sent" /> Sent
- <option value="Confirmed" /> Confirmed
- <option value="Rescheduled" /> Rescheduled
- <option value="Postponed" /> Postponed
- <option value="Done" /> Done
- </select>
- </td>
- </div>
- </tr>
- <tr>
- <td>SR :</td>
- <td><input type="text" name="sr" value="<?php echo $data['sr'];?>" /></td>
- </tr>
- <tr>
- <td>Reschedule Date :</td>
- <td><input type="text" name="time" id="time" value="<?php echo $data['reschedule'];?>" size="25px"/></td>
- </tr>
- <tr>
- <td>Notes :</td>
- <td><textarea name="extranotes" rows="5" cols="30"><?php echo $data['extranotes'];?></textarea></td>
- </tr>
- <tr>
- <td>Attach File</td>
- <td align="left"><input type="file" name="userfile" size="50X7"/></td>
- </tr>
- <tr>
- <td align="left"><input type="submit" name="submit" value="submit"style="width:110px; height:25px;"/></td>
- </tr>
- </table>
- </form>
- </div>
- <?php
- $arr = 0;
- ?>
- <table class="table" width="50%" style="margin:-50px 0 0 218px">
- <tr>
- <th>No</th>
- <th style="width:500px;">Customer</th>
- <th style="width:500px;">Circuit ID</th>
- <th style="width:500px;">Contact</th>
- </tr>
- <?php
- if(!isset($_GET['no']))
- {
- $no=1;
- }
- else
- {
- if($_GET['page']==1)
- {
- $no=1;
- }
- else
- {
- $no=$_GET['no'];
- }
- }
- $sqlCount = "select count(*) from data_niw2 where niw='$ref'.'$";
- $rsCount = mysql_fetch_array(mysql_query($sqlCount));
- $banyakData = $rsCount[0];
- $page = isset($_GET['page']) ? $_GET['page'] : 1;
- $limit = 1000;
- $mulai_dari = $limit * ($page - 1);
- $sql = "select * from data_niw2 where niw = '$ref' limit $mulai_dari,$limit";
- $jalan = mysql_query($sql);
- while($hasil=mysql_fetch_array($jalan))
- {
- ?>
- <tr>
- <td align="center"><?php echo $no;?></td>
- <td size="300px"><?php echo $hasil[1];?></td>
- <td size="300px"><?php echo $hasil[2];?></td>
- <td size="300px"><?php echo $hasil[3];?></td>
- </tr>
- <input type="hidden" name="idkontak<?php echo $arr;?>" value="<?php echo $hasil[0]?>"/>
- <input type="hidden" name="niw<?php echo $arr;?>" value="<?php echo $hasil[1]?>"/>
- <input type="hidden" name="cust<?php echo $arr;?>" value="<?php echo $hasil[2]?>"/>
- <input type="hidden" name="link<?php echo $arr;?>" value="<?php echo $hasil[3]?>"/>
- <input type="hidden" name="kontak<?php echo $arr;?>" value="<?php echo $hasil[4]?>"/>
- <input type="hidden" name="kntk<?php echo $arr;?>" value="<?php echo $hasil[5]?>"/>
- <?php
- $arr++;
- $no++;
- ?>
- </table>
- <center>
- <?php
- $banyakHalaman = ceil($banyakData / $limit);
- echo 'Halaman: ';
- for ($i = 1; $i <= $banyakHalaman; $i++) {
- if ($page != $i) {
- echo '[<a href="detailpo2.php?page=' . $i . '& no=' .$no .'& id=' .$kirim.' ">' . $i . '</a>] ';
- } else {
- echo "[$i] ";
- }
- }
- ?>
- </center>
- </div>
- </div>
- </center>
- <?php
- if(isset($_POST['submit']))
- {
- ini_set('max_execution_time', 3000);
- include "koneksi.php";
- $stat = $_POST['stat'];
- $sr = $_POST['sr'];
- if($stat=='Sent')
- {
- $status = 'Sent';
- }
- if($stat=='Confirmed')
- {
- $status = 'Confirmed';
- }
- else if($stat=='Rescheduled')
- {
- $status = 'Rescheduled';
- }
- else if($stat=='Postponed')
- {
- $status = 'Postponed';
- }
- else if($stat=='Done')
- {
- $status = 'Done';
- }
- $reschedule = $_POST['time'];
- $extranotes = $_POST['extranotes'];
- ini_set('max_execution_time', 300);
- include "koneksi.php";
- error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
- date_default_timezone_set('Asia/Jakarta');
- require_once "excel_reader2.php";
- date_default_timezone_set('Asia/Jakarta');
- //membaca file excel yang diupload
- $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']);
- //membaca jumlah baris dari data excel
- $baris = $data->rowcount($sheet_index=0);
- //nilai awal counter jumlah data yang sukses dan yang gagal diimport
- $sukses = 0;
- $gagal = 0;
- //import data excel dari baris kedua, karena baris pertama adalah nama kolom
- for ($i=2; $i<=$baris; $i++)
- {
- //membaca data nip (kolom)
- $data1 = $data->val($i,1);
- $data2 = $data->val($i,2);
- $data3 = $data->val($i,3);
- $sql = "insert into data_niw2 values('$ref','$data1','$data2','$data3')";
- $input = mysql_query($sql);
- $input = mysql_query($sql);
- }
- $adminEmail = 'serviceassurance.indosat@gmail.com'; //change email admin here
- $receiverEmail = array(
- 'app1' => "b.paramitha@indosatooredoo.com",
- 'app2' => "bulanratu@gmail.com",
- 'app3' => "buulbuul@yahoo.com",
- 'req_email' => $req_email
- );
- switch ($stat) {
- case ($status = 'Rescheduled') :
- $stringQuery = 'SELECT ref, subjek, req_email, status, reschedule , extranotes FROM plan2 where id="'.$id.'"';;
- $result = mysql_query($stringQuery);
- $rowData = array();
- while ($row = mysql_fetch_assoc($result))
- {
- $dataDetail = array();
- $rowKey = array_keys($row);
- foreach ($rowKey as $sKey)
- {
- $rowData[$sKey] = $row[$sKey];
- }
- }
- $to = $rowData['req_email'];;
- $subject = '['.$status.'] REFF No.'.$rowData['ref'];;
- $message ='';
- // $link = 'http://sa-helpdesk/previewadjustment'.$previewadjustment.'.php?id='.$id;;
- //$message .= '<html><head><title>Adjustment Level 4 </title></head>';
- $message .= '<body>';
- $message = 'Dear Requestor, <br><br>
- This is an email notification update for request maintenance with the following details:<br><br>
- Refference No. : '.$rowData['ref'].'<br> Subject : '.$rowData['subjek'].'<br> Requester Name : '.$rowData['req_name'].'<br> Status : '.$status.'<br> Reschedule Date : '.$reschedule.'<br>Notes : '.$extranotes.'<br><br><br>
- Best Regards, <br> Plan Maintenance Corporate (PMC) Admin';
- $message .= '</a>';
- $message .= '</body>';
- $message .= '</html>';
- $headers = "From:".'PMC System'."\n".
- "Reply-To:".'corporatemaintenance@indosatooredoo.com'."\n".
- "Cc:".'corporatemaintenance@indosatooredoo.com, winahyu.dwiningsih@indosatooredoo.com, hery.soegijanto@indosatooredoo.com'."\n".
- //"Bcc:".'wahyu.sonjaya@indosat.com, tantri.oktariani@indosat.com, agus.bahri@indosat.com, mobile.corporate@indosat.com'."\n".
- "MIME-Version: 1.0\n" .
- "Content-type: text/html; charset=iso-8859-1";
- if($jalan)
- {
- mysql_query("update plan2 set status='$status', reschedule='$reschedule', extranotes='$extranotes', sr='$sr' where id='$id'");
- Echo "<script language='javascript' type='text/javascript'>
- alert('Update Done')
- window.location.href='po2.php'
- </script>";
- $kirim=mail($to,$subject,$message,$headers);
- }
- else
- {
- Echo "Email gagal dikirim";
- }
- break;
- case ($status = 'Postponed'):
- $stringQuery = 'SELECT ref,subjek,req_name,req_email, activity, status, sr, extranotes FROM plan2 where id="'.$id.'"';;
- $result = mysql_query($stringQuery);
- $rowData = array();
- while ($row = mysql_fetch_assoc($result))
- {
- $dataDetail = array();
- $rowKey = array_keys($row);
- foreach ($rowKey as $sKey)
- {
- $rowData[$sKey] = $row[$sKey];
- }
- }
- $to = $rowData['req_email'];;
- $subject = '['.$status.'] REFF No.'.$rowData['ref'];;
- $message .= '<body>';
- $message = '<b>Dear Requestor, </b><br><br>
- This is an email notification update for request maintenance with the following details:<br><br>
- Refference No. : '.$rowData['ref'].'<br>Subject : '.$rowData['subjek'].'<br> Requester Name : '.$rowData['req_name'].'<br> Maintenance Activity : '.$rowData['activity'].'<br> Status : '.$status.'<br>Notes : '.$extranotes.'<br><br><br>
- Best Regards, <br> Plan Maintenance Corporate (PMC) Admin';
- $message .= '</a>';
- $message .= '</body>';
- $message .= '</html>';
- $headers = "From:".'PMC System'."\n".
- "Reply-To:".'corporatemaintenance@indosatooredoo.com'."\n".
- "Cc:".'corporatemaintenance@indosatooredoo.com, hery.soegijanto@indosatooredoo.com, winahyu.dwiningsih@indosatooredoo.com, nancylia.tanod@indosatooredoo.com, neny.sukaesih@indosatooredoo.com, bagus.amirulloh@indosatooredoo.com'."\n".
- //"Bcc:".'b.paramitha@indosatooredoo.com'."\n".
- "MIME-Version: 1.0\n" .
- "Content-type: text/html; charset=iso-8859-1";
- if($jalan)
- {
- mysql_query("update plan2 set status='$status', extranotes='$extranotes', sr='$sr' where id='$id'");
- Echo "<script language='javascript' type='text/javascript'>
- alert('Update Done')
- window.location.href='po2.php'
- </script>";
- $kirim=mail($to,$subject,$message,$headers);
- }
- else
- {
- Echo "Email gagal dikirim";
- }
- break;
- case ($status = 'Done'):
- $stringQuery = 'SELECT ref,subjek,req_name,req_email, activity, status,sr extranotes FROM plan2 where id="'.$id.'"';;
- $result = mysql_query($stringQuery);
- $rowData = array();
- while ($row = mysql_fetch_assoc($result))
- {
- $dataDetail = array();
- $rowKey = array_keys($row);
- foreach ($rowKey as $sKey)
- {
- $rowData[$sKey] = $row[$sKey];
- }
- }
- $to = $rowData['req_email'];;
- $subject = '['.$status.'] REFF No.'.$rowData['ref'];;
- $message .= '<body>';
- $message = '<b>Dear Requestor, </b><br><br>
- This is an email notification update for request maintenance with the following details:<br><br>
- Refference No. : '.$rowData['ref'].'<br>Subject : '.$rowData['subjek'].'<br> Requester Name : '.$rowData['req_name'].'<br> Maintenance Activity : '.$rowData['activity'].'<br> Status : '.$status.'<br>Notes : '.$extranotes.'<br><br><br>
- Best Regards, <br> Plan Maintenance Corporate (PMC) Admin';
- $message .= '</a>';
- $message .= '</body>';
- $message .= '</html>';
- $headers = "From:".'PMC System'."\n".
- "Reply-To:".'corporatemaintenance@indosatooredoo.com'."\n".
- "Cc:".'corporatemaintenance@indosatooredoo.com, hery.soegijanto@indosatooredoo.com, winahyu.dwiningsih@indosatooredoo.com, nancylia.tanod@indosatooredoo.com, neny.sukaesih@indosatooredoo.com, bagus.amirulloh@indosatooredoo.com'."\n".
- //"Bcc:".'b.paramitha@indosatooredoo.com'."\n".
- "MIME-Version: 1.0\n" .
- "Content-type: text/html; charset=iso-8859-1";
- if($jalan)
- {
- mysql_query("update plan2 set status='$status', extranotes='$extranotes',sr='$sr' where id='$id'");
- Echo "<script language='javascript' type='text/javascript'>
- alert('Update Done')
- window.location.href='po2.php'
- </script>";
- $kirim=mail($to,$subject,$message,$headers);
- }
- else
- {
- Echo "Email gagal dikirim";
- }
- break;
- default:
- $to = $receiverEmail['app1'];
- break;
- case ($status = 'Sent'):
- $stringQuery = 'SELECT ref,subjek,req_name,req_email, activity, status, extranotes, sr FROM plan2 where id="'.$id.'"';;
- $result = mysql_query($stringQuery);
- $rowData = array();
- while ($row = mysql_fetch_assoc($result))
- {
- $dataDetail = array();
- $rowKey = array_keys($row);
- foreach ($rowKey as $sKey)
- {
- $rowData[$sKey] = $row[$sKey];
- }
- }
- $to = $rowData['req_email'];;
- $subject = '['.$status.'] REFF No.'.$rowData['ref'];;
- $message .= '<body>';
- $message = '<b>Dear Requestor, </b><br><br>
- This is an email notification update for request maintenance with the following details:<br><br>
- Refference No. : '.$rowData['ref'].'<br>Subject : '.$rowData['subjek'].'<br> Requester Name : '.$rowData['req_name'].'<br> Maintenance Activity : '.$rowData['activity'].'<br> Status : '.$status.'<br>Notes : '.$extranotes.'<br><br><br>
- Best Regards, <br> Plan Maintenance Corporate (PMC) Admin';
- $message .= '</a>';
- $message .= '</body>';
- $message .= '</html>';
- $headers = "From:".'PMC System'."\n".
- "Reply-To:".'corporatemaintenance@indosatooredoo.com'."\n".
- "Cc:".'corporatemaintenance@indosatooredoo.com,winahyu.dwiningsih@indosatooredoo.com.com, hery.soegijanto@indosatooredoo.com'."\n".
- //"Bcc:".'wahyu.sonjaya@indosat.com, tantri.oktariani@indosat.com, agus.bahri@indosat.com, mobile.corporate@indosat.com'."\n".
- "MIME-Version: 1.0\n" .
- "Content-type: text/html; charset=iso-8859-1";
- if($jalan)
- {
- mysql_query("update plan2 set status='$status', extranotes='$extranotes', sr='$sr' where id='$id'");
- Echo "<script language='javascript' type='text/javascript'>
- alert('Update Done')
- window.location.href='po2.php'
- </script>";
- $kirim=mail($to,$subject,$message,$headers);
- }
- else
- {
- Echo "Email gagal dikirim";
- }
- break;
- case ($status = 'Confirmed'):
- $stringQuery = 'SELECT ref,subjek,req_name,req_email, activity, status, extranotes, sr FROM plan2 where id="'.$id.'"';;
- $result = mysql_query($stringQuery);
- $rowData = array();
- while ($row = mysql_fetch_assoc($result))
- {
- $dataDetail = array();
- $rowKey = array_keys($row);
- foreach ($rowKey as $sKey)
- {
- $rowData[$sKey] = $row[$sKey];
- }
- }
- $to = $rowData['req_email'];;
- $subject = '['.$status.'] REFF No.'.$rowData['ref'];;
- $message .= '<body>';
- $message = '<b>Dear Requestor, </b><br><br>
- This is an email notification update for request maintenance with the following details:<br><br>
- Refference No. : '.$rowData['ref'].'<br>Subject : '.$rowData['subjek'].'<br> Requester Name : '.$rowData['req_name'].'<br> Maintenance Activity : '.$rowData['activity'].'<br> Status : '.$status.'<br>Notes : '.$extranotes.'<br><br><br>
- Best Regards, <br> Plan Maintenance Corporate (PMC) Admin';
- $message .= '</a>';
- $message .= '</body>';
- $message .= '</html>';
- $headers = "From:".'PMC System'."\n".
- "Reply-To:".'corporatemaintenance@indosatooredoo.com'."\n".
- "Cc:".'corporatemaintenance@indosatooredoo.com, hery.soegijanto@indosatooredoo.com, winahyu.dwiningsih@indosatooredoo.com, nancylia.tanod@indosatooredoo.com, neny.sukaesih@indosatooredoo.com, bagus.amirulloh@indosatooredoo.com'."\n".
- "Bcc:".'b.paramitha@indosatooredoo.com'."\n".
- "MIME-Version: 1.0\n" .
- "Content-type: text/html; charset=iso-8859-1";
- if($jalan)
- {
- mysql_query("update plan2 set status='$status', extranotes='$extranotes',sr='$sr' where id='$id'");
- Echo "<script language='javascript' type='text/javascript'>
- alert('Update Done')
- window.location.href='po2.php'
- </script>";
- $kirim=mail($to,$subject,$message,$headers);
- }
- else
- {
- Echo "Email gagal dikirim";
- }
- break;
- default:
- $to = $receiverEmail['app1'];
- break;
- }
- $to = trim($to);
- }
- ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment