<?php
require_once 'sessao.php';
$id = sql($_GET['id']);
$tsdns = sql($_GET['ts']);
if ($level == 1){
$sql = "DELETE FROM `jtsdns` WHERE `id`='$id' LIMIT 1"; 
$query = mysql_query($sql) or die(mysql_error()); 
$sql = "DELETE FROM `tsdns` WHERE `id`='$tsdns' LIMIT 1";  
$query = mysql_query($sql) or die(mysql_error());
}else{
$sql = "DELETE FROM `jtsdns` WHERE `id`='$id' LIMIT 1"; 
$query = mysql_query($sql) or die(mysql_error()); 
$sql = "DELETE FROM `tsdns` WHERE `id`='$tsdns' LIMIT 1";  
$query = mysql_query($sql) or die(mysql_error());
}
$header = "Location: lista_geral.php?deletado";
header($header);
?>