<?php 
include "scrinit.php";
$menu = $_SESSION['menu'];
include $menu;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<style type="text/css">
table.myTable { border-collapse:collapse; }
table.myTable td, table.myTable th { border:1px solid green;padding:2px;font-size:10pt; }
<p style="font-size:10px;"></p>
</style>
<title>SMS σε γονείς</title>

<?php 

require("dbconnect.php");
$usr=$_SESSION['usr'];
$access=$_SESSION['access'];
$dt=$_SESSION['dt'];
$dtc= date('d-m-Y', strtotime($dt));
if ($access < 2) { echo " *** ΜΗ ΔΙΑΘΕΣΙΜΕΣ ΑΝΑΦΟΡΕΣ *** ";}
else
{
$tax=array();
$sms="";
?>
<h4>  ΑΠΟΣΤΟΛΗ ΜΗΝΥΜΑΤΟΣ ΣΕ ΓΟΝΕΙΣ </h4>

<form  method='post' >

MHNYMA :
<div>
<textarea name='sms' require cols='100' rows='4'><?php echo $smsx;?></textarea>
</div>
<br><br>
<input type="submit" name="epiltaxi" value="Συνέχεια για αποστολή μηνύματος">
</form>
<br>

<?php
if (isset($_POST['epiltaxi']))
{
$_SERVER['PHP_SELF'];	
$sms=trim($_POST['sms']);  

	$result = mysqli_query($con,"SELECT kinito FROM asmsegr  ");
	$c=mysqli_num_rows($result);
	$i=1;
	while ($row = mysqli_fetch_array($result)) 
	{ 
		$ph[$i] = $row['kinito'];	
		$i++;
	}
	
	$_SESSION['tel']=$ph;
	$_SESSION['sms1']=trim($_POST['sms']);
	$l=mb_strlen(trim($_POST['sms']));
	echo '<p style="color: blue; font-size: 14pt">
       Θα σταλούν σύνολο '.$i.' μηνύματα. Αριθμός χαρακτήρων '. $l.'
      </p>';
	echo "<P>";
	echo "MHNYMA: "."<br>".$_POST['sms'];
	echo "</P>";echo "<P>";
	
	echo "</P>";
	
	include "smssecret.php";
  }	

}
?>
<br /><br />
<a  href=<?php echo $menu;?> style="color:blue "  > <button> Επιστροφή στο Μενού  </a>
</body>
</html>