<?php 
session_start();
 
if($_SESSION['CheckPWD']==false){ header("Location: login.php"); }
$myTopCaption_Text="ΤΑΜΕΙΟ ΤΥΠΟΙ ΕΓΓΡΑΦΩΝ";
$MyFormName=str_replace('.php', '', basename($_SERVER['PHP_SELF']));
$MyADDFormName="tameio_rectypes_add";$w=850;$h=400;
$MyIDFieldName="IDRecType";
$tblName='tameio_rectypes';
$FocusField='btnClose'; 
$ListExist=true;
$prefix="tameio_rectypes@";
$frmOpenNew='"'.$MyIDFieldName.'","0","'.$MyADDFormName.'",'.$w.','.$h ;
 
include 'include/top_vars.php';   
include 'include/header.php';
 
 
?>

<link href="logos/ApplicationLogo.png" rel="shortcut icon" type="image/x-icon"> 
 
<head>
	<title>vs Contracts</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="">
</head>

<form id="<?php echo $MyFormName;?>" name="<?php echo $MyFormName;?>" autocomplete="off">
 <body OnLoad="document.<?php echo $MyFormName.'.'.$prefix ?>FindWhat.focus();">

 <div class="vsboxDetail"  >
 <h1> ΤΥΠΟΙ ΕΓΓΡΑΦΩΝ ΤΑΜΕΙΟΥ </h1>
 </div>
 <?php include 'include/top_grid_list_buttons.php';  ?>

 
<div class="scroll" style="height:62vh; margin-bottom:0px;padding-bottom:0px;" > 		

 <div class="sticky">
  <table id="CustomerList" class="gridList"  > 
   <tr >
	<td class="r w60">A/A<a onclick="grdsrt('AA');" class="sortpic"/></td>
	<td class="c w100">ID</td>
    <td>ΤΥΠΟΣ ΕΓΓΡΑΦΗΣ<a onclick="grdsrt('RecType');" class="sortpic"/></td>
    <td class="w120"> ΑΠΟΘΕΜΑΤΙΚΟ ? </td>
	<td>ΠΑΡΑΤΗΡΗΣΕΙΣ </td>
  </tr> 
  </table >
</div  >  

  <table class="gridListNoCaption"  > 
 
<?php
 
 $filter = "";
 $flds = "IDRecType, RecType, Sxolia";
 $filter=filter_make($flds, $FindWhat);

 $query=" SELECT * FROM  $tblName  $filter ORDER BY IDRecType, RecType ";
  
 // $query=" SELECT * FROM $tblName ORDER BY IDRecType, RecType ";

    // echo $query;
 
 $num_rows=RecordsCount($conn,$query);
	$RecNo=$num_rows;
  $FromRec=($pgNo-1)*$RecsPP ;
    $pgMax=intval($num_rows/$RecsPP)+1;
// ====================================  
 
// ====================================
    $query = $query .  ' LIMIT ' .$FromRec . ', ' . $RecsPP ;
   $result = mysqli_query($conn, $query);
 
$iRow=$FromRec;

 while ($rs = mysqli_fetch_array($result)) {
$iRow +=1;
 
$IDRecType = gconvertfield($rs['IDRecType'],0);
$RecType = $rs['RecType'];
$isReserve = gconvertfield($rs['isReserve'],0);
$Sxolia = $rs['Sxolia']; 
$isReserveChk='';
if ($isReserve=='-1'){$isReserveChk='checked';}
//$RecTypeStyle="Style='background:white;color:black;'";
 $frmOpen='"'.$MyIDFieldName.'","'.$IDRecType.'","'.$MyADDFormName.'",'.$w.','.$h ;
 
// ============ 
//  Rec List
// ============ 
    echo "<tr class='tablerowdata'  onclick='javascript:OpenFormADD_onWin($frmOpen);'> ";
    echo "<td class='r w60' >$iRow</td>";
	echo "<td class='c w100'>$IDRecType</td>";
    echo "<td>$RecType</td>";
	echo "<td class='c w120'><input size ='1' type='checkbox' $isReserveChk > </td>";
	echo "<td>$Sxolia</td>";
    echo "</tr>";
 }
  for ($x = $iRow+1; $x <= $pgNo*$RecsPP; $x++) {
    echo "<tr class='tablerowdata'  onclick='javascript:OpenFormADD_onWin($frmOpenNew);'> ";
    echo "<td></td> <td></td> <td></td> <td class='c1 w120'></td>";
    echo " <td></td>";
    echo "</tr>";
 }
 
 ?> 

</table>
<?php include 'include/recs_div_bottom.php'; ?>
 
</div>	
 
</body> 
</form> 
<?php 
  include 'include/footer2020.php';
?>
<script type="text/javascript" src="js/mycheck.js"></script>  

 


