Version stable, aprelic, connexion CFRS et autres corrections

This commit is contained in:
Oleg Barykin committed 2026-04-17 20:18:11 +02:00
1 parent 865de8a976
commit e9d0010451
62 files changed
+17483 -7256

No files matched your search

+576
View File
@@ -0,0 +1,576 @@
<?php
declare (strict_types = 1);
require_once __DIR__ . '/../includes/bootstrap_global.php';
// ===== Helpers header (identiques à index.php) =====
function is_client_logged_in(): bool
{
$role = $_SESSION['role'] ?? ($_SESSION['user_type'] ?? '');
if (! empty($_SESSION['user_id']) && $role === 'client') {
return true;
}
if (! empty($_SESSION['client_id'])) {
return true;
}
if (! empty($_SESSION['reference_id']) && $role === 'client') {
return true;
}
if (! empty($_SESSION['user_id']) && $role === 'praticien') {
return true;
}
if (! empty($_SESSION['praticien_id'])) {
return true;
}
if (! empty($_SESSION['reference_id']) && $role === 'praticien') {
return true;
}
return false;
}
function include_header_clean(string $absPath): void
{
global $translations, $lang;
ob_start();
include $absPath;
$buf = ob_get_clean() ?: '';
$buf = preg_replace('~<!doctype\s+html[^>]*>~i', '', $buf);
$buf = preg_replace('~</?html\b[^>]*>~i', '', $buf);
$buf = preg_replace('~<head\b[^>]*>.*?</head>~is', '', $buf);
$buf = preg_replace('~</?body\b[^>]*>~i', '', $buf);
$buf = preg_replace('~<link[^>]+href="[^"]*(bootstrap[^"]*\.css|mobil_style\.css|site_style\.css|fonts\.googleapis)[^"]*"[^>]*>~i', '', $buf);
$buf = preg_replace('~<script[^>]+src="[^"]*bootstrap[^"]*bundle[^"]*\.js[^"]*"[^>]*>\s*</script>~i', '', $buf);
echo $buf;
}
function t(array $translations, string $key, string $fallback = ''): string
{
$val = $translations[$key] ?? '';
return $val === '' ? $fallback : (string) $val;
}
// Lang HTML
$langHtml = preg_match('~^[a-z]{2}(-[A-Z]{2})?$~', (string) ($lang ?? '')) ? (string) $lang : 'ru';
// SEO
$metaTitle = t($translations, 'regist_meta_title', 'Регистрация специалиста на USLUGI.FR');
$metaDescription = t($translations, 'regist_meta_description', 'Создайте профиль специалиста на USLUGI.FR и получайте новых клиентов во Франции.');
$metaKeywords = t($translations, 'regist_meta_keywords', 'специалист, регистрация, профиль, клиенты, France, uslugi');
?>
<!doctype html>
<html lang="<?php echo htmlspecialchars($langHtml, ENT_QUOTES, 'UTF-8'); ?>">
<head>
<meta charset="UTF-8">
<title><?php echo htmlspecialchars($metaTitle, ENT_QUOTES, 'UTF-8'); ?></title>
<meta name="description" content="<?php echo htmlspecialchars($metaDescription, ENT_QUOTES, 'UTF-8'); ?>">
<meta name="keywords" content="<?php echo htmlspecialchars($metaKeywords, ENT_QUOTES, 'UTF-8'); ?>">
<meta name="author" content="Uslugi.fr">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo asset('/includes/site_style.css'); ?>">
<link rel="stylesheet" href="<?php echo asset('/includes/custom_style.css'); ?>">
<link rel="stylesheet" href="<?php echo asset('/includes/mobil_style.css'); ?>">
<?php include_once __DIR__ . '/includes/tracking.php'; ?>
</head>
<body>
<?php if (is_client_logged_in()): ?>
<?php
require_once __DIR__ . '/public/includes/init_pr_cl.php';
include_header_clean(__DIR__ . '/public/includes/header.php');
?>
<?php else: ?>
<header class="site-header">
<div class="container">
<div class="header-left">
<div class="brand">
<a href="/index.php">
<img src="/public/uploads/img/logo_u.png" alt="uslugi.fr" class="logo-mobile">
</a>
<a href="/index.php">
<img src="/public/uploads/img/logo.png" alt="uslugi.fr" class="logo-desktop">
</a>
</div>
<div class="lang-switch">
<?php require __DIR__ . '/includes/menu_langue.php'; ?>
</div>
</div>
<nav class="header-actions">
<a class="btn-login" href="/connexion.php">
<span class="d-sm-none"><?php echo htmlspecialchars($translations['btn_se_connecter'] ?? 'Connexion', ENT_QUOTES, 'UTF-8'); ?></span>
<span class="d-none d-sm-inline"><?php echo htmlspecialchars($translations['ja_spec'] ?? 'Je suis spécialiste', ENT_QUOTES, 'UTF-8'); ?></span>
</a>
<div class="dropdown">
<button
class="btn btn-logo rounded-circle d-inline-flex align-items-center justify-content-center question-btn"
type="button"
data-bs-toggle="dropdown"
data-bs-auto-close="true"
aria-expanded="false"
aria-label="<?php echo htmlspecialchars(t($translations, 'about_help_aria', 'Help'), ENT_QUOTES, 'UTF-8'); ?>">
?
</button>
<ul class="dropdown-menu dropdown-menu-end shadow help-menu menu-panel">
<li><a href="/how-it-work.php"><?php echo htmlspecialchars($translations['kak_rabotaet'] ?? 'Как это работает', ENT_QUOTES, 'UTF-8'); ?></a></li>
<li><a href="/about.php"><?php echo htmlspecialchars($translations['pro_nas'] ?? 'О нас', ENT_QUOTES, 'UTF-8'); ?></a></li>
<li><a href="/faq.php"><?php echo htmlspecialchars($translations['faq'] ?? 'FAQ', ENT_QUOTES, 'UTF-8'); ?></a></li>
<li><a href="/contact.php"><?php echo htmlspecialchars($translations['nam_pisat'] ?? 'Написать нам', ENT_QUOTES, 'UTF-8'); ?></a></li>
</ul>
</div>
</nav>
</div>
</header>
<?php endif; ?>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--navy: #1a2744;
--blue: #6b7fd4;
--blue-light: #eef0fb;
--red: #e03e3e;
--white: #ffffff;
--gray-bg: #f4f6fb;
--text: #1a2744;
--muted: #6b7a90;
--border: #dde2f0;
}
.content {
max-width: 900px;
background: #F2F3F7;
border-radius: 16px;
}
.hero {
background: var(--white);
padding: 48px 24px 40px;
text-align: center;
max-width: 640px;
margin: 0 auto;
border-radius: 16px;
}
.tag {
display: inline-block;
margin-bottom: 14px;
padding: 6px 14px;
border-radius: 999px;
background: var(--blue-light);
color: var(--navy);
font-size: 12px;
font-weight: 700;
}
.hero h1 {
font-size: clamp(26px, 6vw, 36px);
font-weight: 800;
color: var(--navy);
line-height: 1.2;
margin-bottom: 16px;
}
.hero p {
font-size: 16px;
color: var(--muted);
max-width: 420px;
margin: 0 auto 32px;
font-weight: 500;
}
.section {
padding: 40px 24px;
}
.section-inner {
max-width: 640px;
margin: 0 auto;
}
.section h2 {
font-size: 20px;
font-weight: 800;
color: var(--navy);
margin-bottom: 24px;
}
.benefit-item {
background: var(--white);
border-radius: 16px;
padding: 20px 24px;
margin-bottom: 12px;
border-left: 3px solid var(--blue);
}
.benefit-item h3 {
font-size: 15px;
font-weight: 700;
color: var(--navy);
margin-bottom: 4px;
}
.benefit-item p {
font-size: 13px;
color: var(--muted);
line-height: 1.5;
}
.pricing {
padding: 40px 24px;
max-width: 640px;
margin: 0 auto;
}
.pricing h2 {
font-size: 20px;
font-weight: 800;
color: var(--navy);
margin-bottom: 8px;
}
.pricing-sub {
font-size: 13px;
color: var(--muted);
margin-bottom: 24px;
}
.pricing-cards {
display: flex;
gap: 12px;
}
.pricing-card {
flex: 1;
border: 2px solid var(--border);
border-radius: 16px;
padding: 24px 20px;
text-align: center;
position: relative;
}
.pricing-card.featured {
border-color: var(--blue);
background: var(--blue-light);
}
.pricing-badge {
position: absolute;
top: -12px;
left: 50%;
transform: translateX(-50%);
background: var(--navy);
color: white;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 3px 12px;
border-radius: 100px;
white-space: nowrap;
}
.pricing-period {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 8px;
}
.pricing-price {
font-size: 38px;
font-weight: 800;
color: var(--navy);
line-height: 1;
margin-bottom: 4px;
}
.pricing-unit {
font-size: 12px;
color: var(--muted);
margin-bottom: 20px;
}
.btn-outline {
display: block;
border: 2px solid var(--red);
color: var(--red);
font-family: 'Montserrat', sans-serif;
font-weight: 700;
font-size: 13px;
padding: 10px 16px;
border-radius: 100px;
text-decoration: none;
text-align: center;
}
.btn-filled {
display: block;
background: var(--red);
color: white;
font-family: 'Montserrat', sans-serif;
font-weight: 700;
font-size: 13px;
padding: 10px 16px;
border-radius: 100px;
text-decoration: none;
text-align: center;
}
.pricing-note {
font-size: 12px;
color: var(--muted);
margin-top: 16px;
text-align: center;
line-height: 1.5;
}
.steps {
padding: 40px 24px;
}
.steps-inner {
max-width: 640px;
margin: 0 auto;
}
.steps h2 {
font-size: 20px;
font-weight: 800;
color: var(--navy);
margin-bottom: 24px;
}
.step {
display: flex;
gap: 16px;
margin-bottom: 20px;
align-items: flex-start;
}
.step-num {
width: 36px;
height: 36px;
background: var(--blue);
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 800;
font-size: 15px;
flex-shrink: 0;
}
.step h3 {
font-size: 15px;
font-weight: 700;
color: var(--navy);
margin-bottom: 2px;
padding-top: 6px;
}
.step p {
font-size: 13px;
color: var(--muted);
}
.help-box {
background: var(--white);
border-radius: 16px;
padding: 20px;
margin-top: 8px;
font-size: 14px;
color: var(--muted);
line-height: 1.5;
}
.help-box strong {
color: var(--navy);
display: block;
margin-bottom: 4px;
font-size: 15px;
}
.cta {
padding: 40px 24px 56px;
text-align: center;
max-width: 640px;
margin: 0 auto;
}
.cta h2 {
font-size: 20px;
font-weight: 800;
color: var(--navy);
margin-bottom: 8px;
}
.cta p {
font-size: 14px;
color: var(--muted);
margin-bottom: 24px;
}
</style>
<div class="main">
<div class="content">
<br>
<div class="hero">
<div class="tag"><?php echo htmlspecialchars(t($translations, 'regist_tag', 'Для специалистов'), ENT_QUOTES, 'UTF-8'); ?></div>
<h1><?php echo nl2br(htmlspecialchars(t($translations, 'regist_h1', "Вы специалист?\nРазместите профиль на USLUGI.FR"), ENT_QUOTES, 'UTF-8')); ?></h1>
<p><?php echo htmlspecialchars(t($translations, 'regist_hero_text', 'Получайте новых клиентов во Франции!'), ENT_QUOTES, 'UTF-8'); ?></p>
<a href="/inscription-praticien" class="btn btn-primary">
<?php echo htmlspecialchars(t($translations, 'regist_btn_create_profile', 'Создать профиль'), ENT_QUOTES, 'UTF-8'); ?>
</a>
</div>
<br>
<div class="section">
<div class="section-inner">
<h2><?php echo htmlspecialchars(t($translations, 'regist_benefits_title', 'Что вы получаете'), ENT_QUOTES, 'UTF-8'); ?></h2>
<div class="benefit-item">
<div>
<h3><?php echo htmlspecialchars(t($translations, 'regist_benefit_1_title', 'Профиль с вашей информацией'), ENT_QUOTES, 'UTF-8'); ?></h3>
<p><?php echo htmlspecialchars(t($translations, 'regist_benefit_1_text', 'Специализация, город, фото, описание.'), ENT_QUOTES, 'UTF-8'); ?></p>
</div>
</div>
<div class="benefit-item">
<div>
<h3><?php echo htmlspecialchars(t($translations, 'regist_benefit_2_title', 'Календарь записи'), ENT_QUOTES, 'UTF-8'); ?></h3>
<p><?php echo htmlspecialchars(t($translations, 'regist_benefit_2_text', 'Клиент видит ваше свободное время и записывается сам.'), ENT_QUOTES, 'UTF-8'); ?></p>
</div>
</div>
<div class="benefit-item">
<div>
<h3><?php echo htmlspecialchars(t($translations, 'regist_benefit_3_title', 'Видеосвязь на платформе'), ENT_QUOTES, 'UTF-8'); ?></h3>
<p><?php echo htmlspecialchars(t($translations, 'regist_benefit_3_text', 'Онлайн-консультации без Zoom и лишних настроек.'), ENT_QUOTES, 'UTF-8'); ?></p>
</div>
</div>
<div class="benefit-item">
<div>
<h3><?php echo htmlspecialchars(t($translations, 'regist_benefit_4_title', 'Чат с клиентом'), ENT_QUOTES, 'UTF-8'); ?></h3>
<p><?php echo htmlspecialchars(t($translations, 'regist_benefit_4_text', 'Обменивайтесь документами и уточняйте детали до встречи.'), ENT_QUOTES, 'UTF-8'); ?></p>
</div>
</div>
<div class="benefit-item">
<div>
<h3><?php echo htmlspecialchars(t($translations, 'regist_benefit_5_title', 'Целевая аудитория'), ENT_QUOTES, 'UTF-8'); ?></h3>
<p><?php echo htmlspecialchars(t($translations, 'regist_benefit_5_text', 'Люди приходят с конкретным запросом. Часть записывается сами — часть мы направляем напрямую к вам через форму подбора.'), ENT_QUOTES, 'UTF-8'); ?></p>
</div>
</div>
</div>
</div>
<div class="pricing" id="pricing">
<h2><?php echo htmlspecialchars(t($translations, 'regist_pricing_title', 'Стоимость'), ENT_QUOTES, 'UTF-8'); ?></h2>
<p class="pricing-sub"><?php echo htmlspecialchars(t($translations, 'regist_pricing_sub', 'Без комиссии с консультаций — оплата напрямую от клиента'), ENT_QUOTES, 'UTF-8'); ?></p>
<div class="pricing-cards">
<div class="pricing-card featured">
<div class="pricing-badge"><?php echo htmlspecialchars(t($translations, 'regist_pricing_badge', 'Выгоднее'), ENT_QUOTES, 'UTF-8'); ?></div>
<div class="pricing-period"><?php echo htmlspecialchars(t($translations, 'regist_yearly_label', 'В год'), ENT_QUOTES, 'UTF-8'); ?></div>
<div class="pricing-price"><?php echo htmlspecialchars(t($translations, 'regist_yearly_price', '275€'), ENT_QUOTES, 'UTF-8'); ?></div>
<div class="pricing-unit"><?php echo htmlspecialchars(t($translations, 'regist_yearly_unit', '23€ в месяц'), ENT_QUOTES, 'UTF-8'); ?></div>
<a href="/inscription-praticien" class="btn-filled">
<?php echo htmlspecialchars(t($translations, 'regist_btn_choose', 'Выбрать'), ENT_QUOTES, 'UTF-8'); ?>
</a>
</div>
<div class="pricing-card">
<div class="pricing-period"><?php echo htmlspecialchars(t($translations, 'regist_monthly_label', 'В месяц'), ENT_QUOTES, 'UTF-8'); ?></div>
<div class="pricing-price"><?php echo htmlspecialchars(t($translations, 'regist_monthly_price', '25€'), ENT_QUOTES, 'UTF-8'); ?></div>
<div class="pricing-unit"><?php echo htmlspecialchars(t($translations, 'regist_monthly_unit', ''), ENT_QUOTES, 'UTF-8'); ?>&nbsp;</div>
<a href="/inscription-praticien" class="btn-outline">
<?php echo htmlspecialchars(t($translations, 'regist_btn_choose', 'Выбрать'), ENT_QUOTES, 'UTF-8'); ?>
</a>
</div>
</div>
<p class="pricing-note"><?php echo htmlspecialchars(t($translations, 'regist_pricing_note', 'Оплата картой прямо на сайте через Stripe'), ENT_QUOTES, 'UTF-8'); ?></p>
</div>
<div class="steps">
<div class="steps-inner">
<h2><?php echo htmlspecialchars(t($translations, 'regist_steps_title', 'Как начать'), ENT_QUOTES, 'UTF-8'); ?></h2>
<div class="step">
<div class="step-num">1</div>
<div>
<h3><?php echo htmlspecialchars(t($translations, 'regist_step_1_title', 'Выберите подписку и оплатите картой'), ENT_QUOTES, 'UTF-8'); ?></h3>
<p><?php echo htmlspecialchars(t($translations, 'regist_step_1_text', 'Прямо на сайте, быстро и безопасно.'), ENT_QUOTES, 'UTF-8'); ?></p>
</div>
</div>
<div class="step">
<div class="step-num">2</div>
<div>
<h3><?php echo htmlspecialchars(t($translations, 'regist_step_2_title', 'Создайте профиль'), ENT_QUOTES, 'UTF-8'); ?></h3>
<p><?php echo htmlspecialchars(t($translations, 'regist_step_2_text', 'Фото, описание, специализация, календарь — всё сами.'), ENT_QUOTES, 'UTF-8'); ?></p>
</div>
</div>
<div class="step">
<div class="step-num">3</div>
<div>
<h3><?php echo htmlspecialchars(t($translations, 'regist_step_3_title', 'Получайте запросы от клиентов'), ENT_QUOTES, 'UTF-8'); ?></h3>
<p><?php echo htmlspecialchars(t($translations, 'regist_step_3_text', 'Уведомления на почту, запись в календарь, видеосвязь.'), ENT_QUOTES, 'UTF-8'); ?></p>
</div>
</div>
<div class="help-box">
<strong><?php echo htmlspecialchars(t($translations, 'regist_help_title', 'Нет времени заполнять профиль?'), ENT_QUOTES, 'UTF-8'); ?></strong>
<?php echo htmlspecialchars(t($translations, 'regist_help_text', 'После оплаты пришлите нам фото и информацию — мы оформим за вас.'), ENT_QUOTES, 'UTF-8'); ?>
</div>
</div>
</div>
<div class="cta">
<h2><?php echo htmlspecialchars(t($translations, 'regist_cta_title', 'Готовы начать?'), ENT_QUOTES, 'UTF-8'); ?></h2>
<p><?php echo htmlspecialchars(t($translations, 'regist_cta_text', 'Регистрация занимает 5 минут'), ENT_QUOTES, 'UTF-8'); ?></p>
<a href="/inscription-praticien" class="btn btn-primary">
<?php echo htmlspecialchars(t($translations, 'regist_btn_create_profile', 'Создать профиль'), ENT_QUOTES, 'UTF-8'); ?>
</a>
</div>
</div>
</div>
<footer class="site-footer">
<div class="container">
<p><?php echo $translations['copyr'] ?></p>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>