This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask, render_template, request | |
| import yt_dlp | |
| app = Flask(__name__) | |
| @app.route('/', methods=['GET', 'POST']) | |
| def index(): | |
| if request.method == 'POST': | |
| # Obtener la URL del formulario | |
| url = request.form['url'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id": 1, | |
| "asunto": "Problema con impresora", | |
| "descripcion": "La impresora del segundo piso no responde.", | |
| "estado": "Abierto", | |
| "fecha_creacion": "2025-07-09T12:00:00", | |
| "fecha_cierre": "2025-07-10T13:00:00", | |
| "usuario": { | |
| "id": 101, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id": 1, | |
| "asunto": "Problema con impresora", | |
| "descripcion": "La impresora del segundo piso no responde.", | |
| "estado": "Abierto", | |
| "fecha_creacion": "2025-07-09T12:00:00", | |
| "fecha_cierre": "2025-07-10T13:00:00", | |
| "usuario": { | |
| "id": 101, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id": 1, | |
| "titulo": "Casa de 2 pisos en San Isidro", | |
| "descripcion": "Beatae odio ex quos nihil labore. Aliquam maiores fugiat eum tenetur.", | |
| "precio": 262225.71, | |
| "moneda": "USD", | |
| "metros_cuadrados": 212, | |
| "habitaciones": 5, | |
| "banos": 3, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id": 1, | |
| "titulo": "Casa de 2 pisos en San Isidro", | |
| "descripcion": "Beatae odio ex quos nihil labore. Aliquam maiores fugiat eum tenetur.", | |
| "precio": 262225.71, | |
| "moneda": "USD", | |
| "metros_cuadrados": 212, | |
| "habitaciones": 5, | |
| "banos": 3, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Illuminate\Support\Facades\Log; | |
| public function store(Request $request) | |
| { | |
| try { | |
| Log::debug('馃攳 Iniciando validaci贸n de ticket.'); | |
| $validated = $request->validate([ | |
| 'subject' => 'required|string|max:255', | |
| 'description' => 'required|string', | |
| 'category_id' => 'required|exists:categories,id', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once("../../config/conexion.php"); | |
| // Iniciar la sesi贸n | |
| if (session_status() !== PHP_SESSION_ACTIVE) { | |
| session_start(); | |
| } | |
| // Si hay una sesi贸n activa, redirigir al Home | |
| if (isset($_SESSION["usu_id"])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Metodo del Modelo, se necesitan 3 parametros para la busqueda y la paginacion desde donde inicia y termina, mas abajo te dejo la vista. | |
| public function get_preguntas_paginadas_con_busqueda($start, $perPage, $search){ | |
| $conectar = parent::conexion(); | |
| parent::set_names(); | |
| /* TODO:Dividir la cadena de busqueda en palabras individuales */ | |
| $keywords = explode(" ", $search); | |
| $searchConditions = []; | |
| foreach ($keywords as $keyword){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Datos de conexi贸n a la base de datos | |
| $host = 'localhost'; | |
| $db = 'nombre_de_tu_base_de_datos'; | |
| $user = 'tu_usuario'; | |
| $pass = 'tu_contrase帽a'; | |
| // Conexi贸n a la base de datos | |
| $dsn = "mysql:host=$host;dbname=$db;charset=utf8"; | |
| $pdo = new PDO($dsn, $user, $pass); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| const TOKEN_ANDERCODE = "ANDERCODEPHPAPIMETA2"; | |
| const WEBHOOK_URL = "https://anderson-bastidas.com/webhook.php"; | |
| function recibirMensajes($req, $res) { | |
| try { | |
| $entry = $req['entry'][0]; | |
| $changes = $entry['changes'][0]; |
NewerOlder