<?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']));
$tblName='promitheytes';
$IDcField='IDProm';
$FocusField="Eponymia";
$RequiredField="Eponymia";
$ListExist=true;
$ReturnTo='prom_list.php';

include 'include/header.php';
 
?>
 

<?php
 
//========================================
//        Patients Record Read
//========================================
$closeCap=" Επιστροφή ";
 
# print_r($_SESSION); 

$IDSymvolaiou = 0;$IDc = 0;$IDProm = 0;$IDApp= 0;$Eponymia='';
$AFM='';$DOY='';$Til1='';$Til2='';$ApplicationName='';$ApplicationCustomerVer='';
$eMail1=''; $eMail2=''; $HmEggrafisNum='';
$SerialNo='';$License='';$ActivateEndDate="";
$ActivateStartDateNum=0;$ActivateEndDateNum=0;$ActivateUses=0;$isActive=0;$Message='';$Sxolia='' ;
$isActiveChk='unckecked';
$invemail=""; $invWeb="";
$ActivateStartDate='';

if($conn == false){
	 echo 'Δεν υπαρχει συνδεση...<br>';
	  dbConnect();
}
   $IDc = gConvertField($_COOKIE[$IDcField], '0');
 $query = "SELECT * FROM ".$tblName . " WHERE ". $IDcField . "=" . $IDc ;
// echo '<br>'. $query ;
$result = mysqli_query($conn, $query);
    $rs = mysqli_fetch_assoc($result);

$IDProm=gConvertField($rs['IDProm'],0);
$IDc=$IDProm ;
$Eponymia=$rs['Eponymia'];
$AFM=$rs['AFM'];$DOY=$rs['DOY'];$Epaggelma=$rs['Epaggelma'];
$Dnsi=$rs['Dnsi'];$Poli=$rs['Poli'];$TK=$rs['TK'];
$Til1=$rs['Til1'];$Til2=$rs['Til2'];$Til3=$rs['Til3'];
$eMail1=$rs['eMail1'];
$eMail2=$rs['eMail2'];
$HmEggrafis=formatMyDate($rs['HmEggrafis'],"MySqlToGr","");
#$HmEggrafisNum = $rs['HmEggrafisNum'];

$Web=$rs['Web'];
#$AMKA=$rs['AMKA'];$Barcode=$rs['Barcode'];
$CountryCode=$rs['CountryCode'];$Country=$rs['Country']; 

$isActive=$rs['isActive'];$Sxolia=$rs['Sxolia']  ;
#$Message=$rs['Message'];
#$IDPoliti =gConvertField($rs['IDPoliti'],0);

$IDEtairias =gConvertField($rs['IDEtairias'],0);
$invEponymia=$rs['invEponymia'];
$invEpaggelma=$rs['InvEpaggelma'];
$invDnsi=$rs['invDnsi'];$invPoli=$rs['invPoli'];$invTK=$rs['invTK'];
$invAFM=$rs['invAFM'];$invDOY=$rs['invDOY'];
$invTilefono=$rs['invTilefono'];$invFax=$rs['invFax']; 
$invCountryCode=$rs['invCountryCode'];$invCountry=$rs['invCountry']; 
#$invemail=$rs['invemail'];$invWeb=$rs['invWeb']; 
  
$isActiveChk='unckecked';
if($isActive==-1){$isActiveChk='checked';} 

$mtab=$MyFormName.'@tab';
if ($IDc==0) {$_SESSION[$mtab]="tab1";}

if (isset($_SESSION[$mtab])) {
		$mySelect_tab = $_SESSION[$mtab];
	}else{
		$mySelect_tab = "tab1";
	}
	
// ============================ 
// ============================

include 'include/buttons_bar_top.php';  
?> 

<body  OnLoad="javascript:onLoadFocus();"  > 	
<form name="<?php echo $MyFormName;?>" id="<?php echo $MyFormName;?>" method="post" action=""> 

		<div class="page" style="margin:10px -15px 0px -10px;">
			<div class="pcss3t pcss3t-theme-1 .pcss3t-icons-right">
				<input type="radio" name="pcss3t" checked  id="tab1" class="tab-content-first" >
				<label for="tab1"  onclick="tab_update('tab1');"><i class="icon-large icon-user"></i>Βασικά Στοιχεία</label>
				<input type="radio" name="pcss3t" id="tab2" class="tab-content-3" >
				<label for="tab2"  onclick="tab_update('tab2');"><i class="icon-list"></i>Κινήσεις</label>
				<ul style="height:60vh;"  >
					<li class="tab-content tab-content-first " ><?php include 'prom_basika_stoixeia.php'; ?></li>
					<li class="tab-content tab-content-3 "><?php include 'prom_kiniseis.php'; ?></li>
				</ul>
			</div>	
		</div>	
 
<?php
  include 'include/del_yes_no.php';
?>  
 <Div style="visibility:hidden; position:absolute; margin-left:150px; margin-top:-500px; top:50; width:20%; " >
	  <input type="text" name="IDProm" id="IDProm" value="<?php echo $IDProm;?>">  
	  <input type="text" name="isActive" id="isActive" value="<?php echo $isActive;?>">  
	  <input type="text" name="CountryCode" id="CountryCode" value="<?php echo $CountryCode;?>"> 
	  <input type="text" name="invCountryCode" id="invCountryCode" value="<?php echo $invCountryCode;?>">   
	  <input type="text" name="HmEggrafisNum" id="HmEggrafisNum" value="<?php echo $HmEggrafisNum;?>">
	  <input type="text" name="PageName" id="PageName" value="<?php echo $MyFormName.'.php';?>">
	  <input type="text" name="tblName" id="tblName" value="<?php echo $tblName;?>">
	  <input type="text" name="IDcField" id="IDcField" value="<?php echo $IDcField;?>">
	  <input type="text" name="IDc" id="IDc" value="<?php echo $IDc;?>">  
 </div>	
		<!---   ΚΛΕΙΝΕΙ ΤΟ FRAME  visibility:hidden; --->

</form>
 </body>


 
<?php
// href="javascript:ShowDateDiv();" 

?> 
<?php
   include 'HmApoEos.php';
   include 'include/footer2020.php';
?> 

 
 <script type="text/javascript" src="js/mycheck.js"></script>   
 <script type="text/javascript" src="js/datepicker.js"></script>  
 <script language="JavaScript" type="text/JavaScript">
	m_tab="<?php echo $mySelect_tab ?>";document.getElementById(m_tab).checked = true;
</script>