File: /home/imensosw/www/imenso.co/dev/data-panel/data.php
<?php include 'header_data.php';?>
<?php
error_reporting(0);
// assuming file.zip is in the same directory as the executing script.
include('PHPExcel/Classes/PHPExcel/IOFactory.php');
$inputFileName = "docs/".$_GET['assignment_no']."/".$_GET['assignment_no'].".xls";
$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
$excel2 = PHPExcel_IOFactory::createReader($inputFileType);
$excel2 = $objPHPExcel = $excel2->load($inputFileName);
// Empty Sheet
$sheet = $objPHPExcel->getSheet(0);
$highestRow = $sheet->getHighestRow();
$highestColumn = $sheet->getHighestColumn();
$rowData="";
?>
<div class="container-area">
<div class="container-fluid h-100">
<div class="row">
<div class="left-side border-right">
<ul class="list-group list-group-flush" >
<?php
for ($row = 1; $row <= $highestRow; $row++) {
// Read a row of data into an array
$rowData = $sheet->rangeToArray('A' . $row . ':' . $highestColumn . $row, NULL, TRUE, FALSE);
$check_data="";
if($rowData[0][0]!="Document ID"){
if($rowData[0][3]!=""){
$check_data = "done doubt";
}
else if($rowData[0][2]!="" || $rowData[0][1]!="")
{
$check_data = "done";
}
else{
$check_data = "default";
}
/*if($rowData[0][2]!="" || $rowData[0][3]!="" || $rowData[0][1]!=""){
if($rowData[0][3]==""){
$check_data = "done";
}
else{
$check_data = "done doubt";
}
}
else{
$check_data = "default";
}*/
?>
<li class="list-group-item p-0 <?php echo $check_data; ?>" >
<a href="javascript:;" id="row_link" data-row_id="<?php echo $row; ?>" data-doc_id="<?php echo $rowData[0][0]; ?>"><?php echo $rowData[0][0]; ?></a>
</li>
<?php } } ?>
</ul>
</div>
<div class="right-side">
<div class="row h-100">
<div class="col-md-12 h-100">
<!-- <h2 class="m-0">View PDF</h2>
<hr /> -->
<iframe id="row_iframe" src="" width="100%" class="h-100"></iframe>
</div>
</div>
<!-- <div class="footer-right border-top">
</div> -->
</div>
</div>
</div>
</div>
<?php include 'footer_data.php'; ?>