ctrl/cmd+\`]
+
+* Install dependencies
+
+```
+npm install
+```
+
+* Run locally
+
+```
+npm run dev
+```
+
+After that, it will open up a preview of the template in your default browser, watch for changes to source files, and live reload the browser when changes are saved.
+
+#### Production Build
+
+After finishing all the customization, you can create a production build by running this command.
+
+```
+npm run build
+```
+
+Now you get a `theme` folder that has all the changes you have made. you can use this folder as your main theme.
+
+👉🏻 [visit documentation](https://docs.themefisher.com/agen/)
+
+
+## Reporting Issues
+
+We use GitHub Issues as the official bug tracker for the agen Template. Please Search [existing issues](https://github.com/themefisher/agen/issues). It’s possible someone has already reported the same problem.
+If your problem or idea has not been addressed yet, feel free to [open a new issue](https://github.com/themefisher/agen/issues).
+
+
+## Technical Support or Questions (Paid)
+
+If you have questions or need help integrating the product please [contact us](mailto:mehedi@themefisher.com) instead of opening an issue.
+
+
+## License
+
+Copyright (c) 2016 - Present, Designed & Developed by [Themefisher](https://themefisher.com)
+
+**Code License:** Released under the [MIT](https://github.com/themefisher/agen/blob/main/LICENSE) license.
+
+**Image license:** The images are only for demonstration purposes. They have their license, we don't have permission to share those images.
diff --git a/gymWeb/gulpfile.js b/gymWeb/gulpfile.js
new file mode 100644
index 00000000..b7e6b2f7
--- /dev/null
+++ b/gymWeb/gulpfile.js
@@ -0,0 +1,245 @@
+"use strict";
+
+const sass = require("gulp-sass")(require("sass"));
+const gulp = require("gulp");
+const gutil = require("gulp-util");
+const jshint = require("gulp-jshint");
+const sourcemaps = require("gulp-sourcemaps");
+const fileinclude = require("gulp-file-include");
+const autoprefixer = require("gulp-autoprefixer");
+const bs = require("browser-sync").create();
+const rimraf = require("rimraf");
+const gm = require("gulp-gm");
+const comments = require("gulp-header-comment");
+
+var path = {
+ src: {
+ // source paths
+ html: "source/*.html",
+ htminc: "source/partials/**/*",
+ incdir: "source/partials/",
+ plugins: "source/plugins/**/*",
+ js: "source/js/*.js",
+ scss: "source/scss/**/*.scss",
+ images: "source/images/**/*.+(png|jpg|jpeg|gif|svg|webp|ico)",
+ blur: "source/images/**/*.+(jpg|jpeg|webp)",
+ fonts: "source/fonts/**/*.+(eot|ttf|woff|woff2|otf)",
+ static: "source/static/**/*",
+ },
+ build: {
+ // build paths
+ dir: "theme/",
+ },
+};
+
+// HTML
+gulp.task("html", function () {
+ return gulp
+ .src(path.src.html)
+ .pipe(
+ fileinclude({
+ basepath: path.src.incdir,
+ context: {
+ version: "premium",
+ },
+ })
+ )
+ .pipe(
+ comments(`
+ WEBSITE: https://themefisher.com
+ TWITTER: https://twitter.com/themefisher
+ FACEBOOK: https://facebook.com/themefisher
+ GITHUB: https://github.com/themefisher/
+ `)
+ )
+ .pipe(gulp.dest(path.build.dir))
+ .pipe(
+ bs.reload({
+ stream: true,
+ })
+ );
+});
+
+// SCSS
+gulp.task("scss", function () {
+ return gulp
+ .src(path.src.scss)
+ .pipe(sourcemaps.init())
+ .pipe(
+ sass({
+ outputStyle: "expanded",
+ }).on("error", sass.logError)
+ )
+ .pipe(autoprefixer())
+ .pipe(sourcemaps.write("/"))
+ .pipe(
+ comments(`
+ WEBSITE: https://themefisher.com
+ TWITTER: https://twitter.com/themefisher
+ FACEBOOK: https://facebook.com/themefisher
+ GITHUB: https://github.com/themefisher/
+ `)
+ )
+ .pipe(gulp.dest(path.build.dir + "css/"))
+ .pipe(
+ bs.reload({
+ stream: true,
+ })
+ );
+});
+
+gulp.task("scss-files", function () {
+ return gulp.src(path.src.scss).pipe(gulp.dest(path.build.dir + "scss/"));
+});
+
+// Javascript
+gulp.task("js", function () {
+ return gulp
+ .src(path.src.js)
+ .pipe(jshint("./.jshintrc"))
+ .pipe(jshint.reporter("jshint-stylish"))
+ .on("error", gutil.log)
+ .pipe(
+ comments(`
+ WEBSITE: https://themefisher.com
+ TWITTER: https://twitter.com/themefisher
+ FACEBOOK: https://facebook.com/themefisher
+ GITHUB: https://github.com/themefisher/
+ `)
+ )
+ .pipe(gulp.dest(path.build.dir + "js/"))
+ .pipe(
+ bs.reload({
+ stream: true,
+ })
+ );
+});
+
+// Image blur
+gulp.task("images-blur", function () {
+ return gulp
+ .src(path.src.blur)
+ .pipe(
+ gm(function (gmfile) {
+ return gmfile.blur(10, 10);
+ })
+ )
+ .pipe(gulp.dest(path.build.dir + "images/"));
+});
+
+// image build
+gulp.task("images", function () {
+ return gulp
+ .src(path.src.images)
+ .pipe(gulp.dest(path.build.dir + "images/"))
+ .pipe(
+ bs.reload({
+ stream: true,
+ })
+ );
+});
+
+// fonts
+gulp.task("fonts", function () {
+ return gulp
+ .src(path.src.fonts)
+ .pipe(gulp.dest(path.build.dir + "fonts/"))
+ .pipe(
+ bs.reload({
+ stream: true,
+ })
+ );
+});
+
+// Plugins
+gulp.task("plugins", function () {
+ return gulp
+ .src(path.src.plugins)
+ .pipe(gulp.dest(path.build.dir + "plugins/"))
+ .pipe(
+ bs.reload({
+ stream: true,
+ })
+ );
+});
+
+// static files
+gulp.task("static", function () {
+ return gulp.src(path.src.static).pipe(gulp.dest(path.build.dir));
+});
+
+// Clean Theme Folder
+gulp.task("clean", function (cb) {
+ rimraf("./theme", cb);
+});
+
+// Watch Task
+gulp.task("watch", function () {
+ gulp.watch(path.src.html, gulp.series("html"));
+ gulp.watch(path.src.htminc, gulp.series("html"));
+ gulp.watch(path.src.scss, gulp.series("scss"));
+ gulp.watch(path.src.js, gulp.series("js"));
+ gulp.watch(path.src.images, gulp.series("images"));
+ gulp.watch(path.src.fonts, gulp.series("fonts"));
+ gulp.watch(path.src.plugins, gulp.series("plugins"));
+});
+
+// dev Task
+gulp.task(
+ "default",
+ gulp.series(
+ "clean",
+ "html",
+ "js",
+ "scss",
+ "images",
+ "fonts",
+ "plugins",
+ "static",
+ gulp.parallel("watch", function () {
+ bs.init({
+ server: {
+ baseDir: path.build.dir,
+ },
+ });
+ })
+ )
+);
+
+// Build Task
+gulp.task(
+ "build",
+ gulp.series(
+ "clean",
+ "html",
+ "js",
+ "scss",
+ "images",
+ "fonts",
+ "plugins",
+ "static"
+ )
+);
+
+// Build Download Files Task
+gulp.task(
+ "download",
+ gulp.series(
+ "clean",
+ "html",
+ "js",
+ "scss",
+ "scss-files",
+ "images",
+ "images-blur",
+ "fonts",
+ "plugins",
+ "static"
+ )
+);
+
+// Deploy Task
+gulp.task(
+ "deploy",
+ gulp.series("html", "js", "scss", "images", "fonts", "plugins", "static")
+);
diff --git a/gymWeb/index.php b/gymWeb/index.php
new file mode 100644
index 00000000..5a4f2ff0
--- /dev/null
+++ b/gymWeb/index.php
@@ -0,0 +1,3 @@
+prepare($consulta);
+
+ //2. Validamos los datos
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+
+ //bindear los parametros
+ $stmt->bind_param("sii", $comentario, $id_noticia, $id_usuario);
+
+ //3. Insertamos los datos en la base de datos
+ $stmt->execute();
+ //4.Cerrar la conexion
+
+ $stmt->close();
+
+ }
+}
+
+//Editar comentario siempre y cuando sea el mismo usuario quien lo edita
+
+function editarComentario($id_comentario, $nuevo_comentario) {
+ global $mysqli;
+
+ if (!isset($_SESSION['id_usuario'])) {
+ return false; // usuario no logueado
+ }
+ $id_usuario = $_SESSION['id_usuario'];
+
+ $consulta = 'UPDATE comentarios
+ SET comentario = ?
+ WHERE id = ? AND id_usuario = ?';
+
+ $stmt = $mysqli->prepare($consulta);
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ $stmt->bind_param("sii", $nuevo_comentario, $id_comentario, $id_usuario);
+ $stmt->execute();
+
+ // Sabes si realmente lo ha podido editar
+ $actualizados = $stmt->affected_rows;
+
+ $stmt->close();
+ return $actualizados > 0; // true si era suyo, false si no
+}
+
+//Elliminar comentario (el admin puede eliminar cualquier comentario)
+
+function eliminarComentario($id_comentario) {
+ global $mysqli;
+
+ //Preparamos la consulta
+ $consulta = 'DELETE FROM COMENTARIOS WHERE id_comentario = ?';
+ $stmt = $mysqli->prepare($consulta);
+
+ //2. Validamos los datos
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ //bindear los parametros
+ $stmt->bind_param("i", $id_comentario);
+
+ //3. Ejecutamos la consulta para eliminar el comentario
+ $stmt->execute();
+
+ //4.Cerrar la conexion
+ $stmt->close();
+}
\ No newline at end of file
diff --git a/gymWeb/theme/CRUD/CRUDfaqs.php b/gymWeb/theme/CRUD/CRUDfaqs.php
new file mode 100644
index 00000000..a4b1de8a
--- /dev/null
+++ b/gymWeb/theme/CRUD/CRUDfaqs.php
@@ -0,0 +1,63 @@
+prepare($consulta);
+
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ // 3. Ejecutar
+ $stmt->bind_param("ss", $pregunta, $respuesta);
+ $stmt->execute();
+ $stmt->close();
+ }
+}
+
+function editarFAQ($id_faq, $nueva_pregunta, $nueva_respuesta) {
+ global $mysqli;
+
+ $consulta = 'UPDATE FAQS
+ SET pregunta = ?, respuesta = ?
+ WHERE id = ?';
+
+ $stmt = $mysqli->prepare($consulta);
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ $stmt->bind_param("ssi", $nueva_pregunta, $nueva_respuesta, $id_faq);
+ $stmt->execute();
+ $actualizadas = $stmt->affected_rows;
+ $stmt->close();
+
+ return $actualizadas > 0; // true si se actualizó algo
+}
+
+function eliminarFAQ($id_faq) {
+ global $mysqli;
+
+ $consulta = 'DELETE FROM FAQS WHERE id = ?';
+ $stmt = $mysqli->prepare($consulta);
+
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ $stmt->bind_param("i", $id_faq);
+ $stmt->execute();
+ $stmt->close();
+}
diff --git a/gymWeb/theme/CRUD/CRUDnoticia.php b/gymWeb/theme/CRUD/CRUDnoticia.php
new file mode 100644
index 00000000..c32272f4
--- /dev/null
+++ b/gymWeb/theme/CRUD/CRUDnoticia.php
@@ -0,0 +1,66 @@
+prepare($consulta);
+
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ // 3. Bindeamos parámetros y ejecutamos
+ $stmt->bind_param("sssss", $titulo, $subtitulo, $cuerpo, $fecha_publicacion, $imagen);
+ $stmt->execute();
+ $stmt->close();
+ }
+}
+
+function editarNoticia($id_noticia, $nuevo_titulo, $nuevo_subtitulo, $nuevo_cuerpo, $nueva_fecha, $nueva_imagen) {
+ global $mysqli;
+
+ $consulta = 'UPDATE NOTICIAS
+ SET titulo = ?, subtitulo = ?, cuerpo = ?, fecha_publicacion = ?, imagen = ?
+ WHERE id = ?';
+
+ $stmt = $mysqli->prepare($consulta);
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ $stmt->bind_param("sssssi", $nuevo_titulo, $nuevo_subtitulo, $nuevo_cuerpo, $nueva_fecha, $nueva_imagen, $id_noticia);
+ $stmt->execute();
+ $actualizadas = $stmt->affected_rows;
+ $stmt->close();
+
+ return $actualizadas > 0; // true si se actualizó algo
+}
+
+function eliminarNoticia($id_noticia) {
+ global $mysqli;
+
+ $consulta = 'DELETE FROM NOTICIAS WHERE id = ?';
+ $stmt = $mysqli->prepare($consulta);
+
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ $stmt->bind_param("i", $id_noticia);
+ $stmt->execute();
+ $stmt->close();
+}
+
diff --git a/gymWeb/theme/CRUD/CRUDtestimonios.php b/gymWeb/theme/CRUD/CRUDtestimonios.php
new file mode 100644
index 00000000..7be12323
--- /dev/null
+++ b/gymWeb/theme/CRUD/CRUDtestimonios.php
@@ -0,0 +1,73 @@
+prepare($consulta);
+
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ // 3. Bindeamos parámetros y ejecutamos
+ $stmt->bind_param("sssss", $nombre, $apellido, $testimonio, $imagen, $fecha);
+ $stmt->execute();
+ $stmt->close();
+ }
+}
+
+function editarTestimonio($id_testimonio, $nuevo_nombre, $nuevo_apellido, $nuevo_testimonio, $nueva_imagen, $nueva_fecha) {
+ global $mysqli;
+
+ $consulta = 'UPDATE TESTIMONIOS
+ SET nombre = ?, apellido = ?, testimonio = ?, imagen = ?, fecha = ?
+ WHERE id = ?';
+
+ $stmt = $mysqli->prepare($consulta);
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ $stmt->bind_param("sssssi",
+ $nuevo_nombre,
+ $nuevo_apellido,
+ $nuevo_testimonio,
+ $nueva_imagen,
+ $nueva_fecha,
+ $id_testimonio
+ );
+ $stmt->execute();
+ $actualizadas = $stmt->affected_rows;
+ $stmt->close();
+
+ return $actualizadas > 0; // true si se actualizó algo
+}
+
+function eliminarTestimonio($id_testimonio) {
+ global $mysqli;
+
+ $consulta = 'DELETE FROM TESTIMONIOS WHERE id = ?';
+ $stmt = $mysqli->prepare($consulta);
+
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ $stmt->bind_param("i", $id_testimonio);
+ $stmt->execute();
+ $stmt->close();
+}
diff --git a/gymWeb/theme/CRUD/CRUDtrabajos.php b/gymWeb/theme/CRUD/CRUDtrabajos.php
new file mode 100644
index 00000000..5046e74e
--- /dev/null
+++ b/gymWeb/theme/CRUD/CRUDtrabajos.php
@@ -0,0 +1,71 @@
+prepare($consulta);
+
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ // 3. Bindeamos parámetros y ejecutamos
+ $stmt->bind_param("ssss", $titulo, $descripcion, $imagen, $categoria);
+ $stmt->execute();
+ $stmt->close();
+ }
+}
+
+function editarProyecto($id_proyecto, $nuevo_titulo, $nueva_descripcion, $nueva_imagen, $nueva_categoria) {
+ global $mysqli;
+
+ $consulta = 'UPDATE PORTAFOLIO
+ SET titulo = ?, descripcion = ?, imagen = ?, categoria = ?
+ WHERE id = ?';
+
+ $stmt = $mysqli->prepare($consulta);
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ $stmt->bind_param("ssssi",
+ $nuevo_titulo,
+ $nueva_descripcion,
+ $nueva_imagen,
+ $nueva_categoria,
+ $id_proyecto
+ );
+ $stmt->execute();
+ $actualizadas = $stmt->affected_rows;
+ $stmt->close();
+
+ return $actualizadas > 0; // true si se actualizó algo
+}
+
+function eliminarProyecto($id_proyecto) {
+ global $mysqli;
+
+ $consulta = 'DELETE FROM PORTAFOLIO WHERE id = ?';
+ $stmt = $mysqli->prepare($consulta);
+
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ $stmt->bind_param("i", $id_proyecto);
+ $stmt->execute();
+ $stmt->close();
+}
diff --git a/gymWeb/theme/CRUD/CRUDusuarios.php b/gymWeb/theme/CRUD/CRUDusuarios.php
new file mode 100644
index 00000000..6f24f043
--- /dev/null
+++ b/gymWeb/theme/CRUD/CRUDusuarios.php
@@ -0,0 +1,80 @@
+prepare($consulta);
+
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ // 3. Bindeamos parámetros y ejecutamos
+ $stmt->bind_param("ssss", $nombre, $email, $hash, $rol);
+ $stmt->execute();
+ $stmt->close();
+ }
+}
+
+function editarUsuario($id_usuario, $nuevo_nombre, $nuevo_email, $nuevo_rol, $nueva_password = null) {
+ global $mysqli;
+
+ // Si se pasa nueva contraseña, la actualizamos; si no, solo nombre/email/rol
+ if (!empty($nueva_password)) {
+ $hash = password_hash($nueva_password, PASSWORD_DEFAULT);
+ $consulta = 'UPDATE USUARIOS
+ SET nombre = ?, email = ?, password = ?, rol = ?
+ WHERE id = ?';
+ $stmt = $mysqli->prepare($consulta);
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+ $stmt->bind_param("ssssi", $nuevo_nombre, $nuevo_email, $hash, $nuevo_rol, $id_usuario);
+ } else {
+ $consulta = 'UPDATE USUARIOS
+ SET nombre = ?, email = ?, rol = ?
+ WHERE id = ?';
+ $stmt = $mysqli->prepare($consulta);
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+ $stmt->bind_param("sssi", $nuevo_nombre, $nuevo_email, $nuevo_rol, $id_usuario);
+ }
+
+ $stmt->execute();
+ $actualizadas = $stmt->affected_rows;
+ $stmt->close();
+
+ return $actualizadas > 0; // true si se actualizó algo
+}
+
+function eliminarUsuario($id_usuario) {
+ global $mysqli;
+
+ $consulta = 'DELETE FROM USUARIOS WHERE id = ?';
+ $stmt = $mysqli->prepare($consulta);
+
+ if (!$stmt) {
+ die("Error en prepare: " . $mysqli->error);
+ }
+
+ $stmt->bind_param("i", $id_usuario);
+ $stmt->execute();
+ $stmt->close();
+}
diff --git a/gymWeb/theme/about.php b/gymWeb/theme/about.php
new file mode 100644
index 00000000..5955dc6d
--- /dev/null
+++ b/gymWeb/theme/about.php
@@ -0,0 +1,241 @@
+
+
+
+
+ Profesionales en entrenamiento, nutrición y recuperación dedicados a tus resultados.
+ +
+
+
+
+