<?php include("../conn.php") ?>
<? 

$get_id=$_GET["id"];

$sql="select * from  database_name  where   id=".$get_id;
$rs=$conn->execute($sql);
$get_status=$rs->fields["status"];
$rs->close;

if ($get_status==1)
{
	  $sql="update database_name set status=0  where   id=".$get_id;
      $rs=$conn->execute($sql); 
	  $rs->close;
}


if ($get_status==0)
{
	  $sql="update database_name set status=1  where   id=".$get_id;
      $rs=$conn->execute($sql); 
	  $rs->close;
}



    $conn->close;

    $url="admin_db_list.php";
    echo "<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />";
    echo "<body>";
    echo "<script language=javascript>";
	echo "window.location.href='$url';";
    echo "</script>";
    echo "</body>";
    exit;


?>
