prepare("SELECT * FROM recurrent_messages WHERE id = ?"); $stmt->execute([$templateId]); $template = $stmt->fetch(); } catch (Exception $e) { $error = $e->getMessage(); } if (!$template) { echo "Plantilla no encontrada"; exit; } if ($_SERVER['REQUEST_METHOD'] === 'POST') { $name = $_POST['name']; $messageContent = $_POST['message_content']; $telegramCommand = $_POST['telegram_command'] ?? null; $stmt = $pdo->prepare(" UPDATE recurrent_messages SET name = ?, message_content = ?, telegram_command = ?, updated_at = NOW() WHERE id = ? "); $stmt->execute([$name, $messageContent, $telegramCommand, $templateId]); logActivity(getCurrentUserId(), 'update_template', "Plantilla actualizada: $name"); header('Location: recurrentes.php?updated=1'); exit; } require_once __DIR__ . '/templates/header.php'; ?>

Editar Plantilla

Usa HTML básico: <b>, <i>, <u>, <a href>, <img>
Cancelar