<?php 
session_start();
?>
<head>
	<title>Visualsoft Office Manager - Εφαρμογές</title>
	<link href="logos/ofm1.ico" rel="shortcut icon" type="image/x-icon"> 
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="">
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">	
</head>
<?php   
if($_SESSION['CheckPWD']==false){header("Location: login.php");}

$myTopCaption_Text="ΚΑΤΑΣΤΑΣΗ ΕΦΑΡΜΟΓΩΝ";
$MyFormName=str_replace('.php', '', basename($_SERVER['PHP_SELF']));
$MyADDFormName="app_add";
$tblName="apps";
$MyIDFieldName="IDApp";
$ListExist=true;
$prefix=$MyFormName."@";
$pFind=$prefix."FindWhat";
$frmOpenNew='"'.$MyIDFieldName.'","0","'.$MyADDFormName.'",' ;

include 'include/top_vars.php';  
include 'include/header.php';
?>
 
<head>
 
</head>

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

<div class="vsboxDetail hide1">
	<h1> ΚΑΤΑΣΤΑΣΗ ΕΦΑΡΜΟΓΩΝ </h1>    
</div>	

<?php include 'include/top_grid_list_buttons.php';  ?>
 
<div class="scroll" style="margin-bottom:0px;padding-bottom:0px;width:100%;" > 
<div class="sticky">
  <table class="gridList"  > 
    <tr>
		<td class="c w50">A/A<a onclick="grdsrt('IDApp');" class="sortpic"/></td>
		<td class="c w80">ΕΝΕΡΓΟΣ<a onclick="grdsrt('isActive');" class="sortpic"/></td>
		<td>ΠΕΡΙΓΡΑΦΗ<a onclick="grdsrt('Perigrafi');" class="sortpic"/></td>
		<td class="c w80 hide1"> ΕΚΔΟΣΗ </td>
		<td class="l hide1" > FTP SERVER <a onclick="grdsrt('FtpServer');" class="sortpic"/></td>
		<td class="l hide1"> FTP SERVER 2 </td>
		<td class="c w120 hide1">FOLDER<a onclick="grdsrt('FtpServerFolder');" class="sortpic"/></td> 
		<td class=" hide1">ΠΑΡΑΤΗΡΗΣΕΙΣ</a></td>
	</tr> 
  </table>
</div>
 
 <table class="gridListNoCaption"  >   
 
<?php
 
 if(is_numeric($pgNo)){	 } else { $pgNo=1;}

     $flds="Perigrafi,FtpServerFolder,Sxolia";
   $filter=filter_make($flds, $FindWhat);
    $query=" SELECT * FROM ". $tblName . " " . $filter  ;
 if($SortValue==''){$query=$query ." ORDER BY Perigrafi ";} else {$query=$query." ORDER BY " . $SortValue . " ";} 
 
  $num_rows=RecordsCount($conn,$query);
   $FromRec=($pgNo-1)*$RecsPP ;
     $pgMax=intval($num_rows/$RecsPP)+1;
  
    $query = $query .  ' LIMIT ' .$FromRec . ', ' . $RecsPP ;
   $result = mysqli_query($conn, $query);
 
 
$iRow=($pgNo-1)*$RecsPP;

 while ($rs = mysqli_fetch_array($result)) {
 //$rs = mb_convert_encoding($rs, 'greek' );
$iRow +=1;
 
$IDApp= $rs['IDApp'];
$Perigrafi=$rs['Perigrafi'];
$Version = $rs['Version'];
$VersionDate= $rs['VersionDate'];
$FtpServer = $rs['FtpServer'];
$FtpServer2= $rs['FtpServer2'];
$FtpServerFolder=$rs['FtpServerFolder'];
$Sxolia=$rs['Sxolia'];
$isActive = $rs['isActive'];
$isActiveChk='unckecked';
if($isActive==-1){$isActiveChk='checked';} 
if($FtpServer!==''){$BackColor="Style='background:red;color:white;'";}else{$BackColor='';} 
$frmOpen='"'.$MyIDFieldName.'","'.$IDApp.'","'.$MyADDFormName.'",' ;

// ========================================
//  Pelates List
// ========================================
 
    echo "<tr class='tablerowdata'  onclick='javascript:OpenFormADD($frmOpen);'> ";
    echo "<td class='r w50' >$iRow</td>";
	echo "<td class='c w80'><input type='checkbox' $isActiveChk ></td>";
    echo "<td class='l'>$Perigrafi</td>";
    echo "<td class='c w80 hide1'>$Version</td>";
	echo "<td class='l hide1'>$FtpServer</td>";
	echo "<td class='l hide1'>$FtpServer2</td>";
	echo "<td class='c w120 hide1'>$FtpServerFolder</td>";
	echo "<td class='l hide1'>$Sxolia</td>";
    echo "</tr>";
 }
 for ($x = $iRow+1; $x <= $pgNo*$RecsPP; $x++) {
    echo "<tr class='tablerowdata'  onclick='javascript:OpenFormADD($frmOpenNew);'> ";
    echo "<td class='r w50'> </td> <td class='r w80'> </td> <td > </td> <td class='c w80 hide1'> </td>";
    echo "<td class=' hide1'> </td> <td class=' hide1'> </td> <td class='c w120 hide1'> </td> <td class=' hide1'> </td>";
    echo "</tr>";
 }	
 ?> 

</table>

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

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


