<?php
$totalPageRecord = count($this->exportLogdetails ?? []);
$thePage = $this->page;
$thePageRecord = $this->pageRecord;
$theTotalRecord = $this->countexportLogdetails;
$theTotalPage = ceil ( $theTotalRecord / $thePageRecord );
$indexUrl = "/relationships/viewexportlogdetails";
$isrc = $this->isrc;
$upc = $this->upc;
$vendorId = $this->vendorId;
$trackId = $this->trackId;
$queryString = http_build_query ( array ("isrc" => $isrc, "upc" => $upc, "vendorId" => $vendorId, "trackId" => $trackId ) );
?>
<div>
	<div id="items" style="margin-top:-57px">
		<ul id="itemInfo">
			<li><h3><a href="/relationships/searchexportlogdetails">New Search</a></h3></li>
			<li><b>Export to</b> <a href="/relationships/downloadexportlogdetails/?<?echo $queryString?>"><img src="/images/excel.gif" border="0" alt="Excel" align="absmiddle"></a></li>
		</ul>

	</div>
	<div class="panelContent fullReport" style="clear:left">
		<table class="data">
			<thead>
				<tr>
					<th align="center"><b>No.</b></th>
					<th align="center"><b>Notes</b></th>
					<th align="center"><b>Track Id</b></th>
					<th align="center"><b>Track Name</b></th>
					<th align="center"><b>ISRC</b></th>
					<th align="center"><b>UPC</b></th>
					<th align="center"><b>Delivered Status</b></th>
					<th align="center"><b>File Name</b></th>
					<th align="center"><b>Archive Location</b></th>
				</tr>
			</thead>
			<tbody>
<?php
if(count($this->exportLogdetails ?? []) > 0){
$count = 0;
foreach ( $this->exportLogdetails as $eachLogdetails ) {
	$serialNo = ($this->page - 1) * $this->pageRecord + ($count + 1);
	?>
		<tr>
			<td><?php echo $serialNo;?></td>
			<td><?php echo $eachLogdetails->notes;?></td>
			<td><?php echo $eachLogdetails->trackId;?></td>
			<td><?php echo $eachLogdetails->trackName;?></td>
			<td><?php echo $eachLogdetails->isrc;?></td>
			<td><?php echo $eachLogdetails->displayUpc;?></td>
			<td><?php echo $eachLogdetails->delivered_status;?></td>
			<td><?php echo $eachLogdetails->fileName;?></td>
			<td><?php echo $eachLogdetails->archiveLocation;?></td>
		</tr>
<?php
$count ++;
}
}else{?>
	<tr><td colspan="9" align="center">No Data Found.</td></tr>
<?php }
?>
			</tbody>
		</table>
	<input type="hidden" name="page" id="page" value="<?php echo $this->page;?>" /> <input type="hidden" name="pageRecord" id="pageRecord" value="<?php echo $this->pageRecord;?>" />
	</div>
	<div id="loader" style="display: none;" align="center"><img alt="" src="/images/loader.gif"></div>
	<div id="divPagination">
<?php
	if(count($this->exportLogdetails ?? []) > 0){
		echo $this->paginationpanel($indexUrl, $thePage, $thePageRecord, $theTotalPage, $queryString, $theTotalRecord);
	}?>
</div>
</div>
