Advertisement
Guest User

percobaan

a guest
Apr 4th, 2017
1,358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.42 KB | None | 0 0
  1. <?php
  2. include "koneksi.php";
  3. include "AntiXSS.php";
  4. include "header.php";
  5. include "request_common.php";
  6.  
  7. ?>
  8.  
  9.  
  10. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  11. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  12. <head>
  13. <title>Service Assurance Indosat</title>
  14. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  15. <link rel="stylesheet" media="screen,projection" type="text/css" href="css/reset.css" />
  16. <link rel="stylesheet" media="screen,projection" type="text/css" href="css/main.css" />
  17. <link rel="stylesheet" media="all" type="text/css" href="css/ui-lightness/jquery-ui-1.10.3.custom.css" />
  18. <link rel="stylesheet" media="all" type="text/css" href="css/jquery-ui-timepicker-addon.css" />
  19. <!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="css/main-msie.css" /><![endif]-->
  20. <link rel="stylesheet" media="screen,projection" type="text/css" href="css/style.css" />
  21. <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700' rel='stylesheet' type='text/css'>
  22. <link rel="stylesheet" media="print" type="text/css" href="css/print.css" />
  23. <link type="text/css" href="js/themes/base/ui.all.css" rel="stylesheet" />
  24. <script type="text/javascript" src="js/jquery-1.10.1.min.js"></script>
  25. <script type="text/javascript" src="js/jquery-ui.min.js"></script>
  26. <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script>
  27. <script type="text/javascript" src="js/script.js"></script>
  28.  
  29. <script type="text/javascript">
  30. $(document).ready(function(){
  31. $("#time").datepicker({
  32. dateFormat : "yy-mm-dd",
  33. changeMonth : true,
  34. changeYear : true
  35.  
  36. });
  37. });
  38.  
  39. </script>
  40.  
  41. <script type="text/javascript">
  42. $(document).ready(function(){
  43. $("#time2").datetimepicker({
  44. dateFormat : "yy-mm-dd",
  45. changeMonth : true,
  46. changeYear : true
  47.  
  48. });
  49. });
  50.  
  51. </script>
  52.  
  53.  
  54.  
  55. <script type="text/javascript">
  56. $(document).ready(function(){
  57. $("#time3").datetimepicker({
  58. dateFormat : "yy-mm-dd",
  59. changeMonth : true,
  60. changeYear : true
  61.  
  62. });
  63. });
  64.  
  65. </script>
  66.  
  67. <script type="text/javascript">
  68. $(document).ready(function(){
  69. $("#time4").datepicker({
  70. dateFormat : "yy-mm-dd",
  71. changeMonth : true,
  72. changeYear : true
  73.  
  74. });
  75. });
  76.  
  77. </script>
  78.  
  79. <style type="text/css">
  80.  
  81. table#gede {
  82. margin: 0px 0 100px 100px;
  83. width: 950px;
  84. border-collapse: collapse;
  85.  
  86. }
  87.  
  88. table#kecil {
  89. margin: 0px 0 100px 100px;
  90. width: 370px;
  91. border-collapse: collapse;
  92.  
  93. }
  94.  
  95. table#note {
  96. margin: 0px 0 100px 100px;
  97. width: 370px;
  98. height: 10px;
  99. border-collapse: collapse;
  100.  
  101. }
  102. tbody {
  103. color: #000;
  104. }
  105. table th, table td {
  106. padding: 5px 5px;
  107. border: 1px solid #000;
  108. }
  109. table tr {
  110. font: 11px 'Open Sans',Trebuchet MS, Helvetica, sans-serif;
  111. background: #FFFFF;
  112. }
  113. table td {
  114. -webkit-transition: all 0.7s ease-in-out 0s;
  115. -moz-transition: all 0.7s ease-in-out 0s;
  116. -o-transition: all 0.7s ease-in-out 0s;
  117. transition: all 0.7s ease-in-out 0s;
  118. }
  119. table tr:nth-child(2n+0) {
  120. background: #FFFFFF;
  121. }
  122. table td:hover, table td:nth-child(2n+0):hover {
  123. background: white;
  124. }
  125. table th {
  126. background: #FDD300;
  127. color: #000;
  128.  
  129. font: 13px 'Open Sans',Trebuchet MS, Helvetica, sans-serif;
  130. }
  131.  
  132.  
  133. @-webkit-keyframes invalid {
  134. from { background-color: #FDD300; }
  135. to { background-color: inherit; }
  136. }
  137. @-moz-keyframes invalid {
  138. from { background-color: #FDD300; }
  139. to { background-color: inherit; }
  140. }
  141. @-o-keyframes invalid {
  142. from { background-color: #FDD300; }
  143. to { background-color: white; }
  144. }
  145. @keyframes invalid {
  146. from { background-color: #FDD300; }
  147. to { background-color: inherit; }
  148. }
  149. .invalid {
  150. -webkit-animation: invalid 1s infinite; /* Safari 4+ */
  151. -moz-animation: invalid 1s infinite; /* Fx 5+ */
  152. -o-animation: invalid 1s infinite; /* Opera 12+ */
  153. animation: invalid 1s infinite; /* IE 10+ */
  154. }
  155.  
  156.  
  157. a:link {text-decoration: none}
  158. a:visited {text-decoration: none}
  159. a:active {text-decoration: none}
  160.  
  161.  
  162.  
  163. </style>
  164. <script>
  165.  
  166. function kirim_pending(x)
  167. {
  168.  
  169. var ticket = $('#tiket').val();
  170. var time1 = $('#time').val();
  171. var time2 = $('#time2').val();
  172. var wkt1 = $('#waktu1').val();
  173. var wkt2 = $('#waktu2').val();
  174. var type = $('#type').val();
  175.  
  176. window.location.href ='pending.php?tiket='+escape(ticket)+'&time='+escape(time1)+'&time2='+escape(time2)+'&wkt1='+escape(wkt1)+'&wkt2='+escape(wkt2)+'&type='+escape(type);
  177. }
  178. </script>
  179.  
  180. </head>
  181.  
  182. <?php
  183.  
  184. $id = $_GET['id'];
  185. $query = "select * from plan2 where id='$id'";
  186. $sql = mysql_query($query);
  187. $data = mysql_fetch_assoc($sql);
  188.  
  189. $ref = $data['ref'];
  190.  
  191.  
  192. // initial state
  193. $id = (!empty($_GET['id'])) ? $_GET['id'] : null;
  194. $types = '1';
  195.  
  196.  
  197. /*
  198. if(!isset($_POST['tes']))
  199. {
  200. $query1 = "select count(*) as jml from pending where id='$id'";
  201. $sql1 = mysql_query($query1);
  202. $data1 = mysql_fetch_assoc($sql1);
  203.  
  204. $jml = $data1['jml'];
  205.  
  206. if($jml>0)
  207. {
  208. $query2 = "select * from pending where id='$id'";
  209. $sql2 = mysql_query($query2);
  210. $ilk =0;
  211. while ($data2 = mysql_fetch_array($sql2))
  212. {
  213. $tgl1[$ilk] = $data2[1];
  214. $tgl2[$ilk] = $data2[2];
  215. $status[$ilk] = $data2[4];
  216. $nomor[$ilk] = $data2[5];
  217. $ilk++;
  218. }
  219. }
  220.  
  221. }
  222. else if(isset($_POST['tes']))
  223. {
  224. $query1 = "select count(*) as jml from pending where id='$id'";
  225. $sql1 = mysql_query($query1);
  226. $data1 = mysql_fetch_assoc($sql1);
  227.  
  228. $jml = $data1['jml'];
  229.  
  230. if($jml>0)
  231. {
  232. $query2 = "select * from pending where id='$id'";
  233. $sql2 = mysql_query($query2);
  234. $ilk =0;
  235. while ($data2 = mysql_fetch_array($sql2))
  236. {
  237. $tgl1[$ilk] = $data2[1];
  238. $tgl2[$ilk] = $data2[2];
  239. $status[$ilk] = $data2[4];
  240. $nomor[$ilk] = $data2[5];
  241. $ilk++;
  242. }
  243. }
  244. }
  245.  
  246. */
  247.  
  248. ?>
  249.  
  250. <div id="wrapper">
  251.  
  252.  
  253.  
  254.  
  255. <div width="100px" height="100px" id="demo" style="margin:30px 0 0 -70px">
  256.  
  257. <center>
  258. <h2>Maintenance Request Form</h2>
  259. </center>
  260.  
  261. </div>
  262.  
  263. <div width="100px" height="100px" id="demo" style="margin:30px 0 0 120px">
  264. <table id="kecil" width="200px" height="20px">
  265. <tr style="background:#DDD9C4;">
  266. <td>Subject :</td>
  267. <td style="background:#fff;"><?php echo $data['subjek'];?></td>
  268. </tr>
  269.  
  270. <tr style="background:#DDD9C4;">
  271. <td>Refference No. :</td>
  272. <td style="background:#fff;"><?php echo $data['ref'];?></td>
  273. </tr>
  274.  
  275. </table>
  276. </div>
  277.  
  278. <div width="100px" height="100px" id="demo" style="margin:-80px 0 0 120px">
  279. <table id="kecil" width="200px" height="20px">
  280. <tr>
  281. <th colspan="3" style="background:#DDD9C4;">Requestor</td>
  282. </tr>
  283.  
  284.  
  285.  
  286. <tr style="background:#DDD9C4;">
  287. <td>Name :</td>
  288. <td style="background:#fff;"><?php echo $data['req_name'];?></td>
  289. </tr>
  290.  
  291. <tr style="background:#DDD9C4;">
  292. <td>Email :</td>
  293. <td style="background:#fff;"><?php echo $data['req_email'];?></td>
  294. </tr>
  295.  
  296. <tr style="background:#DDD9C4;">
  297. <td>Phone :</td>
  298. <td style="background:#fff;"><?php echo $data['req_phone'];?></td>
  299. </tr>
  300.  
  301. </table>
  302. </div>
  303.  
  304. <div width="100px" height="100px" id="demo" style="margin:-90px 0 0 120px">
  305. <table id="kecil" width="200px" height="20px">
  306. <tr>
  307. <th colspan="4" style="background:#DDD9C4;">Vendor (if any)</td>
  308. </tr>
  309.  
  310. <tr style="background:#DDD9C4;">
  311. <td>Company Name :</td>
  312. <td style="background:#fff;"><?php echo $data['v_company'];?></td>
  313. </tr>
  314.  
  315. <tr style="background:#DDD9C4;">
  316. <td>Name :</td>
  317. <td style="background:#fff;"><?php echo $data['v_name'];?></td>
  318. </tr>
  319.  
  320. <tr style="background:#DDD9C4;">
  321. <td>Email :</td>
  322. <td style="background:#fff;"><?php echo $data['v_email'];?></td>
  323. </tr>
  324.  
  325. <tr style="background:#DDD9C4;">
  326. <td>Phone :</td>
  327. <td style="background:#fff;"><?php echo $data['v_phone'];?></td>
  328. </tr>
  329.  
  330. </table>
  331. </div>
  332.  
  333. <div width="100px" height="100px" id="demo" style="margin:-90px 0 0 120px">
  334. <table id="kecil" width="200px" height="20px">
  335. <tr>
  336. <th colspan="3" style="background:#DDD9C4;">Indosat PIC</td>
  337. </tr>
  338.  
  339. <tr style="background:#DDD9C4;">
  340. <td>Name :</td>
  341. <td style="background:#fff;"><?php echo $data['pic_name'];?></td>
  342. </tr>
  343.  
  344. <tr style="background:#DDD9C4;">
  345. <td>Email :</td>
  346. <td style="background:#fff;"><?php echo $data['pic_email'];?></td>
  347. </tr>
  348.  
  349. <tr style="background:#DDD9C4;">
  350. <td>Phone :</td>
  351. <td style="background:#fff;"><?php echo $data['pic_phone'];?></td>
  352. </tr>
  353.  
  354.  
  355.  
  356. </table>
  357. </div>
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365. <div width="100px" height="100px" id="demo" style="margin:-470px 0 400px 520px">
  366. <table id="kecil" width="200px" height="20px">
  367.  
  368.  
  369. <tr style="background:#DDD9C4;">
  370. <td>Request Date :</td>
  371. <td style="background:#fff;"><?php echo $data['request'];?></td>
  372. </tr>
  373.  
  374. <tr style="background:#DDD9C4;">
  375. <td>Propose PMC Date :</td>
  376. <td style="background:#fff;"><?php echo $data['purpose'];?></td>
  377. </tr>
  378.  
  379.  
  380.  
  381. </table>
  382. </div>
  383.  
  384.  
  385.  
  386. <div width="100px" height="100px" id="demo" style="margin:-390px 0 300px 520px">
  387. <table id="kecil" width="200px" height="20px">
  388. <tr>
  389. <th colspan="4" style="background:#DDD9C4;">Work Information</td>
  390. </tr>
  391.  
  392. <tr style="background:#DDD9C4;">
  393. <td>Maintenance Activity :</td>
  394. <td style="background:#fff;"><?php echo $data['activity'];?></td>
  395. </tr>
  396.  
  397. <tr style="background:#DDD9C4;">
  398. <td>Background :</td>
  399. <td style="background:#fff;"><?php echo $data['background'];?></td>
  400. </tr>
  401.  
  402. <tr style="background:#DDD9C4;">
  403. <td>Location :</td>
  404. <td style="background:#fff;"><?php echo $data['lokasi'];?></td>
  405. </tr>
  406.  
  407. <tr style="background:#DDD9C4;">
  408. <td>Equipment :</td>
  409. <td style="background:#fff;"><?php echo $data['equipment'];?></td>
  410. </tr>
  411.  
  412. <tr style="background:#DDD9C4;">
  413. <td>Start Activity :</td>
  414. <td style="background:#fff;"><?php echo $data['start'];?></td>
  415. </tr>
  416.  
  417. <tr style="background:#DDD9C4;">
  418. <td>End Activity :</td>
  419. <td style="background:#fff;"><?php echo $data['finish'];?></td>
  420. </tr>
  421.  
  422. <tr style="background:#DDD9C4;">
  423. <td>Outage/Hazardous :</td>
  424. <td style="background:#fff;"><?php echo $data['category'];?></td>
  425. </tr>
  426.  
  427. <tr style="background:#DDD9C4;">
  428. <td>Outage/Hazardous Duration :</td>
  429. <td style="background:#fff;"><?php echo $data['duration'];?> Minutes</td>
  430. </tr>
  431.  
  432. </table>
  433. </div>
  434.  
  435. <div width="100px" height="100px" id="demo" style="margin:-290px 0 0 520px">
  436. <table id="kecil" width="200px" height="20px">
  437. <tr>
  438. <th colspan="3" style="background:#DDD9C4;"> Detail Activity </td>
  439. </tr>
  440.  
  441. <tr>
  442. <th colspan="2" height="50px" style="background:#fff;"><?php echo $data['detail'];?></th>
  443. </tr>
  444. </table>
  445. </div>
  446.  
  447. <div width="100px" height="100px" id="demo" style="margin:-90px 0 0 520px">
  448. <table id="kecil" width="200px" height="20px">
  449. <tr>
  450. <th colspan="3" style="background:#DDD9C4;"> Impacted </td>
  451. </tr>
  452.  
  453. <tr>
  454. <th colspan="2" height="50px" style="background:#fff;"><?php echo $data['impact'];?></th>
  455. </tr>
  456. </table>
  457. </div>
  458.  
  459. <div width="100px" height="100px" id="demo" style="margin:-90px 0 0 520px">
  460. <table id="note" width="200px" height="10px">
  461. <tr>
  462. <th colspan="3" style="background:#DDD9C4;"> Note </td>
  463. </tr>
  464.  
  465. <tr>
  466. <th colspan="1" height="50px" style="background:#fff;"><?php echo $data['note'];?></th>
  467. </tr>
  468. </table>
  469. </div>
  470.  
  471.  
  472. <div width="100px" height="100px" id="demo" style="margin:-320px 0 0 120px">
  473. <table id="kecil" width="200px" height="20px">
  474. <form method="post" action="<?php echo $_SERVER['REQUEST_URI'];?>" enctype="multipart/form-data">
  475.  
  476. <tr>
  477. <td>Status :</td>
  478. <td align="left"><select name="stat">
  479. <option><?php echo $data['status'];?> </option>
  480. <option value="Sent" /> Sent
  481. <option value="Confirmed" /> Confirmed
  482. <option value="Rescheduled" /> Rescheduled
  483. <option value="Postponed" /> Postponed
  484. <option value="Done" /> Done
  485. </select>
  486. </td>
  487. </div>
  488. </tr>
  489.  
  490. <tr>
  491. <td>SR :</td>
  492. <td><input type="text" name="sr" value="<?php echo $data['sr'];?>" /></td>
  493. </tr>
  494. <tr>
  495. <td>Reschedule Date :</td>
  496. <td><input type="text" name="time" id="time" value="<?php echo $data['reschedule'];?>" size="25px"/></td>
  497. </tr>
  498. <tr>
  499. <td>Notes :</td>
  500. <td><textarea name="extranotes" rows="5" cols="30"><?php echo $data['extranotes'];?></textarea></td>
  501. </tr>
  502.  
  503. <tr>
  504. <td>Attach File</td>
  505. <td align="left"><input type="file" name="userfile" size="50X7"/></td>
  506. </tr>
  507.  
  508. <tr>
  509. <td align="left"><input type="submit" name="submit" value="submit"style="width:110px; height:25px;"/></td>
  510. </tr>
  511. </table>
  512. </form>
  513. </div>
  514.  
  515. <?php
  516.  
  517. $arr = 0;
  518. ?>
  519.  
  520.  
  521. <table class="table" width="50%" style="margin:-50px 0 0 218px">
  522.  
  523. <tr>
  524. <th>No</th>
  525. <th style="width:500px;">Customer</th>
  526. <th style="width:500px;">Circuit ID</th>
  527. <th style="width:500px;">Contact</th>
  528.  
  529.  
  530. </tr>
  531. <?php
  532.  
  533. if(!isset($_GET['no']))
  534. {
  535. $no=1;
  536. }
  537. else
  538. {
  539. if($_GET['page']==1)
  540. {
  541. $no=1;
  542. }
  543. else
  544. {
  545. $no=$_GET['no'];
  546. }
  547. }
  548.  
  549. $sqlCount = "select count(*) from data_niw2 where niw='$ref'.'$";
  550. $rsCount = mysql_fetch_array(mysql_query($sqlCount));
  551. $banyakData = $rsCount[0];
  552. $page = isset($_GET['page']) ? $_GET['page'] : 1;
  553. $limit = 1000;
  554. $mulai_dari = $limit * ($page - 1);
  555.  
  556. $sql = "select * from data_niw2 where niw = '$ref' limit $mulai_dari,$limit";
  557. $jalan = mysql_query($sql);
  558. while($hasil=mysql_fetch_array($jalan))
  559. {
  560.  
  561.  
  562. ?>
  563.  
  564. <tr>
  565. <td align="center"><?php echo $no;?></td>
  566. <td size="300px"><?php echo $hasil[1];?></td>
  567. <td size="300px"><?php echo $hasil[2];?></td>
  568. <td size="300px"><?php echo $hasil[3];?></td>
  569.  
  570. </tr>
  571. <input type="hidden" name="idkontak<?php echo $arr;?>" value="<?php echo $hasil[0]?>"/>
  572. <input type="hidden" name="niw<?php echo $arr;?>" value="<?php echo $hasil[1]?>"/>
  573. <input type="hidden" name="cust<?php echo $arr;?>" value="<?php echo $hasil[2]?>"/>
  574. <input type="hidden" name="link<?php echo $arr;?>" value="<?php echo $hasil[3]?>"/>
  575. <input type="hidden" name="kontak<?php echo $arr;?>" value="<?php echo $hasil[4]?>"/>
  576. <input type="hidden" name="kntk<?php echo $arr;?>" value="<?php echo $hasil[5]?>"/>
  577.  
  578. <?php
  579. $arr++;
  580. $no++;
  581.  
  582.  
  583.  
  584.  
  585.  
  586. ?>
  587. </table>
  588. <center>
  589. <?php
  590.  
  591. $banyakHalaman = ceil($banyakData / $limit);
  592. echo 'Halaman: ';
  593. for ($i = 1; $i <= $banyakHalaman; $i++) {
  594. if ($page != $i) {
  595.  
  596. echo '[<a href="detailpo2.php?page=' . $i . '& no=' .$no .'& id=' .$kirim.' ">' . $i . '</a>] ';
  597. } else {
  598. echo "[$i] ";
  599. }
  600. }
  601. ?>
  602.  
  603. </center>
  604. </div>
  605. </div>
  606.  
  607.  
  608. </center>
  609.  
  610. <?php
  611.  
  612.  
  613.  
  614. if(isset($_POST['submit']))
  615. {
  616.  
  617. ini_set('max_execution_time', 3000);
  618.  
  619.  
  620. include "koneksi.php";
  621.  
  622.  
  623. $stat = $_POST['stat'];
  624. $sr = $_POST['sr'];
  625. if($stat=='Sent')
  626. {
  627. $status = 'Sent';
  628. }
  629. if($stat=='Confirmed')
  630. {
  631. $status = 'Confirmed';
  632. }
  633. else if($stat=='Rescheduled')
  634. {
  635. $status = 'Rescheduled';
  636. }
  637. else if($stat=='Postponed')
  638. {
  639. $status = 'Postponed';
  640. }
  641. else if($stat=='Done')
  642. {
  643. $status = 'Done';
  644. }
  645.  
  646. $reschedule = $_POST['time'];
  647. $extranotes = $_POST['extranotes'];
  648.  
  649.  
  650. ini_set('max_execution_time', 300);
  651.  
  652.  
  653.  
  654. include "koneksi.php";
  655.  
  656.  
  657. error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
  658. date_default_timezone_set('Asia/Jakarta');
  659.  
  660.  
  661. require_once "excel_reader2.php";
  662.  
  663. date_default_timezone_set('Asia/Jakarta');
  664.  
  665. //membaca file excel yang diupload
  666. $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']);
  667. //membaca jumlah baris dari data excel
  668. $baris = $data->rowcount($sheet_index=0);
  669.  
  670.  
  671. //nilai awal counter jumlah data yang sukses dan yang gagal diimport
  672. $sukses = 0;
  673. $gagal = 0;
  674.  
  675. //import data excel dari baris kedua, karena baris pertama adalah nama kolom
  676. for ($i=2; $i<=$baris; $i++)
  677. {
  678. //membaca data nip (kolom)
  679.  
  680. $data1 = $data->val($i,1);
  681. $data2 = $data->val($i,2);
  682. $data3 = $data->val($i,3);
  683.  
  684.  
  685.  
  686. $sql = "insert into data_niw2 values('$ref','$data1','$data2','$data3')";
  687. $input = mysql_query($sql);
  688. $input = mysql_query($sql);
  689.  
  690. }
  691.  
  692. $adminEmail = 'serviceassurance.indosat@gmail.com'; //change email admin here
  693. $receiverEmail = array(
  694. 'app1' => "b.paramitha@indosatooredoo.com",
  695. 'app2' => "bulanratu@gmail.com",
  696. 'app3' => "buulbuul@yahoo.com",
  697. 'req_email' => $req_email
  698.  
  699. );
  700.  
  701. switch ($stat) {
  702.  
  703. case ($status = 'Rescheduled') :
  704.  
  705.  
  706. $stringQuery = 'SELECT ref, subjek, req_email, status, reschedule , extranotes FROM plan2 where id="'.$id.'"';;
  707. $result = mysql_query($stringQuery);
  708. $rowData = array();
  709.  
  710. while ($row = mysql_fetch_assoc($result))
  711. {
  712. $dataDetail = array();
  713. $rowKey = array_keys($row);
  714. foreach ($rowKey as $sKey)
  715. {
  716. $rowData[$sKey] = $row[$sKey];
  717. }
  718. }
  719. $to = $rowData['req_email'];;
  720. $subject = '['.$status.'] REFF No.'.$rowData['ref'];;
  721. $message ='';
  722. // $link = 'http://sa-helpdesk/previewadjustment'.$previewadjustment.'.php?id='.$id;;
  723. //$message .= '<html><head><title>Adjustment Level 4 </title></head>';
  724. $message .= '<body>';
  725. $message = 'Dear Requestor, <br><br>
  726. This is an email notification update for request maintenance with the following details:<br><br>
  727. 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>
  728. Best Regards, <br> Plan Maintenance Corporate (PMC) Admin';
  729. $message .= '</a>';
  730. $message .= '</body>';
  731. $message .= '</html>';
  732. $headers = "From:".'PMC System'."\n".
  733. "Reply-To:".'corporatemaintenance@indosatooredoo.com'."\n".
  734. "Cc:".'corporatemaintenance@indosatooredoo.com, winahyu.dwiningsih@indosatooredoo.com, hery.soegijanto@indosatooredoo.com'."\n".
  735. //"Bcc:".'wahyu.sonjaya@indosat.com, tantri.oktariani@indosat.com, agus.bahri@indosat.com, mobile.corporate@indosat.com'."\n".
  736. "MIME-Version: 1.0\n" .
  737. "Content-type: text/html; charset=iso-8859-1";
  738.  
  739. if($jalan)
  740. {
  741. mysql_query("update plan2 set status='$status', reschedule='$reschedule', extranotes='$extranotes', sr='$sr' where id='$id'");
  742. Echo "<script language='javascript' type='text/javascript'>
  743. alert('Update Done')
  744. window.location.href='po2.php'
  745. </script>";
  746.  
  747. $kirim=mail($to,$subject,$message,$headers);
  748.  
  749.  
  750. }
  751. else
  752. {
  753. Echo "Email gagal dikirim";
  754.  
  755. }
  756. break;
  757.  
  758.  
  759.  
  760. case ($status = 'Postponed'):
  761.  
  762.  
  763. $stringQuery = 'SELECT ref,subjek,req_name,req_email, activity, status, sr, extranotes FROM plan2 where id="'.$id.'"';;
  764. $result = mysql_query($stringQuery);
  765. $rowData = array();
  766.  
  767. while ($row = mysql_fetch_assoc($result))
  768. {
  769. $dataDetail = array();
  770. $rowKey = array_keys($row);
  771. foreach ($rowKey as $sKey)
  772. {
  773. $rowData[$sKey] = $row[$sKey];
  774. }
  775. }
  776. $to = $rowData['req_email'];;
  777. $subject = '['.$status.'] REFF No.'.$rowData['ref'];;
  778. $message .= '<body>';
  779. $message = '<b>Dear Requestor, </b><br><br>
  780. This is an email notification update for request maintenance with the following details:<br><br>
  781. 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>
  782. Best Regards, <br> Plan Maintenance Corporate (PMC) Admin';
  783. $message .= '</a>';
  784. $message .= '</body>';
  785. $message .= '</html>';
  786. $headers = "From:".'PMC System'."\n".
  787. "Reply-To:".'corporatemaintenance@indosatooredoo.com'."\n".
  788. "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".
  789. //"Bcc:".'b.paramitha@indosatooredoo.com'."\n".
  790. "MIME-Version: 1.0\n" .
  791. "Content-type: text/html; charset=iso-8859-1";
  792.  
  793.  
  794. if($jalan)
  795. {
  796. mysql_query("update plan2 set status='$status', extranotes='$extranotes', sr='$sr' where id='$id'");
  797. Echo "<script language='javascript' type='text/javascript'>
  798. alert('Update Done')
  799. window.location.href='po2.php'
  800. </script>";
  801.  
  802. $kirim=mail($to,$subject,$message,$headers);
  803.  
  804.  
  805. }
  806. else
  807. {
  808. Echo "Email gagal dikirim";
  809.  
  810. }
  811. break;
  812.  
  813.  
  814.  
  815.  
  816. case ($status = 'Done'):
  817.  
  818.  
  819. $stringQuery = 'SELECT ref,subjek,req_name,req_email, activity, status,sr extranotes FROM plan2 where id="'.$id.'"';;
  820. $result = mysql_query($stringQuery);
  821. $rowData = array();
  822.  
  823. while ($row = mysql_fetch_assoc($result))
  824. {
  825. $dataDetail = array();
  826. $rowKey = array_keys($row);
  827. foreach ($rowKey as $sKey)
  828. {
  829. $rowData[$sKey] = $row[$sKey];
  830. }
  831. }
  832. $to = $rowData['req_email'];;
  833. $subject = '['.$status.'] REFF No.'.$rowData['ref'];;
  834. $message .= '<body>';
  835. $message = '<b>Dear Requestor, </b><br><br>
  836. This is an email notification update for request maintenance with the following details:<br><br>
  837. 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>
  838. Best Regards, <br> Plan Maintenance Corporate (PMC) Admin';
  839. $message .= '</a>';
  840. $message .= '</body>';
  841. $message .= '</html>';
  842. $headers = "From:".'PMC System'."\n".
  843. "Reply-To:".'corporatemaintenance@indosatooredoo.com'."\n".
  844. "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".
  845. //"Bcc:".'b.paramitha@indosatooredoo.com'."\n".
  846. "MIME-Version: 1.0\n" .
  847. "Content-type: text/html; charset=iso-8859-1";
  848.  
  849.  
  850. if($jalan)
  851. {
  852. mysql_query("update plan2 set status='$status', extranotes='$extranotes',sr='$sr' where id='$id'");
  853. Echo "<script language='javascript' type='text/javascript'>
  854. alert('Update Done')
  855. window.location.href='po2.php'
  856. </script>";
  857.  
  858. $kirim=mail($to,$subject,$message,$headers);
  859.  
  860.  
  861. }
  862. else
  863. {
  864. Echo "Email gagal dikirim";
  865.  
  866. }
  867. break;
  868. default:
  869. $to = $receiverEmail['app1'];
  870. break;
  871.  
  872. case ($status = 'Sent'):
  873.  
  874.  
  875. $stringQuery = 'SELECT ref,subjek,req_name,req_email, activity, status, extranotes, sr FROM plan2 where id="'.$id.'"';;
  876.  
  877. $result = mysql_query($stringQuery);
  878. $rowData = array();
  879.  
  880. while ($row = mysql_fetch_assoc($result))
  881. {
  882. $dataDetail = array();
  883. $rowKey = array_keys($row);
  884. foreach ($rowKey as $sKey)
  885. {
  886. $rowData[$sKey] = $row[$sKey];
  887. }
  888. }
  889. $to = $rowData['req_email'];;
  890. $subject = '['.$status.'] REFF No.'.$rowData['ref'];;
  891. $message .= '<body>';
  892. $message = '<b>Dear Requestor, </b><br><br>
  893. This is an email notification update for request maintenance with the following details:<br><br>
  894. 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>
  895. Best Regards, <br> Plan Maintenance Corporate (PMC) Admin';
  896.  
  897.  
  898. $message .= '</a>';
  899. $message .= '</body>';
  900. $message .= '</html>';
  901. $headers = "From:".'PMC System'."\n".
  902. "Reply-To:".'corporatemaintenance@indosatooredoo.com'."\n".
  903. "Cc:".'corporatemaintenance@indosatooredoo.com,winahyu.dwiningsih@indosatooredoo.com.com, hery.soegijanto@indosatooredoo.com'."\n".
  904. //"Bcc:".'wahyu.sonjaya@indosat.com, tantri.oktariani@indosat.com, agus.bahri@indosat.com, mobile.corporate@indosat.com'."\n".
  905. "MIME-Version: 1.0\n" .
  906. "Content-type: text/html; charset=iso-8859-1";
  907.  
  908. if($jalan)
  909. {
  910. mysql_query("update plan2 set status='$status', extranotes='$extranotes', sr='$sr' where id='$id'");
  911. Echo "<script language='javascript' type='text/javascript'>
  912. alert('Update Done')
  913. window.location.href='po2.php'
  914. </script>";
  915.  
  916. $kirim=mail($to,$subject,$message,$headers);
  917.  
  918.  
  919. }
  920. else
  921. {
  922. Echo "Email gagal dikirim";
  923.  
  924. }
  925. break;
  926.  
  927. case ($status = 'Confirmed'):
  928.  
  929.  
  930. $stringQuery = 'SELECT ref,subjek,req_name,req_email, activity, status, extranotes, sr FROM plan2 where id="'.$id.'"';;
  931. $result = mysql_query($stringQuery);
  932. $rowData = array();
  933.  
  934. while ($row = mysql_fetch_assoc($result))
  935. {
  936. $dataDetail = array();
  937. $rowKey = array_keys($row);
  938. foreach ($rowKey as $sKey)
  939. {
  940. $rowData[$sKey] = $row[$sKey];
  941. }
  942. }
  943. $to = $rowData['req_email'];;
  944. $subject = '['.$status.'] REFF No.'.$rowData['ref'];;
  945. $message .= '<body>';
  946. $message = '<b>Dear Requestor, </b><br><br>
  947. This is an email notification update for request maintenance with the following details:<br><br>
  948. 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>
  949. Best Regards, <br> Plan Maintenance Corporate (PMC) Admin';
  950. $message .= '</a>';
  951. $message .= '</body>';
  952. $message .= '</html>';
  953. $headers = "From:".'PMC System'."\n".
  954. "Reply-To:".'corporatemaintenance@indosatooredoo.com'."\n".
  955. "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".
  956. "Bcc:".'b.paramitha@indosatooredoo.com'."\n".
  957. "MIME-Version: 1.0\n" .
  958. "Content-type: text/html; charset=iso-8859-1";
  959.  
  960. if($jalan)
  961. {
  962. mysql_query("update plan2 set status='$status', extranotes='$extranotes',sr='$sr' where id='$id'");
  963. Echo "<script language='javascript' type='text/javascript'>
  964. alert('Update Done')
  965. window.location.href='po2.php'
  966. </script>";
  967.  
  968. $kirim=mail($to,$subject,$message,$headers);
  969.  
  970.  
  971. }
  972. else
  973. {
  974. Echo "Email gagal dikirim";
  975.  
  976. }
  977. break;
  978. default:
  979. $to = $receiverEmail['app1'];
  980. break;
  981.  
  982.  
  983.  
  984. }
  985.  
  986. $to = trim($to);
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993. }
  994.  
  995. ?>
  996.  
  997.  
  998. </body>
  999.  
  1000. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement