<?php
include "scrinit.php";
include "logo.php";
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php

echo "<br>"."<br>"."<br>";
date_default_timezone_set("Europe/Athens");
require "dbconnect.php";

$code=$_GET['id'];
$sql=mysqli_query($con,"select periodoi FROM kataggelia WHERE aranaforas='$code' ");
$row=mysqli_fetch_array($sql);
if ($row['datetimo'] <> '0000-00-00')
{
	echo " Η ΚΑΤΑΓΓΕΛΙΑ ΕΧΕΙ ΔΙΕΚΠΕΡΕΩΘΕΙ - ΔΕΝ ΜΠΟΡΕΙΤΕ ΝΑ ΤΗΝ ΔΙΑΓΡΑΨΕΤΕ";
}
else
{
	mysqli_query($con,"DELETE FROM kataggelia WHERE aranaforas='$code' ");		
	echo '<script type="text/javascript">';
   echo 'alert("Η ΚΑΤΑΓΓΕΛΙΑ ΜΕ ΑΡΙΘΜΟ ΑΝΑΦΟΡΑΣ : ".$code." ΕΧΕΙ ΔΙΑΓΡΑΦΕΙ")';
   echo '</script>';	
   $time = 0.5; //Time (in seconds) to wait. 
   $url = "kataggeliakath.php?pmp=".$mitr; //Location to send to. 
   header("Refresh: $time; url=$url");
}
	



 ?>
 

</body>
</html>