<?php
require_once('../../Connections/odonto_connection1.php');
session_start();
$user=$_SESSION['MM_Username'];
if(!isset($user)) {
	header("Location:" . "../../index.php?deslogeo");
	die();
}

$query_rs_todos = "SELECT categ,negocio FROM ingreso WHERE user LIKE '$user' LIMIT 1";
$rs_ingreso0 = mysqli_query($odonto_connection,$query_rs_todos) or die(mysqli_error());
$row_rs_ingreso0 = mysqli_fetch_assoc($rs_ingreso0);
$negocio=$row_rs_ingreso0['negocio'];


if(isset($_GET['limpiar']) && $_GET['limpiar'] == 1) {
	
$query_rs_todos = "UPDATE avisos SET limpiado = 1 WHERE negocio LIKE '$negocio'";
$rs_ingreso3 = mysqli_query($odonto_connection,$query_rs_todos) or die(mysqli_error());
}

header("Location:" . "./negocio_0.php");

?>