-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdeletar.php
42 lines (35 loc) · 1.4 KB
/
deletar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?
#########################################################
#Copyright © e-Mobiliária. Todos os direitos reservados.#
#########################################################
# #
# Programa : e-Mobiliária PHP #
# Autor : Moisés Bach B. #
# E-mail : [email protected] #
# Versão : 2.5 #
# Modificado em : 09/12/2005 #
# Copyright © : e-Mobiliária #
# WWW.ANIMABUSCA.COM/IMOBILIARIA #
#########################################################
#ESTE SCRIPT NÃO PODE SER COPIADO SEM AUTORIZAÇÃO PRÉVIA#
#########################################################
require_once("configuracao_mysql.php");
require_once("acesso.php");
//get the details
$q1 = "select * from re2_listings where ListingID = '$_GET[id]' and AgentID = '$_SESSION[AgentID]' ";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);
if(!empty($a1[image]))
{
//update the database
$OldImages = explode("|", $a1[image]);
while(list(,$v) = each($OldImages))
{
unlink("fotos_anuncios/$v");
}
}
$q2 = "delete from re2_listings where ListingID = '$_GET[id]' and AgentID = '$_SESSION[AgentID]' ";
mysql_query($q2) or die(mysql_error());
header("location:controle.php");
exit();
?>