Add files via upload
This commit is contained in:
@ -71,10 +71,24 @@ class Aplicacion {
|
||||
public function init($bdDatosConexion) {
|
||||
if ( ! $this->inicializada ) {
|
||||
$this->bdDatosConexion = $bdDatosConexion;
|
||||
//session_start();
|
||||
if ( $this->is_session_started() === FALSE ) session_start();
|
||||
$this->inicializada = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inicia la sesión, si esta no se había iniciado.
|
||||
*/
|
||||
protected function is_session_started(){
|
||||
if ( php_sapi_name() !== 'cli' ) {
|
||||
if ( version_compare(phpversion(), '5.4.0', '>=') ) {
|
||||
return session_status() === PHP_SESSION_ACTIVE ? TRUE : FALSE;
|
||||
} else {
|
||||
return session_id() === '' ? FALSE : TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cierre de la aplicación.
|
||||
|
@ -44,4 +44,9 @@
|
||||
* @see http://php.net/manual/en/language.types.callable.php
|
||||
*/
|
||||
register_shutdown_function(array($app, 'shutdown'));
|
||||
|
||||
//Depuración (BORRAR):
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
?>
|
||||
|
@ -456,17 +456,31 @@
|
||||
|
||||
//Print generic Footer:
|
||||
function print_footer(){
|
||||
//$page = $this->page;
|
||||
$prefix = $this->prefix;
|
||||
/*
|
||||
if (isset($_GET["css"]) && $_GET["css"] === true) {
|
||||
$css = "{$prefix}assets/css/main.css";
|
||||
$nameCSS = "Contraste Normal";
|
||||
} else {
|
||||
$css = "{$prefix}assets/css/highContrast.css";
|
||||
$nameCSS = "Alto Contraste";
|
||||
}
|
||||
*/
|
||||
$css = "{$prefix}assets/css/highContrast.css";
|
||||
$nameCSS = "Alto Contraste";
|
||||
|
||||
echo" <!-- Script -->
|
||||
<script src='{$prefix}assets/js/cambiarCSS.js'></script>
|
||||
|
||||
echo"<footer>
|
||||
<footer>
|
||||
<div class='footer'>
|
||||
<p>© Práctica 2 | Sistemas Web 2021 </p>
|
||||
</div>
|
||||
<a href='{$prefix}fdicines/about_us/'>Sobre FDI-Cines</a> |
|
||||
<a href='{$prefix}fdicines/terms_conditions/'>Términos y condiciones</a> |
|
||||
<a href='{$prefix}cinemas/'>Nuestros cines</a> |
|
||||
<a href='{$prefix}contacto/'>Contacto</a>
|
||||
<a href='{$prefix}contacto/'>Contacto</a> |
|
||||
<button onclick=\"cambiarCSS('{$css}')\">$nameCSS</button>
|
||||
</footer>\n";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user