<?php
@ini_set('session.cache_expire', 60);
@ini_set('session.cookie_httponly', true);
@ini_set('session.use_only_cookie', true);


 
session_start();

if(strpos(strtolower($_SERVER['REQUEST_URI']), 'phpsessid') !== false)
{
	session_destroy();
	session_regenerate_id();
	session_start();
															
}

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

$p  = $_GET['p'];

$sql = mysql_query("SELECT marca FROM clientes WHERE id='$p'");
$imagem = mysql_fetch_assoc($sql);

@unlink(sti('doc_root').sti('up').$imagem['marca']);



mysql_query("UPDATE clientes SET marca='l57a-' WHERE id='$p'", $con) or die(mysql_error());


  
header("location:edit.php?id=".$p);