Initial clean V5 repository

This commit is contained in:
2026-05-13 09:43:32 -04:00
commit 5842222283
7264 changed files with 1322128 additions and 0 deletions

56
v3/.htaccess Normal file
View File

@ -0,0 +1,56 @@
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php82” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php82___lsphp .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
# Disable directory browsing
Options -Indexes
# ----------------------------------------------------------------------
# Rewrite engine
# ----------------------------------------------------------------------
# Turning on the rewrite engine is necessary for the following rules and features.
# FollowSymLinks must be enabled for this to work.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
# If you installed CodeIgniter in a subfolder, you will need to
# change the following line to match the subfolder you need.
# http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
# RewriteBase /
# Redirect Trailing Slashes...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Rewrite "www.example.com -> example.com"
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to the front controller, index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA]
# Ensure Authorization header is passed along
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
ErrorDocument 404 index.php
</IfModule>
# Disable server signature start
ServerSignature Off
# Disable server signature end

1
v3/_phpinfo.php Normal file
View File

@ -0,0 +1 @@
<?php phpinfo();

12
v3/docs/README.md Normal file
View File

@ -0,0 +1,12 @@
<h1 class="lang-fr">Documentation MS1</h1>
<h1 class="lang-en">MS1 Documentation</h1>
<p class="lang-fr">
Bienvenue dans la documentation centralisée de MS1.
</p>
<p class="lang-en">
Welcome to the centralized MS1 documentation.
</p>

7
v3/docs/_sidebar.md Normal file
View File

@ -0,0 +1,7 @@
- <a href="#/README.md"><span class="lang-fr">Accueil</span><span class="lang-en">Home</span></a>
- <a href="#/api.md">API</a>
- <span class="lang-fr">MS-1 Inscription</span><span class="lang-en">MS-1 Registration</span>
- <a href="#/ms1inscription/rabais.md"><span class="lang-fr">Rabais</span><span class="lang-en">Discounts</span></a>
- <a href="#/ms1inscription/dossard.md"><span class="lang-fr">Dossard</span><span class="lang-en">Bib Number</span></a>

264
v3/docs/api.md Normal file
View File

@ -0,0 +1,264 @@
<h1 class="lang-fr">API MS-1</h1>
<h1 class="lang-en">MS-1 API</h1>
<p class="lang-fr">
LAPI MS-1 permet aux partenaires daccéder aux événements, catégories et inscriptions.
</p>
<p class="lang-en">
The MS-1 API allows partners to access events, categories and registrations.
</p>
---
<h2 class="lang-fr">Authentification</h2>
<h2 class="lang-en">Authentication</h2>
<p class="lang-fr">
Pour accéder à lAPI, vous devez obtenir une clé API auprès de MS-1.
</p>
<p class="lang-en">
To access the API you must obtain an API key from MS-1.
</p>
<p class="lang-fr">
Lors de la création de votre accès, MS-1 vous fournira :
</p>
<p class="lang-en">
When your access is created MS-1 will provide:
</p>
<ul class="lang-fr">
<li>une clé API</li>
<li>lURL de base de lAPI</li>
</ul>
<ul class="lang-en">
<li>an API key</li>
<li>the API base URL</li>
</ul>
<p class="lang-fr">
La clé API doit être envoyée dans lentête HTTP suivant :
</p>
<p class="lang-en">
The API key must be sent in the following HTTP header:
</p>
X-API-Key: YOUR_API_KEY
<p class="lang-fr">
Si la clé est invalide ou absente, lAPI retourne :
</p>
<p class="lang-en">
If the API key is missing or invalid the API returns:
</p>
401 Unauthorized
---
<h2 class="lang-fr">Endpoints</h2>
<h2 class="lang-en">Endpoints</h2>
---
# GET /v1/events
<p class="lang-fr">
Retourne la liste des événements accessibles au promoteur associé à la clé API.
</p>
<p class="lang-en">
Returns the list of events accessible to the promoter associated with the API key.
</p>
<h3 class="lang-fr">Paramètres optionnels</h3>
<h3 class="lang-en">Optional parameters</h3>
| Paramètre | Description |
|-----------|-------------|
| start_date | filtre par date de début |
| end_date | filtre par date de fin |
| updated_since | retourne les événements modifiés après cette date |
<h3 class="lang-fr">Exemple</h3>
<h3 class="lang-en">Example</h3>
GET /v1/events?start_date=2026-01-01&end_date=2026-12-31
<h3 class="lang-fr">Réponse</h3>
<h3 class="lang-en">Response</h3>
{
"events": [
{
"eve_id": 4501,
"eve_nom_fr": "Triathlon Démo",
"eve_lieu_fr": "Montréal",
"eve_lieu_en": "Montreal",
"eve_date_debut": "2026-06-21",
"categories": [
{
"category_id": 801,
"epr_nom_fr": "Sprint",
"epr_nom_en": "Sprint"
}
]
}
],
"total": 1
}
---
# GET /v1/events/{event_id}
<p class="lang-fr">
Retourne les informations détaillées dun événement.
</p>
<p class="lang-en">
Returns detailed information for an event.
</p>
<h3 class="lang-fr">Exemple</h3>
<h3 class="lang-en">Example</h3>
GET /v1/events/4501
<h3 class="lang-fr">Réponse</h3>
<h3 class="lang-en">Response</h3>
{
"event": {
"eve_id": 4501,
"eve_nom_fr": "Triathlon Démo",
"eve_lieu_fr": "Montréal",
"eve_lieu_en": "Montreal",
"eve_date_debut": "2026-06-21",
"categories": [
{
"category_id": 801,
"epr_nom_fr": "Sprint",
"epr_nom_en": "Sprint"
}
]
}
}
---
# GET /v1/events/{event_id}/categories
<p class="lang-fr">
Retourne toutes les catégories dun événement.
</p>
<p class="lang-en">
Returns all categories for an event.
</p>
<h3 class="lang-fr">Exemple</h3>
<h3 class="lang-en">Example</h3>
GET /v1/events/4501/categories
<h3 class="lang-fr">Réponse</h3>
<h3 class="lang-en">Response</h3>
{
"event_id": 4501,
"categories": [
{
"category_id": 801,
"eve_id": 4501,
"epr_type_fr": "Triathlon",
"epr_type_en": "Triathlon",
"epr_nom_fr": "Sprint",
"epr_nom_en": "Sprint"
}
]
}
---
# GET /v1/events/{event_id}/registrations
<p class="lang-fr">
Retourne les inscriptions pour un événement.
</p>
<p class="lang-en">
Returns registrations for an event.
</p>
<h3 class="lang-fr">Paramètres optionnels</h3>
<h3 class="lang-en">Optional parameters</h3>
| Paramètre | Description |
|-----------|-------------|
| updated_since | retourne les inscriptions modifiées après cette date |
| page | pagination |
| per_page | nombre déléments |
<h3 class="lang-fr">Exemple</h3>
<h3 class="lang-en">Example</h3>
GET /v1/events/4501/registrations
<h3 class="lang-fr">Réponse</h3>
<h3 class="lang-en">Response</h3>
{
"registrations": [
{
"registration_id": 98001,
"event_id": 4501,
"first_name": "John",
"last_name": "Doe",
"email": "participant@example.com",
"category_id": 801,
"order_id": "ORD-10001",
"payment_status": "paid",
"custom_questions": [
{
"que_id": 12,
"que_question_fr": "Grandeur de chandail",
"que_question_en": "Tshirt size",
"reponse": "M"
}
]
}
]
}
---
<h2 class="lang-fr">Limitations</h2>
<h2 class="lang-en">Limitations</h2>
<p class="lang-fr">
Chaque clé API donne accès uniquement aux événements associés au promoteur.
</p>
<p class="lang-en">
Each API key only provides access to events associated with the promoter.
</p>
---
<h2 class="lang-fr">Support</h2>
<h2 class="lang-en">Support</h2>
<p class="lang-fr">
Pour toute demande daccès ou question technique, contactez MS-1.
</p>
<p class="lang-en">
For API access or technical questions, contact MS-1.
</p>

View File

@ -0,0 +1,16 @@
# Registrations
GET /v1/events/{event_id}/registrations
Retourne les participants inscrits à un événement.
## Paramètres
| Paramètre | Description |
|-----------|-------------|
| updated_since | Date ISO pour récupérer les modifications |
## Exemple
```http
GET /v1/events/4501/registrations

131
v3/docs/index.html Normal file
View File

@ -0,0 +1,131 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MS-1 Documentation</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
<style>
.lang-switch {
position: fixed;
top: 12px;
right: 20px;
z-index: 9999;
background: #fff;
border: 1px solid #ddd;
border-radius: 8px;
padding: 6px 10px;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
font-family: Arial, sans-serif;
font-size: 14px;
}
.lang-switch a {
text-decoration: none;
color: #333;
margin: 0 4px;
font-weight: 600;
cursor: pointer;
}
.lang-switch a.active {
color: #42b983;
}
.lang-fr,
.lang-en {
display: none;
}
body.show-fr .lang-fr {
display: inline;
}
body.show-en .lang-en {
display: inline;
}
body.show-fr div.lang-fr,
body.show-fr p.lang-fr,
body.show-fr h1.lang-fr,
body.show-fr h2.lang-fr,
body.show-fr h3.lang-fr,
body.show-fr ul.lang-fr,
body.show-fr li.lang-fr,
body.show-fr pre.lang-fr,
body.show-fr code.lang-fr {
display: block;
}
body.show-en div.lang-en,
body.show-en p.lang-en,
body.show-en h1.lang-en,
body.show-en h2.lang-en,
body.show-en h3.lang-en,
body.show-en ul.lang-en,
body.show-en li.lang-en,
body.show-en pre.lang-en,
body.show-en code.lang-en {
display: block;
}
.sidebar {
padding-top: 20px;
}
.content {
padding-top: 20px;
}
</style>
<script>
(function () {
var lang = localStorage.getItem('docs_lang') || 'fr';
document.addEventListener('DOMContentLoaded', function () {
document.body.classList.add(lang === 'en' ? 'show-en' : 'show-fr');
});
window.setDocsLang = function(lang) {
localStorage.setItem('docs_lang', lang);
document.body.classList.remove('show-fr', 'show-en');
document.body.classList.add(lang === 'en' ? 'show-en' : 'show-fr');
var frBtn = document.getElementById('btn-fr');
var enBtn = document.getElementById('btn-en');
if (frBtn && enBtn) {
frBtn.classList.toggle('active', lang === 'fr');
enBtn.classList.toggle('active', lang === 'en');
}
};
window.$docsify = {
name: 'MS1 Documentation',
homepage: 'README.md',
loadSidebar: '_sidebar.md',
auto2top: true,
subMaxLevel: 2
};
})();
</script>
</head>
<body>
<div class="lang-switch">
<a id="btn-fr" href="javascript:void(0)" onclick="setDocsLang('fr')">FR</a> |
<a id="btn-en" href="javascript:void(0)" onclick="setDocsLang('en')">EN</a>
</div>
<div id="app"></div>
<script src="https://cdn.jsdelivr.net/npm/docsify@4"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
var lang = localStorage.getItem('docs_lang') || 'fr';
setDocsLang(lang);
});
</script>
</body>
</html>

View File

@ -0,0 +1,64 @@
<h1 class="lang-fr">Dossards</h1>
<h1 class="lang-en">Bib Numbers</h1>
<p class="lang-fr">
Cette section documente la gestion des dossards dans MS1 Inscription.
Elle explique comment les dossards sont assignés et utilisés lors des événements.
</p>
<p class="lang-en">
This section documents bib number management in MS1 Registration.
It explains how bib numbers are assigned and used during events.
</p>
---
<h2 class="lang-fr">Description générale</h2>
<h2 class="lang-en">Overview</h2>
<p class="lang-fr">
Description générale du système de dossards.
</p>
<p class="lang-en">
General description of the bib number system.
</p>
---
<h2 class="lang-fr">Attribution des dossards</h2>
<h2 class="lang-en">Bib Assignment</h2>
<p class="lang-fr">
Comment les dossards sont attribués aux participants.
</p>
<p class="lang-en">
How bib numbers are assigned to participants.
</p>
---
<h2 class="lang-fr">Gestion des plages de dossards</h2>
<h2 class="lang-en">Bib Ranges</h2>
<p class="lang-fr">
Gestion des plages de dossards pour les événements et les catégories.
</p>
<p class="lang-en">
Managing bib ranges for events and categories.
</p>
---
<h2 class="lang-fr">Exemples</h2>
<h2 class="lang-en">Examples</h2>
<p class="lang-fr">
Exemples dutilisation du système de dossards.
</p>
<p class="lang-en">
Examples of bib number usage.
</p>

View File

@ -0,0 +1,64 @@
<h1 class="lang-fr">Rabais</h1>
<h1 class="lang-en">Discounts</h1>
<p class="lang-fr">
Cette section documente le système de rabais dans MS1 Inscription.
Elle explique comment les rabais sont configurés et appliqués lors dune inscription.
</p>
<p class="lang-en">
This section documents the discount system used in MS1 Registration.
It explains how discounts are configured and applied during registration.
</p>
---
<h2 class="lang-fr">Description générale</h2>
<h2 class="lang-en">Overview</h2>
<p class="lang-fr">
Description générale du fonctionnement des rabais.
</p>
<p class="lang-en">
General description of how discounts work.
</p>
---
<h2 class="lang-fr">Types de rabais</h2>
<h2 class="lang-en">Discount Types</h2>
<p class="lang-fr">
Liste et description des différents types de rabais disponibles.
</p>
<p class="lang-en">
List and description of the available discount types.
</p>
---
<h2 class="lang-fr">Configuration</h2>
<h2 class="lang-en">Configuration</h2>
<p class="lang-fr">
Comment configurer les rabais dans MS1 Inscription.
</p>
<p class="lang-en">
How to configure discounts in MS1 Registration.
</p>
---
<h2 class="lang-fr">Exemples</h2>
<h2 class="lang-en">Examples</h2>
<p class="lang-fr">
Exemples dutilisation des rabais.
</p>
<p class="lang-en">
Examples of discount usage.
</p>

BIN
v3/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

59
v3/index.php Normal file
View File

@ -0,0 +1,59 @@
<?php
use CodeIgniter\Boot;
use Config\Paths;
/*
*---------------------------------------------------------------
* CHECK PHP VERSION
*---------------------------------------------------------------
*/
$minPhpVersion = '8.2'; // If you update this, don't forget to update `spark`.
if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
$message = sprintf(
'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s',
$minPhpVersion,
PHP_VERSION,
);
header('HTTP/1.1 503 Service Unavailable.', true, 503);
echo $message;
exit(1);
}
/*
*---------------------------------------------------------------
* SET THE CURRENT DIRECTORY
*---------------------------------------------------------------
*/
// Path to the front controller (this file)
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
// Ensure the current directory is pointing to the front controller's directory
if (getcwd() . DIRECTORY_SEPARATOR !== FCPATH) {
chdir(FCPATH);
}
/*
*---------------------------------------------------------------
* BOOTSTRAP THE APPLICATION
*---------------------------------------------------------------
* This process sets up the path constants, loads and registers
* our autoloader, along with Composer's, loads our constants
* and fires up an environment-specific bootstrapping.
*/
// LOAD OUR PATHS CONFIG FILE
// This is the line that might need to be changed, depending on your folder structure.
require FCPATH . '../v3_ci4/app/Config/Paths.php';
// ^^^ Change this line if you move your application folder
$paths = new Paths();
// LOAD THE FRAMEWORK BOOTSTRAP FILE
require $paths->systemDirectory . '/Boot.php';
exit(Boot::bootWeb($paths));

2
v3/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: