Files
ms1inscription-v5/superadm/dbold.php
2026-05-13 09:43:32 -04:00

290 lines
7.5 KiB
PHP

<?php
error_reporting(E_ALL);
ini_set("display_errors", true);
require_once "../superadm/php/inc_functions.php";
require_once "../superadm/php/inc_fx_dashboard.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard</title>
<style>
/* General Styles */
body {
margin: 0;
padding: 0;
font-family: 'Arial', sans-serif;
background: radial-gradient(circle at bottom, #0d0d2b, #020212 70%);
color: #d1f1ff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
min-height: 100vh;
}
header {
width: 100%;
padding: 20px;
text-align: center;
background: linear-gradient(to bottom, #121228, #0d0d2b);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
font-size: 24px;
color: #68d8e0;
text-transform: uppercase;
border-bottom: 2px solid #1a3b59;
}
/* Dashboard Grid */
.dashboard {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
padding: 20px;
max-width: 1200px;
width: 100%;
}
/* Dashboard Items */
.dashboard-item {
background: linear-gradient(145deg, #1a3b59, #0d1f33);
border: 1px solid #1f4868;
border-radius: 10px;
padding: 20px;
text-align: center;
box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.1), 0 5px 15px rgba(0, 0, 0, 0.5);
}
.dashboard-itemsm {
background: linear-gradient(145deg, #1a3b33, #0d1f22);
border: 1px solid #1f4868;
border-radius: 10px;
padding: 20px;
text-align: center;
box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.1), 0 5px 15px rgba(0, 0, 0, 0.5);
}
.dashboard-itemsa {
background: linear-gradient(145deg, #2a62bc, #2a62bc);
border: 1px solid #1f4868;
border-radius: 10px;
padding: 20px;
text-align: center;
box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.1), 0 5px 15px rgba(0, 0, 0, 0.5);
grid-column: span 2; /* Étendre sur deux colonnes */
}
.dashboard-itemsu {
background: linear-gradient(145deg, #9fcdff, #9fcdff);
border: 1px solid #1f4868;
border-radius: 10px;
padding: 20px;
color: mintcream;
text-align: left;
box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.1), 0 5px 15px rgba(0, 0, 0, 0.5);
}
.dashboard-item h2 {
color: #68d8e0;
font-size: 20px;
margin-bottom: 10px;
}
.dashboard-item .value {
font-size: 28px;
font-weight: bold;
color: #00e6ff;
}
.dashboard-item p {
color: #b0cce5;
font-size: 16px;
}
/* Additional Styling */
.dashboard-item::after {
content: '';
display: block;
margin: 15px auto;
width: 50%;
height: 2px;
background: linear-gradient(to right, #68d8e0, #00e6ff);
border-radius: 1px;
}
/* Responsive Design */
@media (max-width: 768px) {
header {
font-size: 20px;
}
.dashboard {
padding: 10px;
}
}
</style>
</head>
<body>
<header>
MS1inscription.com
</header>
<div class="dashboard">
<?php
$db = fxGetDashboard();
foreach ($db as $key => $value) {
?>
<div class="dashboard-item" id="<?php echo($value['db_id']); ?>">
<h2><?php echo($value['db_titre']); ?></h2>
<div class="value"> <?php
$arrdb = $objDatabase->fxGetVar($value['db_sql']);
echo($arrdb);
?></div>
</div>
<?php
}
?>
<div class="dashboard-itemsm" id="sm">
<h2>MS1inscription analytiques</h2>
<div class="value"> <?php
$propertyId = '407765252';
$data = analy7jours($propertyId);
$result = [];
$x = 0;
foreach ($data['rows'] as $value) {
$formattedDate = substr($value['dimensionValues'][0]['value'], 0, 4) . '/' . substr($value['dimensionValues'][0]['value'], 4, 2) . '/' . substr($value['dimensionValues'][0]['value'], 6, 2);
$result[$x]['date'] = $formattedDate;
$result[$x]['value'] = $value['metricValues'][0]['value'];
$x = $x + 1;
}
usort($result, function ($a, $b) {
return strtotime($a['date']) <=> strtotime($b['date']);
});
// Affichage des résultats triés
foreach ($result as $value) {
echo($value['date'] . ' : ' . $value['value'] . '<br>');
}
?></div>
</div>
</div>
<header>
Support
</header>
<div class="dashboard">
<div class="dashboard-itemsm" id="sm">
<h2>IN PROGRESS</h2>
<div class="value"> <?php
echo(fxGetTicket('status = "IN PROGRESS"'));
?></div>
</div>
<div class="dashboard-itemsm" id="sm">
<h2>WAITING FOR CUSTOMER</h2>
<div class="value"> <?php
echo(fxGetTicket('status = "WAITING FOR CUSTOMER"'));
?></div>
</div>
<div class="dashboard-itemsm" id="sm">
<h2>WAITING FOR SUPPORT</h2>
<div class="value"> <?php
echo(fxGetTicket('status = "WAITING FOR SUPPORT"'));
?></div>
</div>
<div class="dashboard-itemsm" id="sm">
<h2>PENDING</h2>
<div class="value"> <?php
echo(fxGetTicket('status = "PENDING"'));
?></div>
</div>
<div class="dashboard-itemsu" id="sm">
<h2>UP time serveurs</h2>
<div class="value"> <?php
fxGetUptime();
?></div>
</div>
</div>
<header>
MS1timing
</header>
<div class="dashboard">
<div class="dashboard-itemsa" id="sm">
<h2>Événements à venir</h2>
<div class="value"> <?php
fxGetAgenda();;
?></div>
</div>
<div class="dashboard-itemsm" id="sm">
<h2>MS1timing analytiques</h2>
<div class="value"> <?php
$propertyId = '407665718';
$data = analy7jours($propertyId);
$result=[];
$x=0;
foreach ($data['rows'] as $value) {
$formattedDate = substr($value['dimensionValues'][0]['value'], 0, 4) . '/' . substr($value['dimensionValues'][0]['value'], 4, 2) . '/' . substr($value['dimensionValues'][0]['value'], 6, 2);
$result[$x]['date']=$formattedDate;
$result[$x]['value']=$value['metricValues'][0]['value'];
$x=$x+1;
}
usort($result, function ($a, $b) {
return strtotime($a['date']) <=> strtotime($b['date']);
});
// Affichage des résultats triés
foreach ($result as $value) {
echo($value['date'].' : '.$value['value'].'<br>');
}
?></div>
</div>
</div>
</body>
</html>