// mySQL connection information $MYSQL_HOST = 'localhost'; $MYSQL_USER = 'admintodo'; $MYSQL_PASSWORD = '887877'; $MYSQL_DATABASE = 'todo'; $MYSQL_PREFIX = 'nuc_'; // new in 3.50. first element is db handler, the second is the db driver used by the handler // default is $MYSQL_HANDLER = array('mysql','mysql'); //$MYSQL_HANDLER = array('mysql','mysql'); //$MYSQL_HANDLER = array('pdo','mysql'); $MYSQL_HANDLER = array('mysql',''); // main nucleus directory $DIR_NUCLEUS = '/var/www/vhosts/revistatodo.com/httpdocs/nucleus/'; //Estadisticas para articulos y noticias //include_once('/var/www/vhosts/revistatodo.com/httpdocs/nucleus/plugins/slimstat/inc.stats.php'); // path to media dir $DIR_MEDIA = '/var/www/vhosts/revistatodo.com/httpdocs/nucleus/media/'; // extra skin files for imported skins $DIR_SKINS = '/var/www/vhosts/revistatodo.com/httpdocs/skins/'; // these dirs are normally sub dirs of the nucleus dir, but // you can redefine them if you wish $DIR_PLUGINS = $DIR_NUCLEUS . 'plugins/'; $DIR_LANG = $DIR_NUCLEUS . 'language/'; $DIR_LIBS = $DIR_NUCLEUS . 'libs/'; // include libs include($DIR_LIBS.'globalfunctions.php'); //La funcion error_reporting() establece la directiva error_reporting en tiempo de ejecucion. PHP tiene varios niveles de errores, el uso de esta funcion define ese nivel para la duracion (tiempo de ejecucion) de su script. // Deshabilitar todo reporte de errores error_reporting(0); //Inicializar los datos de una sesion //crea una sesion (o la continua basandose en el session id pasado por GET o mediante una cookie). session_start(); $dbhost = "localhost"; // Change this to the proper DB Host name $dbusername = "admintodo"; // Change this to the proper DB User $dbpass = "887877"; // Change this to the proper DB User password $dbname = "todo"; // Change this to the proper DB Name $nombreserv=""; // password del administrador $usuarioadmin = "admintodo"; $password = "88789977"; // Nombre del sitio $site_name = "Revista Todo"; // Site URL - Pagina principal $site_url = "index.php"; // $use_super_globals = 1; // Se cambia a 0 si estas teniendo problemas // $use_iframe = 0; // cambia a 0 si el navegador no soporta iframe // Esconder opciones de administrador? $hide_options = 1; // 1 = esconde 0 = no //Intento de autenticarse. Comprueba que la password sea correcta if ((isset($_POST['todo_pass'])) && (isset($_POST['todo_user']))) { if ((strlen($_POST['todo_user'])<6) || (strlen($_POST['todo_user'])>12)){ header("Location: index.php?Idmen=43&error=1"); } elseif ((strlen($_POST['todo_pass'])<6) || (strlen($_POST['todo_pass'])>12)){ header("Location: index.php?Idmen=43&error=2"); }else { $usuarioParticular = new Usuarios(); $row = $usuarioParticular->comprobarUsuario($_POST[todo_user],$_POST[todo_pass]); if ($row==0){ header("Location: index.php?Idmen=43&error=3"); } else { if ($row["activa"]=="1"){ if ($row["rol"]=="1"){ //Es administrador $_SESSION["phptodo"]="yes"; $_SESSION["usuarioactivo"]=$usuarioadmin; } elseif ($row["rol"]=="2"){ //Es usuario de inmobiliaria $_SESSION["inmobiliario"]="yes"; $_SESSION["usuarioactivo"]=$_POST[todo_user]; } else{ $_SESSION["usuarioactivo"]=$_POST[todo_user]; } if (isset($_POST[cesta])){ $usuario=new Sorteo(); $comprobarUsuario=$usuario->consultarUsuarioPorNick($_SESSION["usuarioactivo"]); if ($comprobarUsuario!=0){ header("Location: index.php?err=7"); } else{ header("Location: index.php?cesta=1"); } } else{ header("Location: index.php"); } } else { header("Location: index.php?Idmen=43&error=4"); } } } } //Hacer un logout if($_GET['Idmen']=="44") { session_destroy(); header("Location: index.php"); } ?>