<?php error_reporting(0); ini_set("display_errors", 0); require_once "../mysql.class.php"; $db = new MySqlClass(); $db->conectar("casablancanew"); $dia = date('w'); $hora = date('H'); if ($hora >= 8 and $hora < 14) { $hora = 1; } if ($hora >= 14 and $hora <= 23) { $hora = 2; } if ($dia >= 1 and $dia <= 4) { $dia = 1; } if ($dia == 6 or $dia == 5) { if ($hora >= 8 and $hora < 14) { $hora = 1; } if ($hora >= 14 and $hora <= 23) { $hora = 2; } $dia = 2; } if ($dia == 0) { if ($hora >= 8 and $hora < 14) { $hora = 1; }