Suppression du dossier suivi par erreur et mise à jour du gitignore
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,3 +3,5 @@
|
|||||||
.obsidian/workspace-mobile.json
|
.obsidian/workspace-mobile.json
|
||||||
# Ignorer les fichiers système
|
# Ignorer les fichiers système
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.trash
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
tags:
|
|
||||||
title: Android avec S'informer sur La Tech
|
|
||||||
theme:
|
|
||||||
- "[[Android]]"
|
|
||||||
article_etat:
|
|
||||||
- publié
|
|
||||||
description:
|
|
||||||
auteur: "[[Cédrix]]"
|
|
||||||
date_create: 2026-02-20
|
|
||||||
page_type:
|
|
||||||
- theme_home
|
|
||||||
---
|
|
||||||
![[view-articles.base]]
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
---
|
|
||||||
title: Edito
|
|
||||||
type:
|
|
||||||
category:
|
|
||||||
status:
|
|
||||||
tags: []
|
|
||||||
description:
|
|
||||||
page_type:
|
|
||||||
- article
|
|
||||||
theme:
|
|
||||||
- "[[Edito]]"
|
|
||||||
date_create: 2026-02-20
|
|
||||||
article_etat:
|
|
||||||
- brouillon
|
|
||||||
lastmod: 2026-02-21 12:12
|
|
||||||
date: 2026-02-20 21:38
|
|
||||||
---
|
|
||||||
|
|
||||||
![[view-articles.base]]
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
<div id="contact-area">
|
|
||||||
<div id="step1">
|
|
||||||
<input type="email" id="email" placeholder="Votre email" required><br>
|
|
||||||
<textarea id="message" placeholder="Votre message (10 caractères min.)"></textarea><br>
|
|
||||||
<button onclick="sendCode()">Recevoir un code de validation</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="step2" style="display:none;">
|
|
||||||
<p>Un code a été envoyé à votre adresse. Entrez-le ci-dessous :</p>
|
|
||||||
<input type="text" id="verify_code" placeholder="Code à 6 chiffres">
|
|
||||||
<button onclick="verifyAndSend()">Valider l'envoi définitif</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
let currentToken = "";
|
|
||||||
|
|
||||||
async function sendCode() {
|
|
||||||
const fd = new FormData();
|
|
||||||
fd.append('step', 'send_code');
|
|
||||||
fd.append('email', document.getElementById('email').value);
|
|
||||||
fd.append('message', document.getElementById('message').value);
|
|
||||||
|
|
||||||
const res = await fetch('/contact-verify.php', { method: 'POST', body: fd });
|
|
||||||
const data = await res.json();
|
|
||||||
|
|
||||||
if (data.status === 'success') {
|
|
||||||
currentToken = data.token;
|
|
||||||
document.getElementById('step1').style.display = 'none';
|
|
||||||
document.getElementById('step2').style.display = 'block';
|
|
||||||
} else {
|
|
||||||
alert(data.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function verifyAndSend() {
|
|
||||||
const fd = new FormData();
|
|
||||||
fd.append('step', 'verify_code');
|
|
||||||
fd.append('token', currentToken);
|
|
||||||
fd.append('code', document.getElementById('verify_code').value);
|
|
||||||
|
|
||||||
const res = await fetch('/contact-verify.php', { method: 'POST', body: fd });
|
|
||||||
const data = await res.json();
|
|
||||||
|
|
||||||
alert(data.message);
|
|
||||||
if (data.status === 'success') location.reload();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
- [[Android, où sont stockés les fichiers.md]]
|
|
||||||
- [[publier son jardin numérique.md]]
|
|
||||||
- [[HUGO - Générateur de sites statiques.md]]
|
|
||||||
- [[AnyDesk, Installation et Configuration sous Linux.md]]
|
|
||||||
- [[android_application_yivi.md]]
|
|
||||||
- [[GIT - Corriger un dossier un suivi par erreur.md]]
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
- [[Android, où sont stockés les fichiers.md]]
|
|
||||||
- [[publier son jardin numérique.md]]
|
|
||||||
- [[HUGO - Générateur de sites statiques.md]]
|
|
||||||
- [[AnyDesk, Installation et Configuration sous Linux.md]]
|
|
||||||
- [[android_application_yivi.md]]
|
|
||||||
- [[GIT - Corriger un dossier un suivi par erreur.md]]
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
$log_dir = "/tmp/contact_auth/";
|
|
||||||
if (!is_dir($log_dir)) mkdir($log_dir, 0700);
|
|
||||||
|
|
||||||
header('Content-Type: application/json');
|
|
||||||
|
|
||||||
// --- CONFIGURATION ---
|
|
||||||
$to_admin = "votre-email@abonnel.fr";
|
|
||||||
$from_server = "webmaster@abonnel.fr";
|
|
||||||
|
|
||||||
$step = $_POST['step'] ?? '';
|
|
||||||
|
|
||||||
// --- ACTION 1 : GÉNÉRATION ET ENVOI DU CODE ---
|
|
||||||
if ($step === 'send_code') {
|
|
||||||
$email = filter_var($_POST['email'] ?? '', FILTER_VALIDATE_EMAIL);
|
|
||||||
$message = trim($_POST['message'] ?? '');
|
|
||||||
|
|
||||||
if (!$email || strlen($message) < 10) {
|
|
||||||
echo json_encode(["status" => "error", "message" => "Données invalides."]);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Génération du code
|
|
||||||
$code = rand(100000, 999999);
|
|
||||||
$token = md5($email . time());
|
|
||||||
|
|
||||||
// Stockage temporaire (Valide 1h)
|
|
||||||
$auth_data = [
|
|
||||||
'code' => $code,
|
|
||||||
'email' => $email,
|
|
||||||
'message' => $message,
|
|
||||||
'expires' => time() + 3600
|
|
||||||
];
|
|
||||||
file_put_contents($log_dir . $token, json_encode($auth_data));
|
|
||||||
|
|
||||||
// Envoi du code à l'utilisateur
|
|
||||||
$subject = "Votre code de vérification - abonnel.fr";
|
|
||||||
$body = "Votre code de validation est : $code\nCe code expire dans 1 heure.";
|
|
||||||
|
|
||||||
if (mail($email, $subject, $body, "From: $from_server")) {
|
|
||||||
echo json_encode(["status" => "success", "token" => $token]);
|
|
||||||
} else {
|
|
||||||
echo json_encode(["status" => "error", "message" => "Erreur d'envoi du code."]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- ACTION 2 : VÉRIFICATION ET ENVOI FINAL ---
|
|
||||||
if ($step === 'verify_code') {
|
|
||||||
$token = $_POST['token'] ?? '';
|
|
||||||
$user_code = $_POST['code'] ?? '';
|
|
||||||
$file = $log_dir . $token;
|
|
||||||
|
|
||||||
if (!file_exists($file)) {
|
|
||||||
echo json_encode(["status" => "error", "message" => "Session expirée."]);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$data = json_decode(file_get_contents($file), true);
|
|
||||||
|
|
||||||
if (time() > $data['expires']) {
|
|
||||||
unlink($file);
|
|
||||||
echo json_encode(["status" => "error", "message" => "Code expiré."]);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($user_code == $data['code']) {
|
|
||||||
// Envoi final à VOUS
|
|
||||||
$final_subject = "[Validé] Contact de " . $data['email'];
|
|
||||||
$final_body = "Message de : " . $data['email'] . "\n\n" . $data['message'];
|
|
||||||
|
|
||||||
mail($to_admin, $final_subject, $final_body, "From: $from_server\r\nReply-To: " . $data['email']);
|
|
||||||
|
|
||||||
unlink($file); // Supprime le ticket après succès
|
|
||||||
echo json_encode(["status" => "success", "message" => "Message envoyé avec succès !"]);
|
|
||||||
} else {
|
|
||||||
echo json_encode(["status" => "error", "message" => "Code incorrect."]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
views:
|
|
||||||
- type: cards
|
|
||||||
name: "View : Les thèmes"
|
|
||||||
filters:
|
|
||||||
and:
|
|
||||||
- '!file.hasTag("#draft")'
|
|
||||||
- "!title.isEmpty()"
|
|
||||||
- file.folder.contains("notes")
|
|
||||||
- type == "article"
|
|
||||||
- theme == "android"
|
|
||||||
order:
|
|
||||||
- title
|
|
||||||
- description
|
|
||||||
sort:
|
|
||||||
- property: file.mtime
|
|
||||||
direction: DESC
|
|
||||||
imageAspectRatio: 1
|
|
||||||
cardSize: 800
|
|
||||||
Reference in New Issue
Block a user