new restylt
This commit is contained in:
+208
-131
@@ -1,43 +1,49 @@
|
||||
<?php
|
||||
include('include/headscript.php');
|
||||
<?php include('include/headscript.php');
|
||||
if (isset($_SESSION["tempcode"])) {
|
||||
unset($_SESSION["tempcode"]);
|
||||
} ?>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
$trfnumbersuser = new WA_MySQLi_RS("trfnumbersuser", $cmctrfdb, 1);
|
||||
$trfnumbersuser->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.iduser='$iduserlogin'");
|
||||
$trfnumbersuser->execute();
|
||||
$numbertrfuser = $trfnumbersuser->TotalRows;
|
||||
?>
|
||||
<?php
|
||||
$trfnumberpercompany = new WA_MySQLi_RS("trfnumberpercompany", $cmctrfdb, 1);
|
||||
$trfnumberpercompany->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idcompany='$idcompany'");
|
||||
$trfnumberpercompany->execute(); ?>
|
||||
<?php
|
||||
$totalparts = new WA_MySQLi_RS("totalparts", $cmctrfdb, 1);
|
||||
$totalparts->setQuery("SELECT * FROM identificationparts LEFT JOIN `trf-details` ON identificationparts.idtrfdetails=`trf-details`.idtrfdetails WHERE `trf-details`.iduser='$user'");
|
||||
$totalparts->execute();
|
||||
?><?php $totalpartstrf = $totalparts->TotalRows ?>
|
||||
<?php
|
||||
$numbertrfcompany = $trfnumberpercompany->TotalRows;
|
||||
?>
|
||||
<?php //search if any module 2 go
|
||||
?>
|
||||
<?php
|
||||
$modulego = new WA_MySQLi_RS("modulego", $cmctrfdb, 0);
|
||||
$modulego->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.iduser='$iduserlogin' AND `trf-details`.csgo='Y' AND `trf-details`.signedonsecondcert IS NULL");
|
||||
$modulego->execute();
|
||||
?>
|
||||
<?php if (!empty($modulego->getColumnVal("csgo"))) {
|
||||
$csgoyes = 'Y';
|
||||
}
|
||||
|
||||
/*
|
||||
* $db è l'istanza di DBHandlerSelect, resa disponibile in headscript.php:
|
||||
* require_once(__DIR__ . '/../class/db-functions.php');
|
||||
* $db = DBHandlerSelect::getInstance();
|
||||
*
|
||||
* Tutte le query qui sotto sono parametrizzate (niente più variabili
|
||||
* dentro la stringa SQL => niente SQL injection).
|
||||
*/
|
||||
|
||||
// N. TRF dell'utente loggato
|
||||
$numbertrfuser = $db->count(
|
||||
"SELECT idtrfdetails FROM `trf-details` WHERE iduser = ?",
|
||||
[$iduserlogin]
|
||||
);
|
||||
|
||||
// N. TRF della company
|
||||
$numbertrfcompany = $db->count(
|
||||
"SELECT idtrfdetails FROM `trf-details` WHERE idcompany = ?",
|
||||
[$idcompany]
|
||||
);
|
||||
|
||||
// N. parti totali collegate ai TRF dell'utente
|
||||
// NOTA: l'originale usava $user (oggetto Auth), qui uso $iduserlogin per coerenza.
|
||||
$totalpartstrf = $db->count(
|
||||
"SELECT identificationparts.ididentificationparts
|
||||
FROM identificationparts
|
||||
LEFT JOIN `trf-details`
|
||||
ON identificationparts.idtrfdetails = `trf-details`.idtrfdetails
|
||||
WHERE `trf-details`.iduser = ?",
|
||||
[$iduserlogin]
|
||||
);
|
||||
|
||||
// Modulo "GO" in sospeso (secondo certificato non ancora firmato)
|
||||
$modulego = $db->selectOne(
|
||||
"SELECT csgo FROM `trf-details`
|
||||
WHERE iduser = ? AND csgo = 'Y' AND signedonsecondcert IS NULL
|
||||
LIMIT 1",
|
||||
[$iduserlogin]
|
||||
);
|
||||
$csgoyes = (!empty($modulego['csgo'])) ? 'Y' : null;
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
@@ -62,40 +68,132 @@ $modulego->execute();
|
||||
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
.btn-custom {
|
||||
background-color: rgb(143, 176, 248);
|
||||
/* Azzurro pastello chiaro */
|
||||
:root {
|
||||
--brand: #6588f1;
|
||||
--brand-dark: #4755d6;
|
||||
--brand-soft: #eef2fe;
|
||||
}
|
||||
|
||||
/* --- Bottoni azione principali --- */
|
||||
.btn-action {
|
||||
border: none;
|
||||
padding: 20px;
|
||||
padding: 22px 20px;
|
||||
font-size: 1.35rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: .2px;
|
||||
border-radius: 14px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
box-shadow: 0 6px 18px rgba(71, 85, 214, .18);
|
||||
transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
|
||||
}
|
||||
|
||||
.btn-action i {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 500;
|
||||
transition: background-color 0.3s ease;
|
||||
opacity: .9;
|
||||
}
|
||||
|
||||
.btn-custom:hover {
|
||||
background-color: rgb(114, 145, 238);
|
||||
/* Leggermente più scuro al passaggio del mouse */
|
||||
.btn-action:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 10px 24px rgba(71, 85, 214, .28);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-custom-dark {
|
||||
background-color: rgb(101, 136, 241);
|
||||
/* Azzurro pastello medio */
|
||||
border: none;
|
||||
padding: 20px;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 500;
|
||||
transition: background-color 0.3s ease;
|
||||
.btn-action-primary {
|
||||
background-color: var(--brand-dark);
|
||||
}
|
||||
|
||||
.btn-custom-dark:hover {
|
||||
background-color: rgb(71, 85, 214);
|
||||
/* Più scuro al passaggio del mouse */
|
||||
.btn-action-primary:hover {
|
||||
background-color: #3b48c4;
|
||||
}
|
||||
|
||||
.btn-action-secondary {
|
||||
background-color: var(--brand);
|
||||
}
|
||||
|
||||
.btn-action-secondary:hover {
|
||||
background-color: var(--brand-dark);
|
||||
}
|
||||
|
||||
.btn-block {
|
||||
display: block;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* --- Card dati / statistiche --- */
|
||||
.stat-card {
|
||||
border: none;
|
||||
border-radius: 14px;
|
||||
box-shadow: 0 2px 10px rgba(20, 30, 70, .06);
|
||||
transition: transform .18s ease, box-shadow .18s ease;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.stat-card:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 10px 22px rgba(20, 30, 70, .12);
|
||||
}
|
||||
|
||||
.stat-card .stat-icon {
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
border-radius: 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.stat-card .stat-label {
|
||||
font-size: .78rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .6px;
|
||||
color: #8a94a6;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.stat-card .stat-value {
|
||||
font-size: 1.9rem;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
color: #2a3142;
|
||||
}
|
||||
|
||||
.icon-users {
|
||||
background: #e7f6ee;
|
||||
color: #2fb87a;
|
||||
}
|
||||
|
||||
.icon-company {
|
||||
background: #fdeef4;
|
||||
color: #e668a0;
|
||||
}
|
||||
|
||||
.icon-parts {
|
||||
background: #f0ecfd;
|
||||
color: #8b6ff0;
|
||||
}
|
||||
|
||||
.icon-reg {
|
||||
background: #fdf4e6;
|
||||
color: #e0a13a;
|
||||
}
|
||||
|
||||
/* --- Header profilo utente --- */
|
||||
.welcome-card {
|
||||
border: none;
|
||||
border-radius: 16px;
|
||||
background: linear-gradient(135deg, var(--brand-soft) 0%, #ffffff 60%);
|
||||
box-shadow: 0 2px 12px rgba(20, 30, 70, .05);
|
||||
}
|
||||
|
||||
.welcome-card .avatar {
|
||||
border: 3px solid #fff;
|
||||
box-shadow: 0 3px 10px rgba(20, 30, 70, .12);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -105,7 +203,6 @@ $modulego->execute();
|
||||
<?php include('include/topbar.php'); ?>
|
||||
<!-- Top Bar End -->
|
||||
|
||||
|
||||
<!-- Left Sidenav -->
|
||||
<?php include('include/leftsidenav.php'); ?>
|
||||
<!-- end left-sidenav-->
|
||||
@@ -132,102 +229,86 @@ $modulego->execute();
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card">
|
||||
<div class="card welcome-card mb-4">
|
||||
<div class="card-body">
|
||||
<div class="media">
|
||||
<img src="upload/users/<?php echo $avatarname; ?>" alt="" class="thumb-md rounded-circle mr-2">
|
||||
<img src="upload/users/<?php echo $avatarname; ?>" alt="" class="avatar thumb-md rounded-circle mr-3">
|
||||
<div class="media-body align-self-center">
|
||||
<h4 class="mt-0 mb-1"><?php echo $welcomeuser; ?><?php echo $nameuser; ?></h4>
|
||||
<p class="text-muted mb-0 font-14 pr-5"><?php echo $welcome_help; ?></p>
|
||||
</div><!--end media-body-->
|
||||
</div><!--end media-->
|
||||
<br>
|
||||
<!-- Due tasti -->
|
||||
|
||||
<!-- Due tasti azione -->
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-4 mb-3">
|
||||
<a href="typeofcertificatenew.php?varcertificate=m&certotherclient=N" class="btn btn-custom-dark btn-lg btn-block text-white">
|
||||
<i class="fas fa-plus mr-2"></i> <?php echo $insertnewrequest; ?>
|
||||
<a href="typeofcertificatenew.php?varcertificate=m&certotherclient=N" class="btn-action btn-action-primary btn-block">
|
||||
<i class="fas fa-plus"></i> <?php echo $insertnewrequest; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<a href="archivetrf.php" class="btn btn-custom btn-lg btn-block text-white">
|
||||
<i class="fas fa-archive mr-2"></i> <?php echo $showarchive; ?>
|
||||
<a href="archivetrf.php" class="btn-action btn-action-secondary btn-block">
|
||||
<i class="fas fa-archive"></i> <?php echo $showarchive; ?>
|
||||
</a>
|
||||
</div>
|
||||
</div><!--end row dei tasti -->
|
||||
</div><!--end card-body-->
|
||||
</div><!--end card-->
|
||||
|
||||
<!-- Rimangono i riquadri con i numeri -->
|
||||
<!-- Riquadri con i numeri -->
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="card crm-data-card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-4 align-self-center">
|
||||
<div class="icon-info">
|
||||
<i class="far fa-user rounded-circle bg-soft-success"></i>
|
||||
</div>
|
||||
</div><!-- end col-->
|
||||
|
||||
<div class="col-8 text-right">
|
||||
<p class="text-muted font-14"><?php echo $numbertrfusertitle; ?></p>
|
||||
<h3 class="mb-0"><?php echo $numbertrfuser; ?></h3>
|
||||
</div><!-- end col-->
|
||||
</div><!-- end row-->
|
||||
</div><!--end card-body-->
|
||||
</div><!--end card-->
|
||||
</div><!--end col-->
|
||||
<div class="col-sm-3">
|
||||
<div class="card crm-data-card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-4 align-self-center">
|
||||
<div class="icon-info">
|
||||
<i class="fas fa-chess-rook rounded-circle bg-soft-pink"></i>
|
||||
</div>
|
||||
</div><!-- end col-->
|
||||
<div class="col-8 text-right">
|
||||
<p class="text-muted font-14"><?php echo $numbertrfcompanytitle; ?></p>
|
||||
<h3 class="mb-0"><?php echo $numbertrfcompany; ?></h3>
|
||||
</div><!-- end col-->
|
||||
</div><!-- end row-->
|
||||
<div class="col-sm-3 mb-3">
|
||||
<div class="card stat-card h-100">
|
||||
<div class="card-body d-flex align-items-center">
|
||||
<div class="stat-icon icon-users mr-3">
|
||||
<i class="far fa-user"></i>
|
||||
</div>
|
||||
<div>
|
||||
<p class="stat-label"><?php echo $numbertrfusertitle; ?></p>
|
||||
<div class="stat-value"><?php echo $numbertrfuser; ?></div>
|
||||
</div>
|
||||
</div><!--end card-body-->
|
||||
</div><!--end card-->
|
||||
</div><!--end col-->
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="card crm-data-card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-4 align-self-center">
|
||||
<div class="icon-info">
|
||||
<i class="fas fa-angle-double-up rounded-circle bg-soft-purple"></i>
|
||||
</div>
|
||||
</div><!-- end col-->
|
||||
<div class="col-8 text-right">
|
||||
<p class="text-muted font-14"><?php echo $partsnumbertitle; ?></p>
|
||||
<h3 class="mb-0"><?php echo $totalpartstrf; ?></h3>
|
||||
</div><!-- end col-->
|
||||
</div><!-- end row-->
|
||||
<div class="col-sm-3 mb-3">
|
||||
<div class="card stat-card h-100">
|
||||
<div class="card-body d-flex align-items-center">
|
||||
<div class="stat-icon icon-company mr-3">
|
||||
<i class="fas fa-chess-rook"></i>
|
||||
</div>
|
||||
<div>
|
||||
<p class="stat-label"><?php echo $numbertrfcompanytitle; ?></p>
|
||||
<div class="stat-value"><?php echo $numbertrfcompany; ?></div>
|
||||
</div>
|
||||
</div><!--end card-body-->
|
||||
</div><!--end card-->
|
||||
</div><!--end col-->
|
||||
<div class="col-sm-3">
|
||||
<div class="card crm-data-card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-4 align-self-center">
|
||||
<div class="icon-info">
|
||||
<i class="far fa-registered rounded-circle bg-soft-warning"></i>
|
||||
</div>
|
||||
</div><!-- end col-->
|
||||
<div class="col-8 text-right">
|
||||
<p class="text-muted font-14"></p>
|
||||
<h3 class="mb-0">-</h3>
|
||||
|
||||
</div><!-- end col-->
|
||||
</div><!-- end row-->
|
||||
<div class="col-sm-3 mb-3">
|
||||
<div class="card stat-card h-100">
|
||||
<div class="card-body d-flex align-items-center">
|
||||
<div class="stat-icon icon-parts mr-3">
|
||||
<i class="fas fa-angle-double-up"></i>
|
||||
</div>
|
||||
<div>
|
||||
<p class="stat-label"><?php echo $partsnumbertitle; ?></p>
|
||||
<div class="stat-value"><?php echo $totalpartstrf; ?></div>
|
||||
</div>
|
||||
</div><!--end card-body-->
|
||||
</div><!--end card-->
|
||||
</div><!--end col-->
|
||||
|
||||
<div class="col-sm-3 mb-3">
|
||||
<div class="card stat-card h-100">
|
||||
<div class="card-body d-flex align-items-center">
|
||||
<div class="stat-icon icon-reg mr-3">
|
||||
<i class="far fa-registered"></i>
|
||||
</div>
|
||||
<div>
|
||||
<p class="stat-label"> </p>
|
||||
<div class="stat-value">-</div>
|
||||
</div>
|
||||
</div><!--end card-body-->
|
||||
</div><!--end card-->
|
||||
</div><!--end col-->
|
||||
@@ -237,15 +318,11 @@ $modulego->execute();
|
||||
</div><!-- container -->
|
||||
<!-- footer start -->
|
||||
<?php include('include/footer.php'); ?>
|
||||
</footer><!--end footer-->
|
||||
</div>
|
||||
<!-- end page content -->
|
||||
</div>
|
||||
<!-- end page-wrapper -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="assets/js/jquery.min.js"></script>
|
||||
<script src="assets/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user