441 lines
28 KiB
PHP
Executable File
441 lines
28 KiB
PHP
Executable File
<?php
|
|
session_start();
|
|
|
|
$configFile = '/opt/wevads/storage/office365/freedns_config.json';
|
|
$message = '';
|
|
$messageType = '';
|
|
|
|
// Connexion DB
|
|
function getDbConnection() {
|
|
try {
|
|
return new PDO("pgsql:host=localhost;dbname=adx_system", "admin", "admin123");
|
|
} catch (Exception $e) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
function getOfficeAccounts() {
|
|
try {
|
|
$pdo = getDbConnection();
|
|
if (!$pdo) return [];
|
|
$stmt = $pdo->query("SELECT id, name, admin_email as email FROM admin.office_accounts WHERE status NOT IN ('Disabled', 'disabled', 'deleted') ORDER BY name");
|
|
return $stmt ? $stmt->fetchAll(PDO::FETCH_ASSOC) : [];
|
|
} catch (Exception $e) {
|
|
return [];
|
|
}
|
|
}
|
|
|
|
function getUnassignedFreeDNSDomains() {
|
|
try {
|
|
$pdo = getDbConnection();
|
|
if (!$pdo) return [];
|
|
// Tous les domaines libres (FREE) ou en attente, peu importe le provider
|
|
$stmt = $pdo->query("SELECT id, domain, status, verification, provider, created_at FROM admin.domains_pool WHERE status = 'FREE' ORDER BY provider, created_at DESC LIMIT 50");
|
|
return $stmt ? $stmt->fetchAll(PDO::FETCH_ASSOC) : [];
|
|
} catch (Exception $e) {
|
|
return [];
|
|
}
|
|
}
|
|
|
|
// Charger config
|
|
$config = ['verification_server' => ['ip' => '', 'ssh_user' => 'ubuntu', 'ssh_password' => '', 'ssh_port' => 22, 'web_root' => '/var/www/html'], 'base_domains' => []];
|
|
if (file_exists($configFile)) {
|
|
$config = array_merge($config, json_decode(file_get_contents($configFile), true) ?: []);
|
|
}
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
$action = $_POST['action'] ?? '';
|
|
switch ($action) {
|
|
case 'save_config':
|
|
$config['verification_server']['ip'] = trim($_POST['server_ip'] ?? '');
|
|
$config['verification_server']['ssh_user'] = trim($_POST['ssh_user'] ?? 'ubuntu');
|
|
$config['verification_server']['ssh_password'] = trim($_POST['ssh_password'] ?? '');
|
|
$config['verification_server']['ssh_port'] = intval($_POST['ssh_port'] ?? 22);
|
|
$config['verification_server']['web_root'] = trim($_POST['web_root'] ?? '/var/www/html');
|
|
$config['base_domains'] = array_filter(array_map('trim', explode("\n", $_POST['base_domains'] ?? '')));
|
|
file_put_contents($configFile, json_encode($config, JSON_PRETTY_PRINT));
|
|
$message = "Configuration sauvegardée !"; $messageType = 'success';
|
|
break;
|
|
|
|
case 'test_ssh':
|
|
$ip = $config['verification_server']['ip']; $user = $config['verification_server']['ssh_user'];
|
|
$pass = $config['verification_server']['ssh_password']; $port = $config['verification_server']['ssh_port'];
|
|
if (empty($ip) || empty($pass)) { $message = "IP et mot de passe requis"; $messageType = 'error'; }
|
|
else {
|
|
$cmd = "sshpass -p " . escapeshellarg($pass) . " ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 -p $port " . escapeshellarg($user) . "@" . escapeshellarg($ip) . " 'echo OK' 2>&1";
|
|
$output = shell_exec($cmd);
|
|
if (strpos($output, 'OK') !== false) { $message = "✅ Connexion SSH réussie !"; $messageType = 'success'; }
|
|
else { $message = "❌ Échec SSH: " . htmlspecialchars(substr($output, 0, 200)); $messageType = 'error'; }
|
|
}
|
|
break;
|
|
|
|
case 'test_http':
|
|
$ip = $config['verification_server']['ip'];
|
|
if (empty($ip)) { $message = "IP requise"; $messageType = 'error'; }
|
|
else {
|
|
$testFile = 'wevads-test-' . time() . '.txt'; $testContent = 'WEVAL-' . uniqid();
|
|
$user = $config['verification_server']['ssh_user']; $pass = $config['verification_server']['ssh_password'];
|
|
$webRoot = $config['verification_server']['web_root'];
|
|
shell_exec("sshpass -p " . escapeshellarg($pass) . " ssh -o StrictHostKeyChecking=no " . escapeshellarg($user) . "@" . escapeshellarg($ip) . " 'echo \"$testContent\" | sudo tee $webRoot/$testFile > /dev/null' 2>&1");
|
|
sleep(1);
|
|
$response = @file_get_contents("http://$ip/$testFile");
|
|
shell_exec("sshpass -p " . escapeshellarg($pass) . " ssh -o StrictHostKeyChecking=no " . escapeshellarg($user) . "@" . escapeshellarg($ip) . " 'sudo rm -f $webRoot/$testFile' 2>&1");
|
|
if ($response && strpos($response, $testContent) !== false) { $message = "✅ Test HTTP réussi !"; $messageType = 'success'; }
|
|
else { $message = "❌ Échec HTTP"; $messageType = 'error'; }
|
|
}
|
|
break;
|
|
|
|
case 'deploy_server':
|
|
$ip = $config['verification_server']['ip'];
|
|
$user = $config['verification_server']['ssh_user'];
|
|
$pass = $config['verification_server']['ssh_password'];
|
|
$port = $config['verification_server']['ssh_port'];
|
|
$webRoot = $config['verification_server']['web_root'];
|
|
if (empty($ip) || empty($pass)) { $message = "IP et mot de passe requis"; $messageType = 'error'; }
|
|
else {
|
|
$results = [];
|
|
$cmd = "sshpass -p " . escapeshellarg($pass) . " ssh -o StrictHostKeyChecking=no -p $port " . escapeshellarg($user) . "@" . escapeshellarg($ip) . " 'sudo mkdir -p $webRoot && sudo chown -R www-data:www-data $webRoot && echo OK' 2>&1";
|
|
$out = shell_exec($cmd);
|
|
$results[] = strpos($out, 'OK') !== false ? "✅ Dossier $webRoot créé" : "❌ Erreur création dossier";
|
|
|
|
$cmd = "sshpass -p " . escapeshellarg($pass) . " ssh -o StrictHostKeyChecking=no -p $port " . escapeshellarg($user) . "@" . escapeshellarg($ip) . " 'echo \"FreeDNS Verification Server\" | sudo tee $webRoot/index.html > /dev/null && echo OK' 2>&1";
|
|
$out = shell_exec($cmd);
|
|
$results[] = strpos($out, 'OK') !== false ? "✅ Index créé" : "❌ Erreur index";
|
|
|
|
sleep(1);
|
|
$response = @file_get_contents("http://$ip/");
|
|
$results[] = $response ? "✅ HTTP accessible" : "❌ HTTP non accessible";
|
|
|
|
$message = implode(" | ", $results);
|
|
$messageType = strpos($message, '❌') === false ? 'success' : 'error';
|
|
}
|
|
break;
|
|
|
|
case 'assign_to_office':
|
|
$selectedDomains = $_POST['freedns_domains'] ?? [];
|
|
$accountId = intval($_POST['target_office_account'] ?? 0);
|
|
if (empty($selectedDomains)) { $message = "Sélectionnez au moins un domaine"; $messageType = 'error'; }
|
|
elseif (empty($accountId)) { $message = "Sélectionnez un compte Office 365"; $messageType = 'error'; }
|
|
elseif (count($selectedDomains) > 10) { $message = "Maximum 10 domaines"; $messageType = 'error'; }
|
|
else {
|
|
$data = ['domains' => $selectedDomains, 'account_id' => $accountId];
|
|
file_put_contents('/opt/wevads/storage/office365/domains_to_assign.json', json_encode($data, JSON_PRETTY_PRINT));
|
|
$logFile = '/opt/wevads/storage/office365/assign_log_' . date('Ymd_His') . '.txt';
|
|
|
|
// Lancer le script universel pour chaque domaine
|
|
foreach($selectedDomains as $dom) {
|
|
exec("cd /opt/wevads/scripts/office365 && python3 add_domain_to_o365_universal.py " . escapeshellarg($dom) . " $accountId >> $logFile 2>&1");
|
|
}
|
|
|
|
$message = "✅ " . count($selectedDomains) . " domaine(s) en cours d'ajout. Voir logs."; $messageType = 'success';
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
$officeAccounts = getOfficeAccounts();
|
|
$unassignedDomains = getUnassignedFreeDNSDomains();
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Universal Domain Manager</title>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
<style>
|
|
*{margin:0;padding:0;box-sizing:border-box}
|
|
body{font-family:'Segoe UI',sans-serif;background:linear-gradient(135deg,#1e293b,#0f172a);min-height:100vh;color:#e2e8f0;padding:20px}
|
|
.container{max-width:1200px;margin:0 auto}
|
|
.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #334155}
|
|
.header h1{font-size:24px;color:#10b981}
|
|
.back-link{color:#94a3b8;text-decoration:none;display:flex;align-items:center;gap:8px}
|
|
.back-link:hover{color:#fff}
|
|
.alert{padding:15px 20px;border-radius:10px;margin-bottom:20px}
|
|
.alert-success{background:rgba(16,185,129,0.2);border:1px solid #10b981}
|
|
.alert-error{background:rgba(239,68,68,0.2);border:1px solid #ef4444}
|
|
.grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
|
|
@media(max-width:900px){.grid{grid-template-columns:1fr}}
|
|
.card{background:rgba(30,41,59,0.8);border:1px solid #334155;border-radius:16px;padding:25px}
|
|
.card-header{display:flex;align-items:center;gap:12px;margin-bottom:20px;padding-bottom:15px;border-bottom:1px solid #334155}
|
|
.card-header i{font-size:22px;color:#3b82f6}
|
|
.card-header h2{font-size:16px}
|
|
.form-group{margin-bottom:15px}
|
|
.form-group label{display:block;margin-bottom:6px;color:#94a3b8;font-size:13px}
|
|
.form-group input,.form-group textarea,.form-group select{width:100%;padding:10px 12px;background:#0f172a;border:1px solid #334155;border-radius:8px;color:#e2e8f0;font-size:13px}
|
|
.form-group input:focus{border-color:#3b82f6;outline:none}
|
|
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
|
|
.btn{padding:10px 18px;border:none;border-radius:8px;font-size:13px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:all 0.2s}
|
|
.btn-primary{background:linear-gradient(135deg,#3b82f6,#2563eb);color:white}
|
|
.btn-success{background:linear-gradient(135deg,#10b981,#059669);color:white}
|
|
.btn-warning{background:linear-gradient(135deg,#f59e0b,#d97706);color:white}
|
|
.btn-sm{padding:8px 14px;font-size:12px}
|
|
.btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,0.3)}
|
|
.btn-group{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}
|
|
.status-badge{padding:4px 10px;border-radius:15px;font-size:11px;background:rgba(16,185,129,0.2);color:#10b981}
|
|
.domain-item{display:flex;align-items:center;padding:8px 10px;background:#0f172a;border-radius:6px;margin-bottom:6px;cursor:pointer;border-left:3px solid #64748b;font-size:12px}
|
|
.domain-item:hover{background:#1e293b}
|
|
.domain-item input{margin-right:10px}
|
|
.info-box{background:rgba(59,130,246,0.1);border:1px solid rgba(59,130,246,0.3);border-radius:8px;padding:12px;margin-bottom:15px;font-size:12px;color:#94a3b8}
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="header">
|
|
<h1><i class="fas fa-server"></i> Universal Domain Manager</h1>
|
|
<a href="domains-management.php" class="back-link"><i class="fas fa-arrow-left"></i> Retour Domaines</a>
|
|
</div>
|
|
|
|
<?php if($message): ?><div class="alert alert-<?=$messageType?>"><?=$message?></div><?php endif; ?>
|
|
|
|
<div class="grid">
|
|
<!-- Serveur de Vérification Microsoft -->
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<i class="fas fa-server"></i>
|
|
<h2>Configuration Serveur</h2>
|
|
<?php if(!empty($config['verification_server']['ip'])): ?><span class="status-badge">✅ Configuré</span><?php endif; ?>
|
|
</div>
|
|
|
|
<div class="info-box">
|
|
<i class="fas fa-info-circle"></i> Ce serveur reçoit les fichiers de vérification Microsoft pour les domaines FreeDNS.
|
|
</div>
|
|
|
|
<form method="POST">
|
|
<input type="hidden" name="action" value="save_config">
|
|
<div class="form-row">
|
|
<div class="form-group"><label>IP du Serveur</label><input type="text" name="server_ip" value="<?=htmlspecialchars($config['verification_server']['ip']??'')?>"></div>
|
|
<div class="form-group"><label>Web Root</label><input type="text" name="web_root" value="<?=htmlspecialchars($config['verification_server']['web_root']??'/var/www/html')?>"></div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group"><label>SSH User</label><input type="text" name="ssh_user" value="<?=htmlspecialchars($config['verification_server']['ssh_user']??'ubuntu')?>"></div>
|
|
<div class="form-group"><label>SSH Port</label><input type="number" name="ssh_port" value="<?=htmlspecialchars($config['verification_server']['ssh_port']??22)?>"></div>
|
|
</div>
|
|
<div class="form-group"><label>SSH Password</label><input type="password" name="ssh_password" value="<?=htmlspecialchars($config['verification_server']['ssh_password']??'')?>"></div>
|
|
<div class="form-group"><label>Domaines de Base FreeDNS</label><textarea name="base_domains" rows="3"><?=htmlspecialchars(implode("\n",$config['base_domains']??[]))?></textarea></div>
|
|
<div class="btn-group">
|
|
<button type="submit" class="btn btn-primary"><i class="fas fa-save"></i> Sauvegarder</button>
|
|
</div>
|
|
</form>
|
|
<div class="btn-group">
|
|
<form method="POST" style="display:inline"><input type="hidden" name="action" value="test_ssh"><button class="btn btn-warning btn-sm"><i class="fas fa-terminal"></i> Test SSH</button></form>
|
|
<form method="POST" style="display:inline"><input type="hidden" name="action" value="test_http"><button class="btn btn-success btn-sm"><i class="fas fa-globe"></i> Test HTTP</button></form>
|
|
<form method="POST" style="display:inline"><input type="hidden" name="action" value="deploy_server"><button class="btn btn-primary btn-sm"><i class="fas fa-rocket"></i> Déployer</button></form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Assigner Domaines -->
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<i class="fas fa-link" style="color:#f59e0b"></i>
|
|
<h2>Assigner Domaines à Office 365</h2>
|
|
</div>
|
|
|
|
<form method="POST">
|
|
<input type="hidden" name="action" value="assign_to_office">
|
|
|
|
<div class="form-group">
|
|
<label><i class="fas fa-building"></i> Compte Office 365</label>
|
|
<input type="text" list="office_list" name="target_office_account" placeholder="Tapez nom ou email..." style="width:100%">
|
|
<datalist id="office_list">
|
|
<?php foreach($officeAccounts as $acc): ?>
|
|
<option value="<?=$acc['id']?> - <?=htmlspecialchars($acc['name']?:$acc['email'])?>"></option>
|
|
<?php endforeach; ?>
|
|
</datalist>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label><i class="fas fa-globe"></i> Domaines disponibles (tous providers) (max 10)</label>
|
|
<div style="max-height:220px;overflow-y:auto;border:1px solid #334155;border-radius:8px;padding:8px;background:#0f172a">
|
|
<?php if(count($unassignedDomains) > 0): ?>
|
|
<?php foreach($unassignedDomains as $d):
|
|
$isO365 = ($d['provider'] ?? '') === 'Office365' || ($d['provider'] ?? '') === 'office365';
|
|
$badgeColor = $isO365 ? '#3b82f6' : '#10b981';
|
|
$badgeText = $isO365 ? 'Libre O365' : 'Libre FreeDNS';
|
|
?>
|
|
<label class="domain-item" style="border-left:3px solid <?=$badgeColor?>">
|
|
<input type="checkbox" name="freedns_domains[]" value="<?=htmlspecialchars($d['domain'])?>" onchange="updateCount()">
|
|
<div style="flex:1">
|
|
<span style="color:#22d3ee;font-family:monospace"><?=htmlspecialchars($d['domain'])?></span>
|
|
<div style="font-size:10px;margin-top:2px">
|
|
<span style="background:<?=$badgeColor?>;color:#fff;padding:1px 6px;border-radius:10px;font-size:9px"><?=$badgeText?></span>
|
|
<span style="color:#64748b;margin-left:5px"><?=$d['verification'] ?? 'N/A'?></span>
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<?php endforeach; ?>
|
|
<?php else: ?>
|
|
<div style="text-align:center;padding:20px;color:#64748b">
|
|
<i class="fas fa-check-circle" style="color:#10b981;font-size:24px;display:block;margin-bottom:8px"></i>
|
|
Aucun domaine disponible - Tous sont assignés
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<small style="color:#64748b">Sélectionnés: <span id="count">0</span>/10</small>
|
|
</div>
|
|
|
|
<?php if(count($unassignedDomains) > 0): ?>
|
|
<div class="btn-group">
|
|
<button type="button" class="btn btn-info" onclick="document.getElementById('helpModal').style.display='flex'" style="margin-right:10px;">
|
|
<i class="fas fa-question-circle"></i> Aide
|
|
</button>
|
|
<button type="submit" class="btn btn-warning"><i class="fas fa-rocket"></i> Ajouter à Office</button>
|
|
<button type="button" onclick="selectAll()" class="btn btn-sm btn-primary">10 premiers</button>
|
|
<button type="button" onclick="clearAll()" class="btn btn-sm" style="background:#475569;color:#fff">Effacer</button>
|
|
</div>
|
|
<?php endif; ?>
|
|
</form>
|
|
|
|
<?php
|
|
$logs = glob('/opt/wevads/storage/office365/assign_log_*.txt');
|
|
rsort($logs);
|
|
if($logs && file_exists($logs[0])):
|
|
?>
|
|
<div style="margin-top:15px;padding-top:15px;border-top:1px solid #334155">
|
|
<label style="color:#94a3b8;font-size:12px"><i class="fas fa-terminal"></i> Dernier log</label>
|
|
<pre style="background:#0f172a;padding:10px;border-radius:6px;font-size:10px;max-height:120px;overflow:auto;color:#10b981;margin-top:8px"><?=htmlspecialchars(substr(file_get_contents($logs[0]), -1000))?></pre>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function updateCount() {
|
|
var c = document.querySelectorAll('input[name="freedns_domains[]"]:checked').length;
|
|
document.getElementById('count').textContent = c;
|
|
if(c > 10) { alert('Max 10'); event.target.checked = false; updateCount(); }
|
|
}
|
|
function selectAll() {
|
|
var cbs = document.querySelectorAll('input[name="freedns_domains[]"]');
|
|
cbs.forEach((cb,i) => cb.checked = i < 10);
|
|
updateCount();
|
|
}
|
|
function clearAll() {
|
|
document.querySelectorAll('input[name="freedns_domains[]"]').forEach(cb => cb.checked = false);
|
|
updateCount();
|
|
}
|
|
</script>
|
|
|
|
<!-- Modal Aide Universal Domain Manager -->
|
|
<div id="helpModal" style="display:none; position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.9); z-index:9999; overflow-y:auto;">
|
|
<div style="background:#1a1a2e; border-radius:12px; padding:30px; max-width:900px; margin:40px auto; border:1px solid #00d4ff;">
|
|
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:20px;">
|
|
<h4 style="color:#00d4ff; margin:0;"><i class="fas fa-info-circle"></i> Universal Domain Manager - Guide</h4>
|
|
<button onclick="document.getElementById('helpModal').style.display='none'" style="background:none; border:none; color:#fff; font-size:24px; cursor:pointer;">×</button>
|
|
</div>
|
|
|
|
<div style="color:#ccc; line-height:1.6; font-size:12px;">
|
|
|
|
<h5 style="color:#00d4ff; margin-bottom:15px;"><i class="fas fa-server"></i> Configuration Serveur (Gauche)</h5>
|
|
<div style="background:#2d3748; padding:12px; border-radius:8px; margin-bottom:15px;">
|
|
<p style="margin:0 0 10px 0;">Ce serveur (151.80.235.110) héberge les fichiers de vérification Microsoft pour les domaines FreeDNS/Namecheap/autres.</p>
|
|
<div style="display:grid; grid-template-columns:1fr 1fr; gap:8px;">
|
|
<div style="background:#1a202c; padding:6px; border-radius:4px;"><strong style="color:#68d391;">IP Serveur</strong> - Adresse du serveur de vérification</div>
|
|
<div style="background:#1a202c; padding:6px; border-radius:4px;"><strong style="color:#68d391;">Web Root</strong> - Dossier racine web (/var/www/html)</div>
|
|
<div style="background:#1a202c; padding:6px; border-radius:4px;"><strong style="color:#68d391;">SSH User/Pass</strong> - Credentials pour upload fichiers</div>
|
|
<div style="background:#1a202c; padding:6px; border-radius:4px;"><strong style="color:#68d391;">Domaines Base</strong> - Zones FreeDNS disponibles</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h5 style="color:#00d4ff; margin-bottom:15px;"><i class="fas fa-vial"></i> Boutons Test</h5>
|
|
<div style="display:flex; gap:10px; margin-bottom:20px; flex-wrap:wrap;">
|
|
<div style="background:#f59e0b; padding:10px; border-radius:6px; flex:1; min-width:200px;">
|
|
<strong style="color:#000;">🔑 Test SSH</strong><br>
|
|
<span style="font-size:11px; color:#000;">Vérifie connexion SSH au serveur. Teste sshpass + login.</span><br>
|
|
<span style="font-size:10px; color:#1a202c;"><strong>OUT:</strong> Connexion OK/KO</span>
|
|
</div>
|
|
<div style="background:#22c55e; padding:10px; border-radius:6px; flex:1; min-width:200px;">
|
|
<strong style="color:#000;">🌐 Test HTTP</strong><br>
|
|
<span style="font-size:11px; color:#000;">Crée fichier test sur serveur et vérifie accès HTTP.</span><br>
|
|
<span style="font-size:10px; color:#1a202c;"><strong>OUT:</strong> HTTP 200 OK/KO</span>
|
|
</div>
|
|
<div style="background:#6366f1; padding:10px; border-radius:6px; flex:1; min-width:200px;">
|
|
<strong>🚀 Déployer</strong><br>
|
|
<span style="font-size:11px;">Crée structure dossiers + index.html sur serveur.</span><br>
|
|
<span style="font-size:10px;"><strong>OUT:</strong> /.well-known/ créé</span>
|
|
</div>
|
|
</div>
|
|
|
|
<hr style="border-color:#333; margin:20px 0;">
|
|
|
|
<h5 style="color:#00d4ff; margin-bottom:15px;"><i class="fas fa-link"></i> Assigner Domaines à Office 365 (Droite)</h5>
|
|
|
|
<div style="background:#2d3748; padding:12px; border-radius:8px; margin-bottom:15px;">
|
|
<strong style="color:#fff;">Workflow complet du bouton "Ajouter à Office":</strong>
|
|
<ol style="margin:10px 0 0 20px; padding:0;">
|
|
<li>Connexion à Office 365 (ROPC ou App credentials)</li>
|
|
<li>Ajout du domaine au tenant via API Graph</li>
|
|
<li>Récupération du code TXT de vérification Microsoft</li>
|
|
<li>Création du fichier de vérification selon le provider</li>
|
|
<li>Vérification automatique par Microsoft</li>
|
|
</ol>
|
|
</div>
|
|
|
|
<!-- CLOUDFLARE -->
|
|
<div style="background:#2d3748; padding:12px; border-radius:8px; margin-bottom:10px; border-left:4px solid #f48120;">
|
|
<h6 style="color:#f48120; margin:0 0 8px 0;"><i class="fab fa-cloudflare"></i> Domaines Cloudflare</h6>
|
|
<div style="display:flex; gap:10px; font-size:11px;">
|
|
<div style="flex:1; background:#1a202c; padding:6px; border-radius:4px;">
|
|
<strong style="color:#68d391;">📥 IN:</strong> domain, CF zone_id, CF api_key, O365 creds
|
|
</div>
|
|
<div style="flex:1; background:#1a202c; padding:6px; border-radius:4px;">
|
|
<strong style="color:#fc8181;">📤 OUT:</strong> TXT record créé via API Cloudflare
|
|
</div>
|
|
</div>
|
|
<div style="background:#1e293b; padding:6px; border-radius:4px; margin-top:6px; font-size:10px;">
|
|
<strong style="color:#00d4ff;">🖥️ IMPACT:</strong> Cloudflare DNS, domains_pool, office_accounts.domains_list
|
|
</div>
|
|
</div>
|
|
|
|
<!-- FREEDNS / AUTRES -->
|
|
<div style="background:#2d3748; padding:12px; border-radius:8px; margin-bottom:10px; border-left:4px solid #48bb78;">
|
|
<h6 style="color:#48bb78; margin:0 0 8px 0;"><i class="fas fa-globe"></i> Domaines FreeDNS / Namecheap / Autres</h6>
|
|
<div style="display:flex; gap:10px; font-size:11px;">
|
|
<div style="flex:1; background:#1a202c; padding:6px; border-radius:4px;">
|
|
<strong style="color:#68d391;">📥 IN:</strong> domain, O365 creds, SSH serveur config
|
|
</div>
|
|
<div style="flex:1; background:#1a202c; padding:6px; border-radius:4px;">
|
|
<strong style="color:#fc8181;">📤 OUT:</strong> Fichier /.well-known/microsoft-identity-association.json
|
|
</div>
|
|
</div>
|
|
<div style="background:#1e293b; padding:6px; border-radius:4px; margin-top:6px; font-size:10px;">
|
|
<strong style="color:#00d4ff;">🖥️ IMPACT:</strong> Serveur 151.80.235.110, domains_pool, office_accounts.domains_list
|
|
</div>
|
|
<div style="background:#7f1d1d; padding:6px; border-radius:4px; margin-top:6px; font-size:10px;">
|
|
⚠️ <strong>Prérequis:</strong> Le domaine DOIT pointer vers 151.80.235.110
|
|
</div>
|
|
</div>
|
|
|
|
<h5 style="color:#00d4ff; margin-bottom:15px;"><i class="fas fa-mouse-pointer"></i> Autres Boutons</h5>
|
|
<div style="display:flex; gap:10px; flex-wrap:wrap;">
|
|
<div style="background:#6366f1; padding:8px 12px; border-radius:6px; font-size:11px;">
|
|
<strong>10 premiers</strong> - Sélectionne les 10 premiers domaines libres
|
|
</div>
|
|
<div style="background:#475569; padding:8px 12px; border-radius:6px; font-size:11px;">
|
|
<strong>Effacer</strong> - Désélectionne tous les domaines
|
|
</div>
|
|
<div style="background:#00d4ff; padding:8px 12px; border-radius:6px; font-size:11px; color:#000;">
|
|
<strong>← Retour Domaines</strong> - Retour à domains-management.php
|
|
</div>
|
|
</div>
|
|
|
|
<hr style="border-color:#333; margin:20px 0;">
|
|
|
|
<h5 style="color:#00d4ff; margin-bottom:10px;"><i class="fas fa-tags"></i> Badges Domaines</h5>
|
|
<div style="display:flex; gap:10px; flex-wrap:wrap;">
|
|
<span style="background:#3b82f6; padding:5px 12px; border-radius:15px; font-size:11px;">Libre O365 - Domaine importé d'O365, non assigné</span>
|
|
<span style="background:#22c55e; padding:5px 12px; border-radius:15px; font-size:11px; color:#000;">VERIFIED - Vérifié par Microsoft</span>
|
|
<span style="background:#f59e0b; padding:5px 12px; border-radius:15px; font-size:11px; color:#000;">PENDING - En attente de vérification</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div style="margin-top:20px; text-align:right;">
|
|
<button onclick="document.getElementById('helpModal').style.display='none'" class="btn btn-primary">Compris !</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php include("includes/chatbot-widget.php"); ?>
|
|
|
|
</body>
|