JezK
Edit File: viewStaffStatus.php
<?php $currentPage="addBDC"; include("header.php"); $staffID = isset($_REQUEST['id'])?$_REQUEST['id']:""; $bdcUserID = isset($_REQUEST['uid'])?$_REQUEST['uid']:""; if($staffID == "" || $bdcUserID == "") { echo "<script>location.replace('B-DC.php')</script>"; } else { include('app/getStaffDetails.php'); } if(isset($_SESSION['saveFailed'])) { echo "<script>alert('Error!!! Unable to update staff approve status. Internal server error.')</script>"; unset($_SESSION['saveFailed']); } if(isset($_SESSION['saveSuccess'])) { echo "<script>alert('Status update successfully.')</script>"; unset($_SESSION['saveSuccess']); } $issueOfIDTextStyle = ""; $identificationNumberStyle = ""; $issueOfCMSTextStyle = ""; $cmsNumberStyle = ""; if(!$issueOfIDText) { $issueOfIDTextStyle = 'display:none'; } if(!$identificationNumber) { $identificationNumberStyle = 'display:none'; } if(!$issueOfCMSText) { $issueOfCMSTextStyle = 'display:none'; } if(!$cmsNumber) { $cmsNumberStyle = 'display:none'; } ?> <div id="page-wrapper"> <div class="container-fluid"> <!-- Page Heading --> <div class="row"> <div class="col-lg-12"> <h1 class="page-header"> <small>View Staff</small> </h1> </div> </div> <!-- /.row --> <div class="row"> <div class="col-md-12 text-right"> <a href="viewStaffStatusPdf.php?uid=<?php echo $bdcUserID; ?>&id=<?php echo $staffID; ?>" class="btn btn-default">Download PDF</a> <a href="viewStaffStatusExcel.php?uid=<?php echo $bdcUserID; ?>&id=<?php echo $staffID; ?>" class="btn btn-default">Download Excel</a> </div> </div> <div class=" table-responsive" > <div class="col-md-12"> <table class="table table-bordered" cellspacing="0" width="100%"> <!--tr> <td>Staff ID</td> <td><?php echo $staffNumber; ?></td> </tr--> <tr> <td>Staff Full Name</td> <td><?php echo $staffName; ?></td> </tr> <tr> <td>District Name</td> <td><?php echo $districtName; ?></td> </tr> <tr> <td>Designation</td> <td><?php echo $designation; ?></td> </tr> <tr> <td>Date of Birth</td> <td><?php echo $dateOfBirth; ?></td> </tr> <tr> <td>Gender</td> <td><?php echo $gender; ?></td> </tr> <tr> <td>Android Mobile</td> <td><?php echo $androidMobile; ?></td> </tr> <tr> <td>IMEI</td> <td><?php echo $IMEI; ?></td> </tr> <tr> <td>Mobile Brand</td> <td><?php echo $brand; ?></td> </tr> <tr> <td>Model Number</td> <td><?php echo $modelNumber; ?></td> </tr> <tr> <td>Android Version</td> <td><?php echo $version; ?></td> </tr> <tr> <td>RAM in Mobile</td> <td><?php echo $ram; ?></td> </tr> <tr> <td>ROM in Mobile</td> <td><?php echo $rom; ?></td> </tr> <tr> <td>UniqueID</td> <td><?php echo $uniqueID; ?></td> </tr> <tr> <td>Access Required</td> <td><?php echo $accessRequiredText; ?></td> </tr> <tr> <td>Photo</td> <td><img src="../B-DC-User/uploads/<?php echo $photo; ?>" height="100px" width="100px"></td> </tr> <tr> <td>KYC</td> <td><img src="../B-DC-User/uploads/<?php echo $KYC; ?>" height="100px" width="100px"></td> </tr> <tr style="<?php echo $issueOfIDTextStyle; ?>"> <td>Issue of ID</td> <td><?php echo $issueOfIDText; ?></td> </tr> <tr style="<?php echo $identificationNumberStyle; ?>"> <td>Identification Number</td> <td><?php echo $identificationNumber; ?></td> </tr> <tr style="<?php echo $issueOfCMSTextStyle; ?>"> <td>Issue of CMS</td> <td><?php echo $issueOfCMSText; ?></td> </tr> <tr style="<?php echo $cmsNumberStyle; ?>"> <td>CMS Number</td> <td><?php echo $cmsNumber; ?></td> </tr> <tr> <td>Approved Status</td> <td><?php echo $approvedStatus; ?></td> </tr> </table> </div> </div> </div> <!-- /.container-fluid --> <!-- /.row --> <div class="" style="<?php echo $staffApproveStyle; ?>"> <form method="POST" action="app/staffApproveApp.php" onsubmit="return validate()"> <div class="form-group text-center"> <input type="hidden" name="staffID" value="<?php echo $staffID; ?>"> <input type="hidden" name="bdcUserID" value="<?php echo $bdcUserID; ?>"> <input type="radio" name="approvedStatus" value="1" id="approve" <?php echo $staffArroveStatus1; ?> onclick="displayComment('none')"> <label for="approve">Approve</label> <input type="radio" name="approvedStatus" value="3" id="reject" <?php echo $staffArroveStatus3; ?> onclick="displayComment('none')"> <label for="reject">Rejected</label> <input type="radio" name="approvedStatus" value="4" id="verify" <?php echo $staffArroveStatus4; ?> onclick="displayComment('none')"> <label for="verfiy" >Rework</label> </div> <div class="form-group col-md-12" id="commentDiv"> <label class="col-md-2 col-md-offset-2" >Comment :</label> <textarea class="col-md-6" id="comment" name="comment" rows="5"></textarea> </div> <div class="text-center"> <input type="submit" value="Submit" name="submit" class="btn btn-cs"></div> </form> </div> </div> <!-- /#page-wrapper --> <script> $(document).ready(function() { document.getElementById('commentDiv').style.display='none'; }); function displayComment(status) { document.getElementById('commentDiv').style.display=status; } function validate() { approve = document.getElementById('approve').checked; reject = document.getElementById('reject').checked; verify = document.getElementById('verify').checked; if(!(approve || reject || verify)) { alert('Please select a status.'); return false; } return true; } </script> <?php include("footer.php");?>