<?php
include "scrinit.php";
include $menu;
?><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
table.myTable { border-collapse:collapse; }
table.myTable td, table.myTable th { border:1px solid black;padding:2px;font-size:11px; }

.fieldset1
{
    width:900px;
	background: #F5F9F0;
	border:2px solid green;
    -moz-border-radius:4px;
    -webkit-border-radius:4px;	
    border-radius:4px;	
}
.fieldset2
{
    width:431px;
	background: #F0FFF0;
	border:2px solid green;
    -moz-border-radius:4px;
    -webkit-border-radius:4px;	
    border-radius:4px;	
}
.fieldset3
{
    width:500px;
	background: #F0FFF0;
	border:2px solid green;
    -moz-border-radius:4px;
    -webkit-border-radius:4px;	
    border-radius:4px;	
}
.fieldset4
{
    width:540px;
	background: #FFDAB9;
	border:2px solid green;
    -moz-border-radius:4px;
    -webkit-border-radius:4px;	
    border-radius:4px;	
}
.fieldset5
{
    width:165px;
	border:2px solid green;
    -moz-border-radius:4px;
    -webkit-border-radius:4px;	
    border-radius:4px;	
}
.fieldset6
{
    width:900px;
	background: #F0FFF0;
	border:2px solid green;
    -moz-border-radius:4px;
    -webkit-border-radius:4px;	
    border-radius:4px;	
}
.label1
{
display:inline-block;
width:95px;
margin-right:10px;
text-align:right;
}
.label2
{
display:inline-block;
width:150px;
margin-right:10px;
text-align:right;
}
</style>
<h3> ΔΙΟΡΘΩΣΗ / ΕΙΣΑΓΩΓΗ ΣΤΟΙΧΕΙΩΝ ΜΑΘΗΤΉ-ΤΡΑΣ </h2>
<?php
require "dbconnect.php";
$usr=$_SESSION['usr'];

