53 lines
4.8 KiB
PHP
Executable File
53 lines
4.8 KiB
PHP
Executable File
<?php
|
|
$pdo = new PDO('pgsql:host=localhost;dbname=adx_system', 'admin', 'admin123');
|
|
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|
|
|
$stats = ['total' => 0, 'active' => 0];
|
|
try {
|
|
$result = $pdo->query("SELECT COUNT(*) FROM admin.google_accounts");
|
|
if ($result) $stats['total'] = $result->fetchColumn() ?: 0;
|
|
} catch(Exception $e) {}
|
|
try {
|
|
$result = $pdo->query("SELECT COUNT(*) FROM admin.google_accounts WHERE status='Active'");
|
|
if ($result) $stats['active'] = $result->fetchColumn() ?: 0;
|
|
} catch(Exception $e) {}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html><head>
|
|
<meta charset="UTF-8">
|
|
<title>Google Manager</title>
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
|
<style>
|
|
*{margin:0;padding:0;box-sizing:border-box}body{font-family:system-ui;background:#0a0a0f;color:#e2e8f0;min-height:100vh;padding:20px}h1{color:#ea4335;margin-bottom:10px}.back-link{color:#5eead4;text-decoration:none;display:inline-block;margin-bottom:20px}.process-box{background:#12121a;border-radius:12px;padding:20px;margin-bottom:20px;border:1px solid #333}.process-title{color:#ea4335;margin-bottom:15px;font-size:1.1rem}.process-flow{display:flex;flex-wrap:wrap;gap:15px;align-items:center;justify-content:center}.process-step{background:#1a1a2e;border:2px solid #333;border-radius:10px;padding:15px;min-width:130px;text-align:center}.process-step .icon{font-size:1.8rem;margin-bottom:8px}.process-step .num{width:24px;height:24px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:0.8rem;font-weight:bold;margin-bottom:5px}.process-step .title{font-weight:bold;font-size:0.85rem;margin-bottom:5px}.process-step .desc{font-size:0.7rem;opacity:0.8}.process-arrow{color:#ea4335;font-size:1.5rem}.summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:15px;margin-bottom:25px}.summary-card{background:#12121a;padding:20px;border-radius:12px;text-align:center;border-left:4px solid #ea4335}.summary-card.green{border-color:#10b981}.summary-val{font-size:2rem;font-weight:bold;color:#ea4335}.summary-card.green .summary-val{color:#10b981}.summary-lbl{font-size:0.85rem;opacity:0.7}.info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:15px;margin-top:15px;font-size:0.85rem}.info-grid div{background:#1a1a2e;padding:12px;border-radius:8px}.panel{background:#12121a;border-radius:12px;padding:20px;margin-top:20px}.btn{padding:10px 20px;border:none;border-radius:6px;cursor:pointer;background:#ea4335;color:white;text-decoration:none;display:inline-flex;align-items:center;gap:5px}
|
|
</style>
|
|
|
|
</head><body>
|
|
<a href="/system-flows.php" class="back-link"><i class="fas fa-arrow-left"></i> Retour aux System Flows</a>
|
|
<div class="process-box">
|
|
<h3 class="process-title"><i class="fab fa-google"></i> Comment fonctionne Google Accounts ?</h3>
|
|
<div class="process-flow">
|
|
<div class="process-step"><div class="icon">📥</div><div class="num" style="background:#ea4335;color:white">1</div><div class="title" style="color:#ea4335">IMPORT</div><div class="desc">Comptes Gmail<br>App Password</div></div>
|
|
<div class="process-arrow">→</div>
|
|
<div class="process-step"><div class="icon">🔑</div><div class="num" style="background:#fbbc05;color:black">2</div><div class="title" style="color:#fbbc05">GOOGLE OAUTH</div><div class="desc">Google API<br>autorisation</div></div>
|
|
<div class="process-arrow">→</div>
|
|
<div class="process-step"><div class="icon">📧</div><div class="num" style="background:#34a853;color:white">3</div><div class="title" style="color:#34a853">GMAIL API</div><div class="desc">SMTP/IMAP<br>enabled</div></div>
|
|
<div class="process-arrow">→</div>
|
|
<div class="process-step"><div class="icon">🌱</div><div class="num" style="background:#4285f4;color:white">4</div><div class="title" style="color:#4285f4">SEEDS</div><div class="desc">Extraction<br>newsletters</div></div>
|
|
<div class="process-arrow">→</div>
|
|
<div class="process-step"><div class="icon">✅</div><div class="num" style="background:#5eead4;color:black">5</div><div class="title" style="color:#5eead4">ACTIVE</div><div class="desc">Prêt</div></div>
|
|
</div>
|
|
</div>
|
|
<h1><i class="fab fa-google"></i> Google Manager</h1>
|
|
<p style="opacity:0.7;margin-bottom:20px">Gestion des comptes Google / Gmail</p>
|
|
<div class="summary">
|
|
<div class="summary-card"><div class="summary-val"><?=$stats['total']?></div><div class="summary-lbl">Total</div></div>
|
|
<div class="summary-card green"><div class="summary-val"><?=$stats['active']?></div><div class="summary-lbl">Active</div></div>
|
|
</div>
|
|
<div class="panel">
|
|
<h4 style="color:#ea4335;margin-bottom:15px"><i class="fas fa-link"></i> Accès rapide</h4>
|
|
<a href="/gsuite-manager.php" class="btn"><i class="fas fa-cogs"></i> GSuite Manager</a>
|
|
<a href="/harvest-manager.php" class="btn" style="margin-left:10px"><i class="fas fa-seedling"></i> Harvest</a>
|
|
</div>
|
|
|
|
</body></html>
|