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