function query_to_csv($query, $headers = TRUE, $download = "") { if (!is_object($query) or !method_exists($query, 'list_fields')) { show_error('invalid query'); } $array = array(); if ($headers) { $line = array(); foreach ($query->list_fields() as $name) { $line[] = ucwords(str_replace('_', ' ', $name)); } $array[] = $line; } foreach ($query->result_array() as $row) { $line = array(); foreach ($row as $item) { if (dateChecker($item) == true) { $item = date("D jS F Y", strtotime($item)); } $line[] = strip_word_html($item); } $array[] = $line; } echo array_to_csv($array, $download); }
while ($row = mysqli_fetch_array($res)) { $var = ""; $ADU_CODE = $row['ADU_CODE']; $ADU_DESC = $row['ADU_DESC']; if ($ADU_CODE == $cumDoseDayUnit) { $var = "selected"; } $str .= "<option value='{$ADU_CODE}' {$var}> {$ADU_DESC} </option>\n"; } $str .= "</select>"; } } echo "<tr>\n\t\t\t\t\t<td> Cumulative Dose/day Unit: </td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t{$str}\n\t\t\t\t\t</td>\n\t\t\t\t</tr>"; $therapy_start = dateChecker($drugRow['therapy_start']); echo "<tr>\n\t\t\t\t\t<td> Therapy start date: </td>\n\t\t\t\t\t<td> <input name='theraphyStartDateEd' id='theraphyStartDateEd' value='{$therapy_start}' type='text' class='form-control datepicker' placeholder='dd/mm/yyyy'> </td>\n\t\t\t\t</tr>"; $therapy_stop = dateChecker($drugRow['therapy_stop']); echo "<tr>\n\t\t\t\t\t<td> Therapy stop date: </td>\n\t\t\t\t\t<td> <input name='theraphyStopDateEd' id='theraphyStopDateEd' value='{$therapy_stop}' type='text' class='form-control datepicker' placeholder='dd/mm/yyyy'> </td>\n\t\t\t\t</tr>"; $indication = $drugRow['indication']; echo "<tr>\n\t\t\t\t\t<td> Indication: </td>\n\t\t\t\t\t<td> <input name='indicationEd' id='indicationEd' value='{$indication}' type='text' class='form-control' > </td>\n\t\t\t\t</tr>"; $drugAction = $drugRow['drugAction']; $drugAction1 = ""; $drugAction2 = ""; $drugAction3 = ""; $drugAction4 = ""; $drugAction5 = ""; $drugAction6 = ""; if ($drugAction == 1) { $drugAction1 = "selected"; } else { if ($drugAction == 2) { $drugAction2 = "selected";
$refNo = $resRow['notes']; $dateRptRcv = $resRow['dateRcv']; $reportInit = $resRow['reportInit']; $initRptNum = $resRow['initRptNum']; $caseType = $resRow['caseType']; $chInitial = $resRow['chInitial']; $chAge = $resRow['chAge']; $chAgeUnit = $resRow['chAgeUnit']; $chAgeGrp = $resRow['chAgeGrp']; $chSex = $resRow['chSex']; $ptInitial = $resRow['initial']; $ptDOB = dateChecker($resRow['ptDOB']); $ptAge = $resRow['age']; $ptageUnit = getAgeUnitByValue($con, $resRow['age_unit']); $ptAgeGrp = $resRow['age_group']; $lastMenDate = dateChecker($resRow['lastMenDate']); $pregnancyStat = getYesNo($resRow['pregnancyStat']); $gesPer = $resRow['gesPer']; $gesPerUnit = getAgeUnitByValue($con, $resRow['gesPerUnit']); $weight = $resRow['weight']; $height = $resRow['height']; $sex = getGenderByValue($resRow['sex']); $ethnic = getEthnicByValue($con, $resRow['ethnic']); $allergyStat = getYesNo($resRow['allergyStat']); $allergyText = $resRow['allergyText']; $seriousness = $resRow['seriousness']; $seriousnessCrit = $resRow['seriousnessCrit']; $history = $resRow['history']; $relInves = $resRow['lab_data']; $adr_desc = $resRow['adr_desc']; $primSource = $resRow['Source'];
<label> ADR List PhIS </label> </div> <div class="panel-body"> <div class="tab-content pn br-n"> <?php $sql = "SELECT ID, adrNo, dateOfReport, reporterName, facilityName, receiveDate FROM phisdata ORDER BY receiveDate DESC"; $res = mysqli_query($con, $sql) or die(mysqli_error($con)); if ($res) { $phisTable = "<table id='listPHISTable' class='table table-condensed'>\n\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t<tr class='info'>\n\t\t\t\t\t\t\t\t\t\t<th> No. </th>\n\t\t\t\t\t\t\t\t\t\t<th> ADR No. </th>\n\t\t\t\t\t\t\t\t\t\t<th> Date of Transmission </th>\n\t\t\t\t\t\t\t\t\t\t<th> Facility Name </th>\n\t\t\t\t\t\t\t\t\t\t<th> Reporter Name </th>\n\t\t\t\t\t\t\t\t\t\t<th width='3%'></th>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t<tbody>"; $no = 1; while ($row = mysqli_fetch_array($res)) { $ID = $row['ID']; $adrNo = $row['adrNo']; $dateOfReport = dateChecker($row['dateOfReport']); $reporterName = $row['reporterName']; $facilityName = $row['facilityName']; $receiveDate = $row['receiveDate']; $receiveDate = date("d/m/Y h:i:s", strtotime($receiveDate)); $phisTable .= "<tr>\n\t\t\t\t\t\t\t\t\t\t<td> {$no} <input type='checkbox' name='ID[]' value='{$ID}' class='hiddenCB' /> </td>\n\t\t\t\t\t\t\t\t\t\t<td> {$adrNo} </td>\n\t\t\t\t\t\t\t\t\t\t<td> {$receiveDate} </td>\n\t\t\t\t\t\t\t\t\t\t<td> {$facilityName} </td>\n\t\t\t\t\t\t\t\t\t\t<td> {$reporterName} </td>\n\t\t\t\t\t\t\t\t\t\t<td> <a href='adr_view_phis.php?phisRptNo={$ID}' class='btn btn-sm btn-info btn-block'>View</a> </td>\n\t\t\t\t\t\t\t\t\t</tr>"; $no++; } $phisTable .= "</tbody></table>"; echo $phisTable; } ?> <center> <input type="button" name="submit" id="submit" value="Move To In-Tray" class="btn btn-sm btn-success" > </center> </div> </div>
// FROM adr_sample WHERE result = '' OR result = NULL"; $sql = "SELECT adrSampleID, adrFormID, result, lab_sent_date, remarks, product_name, seqno, sampleno, lab_recdate, result_remarks, \n\t\t\t\t\t\t\t\t\t\t\t\tDATEDIFF(NOW(), lab_sent_date) AS aging, kp_rs_level, kltt_remark\n\t\t\t\t\t\t\t\t\t\t\t\tFROM adr_sample \n\t\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN k_produk ON kp_sampleID = sampleno\n\t\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN k_lab_task_test ON kltt_kp_id = kp_id\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE result = '' OR result = NULL\n\t\t\t\t\t\t\t\t\t\t\t\tORDER BY lab_sent_date DESC"; $res = mysqli_query($con, $sql); if ($res) { $labPendingTable = "<table id='labPending' class='table table-condensed table-hover'>\n\t\t\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> No. </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Report No. </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Sample No. </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Product name </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Sent Date </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Aging </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> PKK Status </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> PPPPKK Remarks </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Result </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t\t\t<tbody>"; $c = 1; while ($row = mysqli_fetch_array($res)) { $adrSampleID = $row['adrSampleID']; $sampleno = $row['sampleno']; $formID = $row['adrFormID']; $adrNo = getADRNoByFormID($formID); if ($adrNo == null || $adrNo == "") { $adrNo = $formID; } $product_name = $row['product_name']; $lab_sent_date = dateChecker($row['lab_sent_date']); $aging = $row['aging']; $result = $row['result']; $kp_rs_level = $row['kp_rs_level']; $kltt_remark = $row['kltt_remark']; $labPendingTable .= "<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td> {$c} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td> {$adrNo} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td> {$sampleno} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td> {$product_name} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td> {$lab_sent_date} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td> {$aging} day(s) </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td> {$kp_rs_level} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td> {$kltt_remark} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td> {$result} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href='adr_view_sample_pending.php?adrSampleID={$adrSampleID}' class='btn btn-block btn-info btn-sm'> View </a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>"; $c++; } } $labPendingTable .= "</tbody></table>"; echo $labPendingTable; ?> </div> </div> </div>
} } else { $part4Table .= "<tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr>"; } $part4Table .= "</table>"; } $sqlPart5 = "SELECT adrDataIDAI, Source, reporter_state, reporter_org, dateRcv\n\t\t\t\t\t\t\t\t\tFROM adrdata WHERE adrFormID = '{$fID}'"; $resPart5 = mysqli_query($con, $sqlPart5); if ($resPart5) { $part5Table = "<table border='1' class='table table-condensed table-bordered'><tr class='dark'><td colspan='8'> <b> REPORTER INFORMATION </b> </td></tr><tr><td> Qualification </td><td> Primary Source Qualification </td><td> State </td><td> Instituition </td><td> Date of Report </td><td> </td><td> </td><td> </td></tr>"; if (mysqli_num_rows($resPart5) > 0) { $rowPart5 = mysqli_fetch_array($resPart5); $Source = getPrimSourceByValue($con, $rowPart5['Source']); $reporter_state = $rowPart5['reporter_state']; $reporter_org = $rowPart5['reporter_org']; $dateRcv = dateChecker($rowPart5['dateRcv']); $part5Table .= "<tr> <td>{$Source}</td> <td>{$Source}</td> <td>{$reporter_state}</td> <td> {$reporter_org} </td> <td> {$dateRcv} </td> <td> </td> <td> </td> <td> </td> </tr>"; } else { $part5Table .= "<tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr>"; } $part5Table .= "</table>"; } $reportTable = "<table border='1' class='table table-condensed table-bordered table-hover'> <tr> <td>{$part1Table}</td> </tr> <tr> <td>{$part2Table}</td> </tr> <tr> <td>{$part3Table}</td> </tr> <tr> <td>{$part4Table}</td> </tr> <tr> <td>{$part5Table}</td> </tr> </table>"; // echo "$reportTable <hr>"; $c = $i + 1; // $masterTable .= "<tr class='warning'><td> #$c </td></tr> <tr><td>$reportTable</td></tr>"; $masterTable .= $reportTable . "<hr/>"; } // $masterTable .= "</table>"; // echo "$masterTable"; }
// $historyStDate = $resRow['historyStDate']; // $historyCont = $resRow['historyCont']; // $historyEndDate = $resRow['historyEndDate']; $relInves = $resRow['lab_data']; $adr_desc = $resRow['adr_desc']; $primSource = $resRow['Source']; $rptrName = $resRow['reporter_name']; $rptrDesig = $resRow['desig']; $rptrDept = $resRow['reporter_dept']; $rptrOrg = $resRow['reporter_org']; $rptrAddrs = $resRow['reporter_address']; $rptrState = $resRow['reporter_state']; // $rptrState = getStateNameByID($rptrState); $rptrCntct = $resRow['reporter_telno']; $rptrEmail = $resRow['reporter_email']; $rptrDateofRpt = dateChecker($resRow['report_date']); $rptVerName = $resRow['rptVerName']; $rptrVerDesig = $resRow['rptrVerDesig']; $rptrCmt = $resRow['report_comment']; $dechall = $resRow['dechall']; $rechall = $resRow['rechall']; $causality1 = $resRow['causality1']; $causality2 = $resRow['causality2']; $primRptrQuali = $resRow['primRptrQuali']; $primRptrName = $resRow['primRptrName']; $primRptrDesig = $resRow['primRptrDesig']; $primRptrState = $resRow['primRptrState']; $primRptrOrg = $resRow['primRptrOrg']; $primRptrDept = $resRow['primRptrDept']; $primRptrAddrs = $resRow['primRptrAddrs']; $report_type = $resRow['report_type'];
$adrdetailID = getAdrTermByID($resRow['adrdetailID']); } else { $adrdetailID = $resRow['adrdetailID']; } $dosage = $resRow['dosage']; if ($dosage == NULL) { $dosage = ""; } $doseInterval = $resRow['doseInterval']; if ($doseInterval == NULL) { $doseInterval = ""; } $dosageUnit = getDoseUnitByValue($con, $resRow['dosageUnit']); $doseIntervalUnit = getDoseIntervalUnitByValue($resRow['doseIntervalUnit']); $therapy_start = dateChecker($resRow['therapy_start']); $therapy_stop = dateChecker($resRow['therapy_stop']); $relatedness = $resRow['relatedness']; if ($relatedness == 1) { $relatedness = " Certain"; } else { if ($relatedness == 2) { $relatedness = " Probable"; } else { if ($relatedness == 3) { $relatedness = " Possible"; } else { if ($relatedness == 4) { $relatedness = " Unlikely"; } else { if ($relatedness == 5) { $relatedness = " Unclassifiable";
<?php include "connection_pure.php"; include 'function.php'; if (isset($_GET['formID'])) { $formID = $_GET['formID']; $query = "SELECT adrDetailID, adrFormID, AdrDesc, AdrSkinReactYesNo, AdrCutaneous, AdrBodyPart, \n\tAdrTerminology, Adr_onsetDate, Adr_endDate, Adr_Dur, Adr_durUnit, Adr_treat, \n\tAdr_rctFirstTime, Adr_rctFirstTimeUnit, Adr_rctLastTime, Adr_rctLastTimeUnit, Adr_Extent, Adr_outcome, \n\tAdr_dateofDeath, Adr_causeofDeath, Adr_autopsyyesno, Adr_detDeath, meddraTerm, socMeddra, \n\tseriousness, seriousnessCrit\n\tFROM adrdetail WHERE adrFormID = {$formID}"; $res = mysqli_query($con, $query); if ($res) { $dataArray = array(); if (mysqli_num_rows($res) > 0) { $tempArr = array(); while ($resRow = mysqli_fetch_array($res)) { // echo $resRow['LDS_TESTTYPE']; $Adr_onsetDate = dateChecker($resRow['Adr_onsetDate']); $Adr_endDate = dateChecker($resRow['Adr_endDate']); $Adr_Dur = $resRow['Adr_Dur']; if ($Adr_Dur == NULL) { $Adr_Dur = ""; } $Adr_durUnit = $resRow['Adr_durUnit']; if ($Adr_durUnit == NULL) { $Adr_durUnit = ""; } if ($Adr_durUnit == 801) { $Adr_durUnit = "Year"; } else { if ($Adr_durUnit == 802) { $Adr_durUnit = "Month"; } else { if ($Adr_durUnit == 803) {
$seriousnessCrit2 = "selected"; } else { if ($seriousnessCrit == 3) { $seriousnessCrit3 = "selected"; } else { if ($seriousnessCrit == 4) { $seriousnessCrit4 = "selected"; } else { if ($seriousnessCrit == 5) { $seriousnessCrit5 = "selected"; } } } } } $Adr_dateofDeath = dateChecker($rowAdr['Adr_dateofDeath']); $Adr_causeofDeath = $rowAdr['Adr_causeofDeath']; $Adr_autopsyyesno = $rowAdr['Adr_autopsyyesno']; $Adr_autopsyyesno1 = ""; $Adr_autopsyyesno2 = ""; $Adr_autopsyyesno3 = ""; if ($Adr_autopsyyesno == 1) { $Adr_autopsyyesno1 = "selected"; } else { if ($Adr_autopsyyesno == 2) { $Adr_autopsyyesno2 = "selected"; } else { if ($Adr_autopsyyesno == 3) { $Adr_autopsyyesno3 = "selected"; } }
function getReactionStrByFormID($con, $formID) { $sql = "SELECT DISTINCT adrDetailID, AdrTerminology, socMeddra, Adr_onsetDate, Adr_rctFirstTime, Adr_rctFirstTimeUnit, Adr_outcome, seriousness, seriousnessCrit\n\tFROM adrdetail WHERE adrFormID = '{$formID}'"; $res = mysqli_query($con, $sql); $adrStr = "<table class='table table-condensed table-bordered table-hover'>"; if ($res) { if (mysqli_num_rows($res) > 0) { while ($row = mysqli_fetch_array($res)) { $AdrTerminology = $row['AdrTerminology']; $socMeddra = $row['socMeddra']; $Adr_onsetDate = dateChecker($row['Adr_onsetDate']); $Adr_rctFirstTime = $row['Adr_rctFirstTime']; $Adr_rctFirstTimeUnit = getAgeUnitByValue($con, $row['Adr_rctFirstTimeUnit']); $Adr_outcome = getOutcomeByValue($con, $row['Adr_outcome']); $seriousness = $row['seriousness']; if ($seriousness == 1) { $seriousness = "Yes"; } else { if ($seriousness == 2) { $seriousness = "No"; } else { $seriousness = ""; } } $seriousnessCrit = getSeriousnessCritByValue($con, $row['seriousnessCrit']); $adrStr .= "<tr>\n\t\t\t\t<td>\n\t\t\t\t\tADR Terminology: {$AdrTerminology} <br/>\n\t\t\t\t\tSystem Organ Class: {$socMeddra} <br/>\n\t\t\t\t\tDate of Onset: {$Adr_onsetDate} <br/>\n\t\t\t\t\tOnset of Reaction / Time Interval Unit: {$Adr_rctFirstTime} {$Adr_rctFirstTimeUnit} <br/>\n\t\t\t\t\tOutcome of Reaction: {$Adr_outcome} <br/>\n\t\t\t\t\tSeriousness: {$seriousness} <br/>\n\t\t\t\t\tSeriousness Criteria: {$seriousnessCrit} <br/>\n\t\t\t\t</td>\n\t\t\t</tr>"; } $adrStr .= "</table>"; } else { $adrStr .= "No Drug Found"; } } else { $adrStr .= "E"; } return $adrStr; }
<div class="panel panel-primary"> <div class="panel-heading"> <span class="panel-title"> ADR Web Forms </span> </div> <div class="panel-body"> <?php $webFormQuery = "SELECT adrFormID, Adrno, dateRcv, senderIden, notes, Madracno, reporter_org, report_date\n\t\t\t\t\t\t\t\t\tFROM adrdata where `status` = 'WF' ORDER BY report_date DESC"; $webFormRes = mysqli_query($con, $webFormQuery) or die(mysqli_error($con)); if ($webFormRes) { $webFormTable = "<table id='webFormListTbl1' class='table table-condensed'>\n\t\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t\t<tr class='info'>\n\t\t\t\t\t\t\t\t\t\t\t\t<th> No. </th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th> ADR No. </th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th> Date of Report </th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th> Sender Identifier </th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th> Reference Number </th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th> MADRAC Number </th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th> Institute Name </th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t\t<tbody>"; $no = 1; while ($webFormRow = mysqli_fetch_array($webFormRes)) { $formID = $webFormRow['adrFormID']; $formID_enc = q3_encrypt($webFormRow['adrFormID']); $adrNo = $webFormRow['Adrno']; $dateRcv = dateChecker($webFormRow['dateRcv']); $senderIden = $webFormRow['senderIden']; $notes = $webFormRow['notes']; $Madracno = $webFormRow['Madracno']; $org = $webFormRow['reporter_org']; if ($adrNo == "" || $adrNo == NULL || empty($adrNo)) { $adrNo = $formID; } $webFormTable .= "<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td> {$no} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td> {$adrNo} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td> {$dateRcv} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td> {$senderIden} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td> {$notes} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td> {$Madracno} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td> {$org} </td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td> \n\t\t\t\t\t\t\t\t\t\t\t\t\t<a href='adr_view_report.php?formID={$formID_enc}&&vtype=WF' class='btn btn-sm btn-info'>View</a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<a href='adr_print_pdf.php?formID={$formID_enc}' target='_blank' class='btn btn-sm btn-info'>PDF</a>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>"; $no++; } $webFormTable .= "</tbody></table>"; echo $webFormTable; } ?>
<div class="panel panel-danger"> <div class="panel-heading"> <span class="panel-title"> ADR Deleted Reports </span> </div> <div class="panel-body"> <?php $trashQuery = "SELECT adrFormID, Adrno, report_date, Source, reporter_org, status\n\t\t\t\t\t\t\t\t\t\tFROM adrdata where `status` LIKE '%DL%' ORDER BY report_date DESC"; $trashRes = mysqli_query($con, $trashQuery) or die(mysqli_error($con)); if ($trashRes) { $deletedAdrTable = "<table id='adrDeleted' class='table table-condensed'>\n\t\t\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> No. </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> ADR No. </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Date of Report </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Institute Name </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th> Deleted from </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t\t\t<tbody>"; $no = 1; while ($webFormRow = mysqli_fetch_array($trashRes)) { $formID = $webFormRow['adrFormID']; $adrNo = $webFormRow['Adrno']; $dateOfReport = dateChecker($webFormRow['report_date']); $source = $webFormRow['Source']; $org = $webFormRow['reporter_org']; $status = $webFormRow['status']; if ($adrNo == "" || $adrNo == NULL || empty($adrNo)) { $adrNo = $formID; } $origin = ""; if ($status == "DL01") { $origin = "Web Form"; } else { if ($status == "DL02") { $origin = "ConSERF"; } else { if ($status == "DL03") { $origin = "In-Tray";