
<style>
 div.scroll {
		margin:-2px;
		margin-top:-10px;
		margin-bottom:10px;
		height: 321px !important;
		overflow-x: hidden;
		overflow-y: auto;
		text-align:justify;
		border:1px solid #b3b3b3;
		width:100%;
		padding:0px;
		box-shadow:none;
	}
</style>

<?php 

// $IDcField="IDPelati";
$prefix='app_pelates@';
$SortFLD="";
$period_type="";
 
$RecsPP_fld=$prefix.'cboRecPP';
$HmApoCookieName=$prefix.'HmApo';
$HmEosCookieName=$prefix.'HmEos'; 
 
if(!isset($_COOKIE[$RecsPP_fld])) {$RecsPP=10;} else { $RecsPP=$_COOKIE[$RecsPP_fld];}
if(!isset($_COOKIE[$HmApoCookieName])) {$HmApo= date_create('now')->format('d/m/Y');} else { $HmApo=$_COOKIE[$HmApoCookieName];} 
if(!isset($_COOKIE[$HmEosCookieName])) {$HmEos=date_create('now')->format('d/m/Y'); } else { $HmEos=$_COOKIE[$HmEosCookieName];}
 
$FindWhat1 = trim(filter_input(INPUT_GET, 'FindWhat', FILTER_SANITIZE_SPECIAL_CHARS));
     $pgNo = trim(filter_input(INPUT_GET, $prefix.'pgNo', FILTER_SANITIZE_SPECIAL_CHARS));
     if(is_numeric($pgNo)){	 } else { $pgNo=1;} 

//echo "PageNo=" . $pgNo . " ==== RecsPP=" . $RecsPP . "<br>"; 
?> 
<div class="scroll" style="height:62vh; margin-bottom:0px;padding-bottom:0px;" > 
 
	  <table id="CustomerList" class="gridList" > 
	   <tr >
		<td class='r1 w40'>A/A</td>
		<td class="c1 w100">ΗΜΕΡΟΜΗΝΙΑ</td>
		<td>ΠΕΛΑΤΗΣ</td>
		<td class=" w100"> ΧΡΕΩΣΗ </a></td>
	  </tr> 
<?php
$RecNo=0;
$iRow=0;
//$IDc = gConvertField($IDApp, '0');
$query="SELECT * FROM symvolaia WHERE IDApp=$IDApp AND Eponymia LIKE '%" . $FindWhat1 ."%' ORDER BY ActivateStartDate ";
 // echo "<br>". $query."<br>";
  $num_rows=RecordsCount($conn,$query);
   $FromRec=($pgNo-1)*$RecsPP ;
     $pgMax=intval($num_rows/$RecsPP)+1;
 	$RecNo = $num_rows;
     $iRow = $FromRec;
	 
    $query = $query .  ' LIMIT ' .$FromRec . ', ' . $RecsPP ;
   $result = mysqli_query($conn, $query);

 while ($rs = mysqli_fetch_array($result)) {
$iRow +=1;
 
$IDPelati= $rs['IDPelati'];
$HmEggrafis=formatMyDate($rs['HmEggrafis'],"MySqlToGr");
$ActivateStartDate=formatMyDate($rs['ActivateStartDate'],"MySqlToGr");
$Eponymia= $rs['Eponymia'];
$Xreosi=$rs['Xreosi'];
$Xreosi=number_format($Xreosi, 2, ',', '.');
 
// ========================================
//  Pelates List
// ========================================
 
    echo "<tr class='tablerowdata'  onclick='javascript:OpenFormADD($IDPelati);'> ";
    echo "<td class='r1 w40' >$iRow</td>";
	echo "<td class='c1 w100'>$ActivateStartDate</td>";
	echo "<td class='l1'>$Eponymia</td>";
	echo "<td class='r1 w100'>$Xreosi</td>";
    echo "</tr>";
 } 
 for ($x = $iRow+1; $x <= $pgNo*$RecsPP; $x++) {
    echo "<tr class='tablerowdata'  onclick='javascript:OpenFormADD(0);'> ";
    echo "<td class='w40'> </td> <td class='w100'> </td> "; 
	echo "<td> </td> ";
	echo "<td class='w100'> </td>";
    echo "</tr>";
 }	
 ?> 

</table>


<?php include 'include/recs_div_bottom.php'; ?>

 

</div>
 