PHP - index.php queda pantalla en blancoo

 
Vista:
Imágen de perfil de Charly

index.php queda pantalla en blancoo

Publicado por Charly (1 intervención) el 24/08/2021 00:49:35
Buenas noches, les consulto un problema que estoy teniendo en mi sitio web con hosting en donweb y php.... ingreso sin problema a la pantalla de login pero despues del logueo me va al index.php pero me queda la pantalla en blanco sin cargar

login.php

<?php
if (!file_exists ('config/db.php')){
header("location: install/paso1.php");
exit;
}
// checking for minimum PHP version
if (version_compare(PHP_VERSION, '5.3.7', '<')) {
exit("Sorry, Simple PHP Login does not run on a PHP version smaller than 5.3.7 !");
} else if (version_compare(PHP_VERSION, '5.5.0', '<')) {
// if you are using PHP 5.3 or PHP 5.4 you have to include the password_api_compatibility_library.php
// (this library adds the PHP 5.5 password hashing functions to older versions of PHP)
require_once("libraries/password_compatibility_library.php");
}
// include the configs / constants for the database connection
require_once("config/db.php");
// load the login class
require_once("classes/Login.php");
// create a login object. when this object is created, it will do all login/logout stuff automatically
// so this single line handles the entire login process. in consequence, you can simply ...
$login = new Login();
// ... ask if we are logged in here:
if ($login->isUserLoggedIn() == true) {
// the user is logged in. you can do whatever you want here.
// for demonstration purposes, we simply show the "you are logged in" view.
header("location: index.php");

?>

<?php
} else {
$page_title="Simplics | Login";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><?php echo $page_title;?></title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/AdminLTE.min.css">
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<a href="login.php" >
<img src="img/simplics.png" align="center" width="250" height="250"> </a>
</div><!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Inicio de sesión</p>
<?php
// show potential errors / feedback (from login object)
if (isset($login)) {
if ($login->errors) {
?>
<div class="alert alert-danger alert-dismissible" role="alert">
<strong>Error!</strong>

<?php
foreach ($login->errors as $error) {
echo $error;
}
?>
</div>
<?php
}
if ($login->messages) {
?>
<div class="alert alert-success alert-dismissible" role="alert">
<strong>Aviso!</strong>
<?php
foreach ($login->messages as $message) {
echo $message;
}
?>
</div>
<?php
}
}
?>
<form action="login.php" method="post">
<div class="form-group has-feedback">
<input type="text" name="user_name" class="form-control" placeholder="Nombre de Usuario" required>
<span class="glyphicon glyphicon-user form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" name="user_password" class="form-control" placeholder="Contraseña" required>
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
<div class="checkbox icheck">

</div>
</div><!-- /.col -->
<div class="col-xs-4">
<button type="submit" name="login" class="btn btn-primary btn-block btn-flat">Entrar</button>
</div><!-- /.col -->
</div>
</form>
</div><!-- /.login-box-body -->
</div><!-- /.login-box -->
<!-- jQuery 2.1.4 -->
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
<?php
}
?>



index.php

// checking for minimum PHP version
if (version_compare(PHP_VERSION, '5.3.7', '<')) {
exit("Sorry, Simple PHP Login does not run on a PHP version smaller than 5.3.7 !");
} else if (version_compare(PHP_VERSION, '5.5.0', '<')) {
// if you are using PHP 5.3 or PHP 5.4 you have to include the password_api_compatibility_library.php
// (this library adds the PHP 5.5 password hashing functions to older versions of PHP)
require_once("libraries/password_compatibility_library.php");
}
// include the configs / constants for the database connection
require_once("config/db.php");
// load the login class
require_once("classes/Login.php");
// create a login object. when this object is created, it will do all login/logout stuff automatically
// so this single line handles the entire login process. in consequence, you can simply ...
$login = new Login();
// ... ask if we are logged in here:
if ($login->isUserLoggedIn() == true)
{
/* Connect To Database*/
require_once ("config/conexion.php");
/* function_home*/
require_once ("libraries/function_home.php");

//Inicia Control de Permisos
include("./config/permisos.php");

$user_id = $_SESSION['user_id'];
get_cadena($user_id);
$modulo="Inicio";
permisos($modulo,$cadena_permisos);
//Finaliza Control de Permisos
$title="Panel de control";
$skin="skin-green";
$home=1;

include('view/home.php');//Include file with the view
}
else
{
header("location: login.php");
exit;
}
?>


Podran ayudarme adonde estaria el problema?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

index.php queda pantalla en blancoo

Publicado por albert (21 intervenciones) el 24/08/2021 21:14:20
tienes error de sintaxsis revisa el codigo!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar