diff --git a/.gitea/workflows/deploy-dev.yml b/.gitea/workflows/deploy-dev.yml
new file mode 100644
index 0000000..e07b9ba
--- /dev/null
+++ b/.gitea/workflows/deploy-dev.yml
@@ -0,0 +1,75 @@
+name: Déploiement DEV
+
+on:
+ push:
+ branches:
+ - develop
+
+ workflow_dispatch:
+
+jobs:
+ deploy:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Récupérer le dépôt
+ uses: https://github.com/actions/checkout@v4
+
+ - name: Installer les outils
+ run: |
+ apt-get update
+ apt-get install -y rsync openssh-client
+
+ - name: Configurer SSH Synology
+ env:
+ SSH_PRIVATE_KEY: ${{ secrets.NAS_SSH_KEY }}
+ NAS_HOST: ${{ vars.NAS_HOST }}
+ NAS_PORT: ${{ vars.NAS_PORT }}
+ run: |
+ mkdir -p ~/.ssh
+ printf '%s\n' "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
+ chmod 600 ~/.ssh/id_ed25519
+
+ ssh-keyscan \
+ -p "$NAS_PORT" \
+ "$NAS_HOST" \
+ >> ~/.ssh/known_hosts
+
+ chmod 600 ~/.ssh/known_hosts
+
+ - name: Vérifier la destination DEV
+ env:
+ NAS_HOST: ${{ vars.NAS_HOST }}
+ NAS_PORT: ${{ vars.NAS_PORT }}
+ NAS_USER: ${{ vars.NAS_USER }}
+ NAS_PATH: ${{ vars.NAS_PATH }}
+ run: |
+ ssh \
+ -p "$NAS_PORT" \
+ -i ~/.ssh/id_ed25519 \
+ -o IdentitiesOnly=yes \
+ "$NAS_USER@$NAS_HOST" \
+ "test -d '$NAS_PATH' && test -w '$NAS_PATH'"
+
+ - name: Déployer sur le Synology
+ env:
+ NAS_HOST: ${{ vars.NAS_HOST }}
+ NAS_PORT: ${{ vars.NAS_PORT }}
+ NAS_USER: ${{ vars.NAS_USER }}
+ NAS_PATH: ${{ vars.NAS_PATH }}
+ run: |
+ rsync -rz \
+ --no-perms \
+ --no-owner \
+ --no-group \
+ --omit-dir-times \
+ --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r \
+ --exclude=".git/" \
+ --exclude=".gitea/" \
+ --exclude=".env" \
+ --exclude="uploads/" \
+ --exclude="logs/" \
+ --exclude="storage/" \
+ -e "ssh -p $NAS_PORT -i ~/.ssh/id_ed25519 -o IdentitiesOnly=yes" \
+ ./ \
+ "$NAS_USER@$NAS_HOST:$NAS_PATH/"
\ No newline at end of file
diff --git a/.gitea/workflows/deploy-prod.yml b/.gitea/workflows/deploy-prod.yml
new file mode 100644
index 0000000..2ae01bd
--- /dev/null
+++ b/.gitea/workflows/deploy-prod.yml
@@ -0,0 +1,75 @@
+name: Déploiement PROD
+
+on:
+ push:
+ branches:
+ - main
+
+ workflow_dispatch:
+
+jobs:
+ deploy:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Récupérer le dépôt
+ uses: https://github.com/actions/checkout@v4
+
+ - name: Installer les outils
+ run: |
+ apt-get update
+ apt-get install -y rsync openssh-client
+
+ - name: Configurer SSH VPS
+ env:
+ SSH_PRIVATE_KEY: ${{ secrets.VPS_SSH_KEY }}
+ VPS_HOST: ${{ vars.VPS_HOST }}
+ VPS_PORT: ${{ vars.VPS_PORT }}
+ run: |
+ mkdir -p ~/.ssh
+ printf '%s\n' "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
+ chmod 600 ~/.ssh/id_ed25519
+
+ ssh-keyscan \
+ -p "$VPS_PORT" \
+ "$VPS_HOST" \
+ >> ~/.ssh/known_hosts
+
+ chmod 600 ~/.ssh/known_hosts
+
+ - name: Vérifier la destination PROD
+ env:
+ VPS_HOST: ${{ vars.VPS_HOST }}
+ VPS_PORT: ${{ vars.VPS_PORT }}
+ VPS_USER: ${{ vars.VPS_USER }}
+ VPS_PATH: ${{ vars.VPS_PATH }}
+ run: |
+ ssh \
+ -p "$VPS_PORT" \
+ -i ~/.ssh/id_ed25519 \
+ -o IdentitiesOnly=yes \
+ "$VPS_USER@$VPS_HOST" \
+ "test -d '$VPS_PATH' && test -w '$VPS_PATH'"
+
+ - name: Déployer sur le VPS
+ env:
+ VPS_HOST: ${{ vars.VPS_HOST }}
+ VPS_PORT: ${{ vars.VPS_PORT }}
+ VPS_USER: ${{ vars.VPS_USER }}
+ VPS_PATH: ${{ vars.VPS_PATH }}
+ run: |
+ rsync -rz \
+ --no-perms \
+ --no-owner \
+ --no-group \
+ --omit-dir-times \
+ --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r \
+ --exclude=".git/" \
+ --exclude=".gitea/" \
+ --exclude=".env" \
+ --exclude="uploads/" \
+ --exclude="logs/" \
+ --exclude="storage/" \
+ -e "ssh -p $VPS_PORT -i ~/.ssh/id_ed25519 -o IdentitiesOnly=yes" \
+ ./ \
+ "$VPS_USER@$VPS_HOST:$VPS_PATH/"
\ No newline at end of file
diff --git a/activite.php b/activite.php
new file mode 100644
index 0000000..dac3dbd
--- /dev/null
+++ b/activite.php
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/actualite.php b/actualite.php
index e567c94..abd755d 100644
--- a/actualite.php
+++ b/actualite.php
@@ -1,10 +1,9 @@
\ No newline at end of file
diff --git a/config/connexion_sql.php b/config/connexion_sql.php
new file mode 100644
index 0000000..99a8a53
--- /dev/null
+++ b/config/connexion_sql.php
@@ -0,0 +1,11 @@
+ "SET NAMES utf8"));
+}
+catch(Exception $e)
+{
+ die('Erreur : '.$e->getMessage());
+}
diff --git a/config/constants.php b/config/constants.php
new file mode 100644
index 0000000..58db4dd
--- /dev/null
+++ b/config/constants.php
@@ -0,0 +1,9 @@
+
+
+
diff --git a/config/functions.php b/config/functions.php
new file mode 100644
index 0000000..78658bc
--- /dev/null
+++ b/config/functions.php
@@ -0,0 +1,68 @@
+
+
Une erreur s\'est produite pendant votre identification!
+Vous devez remplir tous les champs
+Cliquez ici pour revenir à la page de connexion.
+Bienvenue '.$data['pseudo'].',
Vous êtes maintenant connecté!
Cliquez ici pour accéder a votre espace membre!
+Une erreur s\'est produite pendant votre identification!
+Le mot de passe ou le pseudo entré n\'est pas correct.
+Cliquez ici pour revenir à la page de connexion.
+Bienvenue vous êtes maintenant inscrit sur le forum!
+Cliquez ici pour revenir dans votre espace membre
+Cliquez ici pour recommencer
+Votre profil a été modifié avec succès !
+Cliquez ici + pour revenir à ton profil
+' .$avatar_erreur. '' .$avatar_erreur1. '
+' .$avatar_erreur2. '' .$avatar_erreur3. '
+' .$mdp_erreur. '
'; + ?> +Cliquez ici pour recommencer
+