Now using bootstrap
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
</main>
|
||||
<script src="/static/bootstrap.bundle.min.js"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
console.log("post-body loaded");
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
session_start([ 'cookie_lifetime' => 604800 ]);
|
||||
session_start(['cookie_lifetime' => 604800]);
|
||||
session_regenerate_id();
|
||||
ini_set("session.use_only_cookies", "true");
|
||||
ini_set("session.use_trans_sid", "false");
|
||||
ini_set("display_errors", 0);
|
||||
|
||||
if (!isset($APP_CODE)) {
|
||||
$APP_CODE = "ax4";
|
||||
@@ -23,13 +24,13 @@ if (!isset($APP_CODE)) {
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title><?php echo $APP_TITLE ?? "Axia4"; ?></title>
|
||||
<link rel="stylesheet" href="/static/picnic.min.css" />
|
||||
<link rel="stylesheet" href="/static/bootstrap.min.css" />
|
||||
<link rel="icon" type="image/png" href="/static/<?php echo $APP_ICON ?? "logo.png"; ?>" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<style>
|
||||
fieldset label {
|
||||
/* fieldset label {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
@@ -65,7 +66,7 @@ if (!isset($APP_CODE)) {
|
||||
|
||||
th {
|
||||
text-align: center;
|
||||
}
|
||||
} */
|
||||
|
||||
@media print {
|
||||
.no-print {
|
||||
@@ -97,6 +98,7 @@ if (!isset($APP_CODE)) {
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
|
||||
/*
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
@@ -107,9 +109,6 @@ if (!isset($APP_CODE)) {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.card.pad {
|
||||
padding: 15px 25px;
|
||||
}
|
||||
|
||||
a.grid-item {
|
||||
margin-bottom: 10px !important;
|
||||
@@ -120,58 +119,78 @@ if (!isset($APP_CODE)) {
|
||||
|
||||
a.grid-item img {
|
||||
margin: 0 auto;
|
||||
/*height: 100px;*/
|
||||
} */
|
||||
.card.pad {
|
||||
padding: 15px 25px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
details summary {
|
||||
cursor: pointer;
|
||||
display: list-item;
|
||||
}
|
||||
.text-black {
|
||||
color: black !important;
|
||||
}
|
||||
.btn {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.navbar-nav > a.btn {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.bg-custom {
|
||||
background-color: #9013FE;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="/static/masonry.pkgd.min.js"></script>
|
||||
<script src="//code.iconify.design/1/1.0.6/iconify.min.js"></script>
|
||||
<?php if ($_GET["_hidenav"] == "yes") { ?>
|
||||
<main style="padding: 10px;">
|
||||
<?php } elseif ($_GET["_hidenav"] == "widget") { ?>
|
||||
<main style="padding: 0px;">
|
||||
<?php } else { ?>
|
||||
<style>
|
||||
body {
|
||||
height: calc(100% - 3em);
|
||||
background: #ddd;
|
||||
}
|
||||
</style>
|
||||
<nav>
|
||||
<a href="<?php echo $APP_ROOT ?? ""; ?>" class="brand">
|
||||
<img class="logo" loading="lazy" src="/static/<?php echo $APP_ICON ?? "logo.png"; ?>" />
|
||||
<span><?php echo $APP_NAME ?? "Axia<sup>4</sup>"; ?></span>
|
||||
</a>
|
||||
<?php if ($APP_CODE == "ax4") { ?>
|
||||
<a href="/lazo.php" class="brand" style="padding: 0;">
|
||||
<img style="margin: 0;" class="logo" title="Nuestra solidaridad con las víctimas y familiares del grave accidente de Adamuz"
|
||||
alt="Nuestra solidaridad con las víctimas y familiares del grave accidente de Adamuz" src="/static/lazo_negro.png" />
|
||||
</a>
|
||||
<?php } ?>
|
||||
<input id="bmenub" type="checkbox" class="show" />
|
||||
<label for="bmenub" class="burger button">menú</label>
|
||||
<div class="menu">
|
||||
<?php if (file_exists(__DIR__ . "/.." . $APP_ROOT . "/__menu.php")) { ?>
|
||||
<?php require_once __DIR__ . "/.." . $APP_ROOT . "/__menu.php"; ?>
|
||||
<?php } elseif ($_GET["_hidenav"] == "widget") { ?>
|
||||
<main style="padding: 0px;">
|
||||
<?php } else { ?>
|
||||
<style>
|
||||
body {
|
||||
height: calc(100% - 3em);
|
||||
background: #ddd;
|
||||
}
|
||||
</style>
|
||||
<nav class="navbar navbar-expand-lg bg-<?= $APP_COLOR ?? ($APP_CODE == "ax4" ? "custom" : "primary") ?>" data-bs-theme="dark">
|
||||
<div class="container-fluid">
|
||||
<a href="<?php echo $APP_ROOT ?? ""; ?>" class="navbar-brand">
|
||||
<img height="30" class="logo" loading="lazy" src="/static/<?php echo $APP_ICON ?? "logo.png"; ?>" style="<?= $APP_ICON != "logo.png" ? '' : 'filter: invert(1);' ?>" />
|
||||
<?php echo $APP_NAME ?? "Axia<sup>4</sup>"; ?>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarColor01">
|
||||
<ul class="navbar-nav me-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="<?php echo $APP_ROOT ?? ""; ?>">Inicio
|
||||
<span class="visually-hidden">(current)</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if (file_exists("../$APP_CODE/__menu.php")) { ?>
|
||||
<?php require_once "../$APP_CODE/__menu.php"; ?>
|
||||
<?php } ?>
|
||||
|
||||
</ul>
|
||||
<?php if ($APP_CODE != "ax4") { ?>
|
||||
<a href="/" class="btn btn-secondary pseudo" style="background: #9013FE; color: white;">Salir a Axia4</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<main style="padding: 20px; ">
|
||||
<?php } ?>
|
||||
<?php if ($APP_CODE != "ax4") { ?>
|
||||
<a href="/" class="button pseudo" style="background: #9013FE; color: white;">Ax<sup>4</sup></a>
|
||||
<?php if (isset($_GET["_result"])) { ?>
|
||||
<div class="card pad"
|
||||
style="padding: 10px; background-color: <?php echo $_GET["_resultcolor"] ?? 'lightgreen'; ?>; text-align: center;">
|
||||
<h3><?php echo $_GET["_result"]; ?></h3>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</nav>
|
||||
<main style="margin-top: 3em; padding: 20px; ">
|
||||
<?php } ?>
|
||||
<?php if (isset($_GET["_result"])) { ?>
|
||||
<div class="card"
|
||||
style="padding: 10px; background-color: <?php echo $_GET["_resultcolor"] ?? 'lightgreen'; ?>; text-align: center;">
|
||||
<h3><?php echo $_GET["_result"]; ?></h3>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- <div class="card" style="padding: 15px; background: #ffcc00; color: #000;">
|
||||
<!-- <div class="card pad" style="padding: 15px; background: #ffcc00; color: #000;">
|
||||
<h2>Alerta Meteorologica</h2>
|
||||
<span>Viento fuerte en Portugalete.</span>
|
||||
</div> -->
|
||||
</div> -->
|
||||
@@ -34,14 +34,16 @@ switch ($_GET["step"]) {
|
||||
require_once "_incl/pre-body.php";
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Instalación de Axia4</h1>
|
||||
<span>Bienvenidx al asistente de instalación de Axia4. Por favor, sigue los pasos para completar la configuración inicial del sistema.</span>
|
||||
<ol>
|
||||
<li>Crear el usuario administrador.</li>
|
||||
<!--<li>Configurar los ajustes básicos del sistema.</li>-->
|
||||
<li>Finalizar la instalación y acceder al sistema.</li>
|
||||
</ol>
|
||||
<a href="/_install.php?step=1" class="button">Comenzar instalación</a>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Instalación de Axia4</h1>
|
||||
<span>Bienvenidx al asistente de instalación de Axia4. Por favor, sigue los pasos para completar la configuración inicial del sistema.</span>
|
||||
<ol>
|
||||
<li>Crear el usuario administrador.</li>
|
||||
<!--<li>Configurar los ajustes básicos del sistema.</li>-->
|
||||
<li>Finalizar la instalación y acceder al sistema.</li>
|
||||
</ol>
|
||||
<a href="/_install.php?step=1" class="btn btn-primary">Comenzar instalación</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
require_once "_incl/post-body.php";
|
||||
@@ -50,18 +52,20 @@ switch ($_GET["step"]) {
|
||||
require_once "_incl/pre-body.php";
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Crear usuario administrador</h1>
|
||||
<form method="post" action="?form=create_admin">
|
||||
<label>
|
||||
<b>Nombre de usuario:</b><br>
|
||||
<input required type="text" name="admin_user" placeholder="Ej: AdminUser">
|
||||
</label><br><br>
|
||||
<label>
|
||||
<b>Contraseña:</b><br>
|
||||
<input required type="password" name="admin_password" placeholder="Ej: StrongPassword123">
|
||||
</label><br><br>
|
||||
<button type="submit">Crear usuario administrador</button>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Crear usuario administrador</h1>
|
||||
<form method="post" action="?form=create_admin">
|
||||
<div class="mb-3">
|
||||
<label for="admin_user" class="form-label"><b>Nombre de usuario:</b></label>
|
||||
<input required type="text" id="admin_user" name="admin_user" class="form-control" placeholder="Ej: AdminUser">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="admin_password" class="form-label"><b>Contraseña:</b></label>
|
||||
<input required type="password" id="admin_password" name="admin_password" class="form-control" placeholder="Ej: StrongPassword123">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Crear usuario administrador</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
require_once "_incl/post-body.php";
|
||||
|
||||
@@ -42,21 +42,24 @@ if (!file_exists("/DATA/SISTEMA_INSTALADO.txt")) {
|
||||
}
|
||||
require_once "_incl/pre-body.php"; ?>
|
||||
<div class="card pad">
|
||||
|
||||
<h1>Iniciar sesión en Axia4</h1>
|
||||
|
||||
<form method="post">
|
||||
<fieldset class="card" style="border: 2px solid black; border-radius: 6.5px; padding: 10px 25px; max-width: 500px;">
|
||||
<label>
|
||||
<b>Usuario:</b><br>
|
||||
<input required type="text" name="user" placeholder="Ej: PepitoFlores3">
|
||||
</label><br><br>
|
||||
<label>
|
||||
<b>Contraseña:</b><br>
|
||||
<input required type="password" name="password" placeholder="Ej: PerroArbolPianoPizza">
|
||||
</label>
|
||||
<button type="submit">Iniciar sesión</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Iniciar sesión en Axia4</h1>
|
||||
|
||||
<form method="post">
|
||||
<div class="card pad" style="max-width: 500px;">
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label for="user" class="form-label"><b>Usuario:</b></label>
|
||||
<input required type="text" id="user" name="user" class="form-control" placeholder="Ej: PepitoFlores3">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label"><b>Contraseña:</b></label>
|
||||
<input required type="password" id="password" name="password" class="form-control" placeholder="Ej: PerroArbolPianoPizza">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Iniciar sesión</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php require_once "_incl/post-body.php"; ?>
|
||||
@@ -1,2 +1,2 @@
|
||||
<a href="/_login.php?reload_user=1" class="button pseudo">Recargar Cuenta</a>
|
||||
<a href="/_login.php?logout=1" class="button pseudo">Cerrar sesión</a>
|
||||
<a href="/_login.php?reload_user=1" class="btn btn-secondary">Recargar Cuenta</a>
|
||||
<a href="/_login.php?logout=1" class="btn btn-secondary">Cerrar sesión</a>
|
||||
@@ -37,32 +37,35 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
}
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>¡Crea una cuenta!</h1>
|
||||
<form method="post">
|
||||
<fieldset class="card pad" style="border: 2px solid black; border-radius: 6.5px; max-width: 500px;">
|
||||
<label>
|
||||
<b>Codigo de invitación:</b>
|
||||
<input type="text" name="invitation_code" required />
|
||||
<small>Codigo de invitación proporcionado por un administrador.<br>Formato: 123456-ABCDEF</small>
|
||||
</label>
|
||||
<label>
|
||||
<b>Usuario:</b>
|
||||
<input type="text" name="username" required />
|
||||
</label>
|
||||
<label>
|
||||
<b>Contraseña:</b>
|
||||
<input type="password" name="password" required />
|
||||
</label>
|
||||
<label>
|
||||
<b>Nombre:</b>
|
||||
<input type="text" name="display_name" required />
|
||||
</label>
|
||||
<label>
|
||||
<b>Correo electronico:</b>
|
||||
<input type="email" name="email" required />
|
||||
</label>
|
||||
<button type="submit">Crear cuenta</button>
|
||||
<br><br>
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">¡Crea una cuenta!</h1>
|
||||
<form method="post">
|
||||
<div class="card pad" style="max-width: 500px;">
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label for="invitation_code" class="form-label"><b>Codigo de invitación:</b></label>
|
||||
<input type="text" id="invitation_code" name="invitation_code" class="form-control" required />
|
||||
<small>Codigo de invitación proporcionado por un administrador.<br>Formato: 123456-ABCDEF</small>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label"><b>Usuario:</b></label>
|
||||
<input type="text" id="username" name="username" class="form-control" required />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label"><b>Contraseña:</b></label>
|
||||
<input type="password" id="password" name="password" class="form-control" required />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="display_name" class="form-label"><b>Nombre:</b></label>
|
||||
<input type="text" id="display_name" name="display_name" class="form-control" required />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label"><b>Correo electronico:</b></label>
|
||||
<input type="email" id="email" name="email" class="form-control" required />
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Crear cuenta</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,2 +1,2 @@
|
||||
<a href="/club/upload/" class="button pseudo">Subir fotos</a>
|
||||
<!-- <a href="https://www.google.com/maps/d/u/0/embed?mid=1-iMb0N6ZhLDMu1ArK4fCVW_vVTA-giA&ehbc=2E312F&noprof=1" class="button pseudo">Lugares de interes</a> -->
|
||||
<a href="/club/upload/" class="btn btn-secondary">Subir fotos</a>
|
||||
<!-- <a href="https://www.google.com/maps/d/u/0/embed?mid=1-iMb0N6ZhLDMu1ArK4fCVW_vVTA-giA&ehbc=2E312F&noprof=1" class="btn btn-secondary">Lugares de interes</a> -->
|
||||
@@ -13,11 +13,11 @@ require_once "../_incl/pre-body.php"; ?>
|
||||
<div class="card pad">
|
||||
<h1><?php echo $date; ?> - <?php echo $val["title"] ?: "Por definir"; ?></h1>
|
||||
<span>
|
||||
<a href="/club/" class="button">Volver a Inicio</a>
|
||||
<a href="/club/edit_data.php?f=<?php echo $file; ?>" class="button">Cambiar datos</a>
|
||||
<a href="/club/upload/index.php?f=<?php echo $file; ?>" class="button">Subir fotos</a>
|
||||
<a href="/club/" class="btn btn-secondary">Volver a Inicio</a>
|
||||
<a href="/club/edit_data.php?f=<?php echo $file; ?>" class="btn btn-secondary">Cambiar datos</a>
|
||||
<a href="/club/upload/index.php?f=<?php echo $file; ?>" class="btn btn-primary">Subir fotos</a>
|
||||
<?php if (isset($val["mapa"]["url"]) and $val["mapa"]["url"] != ""): ?>
|
||||
<a class="button" href="<?php echo $val["mapa"]["url"]; ?>" target="_blank">Abrir ruta interactiva</a>
|
||||
<a class="btn btn-secondary" href="<?php echo $val["mapa"]["url"]; ?>" target="_blank">Abrir ruta interactiva</a>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
|
||||
@@ -41,17 +41,17 @@ require_once "../_incl/pre-body.php"; ?>
|
||||
<?php if (strtolower(pathinfo($foto, PATHINFO_EXTENSION)) == "thumbnail") {
|
||||
continue;
|
||||
} ?>
|
||||
<div style="width: 240px; display: inline-block; margin-bottom: 10px; border: 3px solid black; border-radius: 6.5px;"
|
||||
<div style="width: 240px; display: inline-block; margin-bottom: 10px; border: 3px solid black; border-radius: 6.5px; box-sizing: content-box;"
|
||||
class="grid-item">
|
||||
<?php $dl_url = "foto_dl.php?f=$file/$pname/" . str_replace($persona, "", $foto); ?>
|
||||
<img class="stack" width="240px" loading="lazy" src="<?php echo $dl_url; ?>&thumbnail=1"
|
||||
alt="Foto de <?php echo $pname . " - " . str_replace($persona, "", $foto); ?>">
|
||||
<div style="padding: 5px; text-align: center;">
|
||||
Subido por <?php echo $pname; ?><br>
|
||||
<a href="<?php echo $dl_url; ?>" target="_blank" class="button">Abrir</a>
|
||||
<a href="<?php echo $dl_url; ?>" target="_blank" class="btn btn-secondary">Abrir</a>
|
||||
<a href="<?php echo $dl_url; ?>"
|
||||
download="<?php echo "CLUB-NK5-$file-$pname-" . str_replace($persona, "", $foto); ?>"
|
||||
class="button">Descargar</a>
|
||||
class="btn btn-secondary">Descargar</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -22,35 +22,38 @@ $APP_CODE = "club";
|
||||
$APP_NAME = "La web del Club<sup>3</sup>";
|
||||
$APP_TITLE = "La web del Club";
|
||||
require_once "../_incl/pre-body.php"; ?>
|
||||
<div class="card pad">
|
||||
|
||||
<h1>Editar datos</h1>
|
||||
|
||||
<form method="post">
|
||||
<fieldset class="card" style="border: 2px solid black; border-radius: 6.5px; padding: 5px 25px; max-width: 500px;">
|
||||
<label>
|
||||
<b>Contraseña de administración:</b><br>
|
||||
<input required type="text" name="adminpw" placeholder="Contraseña admin">
|
||||
</label><br><br>
|
||||
<label>
|
||||
<b>Fecha:</b><br>
|
||||
<input required type="date" name="date" value="<?php echo $file;?>" placeholder="Fecha">
|
||||
</label><br><br><hr>
|
||||
<label>
|
||||
<b>Titulo:</b><br>
|
||||
<input required type="text" name="title" value="<?php echo $val["title"] ?: "";?>" placeholder="Titulo">
|
||||
</label><br><br>
|
||||
<label>
|
||||
<b>Descripción:</b><br>
|
||||
<textarea rows="5" name="note" placeholder="Descripción"><?php echo $val["note"] ?: "";?></textarea>
|
||||
</label><br><br>
|
||||
<label>
|
||||
<b>Enlace ruta mapa:</b><br>
|
||||
<input type="url" name="mapa_url" value="<?php echo $val["mapa"]["url"] ?: "";?>" placeholder="Enlace Mapa">
|
||||
</label><br><br>
|
||||
<button type="submit">Guardar cambios</button>
|
||||
<br><br>
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Editar datos</h1>
|
||||
|
||||
<form method="post">
|
||||
<div class="card" style="max-width: 500px;">
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label for="adminpw" class="form-label"><b>Contraseña de administración:</b></label>
|
||||
<input required type="text" id="adminpw" name="adminpw" class="form-control" placeholder="Contraseña admin">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="date" class="form-label"><b>Fecha:</b></label>
|
||||
<input required type="date" id="date" name="date" class="form-control" value="<?php echo $file;?>" placeholder="Fecha">
|
||||
</div>
|
||||
<hr>
|
||||
<div class="mb-3">
|
||||
<label for="title" class="form-label"><b>Titulo:</b></label>
|
||||
<input required type="text" id="title" name="title" class="form-control" value="<?php echo $val["title"] ?: "";?>" placeholder="Titulo">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="note" class="form-label"><b>Descripción:</b></label>
|
||||
<textarea rows="5" id="note" name="note" class="form-control" placeholder="Descripción"><?php echo $val["note"] ?: "";?></textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="mapa_url" class="form-label"><b>Enlace ruta mapa:</b></label>
|
||||
<input type="url" id="mapa_url" name="mapa_url" class="form-control" value="<?php echo $val["mapa"]["url"] ?: "";?>" placeholder="Enlace Mapa">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Guardar cambios</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php require_once "../_incl/post-body.php"; ?>
|
||||
@@ -7,30 +7,29 @@ if (strtoupper($_GET["p"]) != "ELPEPE") {
|
||||
$APP_CODE = "club";
|
||||
$APP_NAME = "La web del Club<sup>3</sup>";
|
||||
$APP_TITLE = "La web del Club";
|
||||
require_once "/var/www/_incl/pre-body.php"; ?>
|
||||
<div class="card pad">
|
||||
<h1>Subir fotos</h1>
|
||||
<form id="upload" encType="multipart/form-data">
|
||||
<fieldset class="card"
|
||||
style="border: 2px solid black; border-radius: 6.5px; padding: 5px 25px; max-width: 500px;">
|
||||
|
||||
<label id="uploader0">
|
||||
<b>Elegir los archivos a subir (max 10)</b>
|
||||
<input type="file" name="file[]" multiple="true" id="uploaderfileinp" />
|
||||
</label>
|
||||
require_once "../../_incl/pre-body.php"; ?>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Subir fotos</h1>
|
||||
<form id="upload" encType="multipart/form-data">
|
||||
<div class="mb-3">
|
||||
<label for="uploaderfileinp" class="form-label"><b>Elegir los archivos a subir (max 10)</b></label>
|
||||
<input type="file" id="uploaderfileinp" name="file[]" multiple="true" class="form-control" />
|
||||
</div>
|
||||
<hr>
|
||||
<span>
|
||||
<b>Progreso:</b> <span id="alert">Por subir...</span>
|
||||
</span>
|
||||
<progress id="fileuploaderprog" max="100" value="0" style="width: 100%;">0%</progress>
|
||||
<br>
|
||||
<button type="submit" class="button">Subir fotos</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="mb-3">
|
||||
<span><b>Progreso:</b> <span id="alert">Por subir...</span></span>
|
||||
<div class="progress">
|
||||
<div id="fileuploaderprog" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%;">0%</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Subir fotos</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="js/plugin/jquery-3.6.0.min.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
|
||||
</div>
|
||||
<?php require_once "/var/www/_incl/post-body.php"; ?>
|
||||
<?php require_once "../../_incl/post-body.php"; ?>
|
||||
@@ -1,30 +1,26 @@
|
||||
<?php ini_set("display_errors", "off");
|
||||
|
||||
<?php
|
||||
$APP_CODE = "club";
|
||||
$APP_NAME = "La web del Club<sup>3</sup>";
|
||||
$APP_TITLE = "La web del Club";
|
||||
require_once "/var/www/_incl/pre-body.php"; ?>
|
||||
<div class="card pad">
|
||||
<h1>Subir fotos</h1>
|
||||
<form action="form.php" method="get">
|
||||
<fieldset class="card" style="border: 2px solid black; border-radius: 6.5px; padding: 5px 25px; max-width: 500px;">
|
||||
<label>
|
||||
<b>Tu nombre:</b>
|
||||
<input required type="text" name="n" value="<?php echo $_GET["n"] ?: "";?>" placeholder="Nombre...">
|
||||
</label>
|
||||
<br>
|
||||
<label>
|
||||
<b>Fecha:</b>
|
||||
<input required type="date" name="f" value="<?php echo $_GET["f"] ?: "";?>" placeholder="Fecha...">
|
||||
</label>
|
||||
<br>
|
||||
<label>
|
||||
<b>La contraseña:</b>
|
||||
<input required type="text" name="p" value="" placeholder="Contraseña...">
|
||||
</label>
|
||||
<br>
|
||||
<button type="submit">Continuar...</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
require_once "../../_incl/pre-body.php"; ?>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Subir fotos</h1>
|
||||
<form action="form.php" method="get">
|
||||
<div class="mb-3">
|
||||
<label for="n" class="form-label"><b>Tu nombre:</b></label>
|
||||
<input required type="text" id="n" name="n" class="form-control" value="<?php echo $_GET["n"] ?: "";?>" placeholder="Nombre...">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="f" class="form-label"><b>Fecha:</b></label>
|
||||
<input required type="date" id="f" name="f" class="form-control" value="<?php echo $_GET["f"] ?: "";?>" placeholder="Fecha...">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="p" class="form-label"><b>La contraseña:</b></label>
|
||||
<input required type="text" id="p" name="p" class="form-control" value="" placeholder="Contraseña...">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Continuar...</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php require_once "/var/www/_incl/post-body.php"; ?>
|
||||
<?php require_once "../../_incl/post-body.php"; ?>
|
||||
@@ -40,7 +40,7 @@ $(document).ready(function() {
|
||||
function Progress(current, total) {
|
||||
var percent = ((current / total) * 100).toFixed(0) + "%";
|
||||
|
||||
document.getElementById('fileuploaderprog').value = ((current / total) * 100).toFixed(0);
|
||||
document.getElementById('fileuploaderprog').style.width = percent;
|
||||
document.getElementById('fileuploaderprog').innerText = percent;
|
||||
}
|
||||
|
||||
@@ -51,9 +51,11 @@ function Finished() {
|
||||
document.getElementById('uploaderfileinp').value = "";
|
||||
|
||||
document.getElementById('fileuploaderprog').innerText = "Subido!"
|
||||
document.getElementById('fileuploaderprog').style.width = "100%";
|
||||
|
||||
setTimeout(function() {
|
||||
document.getElementById('fileuploaderprog').innerText = "0%"
|
||||
document.getElementById('fileuploaderprog').style.width = "0%";
|
||||
location.href="../cal.php?f=" + urlParams.get("f")
|
||||
|
||||
}, 3000);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
ini_set("display_errors", 0);
|
||||
ini_set("display_errors", 1);
|
||||
$config = json_decode(file_get_contents("/DATA/club/config.json"), true);
|
||||
if (strtoupper($_GET["pw"]) != $config["uploadpw"]) {
|
||||
header("HTTP/1.1 401 Unauthorized");
|
||||
@@ -33,9 +33,9 @@ for ($i = 0; $i < $file_count; $i++) {
|
||||
// Generate thumbnail
|
||||
require_once "../_incl/tools.photos.php";
|
||||
$thumbnail_path = $location . ".thumbnail";
|
||||
if (!file_exists($thumbnail_path)) {
|
||||
generatethumbnail($location, $thumbnail_path, 240, 0);
|
||||
}
|
||||
#if (!file_exists($thumbnail_path)) {
|
||||
# generatethumbnail($location, $thumbnail_path, 240, 0);
|
||||
#}
|
||||
header("HTTP/1.1 200 OK");
|
||||
} else {
|
||||
header("HTTP/1.1 500 Internal Server Error");
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<a href="/_login.php?reload_user=1" class="button pseudo">Recargar Cuenta</a>
|
||||
<a href="/_login.php?logout=1" class="button pseudo">Cerrar sesión</a>
|
||||
<a href="/_login.php?reload_user=1" class="btn btn-secondary">Recargar Cuenta</a>
|
||||
<a href="/_login.php?logout=1" class="btn btn-secondary">Cerrar sesión</a>
|
||||
@@ -6,27 +6,41 @@ $centro_id = $_SESSION["auth_data"]["entreaulas"]["centro"];
|
||||
$aulario = json_decode(file_get_contents("/DATA/entreaulas/Centros/$centro_id/Aularios/$aulario_id.json"), true);
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Aulario: <?= htmlspecialchars($aulario["name"]) ?></h1>
|
||||
<span>
|
||||
Bienvenidx al aulario <?= htmlspecialchars($aulario["name"]) ?>. Aquí podrás gestionar las funcionalidades específicas de este aulario.
|
||||
</span>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Aulario: <?= htmlspecialchars($aulario["name"]) ?></h1>
|
||||
<span>
|
||||
Bienvenidx al aulario <?= htmlspecialchars($aulario["name"]) ?>. Aquí podrás gestionar las funcionalidades específicas de este aulario.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="grid">
|
||||
<a href="/entreaulas/paneldiario.php?aulario=<?= urlencode($aulario_id) ?>" class="button grid-item">
|
||||
<a href="/entreaulas/paneldiario.php?aulario=<?= urlencode($aulario_id) ?>" class="btn btn-primary grid-item">
|
||||
<img src="/static/iconexperience/calendar_preferences.png" height="125">
|
||||
</br>
|
||||
Panel Diario
|
||||
</a>
|
||||
<?php if (in_array("sysadmin:access", $_SESSION["auth_data"]["permissions"] ?? [])): ?>
|
||||
<a href="/sysadmin/aularios.php?action=edit&aulario=<?= urlencode($aulario_id) ?>" class="button grid-item">
|
||||
<a href="/sysadmin/aularios.php?action=edit&aulario=<?= urlencode($aulario_id) ?>" class="btn btn-secondary grid-item">
|
||||
<img src="/static/iconexperience/gear_edit.png" height="125">
|
||||
<br>
|
||||
Administración del Aulario
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<style>
|
||||
.grid-item {
|
||||
margin-bottom: 10px !important;
|
||||
padding: 15px;
|
||||
width: 250px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.grid-item img {
|
||||
margin: 0 auto;
|
||||
height: 125px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var msnry = new Masonry('#grid', {
|
||||
"columnWidth": 250,
|
||||
|
||||
@@ -2,17 +2,19 @@
|
||||
require_once "_incl/auth_redir.php";
|
||||
require_once "_incl/pre-body.php";?>
|
||||
<div class="card pad">
|
||||
<h1>¡Hola, <?php echo $_SESSION["auth_data"]["display_name"];?>!</h1>
|
||||
<span>
|
||||
Bienvenidx a la plataforma de gestión de aularios conectados. Desde aquí podrás administrar los aularios asociados a tu cuenta.
|
||||
</span>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">¡Hola, <?php echo $_SESSION["auth_data"]["display_name"];?>!</h1>
|
||||
<span>
|
||||
Bienvenidx a la plataforma de gestión de aularios conectados. Desde aquí podrás administrar los aularios asociados a tu cuenta.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="grid">
|
||||
<?php $user_data = $_SESSION["auth_data"];
|
||||
$centro_id = $user_data["entreaulas"]["centro"];
|
||||
foreach ($user_data["entreaulas"]["aulas"] as $aulario_id) {
|
||||
$aulario = json_decode(file_get_contents("/DATA/entreaulas/Centros/$centro_id/Aularios/$aulario_id.json"), true);
|
||||
echo '<a href="/entreaulas/aulario.php?id=' . $aulario_id . '" class="button grid-item">
|
||||
echo '<a href="/entreaulas/aulario.php?id=' . $aulario_id . '" class="btn btn-primary grid-item">
|
||||
<img style="height: 125px;" src="' . $aulario["icon"] . '" alt="' . htmlspecialchars($aulario["name"]) . ' Icono">
|
||||
<br>
|
||||
' . htmlspecialchars($aulario["name"]) . '
|
||||
|
||||
@@ -14,17 +14,19 @@ switch ($_GET["form"]) {
|
||||
header("Refresh: 10; URL=/entreaulas/paneldiario.php?aulario=" . urlencode($_GET['aulario'] ?? ''));
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Menú Seleccionado</h1>
|
||||
<span>
|
||||
Has seleccionado el siguiente menú para el día <?php echo htmlspecialchars($selected_date); ?>:
|
||||
</span>
|
||||
<ul>
|
||||
<li>Primer Plato: <?php echo htmlspecialchars($plato1); ?></li>
|
||||
<li>Segundo Plato: <?php echo htmlspecialchars($plato2); ?></li>
|
||||
<li>Postre: <?php echo htmlspecialchars($postre); ?></li>
|
||||
</ul>
|
||||
<a href="/entreaulas/paneldiario.php?aulario=<?php echo urlencode($_GET['aulario'] ?? ''); ?>" class="button">Volver
|
||||
al Panel Diario</a>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Menú Seleccionado</h1>
|
||||
<span>
|
||||
Has seleccionado el siguiente menú para el día <?php echo htmlspecialchars($selected_date); ?>:
|
||||
</span>
|
||||
<ul>
|
||||
<li>Primer Plato: <?php echo htmlspecialchars($plato1); ?></li>
|
||||
<li>Segundo Plato: <?php echo htmlspecialchars($plato2); ?></li>
|
||||
<li>Postre: <?php echo htmlspecialchars($postre); ?></li>
|
||||
</ul>
|
||||
<a href="/entreaulas/paneldiario.php?aulario=<?php echo urlencode($_GET['aulario'] ?? ''); ?>" class="btn btn-primary">Volver
|
||||
al Panel Diario</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
die();
|
||||
@@ -40,26 +42,28 @@ switch ($_GET["action"]) {
|
||||
case "index":
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Panel diario</h1>
|
||||
<span>
|
||||
Desde este panel puedes apuntar las actividades diarias del aulario.
|
||||
</span>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Panel diario</h1>
|
||||
<span>
|
||||
Desde este panel puedes apuntar las actividades diarias del aulario.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="grid">
|
||||
<!-- Calendario -->
|
||||
<a onclick="document.getElementById('click-sound').play()" href="?action=calendar&aulario=<?php echo urlencode($_GET['aulario'] ?? ''); ?>" class="button grid-item">
|
||||
<a onclick="document.getElementById('click-sound').play()" href="?action=calendar&aulario=<?php echo urlencode($_GET['aulario'] ?? ''); ?>" class="btn btn-primary grid-item">
|
||||
<img src="/static/arasaac/calendario.png" height="125">
|
||||
<br>
|
||||
Calendario
|
||||
</a>
|
||||
<!-- Actividades -->
|
||||
<a onclick="document.getElementById('click-sound').play()" href="?action=actividades&aulario=<?php echo urlencode($_GET['aulario'] ?? ''); ?>" class="button grid-item">
|
||||
<a onclick="document.getElementById('click-sound').play()" href="?action=actividades&aulario=<?php echo urlencode($_GET['aulario'] ?? ''); ?>" class="btn btn-primary grid-item">
|
||||
<span class="iconify" style="font-size: 125px" data-icon="mdi-school"></span>
|
||||
<br>
|
||||
Actividades
|
||||
</a>
|
||||
<!-- Menú del comedor -->
|
||||
<a onclick="document.getElementById('click-sound').play()" href="?action=menu&aulario=<?php echo urlencode($_GET['aulario'] ?? ''); ?>" class="button grid-item">
|
||||
<a onclick="document.getElementById('click-sound').play()" href="?action=menu&aulario=<?php echo urlencode($_GET['aulario'] ?? ''); ?>" class="btn btn-primary grid-item">
|
||||
<span class="iconify" style="font-size: 125px" data-icon="mdi-silverware-fork-knife"></span>
|
||||
<br>
|
||||
Menú del Comedor
|
||||
@@ -101,14 +105,16 @@ switch ($_GET["action"]) {
|
||||
$actividades = json_decode(file_get_contents("/DATA/entreaulas/Centros/" . $_SESSION["auth_data"]["entreaulas"]["centro"] . "/Panel/Actividades.json"), true);
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Actividades</h1>
|
||||
<span>
|
||||
Aquí podrás ver y seleccionar las actividades del día para el aulario.
|
||||
</span>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Actividades</h1>
|
||||
<span>
|
||||
Aquí podrás ver y seleccionar las actividades del día para el aulario.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="grid">
|
||||
<?php foreach ($actividades as $actividad_name => $actividad_data) { ?>
|
||||
<a class="button grid-item">
|
||||
<a class="btn btn-primary grid-item">
|
||||
<img src="<?php echo htmlspecialchars($actividad_data["Foto"]); ?>" height="125">
|
||||
<br>
|
||||
<?php echo htmlspecialchars($actividad_name); ?>
|
||||
@@ -275,7 +281,19 @@ switch ($_GET["action"]) {
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<style>
|
||||
.grid-item {
|
||||
margin-bottom: 10px !important;
|
||||
padding: 15px;
|
||||
width: 250px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.grid-item img {
|
||||
margin: 0 auto;
|
||||
height: 125px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var msnry = new Masonry('.grid', {
|
||||
"columnWidth": 250,
|
||||
@@ -325,7 +343,7 @@ switch ($_GET["action"]) {
|
||||
$ds = date('N', strtotime(date('Y-m-') . sprintf("%02d", $dia)));
|
||||
if ($ds > 5) {
|
||||
?>
|
||||
<div class="card grid-item" style="width: 130px; background-color: #000; color: #fff; height: 100px;">
|
||||
<div class="card grid-item" style="background-color: #000; color: #fff; text-align: center;">
|
||||
<span style="font-size: 48px;"><?php echo $dia; ?></span>
|
||||
</div>
|
||||
<?php
|
||||
@@ -333,12 +351,27 @@ switch ($_GET["action"]) {
|
||||
}
|
||||
$is_today = ($dia == $dia_correcto);
|
||||
?>
|
||||
<a class="card grid-item" style="width: 130px; height: 100px; color: black;"
|
||||
<a class="card grid-item" style="color: black; text-align: center;"
|
||||
onclick="seleccionarDia(this, <?php echo $dia; ?>, <?php echo $mes_correcto; ?>, <?php echo date('Y'); ?>, <?php echo $ds; ?>);">
|
||||
<span style="font-size: 48px;"><?php echo $dia; ?></span>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<style>
|
||||
.grid-item {
|
||||
margin-bottom: 10px !important;
|
||||
padding: 15px;
|
||||
width: 130px;
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.grid-item img {
|
||||
margin: 0 auto;
|
||||
height: 125px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var msnry = new Masonry('.grid', {
|
||||
"columnWidth": 130,
|
||||
@@ -407,6 +440,20 @@ switch ($_GET["action"]) {
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<style>
|
||||
.grid-item {
|
||||
margin-bottom: 10px !important;
|
||||
padding: 15px;
|
||||
width: 225px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.grid-item img {
|
||||
margin: 0 auto;
|
||||
height: 125px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var msnry = new Masonry('.grid', {
|
||||
"columnWidth": 225,
|
||||
@@ -488,6 +535,20 @@ switch ($_GET["action"]) {
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<style>
|
||||
.grid-item {
|
||||
margin-bottom: 10px !important;
|
||||
padding: 15px;
|
||||
width: 180px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.grid-item img {
|
||||
margin: 0 auto;
|
||||
height: 125px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var msnry = new Masonry('.grid', {
|
||||
"columnWidth": 180,
|
||||
|
||||
@@ -7,17 +7,16 @@
|
||||
<div class="card grid-item">
|
||||
<img src="/static/logo-club.png" alt="Logo Club">
|
||||
<b>La web del club</b>
|
||||
<a href="/club/" class="button">Acceso publico</a>
|
||||
<a href="/club/" class="btn btn-primary">Acceso publico</a>
|
||||
</div>
|
||||
<div class="card grid-item">
|
||||
<img src="/static/logo-entreaulas.png" alt="Logo EntreAulas">
|
||||
<b>EntreAulas</b>
|
||||
<span>Gestión de aularios conectados.</span>
|
||||
<?php if ($_SESSION["auth_ok"] && in_array('entreaulas:access', $_SESSION["auth_data"]["permissions"] ?? [])) { ?>
|
||||
<a href="/entreaulas/" class="button">Acceder</a>
|
||||
<a href="/entreaulas/" class="btn btn-primary">Acceder</a>
|
||||
<?php } else { ?>
|
||||
<hr>
|
||||
<small>No tienes permiso para acceder</small>
|
||||
<small class="btn btn-dark disabled">No tienes permiso para acceder</small>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="card grid-item">
|
||||
@@ -25,10 +24,11 @@
|
||||
<b>Mi Cuenta</b>
|
||||
<span>Acceso a la plataforma y pagos.</span>
|
||||
<?php if ($_SESSION["auth_ok"]) { ?>
|
||||
<a href="/account/" class="button">Ir a mi cuenta</a>
|
||||
<a href="/account/" class="btn btn-primary">Ir a mi cuenta</a>
|
||||
<a href="/_logout.php?redir=/" class="btn btn-secondary">Cerrar sesión</a>
|
||||
<?php } else { ?>
|
||||
<a href="/_login.php?redir=/account/" class="button">Iniciar sesión</a>
|
||||
<a href="/account/register.php" class="button">Crear cuenta</a>
|
||||
<a href="/_login.php?redir=/account/" class="btn btn-primary">Iniciar sesión</a>
|
||||
<a href="/account/register.php" class="btn btn-primary">Crear cuenta</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="card grid-item" style="opacity: 0.5;">
|
||||
@@ -60,21 +60,21 @@
|
||||
<img src="/static/logo-aularios.png" alt="Logo Aularios">
|
||||
<b>Aularios<sup>2</sup></b>
|
||||
<span>Visita virtual a los aularios.</span>
|
||||
<!--<a href="https://aularios.tech.eus" class="button">Tengo cuenta</a>-->
|
||||
<!--<a href="https://aularios.tech.eus" class="btn btn-primary">Tengo cuenta</a>-->
|
||||
<small>Solo lectura - Migrando a Axia4</small>
|
||||
</div>
|
||||
<div class="card grid-item" style="opacity: 0.5;">
|
||||
<img src="/static/logo-nube.png" alt="Logo Axia4 Cloud">
|
||||
<b>Nube Axia4.NET</b>
|
||||
<span>Almacenamiento central de datos.</span>
|
||||
<!--<a href="https://axia4.net" class="button">Tengo cuenta</a>-->
|
||||
<!--<a href="https://axia4.net" class="btn btn-primary">Tengo cuenta</a>-->
|
||||
<small>Cerrado por migración a Axia4</small>
|
||||
</div>
|
||||
<div class="card grid-item" style="opacity: 0.5;">
|
||||
<img src="/static/logo-nk4.png" alt="Logo Nube Kasa">
|
||||
<b>Nube Kasa</b>
|
||||
<span>Nube personal con domotica.</span>
|
||||
<!--<a href="https://nk4.tech.eus/_familia/" class="button">Acceso privado</a>-->
|
||||
<!--<a href="https://nk4.tech.eus/_familia/" class="btn btn-primary">Acceso privado</a>-->
|
||||
<small>Cerrado por mantenimiento</small>
|
||||
</div>
|
||||
<div class="card grid-item">
|
||||
@@ -82,10 +82,9 @@
|
||||
<b>SysAdmin</b>
|
||||
<span>Configuración de Axia4.</span>
|
||||
<?php if (in_array('sysadmin:access', $_SESSION["auth_data"]["permissions"] ?? [])) { ?>
|
||||
<a href="/sysadmin/" class="button">Acceder</a>
|
||||
<a href="/sysadmin/" class="btn btn-primary">Acceder</a>
|
||||
<?php } else { ?>
|
||||
<hr>
|
||||
<small>No tienes permiso para acceder</small>
|
||||
<small class="btn btn-dark disabled">No tienes permiso para acceder</small>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php require_once "_incl/pre-body.php"; ?>
|
||||
<div class="card" style="padding: 15px; text-align: center;">
|
||||
<div class="card pad" style="padding: 15px; text-align: center;">
|
||||
<img src="/static/lazo_negro.png" alt="Lazo negro" style="height: 100px; width: auto; margin-bottom: 15px; margin: 0 auto;">
|
||||
<h1 style="font-size: 27.5px;">Nuestra solidaridad con las víctimas y familiares del grave accidente de Adamuz</h1>
|
||||
<em>- EuskadiTech y Sketaria.</em>
|
||||
|
||||
7
public_html/static/bootstrap.bundle.min.js
vendored
Normal file
7
public_html/static/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
12
public_html/static/bootstrap.min.css
vendored
Normal file
12
public_html/static/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -2,4 +2,5 @@
|
||||
$APP_CODE = "sysadmin";
|
||||
$APP_NAME = "SysAdmin";
|
||||
$APP_TITLE = "Administración del Sistema";
|
||||
$APP_COLOR = "danger";
|
||||
require_once __DIR__ . "/../../_incl/pre-body.php";
|
||||
|
||||
@@ -27,34 +27,36 @@ switch ($_GET["action"]) {
|
||||
case "new":
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Nuevo Aulario</h1>
|
||||
<span>
|
||||
Aquí puedes crear un nuevo aulario para el centro que administras.
|
||||
</span>
|
||||
<form method="post" action="?form=create">
|
||||
<label>
|
||||
<b>Centro:</b><br>
|
||||
<select required name="centro">
|
||||
<option value="">-- Selecciona un centro --</option>
|
||||
<?php
|
||||
foreach (glob("/DATA/entreaulas/Centros/*", GLOB_ONLYDIR) as $centro_folder) {
|
||||
$centro_id = basename($centro_folder);
|
||||
$selected = ($centro_id == $_SESSION["auth_data"]["entreaulas"]["centro"]) ? "selected" : "";
|
||||
echo '<option value="' . htmlspecialchars($centro_id) . '" ' . $selected . '>' . htmlspecialchars($centro_id) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</label><br><br>
|
||||
<label>
|
||||
Nombre del Aulario:<br>
|
||||
<input required type="text" name="name" placeholder="Ej: Aulario Principal">
|
||||
</label><br><br>
|
||||
<label>
|
||||
Icono del Aulario (URL):<br>
|
||||
<input type="text" name="icon" placeholder="Ej: https://example.com/icon.png" value="/static/logo-entreaulas.png">
|
||||
</label><br><br>
|
||||
<button type="submit">Crear Aulario</button>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Nuevo Aulario</h1>
|
||||
<span>
|
||||
Aquí puedes crear un nuevo aulario para el centro que administras.
|
||||
</span>
|
||||
<form method="post" action="?form=create">
|
||||
<div class="mb-3">
|
||||
<label for="centro" class="form-label"><b>Centro:</b></label>
|
||||
<select required id="centro" name="centro" class="form-select">
|
||||
<option value="">-- Selecciona un centro --</option>
|
||||
<?php
|
||||
foreach (glob("/DATA/entreaulas/Centros/*", GLOB_ONLYDIR) as $centro_folder) {
|
||||
$centro_id = basename($centro_folder);
|
||||
$selected = ($centro_id == $_SESSION["auth_data"]["entreaulas"]["centro"]) ? "selected" : "";
|
||||
echo '<option value="' . htmlspecialchars($centro_id) . '" ' . $selected . '>' . htmlspecialchars($centro_id) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Nombre del Aulario:</label>
|
||||
<input required type="text" id="name" name="name" class="form-control" placeholder="Ej: Aulario Principal">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="icon" class="form-label">Icono del Aulario (URL):</label>
|
||||
<input type="text" id="icon" name="icon" class="form-control" placeholder="Ej: https://example.com/icon.png" value="/static/logo-entreaulas.png">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Crear Aulario</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@@ -69,20 +71,22 @@ switch ($_GET["action"]) {
|
||||
$aulario_data = json_decode(file_get_contents($aulario_file), true);
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Editar Aulario: <?php echo htmlspecialchars($aulario_data['name'] ?? 'Sin Nombre'); ?></h1>
|
||||
<form method="post" action="?form=save_edit">
|
||||
<label>
|
||||
Nombre del Aulario:<br>
|
||||
<input required type="text" name="name" value="<?php echo htmlspecialchars($aulario_data['name'] ?? ''); ?>">
|
||||
</label><br><br>
|
||||
<label>
|
||||
Icono del Aulario (URL):<br>
|
||||
<input type="text" name="icon" value="<?php echo htmlspecialchars($aulario_data['icon'] ?? '/static/logo-entreaulas.png'); ?>">
|
||||
</label><br><br>
|
||||
<input type="hidden" name="aulario_id" value="<?php echo htmlspecialchars($aulario_id); ?>">
|
||||
<input type="hidden" name="centro_id" value="<?php echo htmlspecialchars($centro_id); ?>">
|
||||
<button type="submit">Guardar Cambios</button>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Editar Aulario: <?php echo htmlspecialchars($aulario_data['name'] ?? 'Sin Nombre'); ?></h1>
|
||||
<form method="post" action="?form=save_edit">
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Nombre del Aulario:</label>
|
||||
<input required type="text" id="name" name="name" class="form-control" value="<?php echo htmlspecialchars($aulario_data['name'] ?? ''); ?>">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="icon" class="form-label">Icono del Aulario (URL):</label>
|
||||
<input type="text" id="icon" name="icon" class="form-control" value="<?php echo htmlspecialchars($aulario_data['icon'] ?? '/static/logo-entreaulas.png'); ?>">
|
||||
</div>
|
||||
<input type="hidden" name="aulario_id" value="<?php echo htmlspecialchars($aulario_id); ?>">
|
||||
<input type="hidden" name="centro_id" value="<?php echo htmlspecialchars($centro_id); ?>">
|
||||
<button type="submit" class="btn btn-primary">Guardar Cambios</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
@@ -90,37 +94,39 @@ switch ($_GET["action"]) {
|
||||
default:
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Gestión de Aularios</h1>
|
||||
<span>
|
||||
Desde esta sección puedes administrar los aularios asociados al centro que estás administrando.
|
||||
</span>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Icono</th>
|
||||
<th>Nombre</th>
|
||||
<th>
|
||||
<a href="?action=new" class="button pseudo" style="background: white; color: black;">+ Nuevo</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$user_data = $_SESSION["auth_data"];
|
||||
$centro_filter = $_GET['centro'] ?? "*";
|
||||
$aulas_filelist = glob("/DATA/entreaulas/Centros/$centro_filter/Aularios/*.json");
|
||||
foreach ($aulas_filelist as $aula_file) {
|
||||
$aula_data = json_decode(file_get_contents($aula_file), true);
|
||||
$centro_id = basename(dirname(dirname($aula_file)));
|
||||
echo '<tr>';
|
||||
echo '<td><img src="' . htmlspecialchars($aula_data['icon'] ?? '/static/logo-entreaulas.png') . '" alt="Icono" style="height: 50px;"></td>';
|
||||
echo '<td>' . htmlspecialchars($aula_data['name'] ?? 'Sin Nombre') . '<br><small>' . $centro_id . '</small></td>';
|
||||
echo '<td><a href="?action=edit&aulario=' . urlencode(basename($aula_file, ".json")) . '¢ro=' . urlencode($centro_id) . '" class="button">Gestionar</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Gestión de Aularios</h1>
|
||||
<span>
|
||||
Desde esta sección puedes administrar los aularios asociados al centro que estás administrando.
|
||||
</span>
|
||||
<table class="table table-striped table-hover">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Icono</th>
|
||||
<th>Nombre</th>
|
||||
<th>
|
||||
<a href="?action=new" class="btn btn-success">+ Nuevo</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$user_data = $_SESSION["auth_data"];
|
||||
$centro_filter = $_GET['centro'] ?? "*";
|
||||
$aulas_filelist = glob("/DATA/entreaulas/Centros/$centro_filter/Aularios/*.json");
|
||||
foreach ($aulas_filelist as $aula_file) {
|
||||
$aula_data = json_decode(file_get_contents($aula_file), true);
|
||||
$centro_id = basename(dirname(dirname($aula_file)));
|
||||
echo '<tr>';
|
||||
echo '<td><img src="' . htmlspecialchars($aula_data['icon'] ?? '/static/logo-entreaulas.png') . '" alt="Icono" style="height: 50px;"></td>';
|
||||
echo '<td>' . htmlspecialchars($aula_data['name'] ?? 'Sin Nombre') . '<br><small>' . $centro_id . '</small></td>';
|
||||
echo '<td><a href="?action=edit&aulario=' . urlencode(basename($aula_file, ".json")) . '¢ro=' . urlencode($centro_id) . '" class="btn btn-primary">Gestionar</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
|
||||
@@ -82,27 +82,31 @@ switch ($_GET["action"]) {
|
||||
}
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Gestión de la Actividad: <?php echo htmlspecialchars($activity_name); ?></h1>
|
||||
<span>
|
||||
Desde esta sección puedes administrar la actividad seleccionada del panel del centro <?php echo htmlspecialchars($centro_id); ?>.
|
||||
</span>
|
||||
<form method="post" action="?form=edit_activity¢ro=<?php echo urlencode($centro_id); ?>&activity=<?php echo urlencode($activity_name); ?>" enctype="multipart/form-data">
|
||||
<label>
|
||||
Nombre de la actividad:<br>
|
||||
<input required type="text" name="nombre" value="<?php echo htmlspecialchars($activity_name); ?>">
|
||||
</label><br><br>
|
||||
Foto (pulsa para cambiarla):<br>
|
||||
<div style="width: 200px;">
|
||||
<label class="dropimage" style="background-image: url('<?php
|
||||
$image_path = "$activity_path/photo.jpg";
|
||||
$image_fetchpath = file_exists($image_path) ? "/entreaulas/_filefetch.php?type=panel_actividades¢ro=" . urlencode($centro_id) . "&activity=" . urlencode($activity_name) : '/static/logo-entreaulas.png';
|
||||
echo htmlspecialchars($image_fetchpath);
|
||||
?>');">
|
||||
<input title="Drop image or click me" type="file" name="file" accept="image/*">
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit">Guardar Cambios</button>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Gestión de la Actividad: <?php echo htmlspecialchars($activity_name); ?></h1>
|
||||
<span>
|
||||
Desde esta sección puedes administrar la actividad seleccionada del panel del centro <?php echo htmlspecialchars($centro_id); ?>.
|
||||
</span>
|
||||
<form method="post" action="?form=edit_activity¢ro=<?php echo urlencode($centro_id); ?>&activity=<?php echo urlencode($activity_name); ?>" enctype="multipart/form-data">
|
||||
<div class="mb-3">
|
||||
<label for="nombre" class="form-label">Nombre de la actividad:</label>
|
||||
<input required type="text" id="nombre" name="nombre" class="form-control" value="<?php echo htmlspecialchars($activity_name); ?>">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Foto (pulsa para cambiarla):</label><br>
|
||||
<div style="width: 200px;">
|
||||
<label class="dropimage" style="background-image: url('<?php
|
||||
$image_path = "$activity_path/photo.jpg";
|
||||
$image_fetchpath = file_exists($image_path) ? "/entreaulas/_filefetch.php?type=panel_actividades¢ro=" . urlencode($centro_id) . "&activity=" . urlencode($activity_name) : '/static/logo-entreaulas.png';
|
||||
echo htmlspecialchars($image_fetchpath);
|
||||
?>');">
|
||||
<input title="Drop image or click me" type="file" name="file" accept="image/*">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Guardar Cambios</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
@@ -114,38 +118,42 @@ switch ($_GET["action"]) {
|
||||
}
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Nueva Actividad del Panel</h1>
|
||||
<span>
|
||||
Aquí puedes crear una nueva actividad para el panel del centro <?php echo htmlspecialchars($centro_id); ?>.
|
||||
</span>
|
||||
<form method="post" action="?form=create_activity¢ro=<?php echo urlencode($centro_id); ?>" enctype="multipart/form-data">
|
||||
<label>
|
||||
Nombre de la actividad:<br>
|
||||
<input required type="text" name="name" placeholder="Ej: Biblioteca">
|
||||
</label><br><br>
|
||||
<label>
|
||||
Foto:<br>
|
||||
<input required type="file" name="photo" accept="image/*">
|
||||
</label><br><br>
|
||||
<button type="submit">Crear Actividad</button>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Nueva Actividad del Panel</h1>
|
||||
<span>
|
||||
Aquí puedes crear una nueva actividad para el panel del centro <?php echo htmlspecialchars($centro_id); ?>.
|
||||
</span>
|
||||
<form method="post" action="?form=create_activity¢ro=<?php echo urlencode($centro_id); ?>" enctype="multipart/form-data">
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Nombre de la actividad:</label>
|
||||
<input required type="text" id="name" name="name" class="form-control" placeholder="Ej: Biblioteca">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="photo" class="form-label">Foto:</label>
|
||||
<input required type="file" id="photo" name="photo" class="form-control" accept="image/*">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Crear Actividad</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
case "new":
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Nuevo Centro</h1>
|
||||
<span>
|
||||
Aquí puedes crear un nuevo centro para el sistema.
|
||||
</span>
|
||||
<form method="post" action="?form=create">
|
||||
<label>
|
||||
ID del centro:<br>
|
||||
<input required type="text" name="name" placeholder="Ej: Centro-Principal-001">
|
||||
</label><br><br>
|
||||
<button type="submit">Crear Centro</button>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Nuevo Centro</h1>
|
||||
<span>
|
||||
Aquí puedes crear un nuevo centro para el sistema.
|
||||
</span>
|
||||
<form method="post" action="?form=create">
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">ID del centro:</label>
|
||||
<input required type="text" id="name" name="name" class="form-control" placeholder="Ej: Centro-Principal-001">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Crear Centro</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@@ -158,66 +166,72 @@ switch ($_GET["action"]) {
|
||||
}
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Gestión del Centro: <?php echo htmlspecialchars($centro_id); ?></h1>
|
||||
<span>
|
||||
Desde esta sección puedes administrar el centro seleccionado.
|
||||
</span>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Gestión del Centro: <?php echo htmlspecialchars($centro_id); ?></h1>
|
||||
<span>
|
||||
Desde esta sección puedes administrar el centro seleccionado.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card pad">
|
||||
<h2>Aularios</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Icono</th>
|
||||
<th>Nombre</th>
|
||||
<th>
|
||||
<a href="/sysadmin/aularios.php?action=new¢ro=<?php echo urlencode($centro_id); ?>" class="button pseudo" style="background: white; color: black;">+ Nuevo</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$aulas_filelist = glob("/DATA/entreaulas/Centros/$centro_id/Aularios/*.json");
|
||||
foreach ($aulas_filelist as $aula_file) {
|
||||
$aula_data = json_decode(file_get_contents($aula_file), true);
|
||||
echo '<tr>';
|
||||
echo '<td><img src="' . htmlspecialchars($aula_data['icon'] ?? '/static/logo-entreaulas.png') . '" alt="Icono" style="height: 50px;"></td>';
|
||||
echo '<td>' . htmlspecialchars($aula_data['name'] ?? 'Sin Nombre') . '</td>';
|
||||
echo '<td><a href="/sysadmin/aularios.php?action=edit&aulario=' . urlencode(basename($aula_file, ".json")) . '¢ro=' . urlencode($centro_id) . '" class="button">Gestionar</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-body">
|
||||
<h2>Aularios</h2>
|
||||
<table class="table table-striped table-hover">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Icono</th>
|
||||
<th>Nombre</th>
|
||||
<th>
|
||||
<a href="/sysadmin/aularios.php?action=new¢ro=<?php echo urlencode($centro_id); ?>" class="btn btn-success">+ Nuevo</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$aulas_filelist = glob("/DATA/entreaulas/Centros/$centro_id/Aularios/*.json");
|
||||
foreach ($aulas_filelist as $aula_file) {
|
||||
$aula_data = json_decode(file_get_contents($aula_file), true);
|
||||
echo '<tr>';
|
||||
echo '<td><img src="' . htmlspecialchars($aula_data['icon'] ?? '/static/logo-entreaulas.png') . '" alt="Icono" style="height: 50px;"></td>';
|
||||
echo '<td>' . htmlspecialchars($aula_data['name'] ?? 'Sin Nombre') . '</td>';
|
||||
echo '<td><a href="/sysadmin/aularios.php?action=edit&aulario=' . urlencode(basename($aula_file, ".json")) . '¢ro=' . urlencode($centro_id) . '" class="btn btn-primary">Gestionar</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card pad">
|
||||
<h2>Actividades del panel</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Foto</th>
|
||||
<th>Nombre</th>
|
||||
<th>
|
||||
<a href="?action=new_activity¢ro=<?php echo urlencode($centro_id); ?>" class="button pseudo" style="background: white; color: black;">+ Nuevo</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$activities = glob("/DATA/entreaulas/Centros/$centro_id/Panel/Actividades/*", GLOB_ONLYDIR);
|
||||
foreach ($activities as $activity_path) {
|
||||
$activity_name = basename($activity_path);
|
||||
$image_path = "/DATA/entreaulas/Centros/$centro_id/Panel/Actividades/" . basename($activity_name) . "/photo.jpg";
|
||||
$image_fetchpath = file_exists($image_path) ? "/entreaulas/_filefetch.php?type=panel_actividades¢ro=" . urlencode($centro_id) . "&activity=" . urlencode(basename($activity_name)) : '/static/logo-entreaulas.png';
|
||||
echo '<tr>';
|
||||
echo '<td><img src="' . htmlspecialchars($image_fetchpath) . '" alt="Foto" style="height: 50px;"></td>';
|
||||
echo '<td>' . htmlspecialchars($activity_name) . '</td>';
|
||||
echo '<td><a href="?action=edit_activity¢ro=' . urlencode($centro_id) . '&activity=' . urlencode($activity_name) . '" class="button">Gestionar</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-body">
|
||||
<h2>Actividades del panel</h2>
|
||||
<table class="table table-striped table-hover">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Foto</th>
|
||||
<th>Nombre</th>
|
||||
<th>
|
||||
<a href="?action=new_activity¢ro=<?php echo urlencode($centro_id); ?>" class="btn btn-success">+ Nuevo</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$activities = glob("/DATA/entreaulas/Centros/$centro_id/Panel/Actividades/*", GLOB_ONLYDIR);
|
||||
foreach ($activities as $activity_path) {
|
||||
$activity_name = basename($activity_path);
|
||||
$image_path = "/DATA/entreaulas/Centros/$centro_id/Panel/Actividades/" . basename($activity_name) . "/photo.jpg";
|
||||
$image_fetchpath = file_exists($image_path) ? "/entreaulas/_filefetch.php?type=panel_actividades¢ro=" . urlencode($centro_id) . "&activity=" . urlencode(basename($activity_name)) : '/static/logo-entreaulas.png';
|
||||
echo '<tr>';
|
||||
echo '<td><img src="' . htmlspecialchars($image_fetchpath) . '" alt="Foto" style="height: 50px;"></td>';
|
||||
echo '<td>' . htmlspecialchars($activity_name) . '</td>';
|
||||
echo '<td><a href="?action=edit_activity¢ro=' . urlencode($centro_id) . '&activity=' . urlencode($activity_name) . '" class="btn btn-primary">Gestionar</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@@ -226,33 +240,35 @@ switch ($_GET["action"]) {
|
||||
default:
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Gestión de Centros</h1>
|
||||
<span>
|
||||
Desde esta sección puedes administrar los centros asociados al sistema.
|
||||
</span>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nombre</th>
|
||||
<th>
|
||||
<a href="?action=new" class="button pseudo" style="background: white; color: black;">+ Nuevo</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$user_data = $_SESSION["auth_data"];
|
||||
$centros_filelist = glob("/DATA/entreaulas/Centros/*");
|
||||
foreach ($centros_filelist as $centro_folder) {
|
||||
$centro_id = basename($centro_folder);
|
||||
echo '<tr>';
|
||||
echo '<td>' . htmlspecialchars($centro_id) . '</td>';
|
||||
echo '<td><a href="?action=edit¢ro=' . urlencode($centro_id) . '" class="button">Gestionar</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Gestión de Centros</h1>
|
||||
<span>
|
||||
Desde esta sección puedes administrar los centros asociados al sistema.
|
||||
</span>
|
||||
<table class="table table-striped table-hover">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Nombre</th>
|
||||
<th>
|
||||
<a href="?action=new" class="btn btn-success">+ Nuevo</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$user_data = $_SESSION["auth_data"];
|
||||
$centros_filelist = glob("/DATA/entreaulas/Centros/*");
|
||||
foreach ($centros_filelist as $centro_folder) {
|
||||
$centro_id = basename($centro_folder);
|
||||
echo '<tr>';
|
||||
echo '<td>' . htmlspecialchars($centro_id) . '</td>';
|
||||
echo '<td><a href="?action=edit¢ro=' . urlencode($centro_id) . '" class="btn btn-primary">Gestionar</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
|
||||
@@ -42,7 +42,7 @@ switch ($_GET["action"]) {
|
||||
</span>
|
||||
<form method="get" action="">
|
||||
<input type="hidden" name="action" value="generate_thumbs">
|
||||
<button type="submit">Generar Miniaturas</button>
|
||||
<button type="submit" class="btn btn-primary">Generar Miniaturas</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
@@ -9,19 +9,19 @@ require_once "_incl/pre-body.php"; ?>
|
||||
<div class="card grid-item">
|
||||
<img src="/static/logo-entreaulas.png" alt="Logo EntreAulas">
|
||||
<b>EntreAulas</b>
|
||||
<a href="/sysadmin/centros.php" class="button">Gestionar Centros</a>
|
||||
<a href="/sysadmin/aularios.php" class="button">Gestionar Aularios</a>
|
||||
<a href="/sysadmin/centros.php" class="btn btn-primary">Gestionar Centros</a>
|
||||
<a href="/sysadmin/aularios.php" class="btn btn-primary">Gestionar Aularios</a>
|
||||
</div>
|
||||
<div class="card grid-item">
|
||||
<img src="/static/logo-account.png" alt="Logo Mi Cuenta">
|
||||
<b>Mi Cuenta</b>
|
||||
<a href="/sysadmin/users.php" class="button">Gestionar Usuarios</a>
|
||||
<a href="/sysadmin/invitations.php" class="button">Gestionar Invitaciones</a>
|
||||
<a href="/sysadmin/users.php" class="btn btn-primary">Gestionar Usuarios</a>
|
||||
<a href="/sysadmin/invitations.php" class="btn btn-primary">Gestionar Invitaciones</a>
|
||||
</div>
|
||||
<div class="card grid-item">
|
||||
<img src="/static/logo-club.png" alt="Logo Club">
|
||||
<b>La web del Club</b>
|
||||
<a href="/sysadmin/club_mkthumb.php" class="button">Generar Miniaturas</a>
|
||||
<a href="/sysadmin/club_mkthumb.php" class="btn btn-primary">Generar Miniaturas</a>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
|
||||
@@ -37,22 +37,27 @@ switch ($_GET['action']) {
|
||||
case "new":
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Nueva invitación de usuario</h1>
|
||||
<form method="post" action="?form=create">
|
||||
<fieldset class="card pad" style="border: 2px solid black; border-radius: 6.5px; max-width: 500px;">
|
||||
<label>
|
||||
<b>Código de invitación:</b>
|
||||
<input type="text" name="invitation_code" required />
|
||||
<small>Formato: 123456-ABCDEF</small>
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" name="single_use" />
|
||||
<span class="checkable">Uso único</span>
|
||||
</label>
|
||||
<button type="submit">Crear invitación</button>
|
||||
<br><br>
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Nueva invitación de usuario</h1>
|
||||
<form method="post" action="?form=create">
|
||||
<div class="card pad" style="max-width: 500px;">
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label for="invitation_code" class="form-label"><b>Código de invitación:</b></label>
|
||||
<input type="text" id="invitation_code" name="invitation_code" class="form-control" required />
|
||||
<small>Formato: 123456-ABCDEF</small>
|
||||
</div>
|
||||
<div class="form-check mb-3">
|
||||
<input class="form-check-input" type="checkbox" name="single_use" id="single_use">
|
||||
<label class="form-check-label" for="single_use">
|
||||
Uso único
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Crear invitación</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
@@ -60,32 +65,34 @@ switch ($_GET['action']) {
|
||||
case "index":
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Invitaciones de usuarios</h1>
|
||||
<span>Desde aquí puedes gestionar las invitaciones de usuarios.</span>
|
||||
<table>
|
||||
<thead>
|
||||
<th>Codigo de invitación</th>
|
||||
<th>
|
||||
<a href="?action=new" class="button pseudo" style="background: white; color: black;">+ Nuevo</a>
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$invitations = json_decode(file_get_contents("/DATA/Invitaciones_de_usuarios.json"), true);
|
||||
foreach ($invitations as $inv_key => $inv_data) {
|
||||
echo "<tr>";
|
||||
echo "<td>" . htmlspecialchars($inv_key) . "</td>";
|
||||
echo "<td>";
|
||||
echo '<form method="post" action="?form=delete" style="display:inline;">';
|
||||
echo '<input type="hidden" name="invitation_code" value="' . htmlspecialchars($inv_key) . '"/>';
|
||||
echo '<button type="submit" class="button danger" onclick="return confirm(\'¿Estás seguro de que deseas eliminar esta invitación?\');">Eliminar</button>';
|
||||
echo '</form>';
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-body">
|
||||
<h1>Invitaciones de usuarios</h1>
|
||||
<span>Desde aquí puedes gestionar las invitaciones de usuarios.</span>
|
||||
<table class="table table-striped table-hover">
|
||||
<thead class="table-dark">
|
||||
<th>Codigo de invitación</th>
|
||||
<th>
|
||||
<a href="?action=new" class="btn btn-success">+ Nuevo</a>
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$invitations = json_decode(file_get_contents("/DATA/Invitaciones_de_usuarios.json"), true);
|
||||
foreach ($invitations as $inv_key => $inv_data) {
|
||||
echo "<tr>";
|
||||
echo "<td>" . htmlspecialchars($inv_key) . "</td>";
|
||||
echo "<td>";
|
||||
echo '<form method="post" action="?form=delete" style="display:inline;">';
|
||||
echo '<input type="hidden" name="invitation_code" value="' . htmlspecialchars($inv_key) . '"/>';
|
||||
echo '<button type="submit" class="btn btn-danger" onclick="return confirm(\'¿Estás seguro de que deseas eliminar esta invitación?\');">Eliminar</button>';
|
||||
echo '</form>';
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
|
||||
@@ -32,35 +32,59 @@ switch ($_GET['action'] ?? '') {
|
||||
?>
|
||||
<form method="post" action="?form=save_edit">
|
||||
<div class="card pad">
|
||||
<h1>Agregar Nuevo Usuario</h1>
|
||||
<label>
|
||||
Nombre de usuario:<br>
|
||||
<input type="text" name="username" required>
|
||||
</label><br><br>
|
||||
<label>
|
||||
Nombre para mostrar:<br>
|
||||
<input type="text" name="display_name" required>
|
||||
</label><br><br>
|
||||
<label>
|
||||
Correo electrónico:<br>
|
||||
<input type="email" name="email" required>
|
||||
</label><br><br>
|
||||
<b>Permisos:</b>
|
||||
<details open>
|
||||
<summary>Administración del sistema</summary>
|
||||
<label style="padding: 5px; border: 1.5px solid #000; display: inline-block; margin-bottom: 5px; border-radius: 5px;">
|
||||
<input type="checkbox" name="permissions[]" value="sysadmin:access">
|
||||
<span class="checkable">Acceso</span>
|
||||
</label>
|
||||
</details>
|
||||
<details open>
|
||||
<summary>EntreAulas</summary>
|
||||
<label style="padding: 5px; border: 1.5px solid #000; display: inline-block; margin-bottom: 5px; border-radius: 5px;">
|
||||
<input type="checkbox" name="permissions[]" value="entreaulas:access">
|
||||
<span class="checkable">Acceso</span>
|
||||
</label>
|
||||
</details>
|
||||
<button type="submit">Crear Usuario</button>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title">Agregar Nuevo Usuario</h1>
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Nombre de usuario:</label>
|
||||
<input type="text" id="username" name="username" class="form-control" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="display_name" class="form-label">Nombre para mostrar:</label>
|
||||
<input type="text" id="display_name" name="display_name" class="form-control" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">Correo electrónico:</label>
|
||||
<input type="email" id="email" name="email" class="form-control" required>
|
||||
</div>
|
||||
<b>Permisos:</b>
|
||||
<div class="accordion mt-3" id="permissionsAccordion">
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="headingSysadmin">
|
||||
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseSysadmin" aria-expanded="true" aria-controls="collapseSysadmin">
|
||||
Administración del sistema
|
||||
</button>
|
||||
</h2>
|
||||
<div id="collapseSysadmin" class="accordion-collapse collapse show" aria-labelledby="headingSysadmin" data-bs-parent="#permissionsAccordion">
|
||||
<div class="accordion-body">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="permissions[]" value="sysadmin:access" id="sysadmin-access">
|
||||
<label class="form-check-label" for="sysadmin-access">
|
||||
Acceso
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="headingEntreaulas">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseEntreaulas" aria-expanded="false" aria-controls="collapseEntreaulas">
|
||||
EntreAulas
|
||||
</button>
|
||||
</h2>
|
||||
<div id="collapseEntreaulas" class="accordion-collapse collapse" aria-labelledby="headingEntreaulas" data-bs-parent="#permissionsAccordion">
|
||||
<div class="accordion-body">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="permissions[]" value="entreaulas:access" id="entreaulas-access">
|
||||
<label class="form-check-label" for="entreaulas-access">
|
||||
Acceso
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary mt-3">Crear Usuario</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
@@ -73,80 +97,108 @@ switch ($_GET['action'] ?? '') {
|
||||
?>
|
||||
<form method="post" action="?form=save_edit">
|
||||
<div class="card pad">
|
||||
<h1>Editar Usuario: <?php echo htmlspecialchars($username); ?></h1>
|
||||
<label>
|
||||
Nombre para mostrar:<br>
|
||||
<input type="text" name="display_name" value="<?php echo htmlspecialchars($userdata['display_name'] ?? ''); ?>" required>
|
||||
</label><br><br>
|
||||
<label>
|
||||
Correo electrónico:<br>
|
||||
<input type="email" name="email" value="<?php echo htmlspecialchars($userdata['email'] ?? ''); ?>" required>
|
||||
</label><br><br>
|
||||
<b>Permisos:</b>
|
||||
<details open>
|
||||
<summary>Administración del sistema</summary>
|
||||
<label style="padding: 5px; border: 1.5px solid #000; display: inline-block; margin-bottom: 5px; border-radius: 5px;">
|
||||
<input type="checkbox" name="permissions[]" value="sysadmin:access" <?php if (in_array('sysadmin:access', $userdata['permissions'] ?? [])) echo 'checked'; ?>>
|
||||
<span class="checkable">Acceso</span>
|
||||
</label>
|
||||
</details>
|
||||
<details open>
|
||||
<summary>EntreAulas</summary>
|
||||
<label style="padding: 5px; border: 1.5px solid #000; display: inline-block; margin-bottom: 5px; border-radius: 5px;">
|
||||
<input type="checkbox" name="permissions[]" value="entreaulas:access" <?php if (in_array('entreaulas:access', $userdata['permissions'] ?? [])) echo 'checked'; ?>>
|
||||
<span class="checkable">Acceso</span>
|
||||
</label>
|
||||
</details>
|
||||
<input type="hidden" name="username" value="<?php echo htmlspecialchars($username); ?>">
|
||||
<button type="submit">Guardar Cambios</button>
|
||||
<div class="card-body">
|
||||
<h1>Editar Usuario: <?php echo htmlspecialchars($username); ?></h1>
|
||||
<div class="mb-3">
|
||||
<label for="display_name" class="form-label">Nombre para mostrar:</label>
|
||||
<input type="text" id="display_name" name="display_name" value="<?php echo htmlspecialchars($userdata['display_name'] ?? ''); ?>" class="form-control" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">Correo electrónico:</label>
|
||||
<input type="email" id="email" name="email" value="<?php echo htmlspecialchars($userdata['email'] ?? ''); ?>" class="form-control" required>
|
||||
</div>
|
||||
<b>Permisos:</b>
|
||||
<div class="accordion mt-3" id="permissionsAccordion">
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="headingSysadmin">
|
||||
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseSysadmin" aria-expanded="true" aria-controls="collapseSysadmin">
|
||||
Administración del sistema
|
||||
</button>
|
||||
</h2>
|
||||
<div id="collapseSysadmin" class="accordion-collapse collapse show" aria-labelledby="headingSysadmin" data-bs-parent="#permissionsAccordion">
|
||||
<div class="accordion-body">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="permissions[]" value="sysadmin:access" id="sysadmin-access" <?php if (in_array('sysadmin:access', $userdata['permissions'] ?? [])) echo 'checked'; ?>>
|
||||
<label class="form-check-label" for="sysadmin-access">
|
||||
Acceso
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="headingEntreaulas">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseEntreaulas" aria-expanded="false" aria-controls="collapseEntreaulas">
|
||||
EntreAulas
|
||||
</button>
|
||||
</h2>
|
||||
<div id="collapseEntreaulas" class="accordion-collapse collapse" aria-labelledby="headingEntreaulas" data-bs-parent="#permissionsAccordion">
|
||||
<div class="accordion-body">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="permissions[]" value="entreaulas:access" id="entreaulas-access" <?php if (in_array('entreaulas:access', $userdata['permissions'] ?? [])) echo 'checked'; ?>>
|
||||
<label class="form-check-label" for="entreaulas-access">
|
||||
Acceso
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="username" value="<?php echo htmlspecialchars($username); ?>">
|
||||
<button type="submit" class="btn btn-primary mt-3">Guardar Cambios</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card pad">
|
||||
<h2>EntreAulas: Configuración</h2>
|
||||
<label>
|
||||
Centro asociado:<br>
|
||||
<select name="centro" required>
|
||||
<option value="" <?php if (empty($userdata["entreaulas"]['centro'] ?? '')) echo 'selected'; ?>>-- Selecciona un centro --</option>
|
||||
<?php
|
||||
$centros_folders = glob("/DATA/entreaulas/Centros/*", GLOB_ONLYDIR);
|
||||
foreach ($centros_folders as $centro_folder) {
|
||||
$centro_id = basename($centro_folder);
|
||||
echo '<option value="' . htmlspecialchars($centro_id) . '"';
|
||||
if (($userdata["entreaulas"]['centro'] ?? '') === $centro_id) {
|
||||
echo ' selected';
|
||||
<div class="card-body">
|
||||
<h2>EntreAulas: Configuración</h2>
|
||||
<div class="mb-3">
|
||||
<label for="centro" class="form-label">Centro asociado:</label>
|
||||
<select id="centro" name="centro" class="form-select" required>
|
||||
<option value="" <?php if (empty($userdata["entreaulas"]['centro'] ?? '')) echo 'selected'; ?>>-- Selecciona un centro --</option>
|
||||
<?php
|
||||
$centros_folders = glob("/DATA/entreaulas/Centros/*", GLOB_ONLYDIR);
|
||||
foreach ($centros_folders as $centro_folder) {
|
||||
$centro_id = basename($centro_folder);
|
||||
echo '<option value="' . htmlspecialchars($centro_id) . '"';
|
||||
if (($userdata["entreaulas"]['centro'] ?? '') === $centro_id) {
|
||||
echo ' selected';
|
||||
}
|
||||
echo '>' . htmlspecialchars($centro_id) . '</option>';
|
||||
}
|
||||
echo '>' . htmlspecialchars($centro_id) . '</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="role" class="form-label">Rol en EntreAulas:</label>
|
||||
<select id="role" name="role" class="form-select" required>
|
||||
<option value="" <?php if (empty($userdata["entreaulas"]['role'] ?? '')) echo 'selected'; ?>>-- Selecciona un rol --</option>
|
||||
<option value="teacher" <?php if (($userdata["entreaulas"]['role'] ?? '') === 'teacher') echo 'selected'; ?>>Profesor</option>
|
||||
<option value="student" <?php if (($userdata["entreaulas"]['role'] ?? '') === 'student') echo 'selected'; ?>>Estudiante</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Aulas asignadas: <small>(Guarda primero para actualizar la lista)</small></label><br>
|
||||
<?php
|
||||
$aulas_filelist = glob("/DATA/entreaulas/Centros/" . ($userdata["entreaulas"]['centro'] ?? '') . "/Aularios/*.json");
|
||||
foreach ($aulas_filelist as $aula_file) {
|
||||
$aula_data = json_decode(file_get_contents($aula_file), true);
|
||||
$aula_id = basename($aula_file, ".json");
|
||||
$is_assigned = in_array($aula_id, $userdata["entreaulas"]['aulas'] ?? []);
|
||||
echo '<div class="form-check form-check-inline">';
|
||||
echo '<input class="form-check-input" type="checkbox" name="aulas[]" value="' . htmlspecialchars($aula_id) . '" id="aula-' . htmlspecialchars($aula_id) . '" ' . ($is_assigned ? 'checked' : '') . '>';
|
||||
echo '<label class="form-check-label" for="aula-' . htmlspecialchars($aula_id) . '">' . htmlspecialchars($aula_data['name'] ?? $aula_id) . '</label>';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</label>
|
||||
<br><br>
|
||||
<label>
|
||||
Rol en EntreAulas:<br>
|
||||
<select name="role" required>
|
||||
<option value="" <?php if (empty($userdata["entreaulas"]['role'] ?? '')) echo 'selected'; ?>>-- Selecciona un rol --</option>
|
||||
<option value="teacher" <?php if (($userdata["entreaulas"]['role'] ?? '') === 'teacher') echo 'selected'; ?>>Profesor</option>
|
||||
<option value="student" <?php if (($userdata["entreaulas"]['role'] ?? '') === 'student') echo 'selected'; ?>>Estudiante</option>
|
||||
</select>
|
||||
</label>
|
||||
<br><br>
|
||||
<span>Aulas asignadas: <small>(Guarda primero para actualizar la lista)</small></span><br>
|
||||
<?php
|
||||
$aulas_filelist = glob("/DATA/entreaulas/Centros/" . ($userdata["entreaulas"]['centro'] ?? '') . "/Aularios/*.json");
|
||||
foreach ($aulas_filelist as $aula_file) {
|
||||
$aula_data = json_decode(file_get_contents($aula_file), true);
|
||||
$aula_id = basename($aula_file, ".json");
|
||||
$is_assigned = in_array($aula_id, $userdata["entreaulas"]['aulas'] ?? []);
|
||||
echo '<label style="padding: 5px; border: 1.5px solid #000; display: inline-block; margin-bottom: 5px; border-radius: 5px;">';
|
||||
echo '<input type="checkbox" name="aulas[]" value="' . htmlspecialchars($aula_id) . '" ' . ($is_assigned ? 'checked' : '') . '>';
|
||||
echo '<span class="checkable">' . htmlspecialchars($aula_data['name'] ?? $aula_id) . '</span>';
|
||||
echo '</label> ';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card pad">
|
||||
<h2>Cambiar contraseña</h2>
|
||||
<p>Para cambiar la contraseña de este usuario, utiliza la herramienta de restablecimiento de contraseñas disponible en el siguiente enlace:</p>
|
||||
<a href="/sysadmin/reset_password.php?user=<?php echo urlencode($username); ?>" class="button">Restablecer Contraseña</a>
|
||||
<div class="card-body">
|
||||
<h2>Cambiar contraseña</h2>
|
||||
<p>Para cambiar la contraseña de este usuario, utiliza la herramienta de restablecimiento de contraseñas disponible en el siguiente enlace:</p>
|
||||
<a href="/sysadmin/reset_password.php?user=<?php echo urlencode($username); ?>" class="btn btn-secondary">Restablecer Contraseña</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
@@ -157,39 +209,41 @@ switch ($_GET['action'] ?? '') {
|
||||
require_once "_incl/pre-body.php";
|
||||
?>
|
||||
<div class="card pad">
|
||||
<h1>Gestión de Usuarios</h1>
|
||||
<p>Desde esta sección puedes gestionar los usuarios del sistema. Puedes agregar, editar o eliminar usuarios según sea necesario.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Usuario</th>
|
||||
<th>Nombre</th>
|
||||
<th>Correo</th>
|
||||
<th>
|
||||
<a href="?action=add" class="button pseudo" style="background: white; color: black;">+ Nuevo</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$users_filelist = glob("/DATA/Usuarios/*.json");
|
||||
foreach ($users_filelist as $user_file) {
|
||||
$userdata = json_decode(file_get_contents($user_file), true);
|
||||
// Username is the filename without path and extension
|
||||
$username = basename($user_file, ".json");
|
||||
echo "<tr>";
|
||||
echo "<td>" . htmlspecialchars($username) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($userdata['display_name'] ?? 'N/A') . "</td>";
|
||||
echo "<td>" . htmlspecialchars($userdata['email'] ?? 'N/A') . "</td>";
|
||||
echo "<td>";
|
||||
echo '<a href="?action=edit&user=' . urlencode($username) . '" class="button">Editar</a> ';
|
||||
echo '<a href="?action=delete&user=' . urlencode($username) . '" class="button danger">Eliminar</a>';
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-body">
|
||||
<h1>Gestión de Usuarios</h1>
|
||||
<p>Desde esta sección puedes gestionar los usuarios del sistema. Puedes agregar, editar o eliminar usuarios según sea necesario.</p>
|
||||
<table class="table table-striped table-hover">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Usuario</th>
|
||||
<th>Nombre</th>
|
||||
<th>Correo</th>
|
||||
<th>
|
||||
<a href="?action=add" class="btn btn-success">+ Nuevo</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$users_filelist = glob("/DATA/Usuarios/*.json");
|
||||
foreach ($users_filelist as $user_file) {
|
||||
$userdata = json_decode(file_get_contents($user_file), true);
|
||||
// Username is the filename without path and extension
|
||||
$username = basename($user_file, ".json");
|
||||
echo "<tr>";
|
||||
echo "<td>" . htmlspecialchars($username) . "</td>";
|
||||
echo "<td>" . htmlspecialchars($userdata['display_name'] ?? 'N/A') . "</td>";
|
||||
echo "<td>" . htmlspecialchars($userdata['email'] ?? 'N/A') . "</td>";
|
||||
echo "<td>";
|
||||
echo '<a href="?action=edit&user=' . urlencode($username) . '" class="btn btn-primary">Editar</a> ';
|
||||
echo '<a href="?action=delete&user=' . urlencode($username) . '" class="btn btn-danger">Eliminar</a>';
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
require_once "_incl/post-body.php";
|
||||
|
||||
Reference in New Issue
Block a user