<?php
session_start();

include "../phpconfig/config.php";
include "../phpconfig/valida_login.php";
include "../phpconfig/funcoes.php";



$id  = $_GET['id'];

$linha=retorna($id, 'servicos');

$uploadDir = sti('doc_root').sti('up');



if(file_exists($uploadDir.$linha['imagem'])) { 
	@unlink ($uploadDir.$linha['imagem'] ) or die();
	@unlink ($uploadDir.'thumb-'.$linha['imagem'] ) or die();
}


mysql_query("DELETE FROM servicos WHERE id='$id'", $con) or die(mysql_error());


  
header("location:index.php");