<?php session_start();
 if( !isset($_SESSION['ps_user']) )
 {
	echo "<script>location='../../devices.php'</script>";
	    die();
}
 
include('../../includes/config.php');
 
  ?>
<html>
<body style="background-color:#0c0c0c;">
<center>
<img style="width:100%;margin-top: -200px;" src="../../img/closing.gif">
</center>
</body>
</html>
<?     

              $id=$_GET['id'];			
 
$new = (int) str_replace('countdownn__', '', $_GET['id']);
 
  mysql_connect("$host", "$user", "$pass") or die(mysql_error()); 
  mysql_select_db("$db") or die(mysql_error()); 
  mysql_query("UPDATE `devices` set `Device Status` = 'finished'  WHERE `id` = '$new';");
  // header("location:devices.php");
  echo "<script>location='../../devices.php'</script>";

			  ?> 