'._('Error: Incorrect password').''; } if (empty($_SESSION['adminPasswordHash']) || $auth == false) { echo '
'; } // Test connexion, si c'est ok : if ($auth==true) { languesSwitch(); // Connect DB try { if (preg_match('/^sqlite/', DB)) { $dbco = new PDO(DB); } else { $dbco = new PDO(DB, DBUSER, DBPASS); } $dbco->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch ( PDOException $e ) { die('DB connect error : '.$e->getMessage()); } if (isset($_POST['action'])) { if ($_POST['action'] == 'DeleteEmail' && isset($_POST['email'])) { DeleteEmail($_POST['email']); } if ($_POST['action'] == 'AddBlacklistEmail' && isset($_POST['email'])) { AddBlacklistEmail($_POST['email']); } if ($_POST['action'] == 'DeleteAlias' && isset($_POST['id']) && isset($_POST['alias'])) { DeleteAlias($_POST['id'], $_POST['alias']); } if ($_POST['action'] == 'DisableAlias' && isset($_POST['id']) && isset($_POST['alias'])) { DisableAlias($_POST['id'], $_POST['alias'], $_POST['email']); } } ?> '._('Statistics').' :

'; echo ''; echo '

User info

'; echo '
'; if (isset($_POST['email'])) { $requestUtilisateur = $dbco->query("SELECT * FROM ".DBTABLEPREFIX."alias WHERE email='".$_POST['email']."' ORDER BY dateCreat DESC")->fetchAll() ; echo '

User '.$_POST['email'].' : '; if (count($requestUtilisateur) != 0) { echo 'sup'; if (!BlacklistEmail($_POST['email'])) { echo 'blk'; } } else { echo 'Not found !'; } echo '

'; echo '

'; if (count($requestUtilisateur) != 0) { echo ''; echo ''; foreach ($requestUtilisateur as $utilisateur) { echo ''; } echo '
Status Alias DateCreat DateExpir Comment
'.$utilisateur['status'].' '.$utilisateur['alias'].'
sup'; if ($utilisateur['status'] == 5) { echo 'Suspendre'; } echo '
'.$utilisateur['dateCreat'].' '.$utilisateur['dateExpir'].' '.$utilisateur['comment'].'
'; } } echo '

Top user

'; $recordActifs = $dbco->query("SELECT email, count(alias) calias FROM ".DBTABLEPREFIX."alias WHERE status=5 GROUP BY email ORDER BY calias DESC LIMIT 40")->fetchAll(); echo ''; echo ''; foreach ($recordActifs as $recordActif) { echo ''; } echo '
Email Number of alias Action
'; if (BlacklistEmail($recordActif['email'])) { echo 'blk '; } echo $recordActif['email'].' '.$recordActif['calias'].' sup'; if (!BlacklistEmail($recordActif['email'])) { echo 'blk'; } echo '
'; } ?>