Created
December 13, 2017 12:45
-
-
Save tisuchi/9688d0db8488dbaa29f9eaf98155e6fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head><title>View Details</title></head> | |
| <head> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <style> | |
| div.container | |
| { | |
| width: 100%; | |
| border: 1px gray; | |
| } | |
| header, footer | |
| { | |
| padding: 1em; | |
| color: white; | |
| background-color: grey; | |
| clear: left; | |
| text-align: center; | |
| } | |
| body{ | |
| background-color: #F5DEB3; | |
| <!--#CCCCCC #FFFFFF--> | |
| } | |
| table, th, td, tr | |
| { | |
| border: 1px solid black; | |
| border-collapse: collapse; | |
| table-layout: initial ; | |
| } | |
| th, td , tr | |
| { | |
| padding: 1px; | |
| text-align: center;; | |
| } | |
| th | |
| { | |
| text-align: center; | |
| } | |
| </style> | |
| </head> | |
| <header> | |
| <div class="container"> | |
| <h1> View Aduan </h1> | |
| <div class="bg"></div> | |
| <p><center> | |
| <img src="bersekutu.jpg" alt="mpm image" width="90" height="100"> | |
| <img src="jata.jpg" alt="mpm image" width="100" height="100"> | |
| <img src="MPM.png" alt="mpm image" width="100" height="100"> | |
| <img src="IIUM_Logo.png" alt="mpm image" width="350" height="100"> | |
| </p></center> | |
| <input type="button" value="BACK TO MAINPAGE" onclick="window.location.href='index.php'" /> | |
| </header> | |
| <article><p> | |
| <body> | |
| <form name="form" action="" method="post"> | |
| <table style= "width:100%" border= "1"> | |
| <!--<table id="dataTable" style= "width:100%" border= "1">--> | |
| <?php | |
| include('connect.php'); | |
| $query = "SELECT * FROM aduan ORDER BY dateReceive ASC"; | |
| $result = mysqli_query($link, $query); | |
| echo "<br>"; | |
| echo "<table border=\"1\" width=\"100%\">"; | |
| echo "<tr> | |
| <td><b>REFERENCE NO</b></td> | |
| <td><b>DATE OF RECEIVE</td> | |
| <td><b>DETAILS</td> | |
| <td><b>INVESTIGATING DATE</td> | |
| <td><b>INVESTIGATING OFFICER</td> | |
| <td><b>FEEDBACK FROM OFFICER</td> | |
| <td><b>DAYS</td> | |
| </tr>"; | |
| function dateDifference($date_1 , $date_2 , $differenceFormat = '%a' ) | |
| { | |
| $datetime1 = date_create($date_1); | |
| $datetime2 = date_create($date_2); | |
| $interval = date_diff($datetime1, $datetime2); | |
| return $interval->format($differenceFormat); | |
| } | |
| if($result){ | |
| while($row=mysqli_fetch_array($result)) | |
| { | |
| $referenceNo=$row['referenceNo']; | |
| $dateReceive=$row['dateReceive']; | |
| $details=$row['details']; | |
| $investDate=$row['investDate']; | |
| $investofficer=$row['investofficer']; | |
| $feedback=$row['feedback']; | |
| //days left count | |
| // today - dateof investigate | |
| echo "<tr> | |
| <td>$referenceNo</td> | |
| <td>$dateReceive</td> | |
| <td>$details</td> | |
| <td>$investDate</td> | |
| <td>$investofficer</td> | |
| <td>$feedback</td> | |
| <td><a href=daysleft.php?id=".$row['referenceNo']." >DAYS LEFT</a>".dateDifference(date('Y-m-d'), $investDate)."</td>; | |
| </tr>"; | |
| } | |
| } | |
| echo "</table>"; | |
| ?> | |
| <center><input type="button" value="EDIT ADUAN" onclick="window.location.href='editdeleterecord.php'" /> | |
| <input type="button" value="DELETE ADUAN" onclick="window.location.href='deleterecord.php'" /></center> | |
| </p></article> | |
| <footer> | |
| <p>Copyright [email protected]</p> | |
| <p>Jabatan Perlesenan dan Penguatkuasaan</p> | |
| <p>Majlis Perbandaran Muar Johor Darul Takzim</p> | |
| <p>Karung Berkunci no.516 84009 Muar</p> | |
| <p>Johor Darul Takzim</p> | |
| </footer> | |
| </div> | |
| </body> | |
| </html> | |
| ViewAduan.php | |
| Open with Drive Notepad | |
| Displaying ViewAduan.php. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment