Seguro
Validados
todos los días
de tu Región
include('database.php'); $Connect_Region = "select * from regiones where romano='".$_GET['region']."'"; $Connect_Region_query = mysql_query($Connect_Region, $repart); $RegionSeleccionada = mysql_fetch_array($Connect_Region_query); $region = $RegionSeleccionada['region']; $HolaPo = "holapo"; if($region==NULL){ $Categoria_Servicios = "Moda, Belleza y Salud"; $Connect_Servicios = "select * from productosrepago where categoria like '%".$Categoria_Servicios."%' and modo='1' and id_user in(select id from repago where linkcomision='".$HolaPo."') order by id desc limit 10"; $Connect_Servicios_Query = mysql_query($Connect_Servicios, $repart); $artesania="Manualidades y Artesanía"; $Lo_Mas_Nuevo = "select * from productosrepago where categoria like '%".$artesania."%' and modo='1' and id_user in(select id from repago where linkcomision='".$HolaPo."') order by id desc limit 5"; $Lo_Mas_Nuevo_Query = mysql_query($Lo_Mas_Nuevo, $repart); $maternidad="Bebés, Niños y Maternidad"; $Lo_Mas_Nuevo2 = "select * from productosrepago where categoria like '%".$maternidad."%' and modo='1' and id_user in(select id from repago where linkcomision='".$HolaPo."') order by id desc limit 5"; $Lo_Mas_Nuevo_Query2 = mysql_query($Lo_Mas_Nuevo2, $repart); $alimento="Alimentos y Bebidas"; $Lo_Mas_Nuevo3 = "select * from productosrepago where categoria like '%".$alimento."%' and modo='1' and id_user in(select id from repago where linkcomision='".$HolaPo."') order by id desc limit 5"; $Lo_Mas_Nuevo_Query3 = mysql_query($Lo_Mas_Nuevo3, $repart); $hogar="Hogar"; $Lo_Mas_Nuevo4 = "select * from productosrepago where categoria like '%".$hogar."%' and modo='1' and id_user in(select id from repago where linkcomision='".$HolaPo."') order by id desc limit 5"; $Lo_Mas_Nuevo_Query4 = mysql_query($Lo_Mas_Nuevo4, $repart); }else{ $Categoria_Servicios = "Moda, Belleza y Salud"; $Connect_Servicios = "select * from productosrepago where categoria like '%".$Categoria_Servicios."%' and modo='1' and id_user in(select id from repago where comuna like '%".$region."%' and linkcomision='".$HolaPo."') order by id desc limit 10"; $Connect_Servicios_Query = mysql_query($Connect_Servicios, $repart); $artesania="Manualidades y Artesanía"; $Lo_Mas_Nuevo = "select * from productosrepago where categoria like '%".$artesania."%' and modo='1' and id_user in(select id from repago where comuna like '%".$region."%' and linkcomision='".$HolaPo."') order by id desc limit 5"; $Lo_Mas_Nuevo_Query = mysql_query($Lo_Mas_Nuevo, $repart); $maternidad="Bebés, Niños y Maternidad"; $Lo_Mas_Nuevo2 = "select * from productosrepago where categoria like '%".$maternidad."%' and modo='1' and id_user in(select id from repago where comuna like '%".$region."%' and linkcomision='".$HolaPo."') order by id desc limit 5"; $Lo_Mas_Nuevo_Query2 = mysql_query($Lo_Mas_Nuevo2, $repart); $alimento="Alimentos y Bebidas"; $Lo_Mas_Nuevo3 = "select * from productosrepago where categoria like '%".$alimento."%' and modo='1' and id_user in(select id from repago where comuna like '%".$region."%' and linkcomision='".$HolaPo."') order by id desc limit 5"; $Lo_Mas_Nuevo_Query3 = mysql_query($Lo_Mas_Nuevo3, $repart); $hogar="Hogar"; $Lo_Mas_Nuevo4 = "select * from productosrepago where categoria like '%".$hogar."%' and modo='1' and id_user in(select id from repago where comuna like '%".$region."%' and linkcomision='".$HolaPo."') order by id desc limit 5"; $Lo_Mas_Nuevo_Query4 = mysql_query($Lo_Mas_Nuevo4, $repart); } if($_GET['delete']!=NULL){ mysql_query("DELETE FROM carrodecompras WHERE micarro='".$_SESSION['carrito']."' and id_producto='".$_GET['delete']."'"); $eliminar_carro = "select * from carrodecompras where micarro='".$_SESSION['carrito']."'"; $eliminar_carro_query = mysql_query($eliminar_carro, $repart) or die(mysql_error()); if(mysql_num_rows($eliminar_carro_query)==0){ session_destroy(); } echo ''; }elseif($_GET['deleteall']!=NULL){ mysql_query("DELETE FROM carrodecompras WHERE micarro='".$_SESSION['carrito']."'"); session_destroy(); echo ''; } $connect_carrodecompras = "select * from carrodecompras where micarro='".$_SESSION['carrito']."' order by id desc"; $connect_carrodecompras_query = mysql_query($connect_carrodecompras, $repart); $connect_Carrodecompras = "select * from carrodecompras where micarro='".$_SESSION['carrito']."' order by id desc"; $connect_Carrodecompras_query = mysql_query($connect_Carrodecompras, $repart); $connect_sumatotalcarrodecompras = "select SUM(monto) from carrodecompras where micarro='".$_SESSION['carrito']."'"; $connect_sumatotalcarrodecompras_query = mysql_query($connect_sumatotalcarrodecompras, $repart) or die(mysql_error()); $mtotal = mysql_result($connect_sumatotalcarrodecompras_query, 0); ?>