if (isset($_POST['mitr']))
{
	$mitroo=$_POST['mitr'];
	
 if ($mitroo > 0) // edit student
 {
	$new=0;
	$sql = mysqli_query($con,"SELECT * FROM allstudentinfo WHERE mitroo='$mitroo'  " );
	$row = mysqli_fetch_array($sql);
	$enroll=$row['enroll'];
	$eponimo=$row['eponimo'];
	$onoma=$row['onoma'];
	$tmima=$row['tmima'];
	$omp=$row['omp'];
	$sex=$row['sex'];
	$address=$row['address'];
	$poli=$row['poli'];
	$tk=$row['tk'];
	$pateras=$row['pateras'];
	//$katpatera=$row['katpatera'];
	//$epapatera=$row['epapatera'];
	$kpatera=$row['kpatera'];
	$mitera=$row['mitera'];
	//$katmiteras=$row['katmiteras'];
	//$epamiteras=$row['epamiteras'];
	$kmiteras=$row['kmiteras'];
	$kmathiti=$row['kmathiti'];
	//$epokidemona=$row['epokidemona'];
	//$onokidemona=$row['onokidemona'];
	$kinito=$row['kinito'];
	$stathero=$row['sthathero'];
	//$ektopismenos=$row['ektopismenos'];
	//$birthplace=$row['birthplace'];
	$birthday=$row['birthday'];
	//$nationality=$row['nationality'];
	//$religion=$row['religion'];
	//$stathero=$row['sthathero'];
	//$politekni=$row['politekni'];
	$identity=$row['identity'];
	//$passport=$row['passport'];
}
ELSE
{
	$new=1;
}
?>
<form  method="post" action="stform1.php">
<fieldset fieldset class="fieldset1"  >
<legend> <?php echo "<b>"."ΚΑΡΤΕΛΑ ΜΑΘΗΤΗ/ΤΡΙΑΣ"."</b>"; ?> </legend>
<br>
<label class="label1" > ΜΗΤΡΩΟ:</label><input type='text' size='20' name='mitroo' value = "<?php echo $mitroo; ?>" />
<p><label class="label1" > ΕΠΩΝΥΜΟ:</label><input type='text' size='20' name='eponimo' value = "<?php echo $eponimo; ?>" />
<label class="label1" > ΟΝΟΜΑ:</label><input type='text' size='20' name='onoma' value = "<?php echo $onoma; ?>" /></P>
<p><label class="label1" > ΤΜΗΜΑ:</label><input type='text' size='4' name='tmima' value = "<?php echo $tmima; ?>" /><?php echo str_repeat("&nbsp",14);?>
&nbsp&nbsp&nbsp&nbspΟΜΠ/ΚΑΤΕΥΘΥΝΣΗ:<input type='text' size='4' name='omp' value = "<?php echo $omp; ?>" />
ΦΥΛΟ:<input type='text' size='4' name='sex' value = "<?php echo $sex; ?>" /></p>
<br>
<p><label class="label1"  for="address">ΔΙΕΥΘΥΝΣΗ:</label><input type='text' size='40' name='address' value = "<?php echo $address; ?>" />
<label class="label1"  for="katmiteras">ΠΟΛΗ:</label><input type='text' name='poli' value = "<?php echo $poli; ?>" />
 T.K:<input type='text' name='tk' size='5' value = "<?php echo $tk; ?>" /></p>
<p><label class="label1" >ΟΝΟΜΑ ΠΑΤΕΡΑ:</label><input type='text' name='pateras' size='20' value = "<?php echo $pateras; ?>" />
<label class="label1" >ΚΙΝΗΤΟ ΠΑΤΕΡΑ:</label><input type='text' name='kpatera' size='20' value = "<?php echo $kpatera; ?>" /></p>
<p><label class="label1" >ΟΝΟΜΑ ΜΗΤΕΡΑΣ:</label><input type='text' name='mitera' size='20' value = "<?php echo $mitera; ?>" />
<label class="label1" >ΚΙΝΗΤΟ ΜΗΤΕΡΑΣ:</label><input type='text' name='kmiteras' size='20' value = "<?php echo $kmiteras; ?>" /></p>
<p><label class="label1" >ΚΙΝΗΤΟ SMS:</label><input type='text' name='kinito' size='20' value = "<?php echo $kinito; ?>" />
<label class="label1" >ΚΙΝΗΤΟ ΜΑΘΗΤΗ:</label><input type='text' name='kmathiti' size='20' value = "<?php echo $kmathiti; ?>" />
<label class="label1" >ΣΤΑΘΕΡΟ:</label><input type='text' name='kmiteras' size='20' value = "<?php echo $kmiteras; ?>" /></p>
<label class="label1" >ΗΜΕΡ. ΓΕΝΝΗΣΗΣ:</label><input type='text' name='birthday' size='20' value = "<?php echo $birthday; ?>" />  
<label class="label1" >ΤΑΥΤΟΤΗΤΑ:</label><input type='text' name='identity' size='20' value = "<?php echo $identity; ?>" />
</p> 
<br>
<input type="hidden" name="newx" value=<?php echo $new; ?>>
<input type="submit"  name="kata" value="Καταχώρηση" style="background-color: #336699; color: #ffffff;">
&nbsp;&nbsp;&nbsp
<a href="stform1.php?mit=<?php echo $mitroo;?>" onclick="return confirm('ΤΑ ΣΤΟΙΧΕΙΑ ΤΟΥ ΜΑΘΗΤΗ ΘΑ ΔΙΑΓΡΑΦΟΥΝ')">ΜΟΝΙΜΗ ΔΙΑΓΡΑΦΗ</a>
</fieldset>
</form>	
<?php
}
?>
<br /><br />
<a  href=<?php echo $menu;?> style="color:blue "  > <button> Επιστροφή στο Μενού  </a></button>

</body>
</html>