<?php 
include "scrinit.php";
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" />
<script type="text/javascript">

    function do_this(){

        var checkboxes = document.getElementsByName('smsx[]');
        var button = document.getElementById('toggle');

        if(button.value == 'Επιλογή Όλων'){
            for (var i in checkboxes){
                checkboxes[i].checked = 'FALSE';
            }
            button.value = 'Αποεπιλογή Όλων'
        }else{
            for (var i in checkboxes){
                checkboxes[i].checked = '';
            }
            button.value = 'Επιλογή Όλων';
        }
    }
</script>
</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
{
    echo "<BR>"."<b>"."EΠΕΛΕΞΕ ΕΠΙΤΡΟΠΗ:"."</b>"."<br>"."<br>";
	$sql = "SELECT code,perigrafi from epitropes order by code";
	$result = $dbcon->prepare($sql);
	$result->execute();

?>
<form  method="post" action='smsepitropes1.php'/> 

<?php
echo "<select name='ep'>";
while ($row =$result->fetch(PDO::FETCH_ASSOC)) 
{
	$per=$row['perigrafi'];
	$code=$row['code'];
   	echo "<option value ='".$code."'>".$code.".".$per."</option>";
}
echo "</select>";
?>
<br><br>
<input type="Submit" name="epit" value="Επιλογή Επιτροπής" >
</form>	
<?php
}

?>
<br /><br />
<a  href=<?php echo $menu;?> style="color:blue "  > <button> Ακύρωση Διαδικασίας και Επιστροφή στο Μενού  </a>
</body>
</html>