0001.
<?php
0002.
require_once
(
'connection.php'
);
0003.
0004.
header(
"Content-type:text/html; charset=UTF-8"
);
0005.
header(
"Cache-Control: no-store, no-cache, must-revalidate"
);
0006.
header(
"Cache-Control: post-check=0, pre-check=0"
, false);
0007.
if
(isset(
$_GET
[
'rev'
]) &&
$_GET
[
'rev'
] == 1) {
0008.
echo
date
(
"Y-m-d H:i:s"
);
0009.
exit
;
0010.
}
0011.
0012.
?>
0013.
<!DOCTYPE html>
0014.
<html lang=
"en"
>
0015.
0016.
<head>
0017.
<meta charset=
"UTF-8"
>
0018.
<meta name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
0019.
<title>DashBoard</title>
0020.
0021.
<link rel=
"stylesheet"
href=
"bootstrap/bootstrap.css"
>
0022.
<!-- <link rel=
"stylesheet"
type=
"text/css"
href=
"stylesheet/styles.css"
> -->
0024.
0026.
<script language=
"javascript"
src=
"jquery/jquery-3.5.1.min.js"
></script>
0027.
</head>
0028.
0029.
<body>
0030.
<div id=
"showData"
></div>
0031.
0032.
<script type=
"text/javascript"
>
0033.
$(
function
() {
0034.
setInterval(
function
() {
0035.
var
getData = $.ajax({
0036.
type:
'POST'
,
0037.
data:
"rev=1"
,
0038.
async: false,
0039.
success:
function
(getData) {
0040.
$(
"div#showData"
).html(getData);
0041.
}
0042.
}).responseText;
0043.
}, 5000);
0044.
});
0045.
</script>
0046.
0047.
0048.
<!-- start style -->
0049.
<style>
0050.
0051.
0052.
0053.
0054.
0055.
0056.
0057.
0058.
0059.
0060.
0061.
0062.
0063.
0064.
0065.
0066.
0067.
0068.
0069.
0070.
0071.
body {
0072.
0073.
0074.
0075.
font-weight: 400;
0076.
background: #eff3f6;
0077.
position: relative;
0078.
}
0079.
0080.
table,
0081.
td,
0082.
th {
0083.
border: 0px solid green;
0084.
0085.
}
0086.
0087.
th {
0088.
0089.
color: green;
0090.
}
0091.
0092.
0093.
.card {
0094.
border-radius: 2px;
0095.
box-shadow: 0 0 0 1px #e2e5e8;
0096.
border: none;
0097.
margin-bottom: 30px;
0098.
transition: all 0.5s ease-in-out;
0099.
}
0100.
0101.
0102.
0103.
0104.
0105.
0106.
0107.
.h3,
0108.
h3 {
0109.
font-size: 1.75rem;
0110.
}
0111.
0112.
0113.
h3 {
0114.
display: block;
0115.
0116.
margin-block-start: 1em;
0117.
margin-block-
end
: 1em;
0118.
margin-inline-start: 0px;
0119.
margin-inline-
end
: 0px;
0120.
font-weight: bold;
0121.
0122.
}
0123.
0124.
0125.
.f-36 {
0126.
font-size: 50px;
0127.
}
0128.
0129.
0130.
h1,
0131.
h2,
0132.
h3,
0133.
h4,
0134.
h5,
0135.
h6 {
0136.
margin-top: 0;
0137.
margin-bottom: .1rem;
0138.
}
0139.
0140.
0141.
.card .card-block,
0142.
.card .card-body {
0143.
padding: 20px 25px;
0144.
}
0145.
0146.
0147.
.card-social .card-active>div+div {
0148.
border-left: 1px solid #e2e5e8;
0149.
}
0150.
0151.
0152.
0153.
0154.
.text-c-green {
0155.
color: #19BCBF;
0156.
}
0157.
0158.
0159.
.text-Info {
0160.
color: #58C8AC !important;
0161.
}
0162.
0163.
0164.
0165.
0166.
.text-c-yellow {
0167.
color: #19BCBF;
0168.
0169.
}
0170.
0171.
0172.
.text-c-red {
0173.
color: #FF425C;
0174.
0175.
}
0176.
0177.
0178.
.text-danger {
0179.
color: #58C8AC !important;
0180.
}
0181.
0182.
0183.
0184.
0185.
.text-c-blue {
0186.
color: #19BCBF;
0187.
}
0188.
0189.
0190.
.text-primary {
0191.
color: #58C8AC !important;
0192.
}
0193.
0194.
0195.
.bg-warning,
0196.
.bg-warning>a {
0197.
color: #fff !important;
0198.
background-color: #92AAC7 !important;
0199.
}
0200.
0201.
0202.
.bg-info,
0203.
.bg-info>a {
0204.
color: #fff !important;
0205.
background-color: #B3DE81 !important;
0206.
}
0207.
0208.
0209.
.bg-danger,
0210.
.bg-danger>a {
0211.
color: #fff !important;
0212.
background-color: #FCC875 !important;
0213.
}
0214.
</style>
0215.
0216.
0217.
<nav
class
=
"navbar navbar-expand-lg navbar-dark bg-dark text-uppercase fixed-top"
>
0218.
<a
class
=
"fas fa-desktop fa-2x"
href=
"#"
></a>
0219.
0220.
<button
class
=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarSupportedContent"
aria-controls=
"navbarSupportedContent"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
0221.
<span
class
=
"navbar-toggler-icon"
></span>
0222.
</button>
0223.
0224.
<div
class
=
"collapse navbar-collapse"
id=
"navbarSupportedContent"
>
0225.
<ul
class
=
"navbar-nav mr-auto"
>
0226.
<li
class
=
"nav-item active"
>
0227.
<a
class
=
"nav-link"
href=
"index.php"
>Computer Management System<span
class
=
"sr-only"
>(current)</span></a>
0228.
</li>
0229.
0230.
<li
class
=
"nav-item "
>
0231.
<a
class
=
"nav-link"
href=
"dashboardcms.php"
>DashBoard</a>
0232.
</li>
0233.
0234.
<li
class
=
"nav-item "
>
0235.
<a
class
=
"nav-link"
href=
"modalmasterpc.php"
>Master Pc</a>
0236.
</li>
0237.
0238.
<li
class
=
"nav-item "
>
0239.
<a
class
=
"nav-link"
href=
"v_detail_pc.php"
>Detail Pc</a>
0240.
</li>
0241.
0242.
<li
class
=
"nav-item"
>
0243.
<a
class
=
"nav-link"
href=
"v_monitor_pc.php"
>Monitor Pc</a>
0244.
</li>
0245.
</ul>
0246.
</div>
0247.
</nav>
0248.
<br>
0249.
<br>
0250.
0251.
<!-- start header -->
0252.
<!-- <header
class
=
"masthead bg-primary"
> -->
0253.
<div
class
=
"container"
>
0254.
<div
class
=
"row "
>
0255.
<div
class
=
"col-lg-12"
>
0256.
<!-- <br><img
class
=
"d-block mx-auto mb-4"
src=
"bg/web analysic.png"
alt=
""
width=
"72"
height=
"72"
> -->
0257.
<!-- <br><img
class
=
"d-block mx-auto mb-4"
src=
"bg/logo dashboard.png"
> -->
0258.
<!-- <h2
class
=
"display text-center text-uppercase"
>DashBoard Computer Management</h2> -->
0259.
<br>
0260.
<?php
0261.
0262.
0263.
0264.
0265.
0266.
?>
0267.
<hr>
0268.
0269.
<!-----------------------------------start card cp3---------------------------------->
0270.
<div
class
=
"row"
>
0271.
<!-- sum total pc on-->
0272.
<?php
0273.
$totalpcon
= 0;
0274.
$sql1
= "SELECT location,sum(total)
as
totalpcon FROM monitorpc.v_check_pc_daily
0275.
where location =
'cp3'
and
timestamp = CURRENT_DATE group by location ;";
0276.
0277.
$result1
=
$mysqli
->query(
$sql1
);
0278.
while
(
$row
=
$result1
->fetch_array(MYSQLI_ASSOC)) {
0279.
$totalpcon
=
$totalpcon
+
$row
[
'totalpcon'
];
0280.
} ?>
0281.
0282.
<!----------statuspc-------->
0283.
<?php
0284.
$statuspc
= 0;
0285.
$sql
= "SELECT ip, statuspc,
count
(ip)
as
countstatus FROM monitorpc.tbl_detail_pc where ip LIKE
'10.183%'
0286.
and
statuspc =
'2'
;";
0287.
$result2
=
$mysqli
->query(
$sql
);
0288.
while
(
$row
=
$result2
->fetch_array(MYSQLI_ASSOC)) {
0289.
$statuspc
=
$statuspc
+
$row
[
'countstatus'
];
0290.
} ?>
0291.
0292.
<!-------
count
total pc ------->
0293.
<?php
0294.
$total
= 0;
0295.
$sql1
= "SELECT team,
count
(no)
as
countpc FROM monitorpc.master_pc
0296.
where location =
'cp3'
and
(type =
'PC Gosoft'
or
type =
'Notebook Gosoft'
or
type =
'All in one'
)
0297.
group by team ;";
0298.
0299.
$result1
=
$mysqli
->query(
$sql1
);
0300.
while
(
$row
=
$result1
->fetch_array(MYSQLI_ASSOC)) {
0301.
$total
=
$total
+
$row
[
'countpc'
];
0302.
0303.
} ?>
0304.
<div
class
=
"col-md-12 col-xl-4"
>
0305.
<div
class
=
"card card-social "
>
0306.
<div
class
=
"card-block border-bottom"
>
0307.
<div
class
=
"row align-items-center justify-content-center"
>
0308.
<div
class
=
"col-auto"
>
0309.
<i
class
=
"fas fa-desktop text-Info f-36"
></i>
0310.
</div>
0311.
<div
class
=
"col text-right"
>
0312.
<h3>Location CP3</h3>
0313.
<h5
class
=
"text-muted "
>Total PC <span
class
=
"text-c-green mb-0 "
> <?php
echo
$total
; ?></span></h5>
0314.
</div>
0315.
</div>
0316.
</div>
0317.
<div
class
=
"card-block"
>
0318.
<div
class
=
"row align-items-center justify-content-center card-active"
>
0319.
<div
class
=
"col-6"
>
0320.
<h6
class
=
"text-center m-b-10"
><span
class
=
"text-muted m-r-5"
>Total PC New:</span><span
class
=
"text-c-red mb-0 "
><a target=
"_blank"
href=
"pcnew.php"
> <?php
echo
$statuspc
; ?></a> </h6>
0321.
</div>
0322.
<div
class
=
"col-6"
>
0323.
<h6
class
=
"text-center m-b-10"
><span
class
=
"text-muted m-r-5"
>Total PC ON:</span><span
class
=
"text-c-red mb-0 "
> <?php
echo
$totalpcon
; ?></h6>
0324.
</div>
0325.
</div>
0326.
</div>
0327.
<table
class
=
"table table-bordered text-center"
style=
"font-size:8pt;"
>
0328.
<thead>
0329.
<tr>
0330.
<th>Team</th>
0331.
<th>PC Gosoft</th>
0332.
<th>PC CPAll</th>
0333.
<th>AIO</th>
0334.
<th>NB Gosoft</th>
0335.
<th>PC ON</th>
0336.
</tr>
0337.
</thead>
0338.
0339.
<tbody>
0340.
<?php
0341.
0342.
0343.
0344.
0345.
0346.
0347.
0348.
0349.
0350.
?>
0351.
0352.
<!-- <<-------------total
count
opt1 2 3 support------->
0353.
<?php
0354.
$sql
=
"SELECT team FROM monitorpc.master_pc where location ='cp3' group by team ;"
;
0355.
$result
=
$mysqli
->query(
$sql
);
0356.
while
(
$row
=
$result
->fetch_array(MYSQLI_ASSOC)) {
0357.
$team
=
$row
[
'team'
];
0358.
0359.
0360.
$num2
= 0;
0361.
$sql2
= "SELECT team
as
countpc FROM monitorpc.master_pc where location =
'cp3'
0362.
and
type =
'pc gosoft'
and
team =
'$team'
;";
0363.
$result2
=
$mysqli
->query(
$sql2
);
0364.
while
(
$row2
=
$result2
->fetch_array(MYSQLI_ASSOC)) {
0365.
0366.
$num2
+= 1;
0367.
}
0368.
0369.
0370.
$num3
= 0;
0371.
$sql3
= "SELECT team
as
countpc FROM monitorpc.master_pc where location =
'cp3'
0372.
and
type =
'pc cpall'
and
team =
'$team'
;";
0373.
$result3
=
$mysqli
->query(
$sql3
);
0374.
while
(
$row3
=
$result3
->fetch_array(MYSQLI_ASSOC)) {
0375.
0376.
$num3
+= 1;
0377.
}
0378.
0379.
0380.
$num4
= 0;
0381.
$sql4
= "SELECT team
as
countpcaio FROM monitorpc.master_pc where location =
'cp3'
0382.
and
type =
'all in one'
and
team =
'$team'
;";
0383.
$result4
=
$mysqli
->query(
$sql4
);
0384.
while
(
$row4
=
$result4
->fetch_array(MYSQLI_ASSOC)) {
0385.
0386.
$num4
+= 1;
0387.
}
0388.
0389.
0390.
$num5
= 0;
0391.
$sql5
= "SELECT team
as
countnb FROM monitorpc.master_pc where location =
'cp3'
0392.
and
type =
'notebook gosoft'
and
team =
'$team'
;";
0393.
$result5
=
$mysqli
->query(
$sql5
);
0394.
while
(
$row5
=
$result5
->fetch_array(MYSQLI_ASSOC)) {
0395.
0396.
$num5
+= 1;
0397.
}
0398.
0399.
0400.
$sql6
= "SELECT team,sum(total)
as
pcon FROM monitorpc.v_check_pc_daily where location =
'cp3'
0401.
and
timestamp = CURRENT_DATE
and
team =
'$team'
";
0402.
0403.
$result6
=
$mysqli
->query(
$sql6
);
0404.
while
(
$row6
=
$result6
->fetch_array(MYSQLI_ASSOC)) {
0405.
$pcon
=
$row6
[
'pcon'
];
0406.
}
0407.
0408.
?>
0409.
<tr>
0410.
<td><?=
$team
?></td>
0411.
<td><?=
$num2
?></td>
0412.
<td><?=
$num3
?></td>
0413.
<td><?=
$num4
?></td>
0414.
<td><?=
$num5
?></td>
0415.
<td><span
class
=
"text-c-red mb-0 "
><?php
echo
$pcon
?></td>
0416.
<!-- <td><span
class
=
"text-c-red mb-0 "
><?php
echo
$_arrname
[
$row
[
'team'
]]; ?></td> -->
0417.
</tr>
0418.
<?php } ?>
0419.
</tbody>
0420.
0421.
</table>
0422.
0423.
</div>
0424.
</div>
0425.
0426.
0427.
0428.
<!-----------------------------------start card tara---------------------------------->
0429.
<!-- sum total pc on-->
0430.
<?php
0431.
$totalpcon
= 0;
0432.
$sql1
= "SELECT location,sum(total)
as
totalpcon FROM monitorpc.v_check_pc_daily
0433.
where location =
'Tara park'
and
timestamp = CURRENT_DATE group by location ;";
0434.
0435.
$result1
=
$mysqli
->query(
$sql1
);
0436.
while
(
$row
=
$result1
->fetch_array(MYSQLI_ASSOC)) {
0437.
$totalpcon
=
$totalpcon
+
$row
[
'totalpcon'
];
0438.
} ?>
0439.
0440.
<!----------statuspc-------->
0441.
<?php
0442.
0443.
0444.
$statuspc
= 0;
0445.
$sql
= "SELECT statuspc,
count
(ip)
as
countstatus FROM monitorpc.tbl_detail_pc where ip LIKE
'10.150%'
0446.
and
statuspc =
'2'
;";
0447.
$result2
=
$mysqli
->query(
$sql
);
0448.
while
(
$row
=
$result2
->fetch_array(MYSQLI_ASSOC)) {
0449.
0450.
$statuspc
=
$statuspc
+
$row
[
'countstatus'
];
0451.
0452.
} ?>
0453.
0454.
<!-------
count
total pc ------->
0455.
<?php
0456.
$total
= 0;
0457.
$sql1
= "SELECT team,
count
(no)
as
countpc FROM monitorpc.master_pc
0458.
where location =
'Tara park'
group by team ;";
0459.
0460.
$result1
=
$mysqli
->query(
$sql1
);
0461.
while
(
$row
=
$result1
->fetch_array(MYSQLI_ASSOC)) {
0462.
$total
=
$total
+
$row
[
'countpc'
];
0463.
} ?>
0464.
<div
class
=
"col-md-12 col-xl-4"
>
0465.
<div
class
=
"card card-social "
>
0466.
<div
class
=
"card-block border-bottom"
>
0467.
<div
class
=
"row align-items-center justify-content-center"
>
0468.
<div
class
=
"col-auto"
>
0469.
<i
class
=
"fas fa-desktop text-Info f-36"
></i>
0470.
</div>
0471.
<div
class
=
"col text-right"
>
0472.
<h3>Location Tara</h3>
0473.
<h5
class
=
"text-muted "
>Total PC <span
class
=
"text-c-green mb-0 "
> <?php
echo
$total
; ?></span></h5>
0474.
</div>
0475.
</div>
0476.
</div>
0477.
<div
class
=
"card-block"
>
0478.
<div
class
=
"row align-items-center justify-content-center card-active"
>
0479.
<div
class
=
"col-6"
>
0480.
<h6
class
=
"text-center m-b-10"
><span
class
=
"text-muted m-r-5"
>Total PC New:</span><span
class
=
"text-c-red mb-0 "
> <?php
echo
$statuspc
; ?></h6>
0481.
</div>
0482.
<div
class
=
"col-6"
>
0483.
<h6
class
=
"text-center m-b-10"
><span
class
=
"text-muted m-r-5"
>Total PC ON:</span><span
class
=
"text-c-red mb-0 "
> <?php
echo
$totalpcon
; ?></h6>
0484.
</div>
0485.
</div>
0486.
</div>
0487.
<table
class
=
"table table-bordered text-center"
style=
"font-size:8pt;"
>
0488.
<thead>
0489.
<tr>
0490.
<th>Team</th>
0491.
<th>PC Gosoft</th>
0492.
<th>PC CPAll</th>
0493.
<th>AIO</th>
0494.
<th>NB Gosoft</th>
0495.
<th>PC ON</th>
0496.
</tr>
0497.
</thead>
0498.
0499.
<tbody>
0500.
0501.
<!-- <<-------------total
count
opt1 2 3 support------->
0502.
<?php
0503.
$sql
=
"SELECT team FROM monitorpc.master_pc where location ='Tara park' group by team ;"
;
0504.
$result
=
$mysqli
->query(
$sql
);
0505.
while
(
$row
=
$result
->fetch_array(MYSQLI_ASSOC)) {
0506.
$team
=
$row
[
'team'
];
0507.
0508.
0509.
$num2
= 0;
0510.
$sql2
= "SELECT team
as
countpc FROM monitorpc.master_pc where location =
'Tara park'
0511.
and
type =
'pc gosoft'
and
team =
'$team'
;";
0512.
$result2
=
$mysqli
->query(
$sql2
);
0513.
while
(
$row2
=
$result2
->fetch_array(MYSQLI_ASSOC)) {
0514.
0515.
$num2
+= 1;
0516.
}
0517.
0518.
$num3
= 0;
0519.
$sql3
= "SELECT team
as
countpc FROM monitorpc.master_pc where location =
'Tara park'
0520.
and
type =
'pc cpall'
and
team =
'$team'
;";
0521.
$result3
=
$mysqli
->query(
$sql3
);
0522.
while
(
$row3
=
$result3
->fetch_array(MYSQLI_ASSOC)) {
0523.
0524.
$num3
+= 1;
0525.
}
0526.
0527.
0528.
$num4
= 0;
0529.
$sql4
= "SELECT team
as
countpcaio FROM monitorpc.master_pc where location =
'Tara park'
0530.
and
type =
'all in one'
and
team =
'$team'
;";
0531.
$result4
=
$mysqli
->query(
$sql4
);
0532.
while
(
$row4
=
$result4
->fetch_array(MYSQLI_ASSOC)) {
0533.
0534.
$num4
+= 1;
0535.
}
0536.
0537.
0538.
$num5
= 0;
0539.
$sql5
= "SELECT team
as
countnb FROM monitorpc.master_pc where location =
'Tara park'
0540.
and
type =
'notebook gosoft'
and
team =
'$team'
;";
0541.
$result5
=
$mysqli
->query(
$sql5
);
0542.
while
(
$row5
=
$result5
->fetch_array(MYSQLI_ASSOC)) {
0543.
0544.
$num5
+= 1;
0545.
}
0546.
0547.
0548.
$sql6
= "SELECT team,sum(total)
as
pcon FROM monitorpc.v_check_pc_daily where location =
'Tara park'
0549.
and
timestamp = CURRENT_DATE
and
team =
'$team'
";
0550.
0551.
$result6
=
$mysqli
->query(
$sql6
);
0552.
while
(
$row6
=
$result6
->fetch_array(MYSQLI_ASSOC)) {
0553.
$pcon
=
$row6
[
'pcon'
];
0554.
}
0555.
0556.
?>
0557.
<tr>
0558.
<td><?=
$team
?></td>
0559.
<td><?=
$num2
?></td>
0560.
<td><?=
$num3
?></td>
0561.
<td><?=
$num4
?></td>
0562.
<td><?=
$num5
?></td>
0563.
<td><span
class
=
"text-c-red mb-0 "
><?php
echo
$pcon
?></td>
0564.
0565.
</tr>
0566.
<?php } ?>
0567.
</tbody>
0568.
0569.
</table>
0570.
0571.
</div>
0572.
</div>
0573.
0574.
0575.
0576.
<!-----------------------------------start card wfh---------------------------------->
0577.
<!-- start card3 sum total pc on-->
0578.
<!-- sum total pc on-->
0579.
<?php
0580.
$totalpcon
= 0;
0581.
$sql1
= "SELECT location,sum(total)
as
totalpcon FROM monitorpc.v_check_pc_daily
0582.
where location =
'wfh'
and
timestamp = CURRENT_DATE group by location ;";
0583.
0584.
$result1
=
$mysqli
->query(
$sql1
);
0585.
while
(
$row
=
$result1
->fetch_array(MYSQLI_ASSOC)) {
0586.
$totalpcon
=
$totalpcon
+
$row
[
'totalpcon'
];
0587.
} ?>
0588.
0589.
<!----------statuspc-------->
0590.
<?php
0591.
$statuspc
= 0;
0592.
$sql
= "SELECT statuspc,
count
(ip)
as
countstatus FROM monitorpc.tbl_detail_pc where ip LIKE
'192.168%'
0593.
and
statuspc =
'2'
;";
0594.
$result2
=
$mysqli
->query(
$sql
);
0595.
while
(
$row
=
$result2
->fetch_array(MYSQLI_ASSOC)) {
0596.
$statuspc
=
$statuspc
+
$row
[
'countstatus'
];
0597.
}
0598.
0599.
0600.
0601.
0602.
0603.
0604.
0605.
0606.
0607.
0608.
0609.
?>
0610.
0611.
<!-------
count
total pc ------->
0612.
<?php
0613.
$total
= 0;
0614.
$sql1
= "SELECT team,
count
(no)
as
countpc FROM monitorpc.master_pc
0615.
where location =
'wfh'
group by team ;";
0616.
0617.
$result1
=
$mysqli
->query(
$sql1
);
0618.
while
(
$row
=
$result1
->fetch_array(MYSQLI_ASSOC)) {
0619.
$total
=
$total
+
$row
[
'countpc'
];
0620.
} ?>
0621.
<div
class
=
"col-md-12 col-xl-4"
>
0622.
<div
class
=
"card card-social "
>
0623.
<div
class
=
"card-block border-bottom"
>
0624.
<div
class
=
"row align-items-center justify-content-center"
>
0625.
<div
class
=
"col-auto"
>
0626.
<i
class
=
"fas fa-desktop text-Info f-36"
></i>
0627.
</div>
0628.
<div
class
=
"col text-right"
>
0629.
<h3>Location WFH</h3>
0630.
<h5
class
=
"text-muted "
>Total PC <span
class
=
"text-c-green mb-0 "
> <?php
echo
$total
; ?></span></h5>
0631.
</div>
0632.
</div>
0633.
</div>
0634.
<div
class
=
"card-block"
>
0635.
<div
class
=
"row align-items-center justify-content-center card-active"
>
0636.
<div
class
=
"col-6"
>
0637.
<h6
class
=
"text-center m-b-10"
><span
class
=
"text-muted m-r-5"
>Total PC New:</span><span
class
=
"text-c-red mb-0 "
> <?php
echo
$statuspc
; ?></h6>
0638.
</div>
0639.
<div
class
=
"col-6"
>
0640.
<h6
class
=
"text-center m-b-10"
><span
class
=
"text-muted m-r-5"
>Total PC ON:</span><span
class
=
"text-c-red mb-0 "
> <?php
echo
$totalpcon
; ?></h6>
0641.
</div>
0642.
</div>
0643.
</div>
0644.
<table
class
=
"table table-bordered text-center"
style=
"font-size:8pt;"
>
0645.
<thead>
0646.
<tr>
0647.
<th>Team</th>
0648.
<th>PC Gosoft</th>
0649.
<th>PC CPAll</th>
0650.
<th>AIO</th>
0651.
<th>NB Gosoft</th>
0652.
<th>PC ON</th>
0653.
</tr>
0654.
</thead>
0655.
0656.
<tbody>
0657.
<?php
0658.
0659.
0660.
0661.
0662.
0663.
0664.
0665.
0666.
0667.
?>
0668.
0669.
<!-- <<-------------total
count
opt1 2 3 support------->
0670.
<?php
0671.
$sql
=
"SELECT team FROM monitorpc.master_pc where location ='wfh' group by team ;"
;
0672.
$result
=
$mysqli
->query(
$sql
);
0673.
while
(
$row
=
$result
->fetch_array(MYSQLI_ASSOC)) {
0674.
$team
=
$row
[
'team'
];
0675.
0676.
0677.
$num2
= 0;
0678.
$sql2
= "SELECT team
as
countpc FROM monitorpc.master_pc where location =
'wfh'
0679.
and
type =
'pc gosoft'
and
team =
'$team'
;";
0680.
$result2
=
$mysqli
->query(
$sql2
);
0681.
while
(
$row2
=
$result2
->fetch_array(MYSQLI_ASSOC)) {
0682.
0683.
$num2
+= 1;
0684.
}
0685.
0686.
$num3
= 0;
0687.
$sql3
= "SELECT team
as
countpc FROM monitorpc.master_pc where location =
'wfh'
0688.
and
type =
'pc cpall'
and
team =
'$team'
;";
0689.
$result3
=
$mysqli
->query(
$sql3
);
0690.
while
(
$row3
=
$result3
->fetch_array(MYSQLI_ASSOC)) {
0691.
0692.
$num3
+= 1;
0693.
}
0694.
0695.
0696.
$num4
= 0;
0697.
$sql4
= "SELECT team
as
countpcaio FROM monitorpc.master_pc where location =
'wfh'
0698.
and
type =
'all in one'
and
team =
'$team'
;";
0699.
$result4
=
$mysqli
->query(
$sql4
);
0700.
while
(
$row4
=
$result4
->fetch_array(MYSQLI_ASSOC)) {
0701.
0702.
$num4
+= 1;
0703.
}
0704.
0705.
0706.
$num5
= 0;
0707.
$sql5
= "SELECT team
as
countnb FROM monitorpc.master_pc where location =
'wfh'
0708.
and
type =
'notebook gosoft'
and
team =
'$team'
;";
0709.
$result5
=
$mysqli
->query(
$sql5
);
0710.
while
(
$row5
=
$result5
->fetch_array(MYSQLI_ASSOC)) {
0711.
0712.
$num5
+= 1;
0713.
}
0714.
0715.
0716.
$sql6
= "SELECT team,sum(total)
as
pcon FROM monitorpc.v_check_pc_daily where location =
'wfh'
0717.
and
timestamp = CURRENT_DATE
and
team =
'$team'
";
0718.
0719.
$result6
=
$mysqli
->query(
$sql6
);
0720.
while
(
$row6
=
$result6
->fetch_array(MYSQLI_ASSOC)) {
0721.
$pcon
=
$row6
[
'pcon'
];
0722.
}
0723.
?>
0724.
<tr>
0725.
<td><?=
$team
?></td>
0726.
<td><?=
$num2
?></td>
0727.
<td><?=
$num3
?></td>
0728.
<td><?=
$num4
?></td>
0729.
<td><?=
$num5
?></td>
0730.
<td><span
class
=
"text-c-red mb-0 "
><?php
echo
$pcon
?></td>
0731.
</tr>
0732.
<?php } ?>
0733.
</tbody>
0734.
</table>
0735.
</div>
0736.
</div>
0737.
</div>
0738.
0739.
0740.
<!-- ---------------------------------------------------------------------------------------------------------------->
0741.
<hr>
0742.
<h4
class
=
"display text-left"
>PC OFF</h4>
0743.
<br>
0744.
<!-----------------------------------start card cp3---------------------------------->
0745.
<div
class
=
"row"
>
0746.
<!-- sum total pc on-->
0747.
<?php
0748.
$totalpcon
= 0;
0749.
$sql1
= "SELECT location,sum(total)
as
totalpcon FROM monitorpc.v_check_pc_daily
0750.
where location =
'cp3'
and
timestamp = CURRENT_DATE group by location ;";
0751.
0752.
$result1
=
$mysqli
->query(
$sql1
);
0753.
while
(
$row
=
$result1
->fetch_array(MYSQLI_ASSOC)) {
0754.
$totalpcon
=
$totalpcon
+
$row
[
'totalpcon'
];
0755.
} ?>
0756.
0757.
<!----------statuspc-------->
0758.
<?php
0759.
$statuspc
= 0;
0760.
$sql
=
"SELECT statuspc, count(ip) as countstatus FROM monitorpc.tbl_detail_pc where statuspc = '2';"
;
0761.
$result2
=
$mysqli
->query(
$sql
);
0762.
while
(
$row
=
$result2
->fetch_array(MYSQLI_ASSOC)) {
0763.
$statuspc
=
$statuspc
+
$row
[
'countstatus'
];
0764.
} ?>
0765.
0766.
<!-------
count
total pc ------->
0767.
<?php
0768.
$total
= 0;
0769.
$sql1
= "SELECT team,
count
(no)
as
countpc FROM monitorpc.master_pc
0770.
where location =
'cp3'
and
(type =
'PC Gosoft'
or
type =
'Notebook Gosoft'
or
type =
'All in one'
)
0771.
group by team ;";
0772.
0773.
$result1
=
$mysqli
->query(
$sql1
);
0774.
while
(
$row
=
$result1
->fetch_array(MYSQLI_ASSOC)) {
0775.
$total
=
$total
+
$row
[
'countpc'
];
0776.
0777.
} ?>
0778.
<div
class
=
"col-md-12 col-xl-4"
>
0779.
<div
class
=
"card card-social "
>
0780.
<div
class
=
"card-block border-bottom"
>
0781.
<div
class
=
"row align-items-center justify-content-center"
>
0782.
<div
class
=
"col-auto"
>
0783.
<i
class
=
"fas fa-desktop text-Info f-36"
></i>
0784.
</div>
0785.
<div
class
=
"col text-right"
>
0786.
<h3>Location CP3</h3>
0787.
<h5
class
=
"text-muted "
>Total PC Off<span
class
=
"text-c-green mb-0 "
> </span></h5>
0788.
</div>
0789.
</div>
0790.
</div>
0791.
0792.
<table
class
=
"table table-bordered text-center"
style=
"font-size:8pt;"
>
0793.
<thead>
0794.
<tr>
0795.
<th>Team</th>
0796.
<th>PC Off</th>
0797.
0798.
</tr>
0799.
</thead>
0800.
0801.
<tbody>
0802.
<?php
0803.
0804.
0805.
0806.
0807.
0808.
0809.
0810.
0811.
0812.
?>
0813.
0814.
<!-- <<-------------total
count
opt1 2 3 support------->
0815.
<?php
0816.
$sql
=
"SELECT team FROM monitorpc.master_pc where location ='cp3' group by team ;"
;
0817.
$result
=
$mysqli
->query(
$sql
);
0818.
while
(
$row
=
$result
->fetch_array(MYSQLI_ASSOC)) {
0819.
$team
=
$row
[
'team'
];
0820.
0821.
0822.
$num2
= 0;
0823.
$sql2
= "SELECT team
as
countpc FROM monitorpc.master_pc where location =
'cp3'
0824.
and
type =
'pc gosoft'
and
team =
'$team'
;";
0825.
$result2
=
$mysqli
->query(
$sql2
);
0826.
while
(
$row2
=
$result2
->fetch_array(MYSQLI_ASSOC)) {
0827.
0828.
$num2
+= 1;
0829.
}
0830.
0831.
0832.
$num3
= 0;
0833.
$sql3
= "SELECT team
as
countpc FROM monitorpc.master_pc where location =
'cp3'
0834.
and
type =
'pc cpall'
and
team =
'$team'
;";
0835.
$result3
=
$mysqli
->query(
$sql3
);
0836.
while
(
$row3
=
$result3
->fetch_array(MYSQLI_ASSOC)) {
0837.
0838.
$num3
+= 1;
0839.
}
0840.
0841.
0842.
$num4
= 0;
0843.
$sql4
= "SELECT team
as
countpcaio FROM monitorpc.master_pc where location =
'cp3'
0844.
and
type =
'all in one'
and
team =
'$team'
;";
0845.
$result4
=
$mysqli
->query(
$sql4
);
0846.
while
(
$row4
=
$result4
->fetch_array(MYSQLI_ASSOC)) {
0847.
0848.
$num4
+= 1;
0849.
}
0850.
0851.
0852.
$num5
= 0;
0853.
$sql5
= "SELECT team
as
countnb FROM monitorpc.master_pc where location =
'cp3'
0854.
and
type =
'notebook gosoft'
and
team =
'$team'
;";
0855.
$result5
=
$mysqli
->query(
$sql5
);
0856.
while
(
$row5
=
$result5
->fetch_array(MYSQLI_ASSOC)) {
0857.
0858.
$num5
+= 1;
0859.
}
0860.
0861.
0862.
$sql6
= "SELECT team,sum(total)
as
pcon FROM monitorpc.v_check_pc_daily where location =
'cp3'
0863.
and
timestamp = CURRENT_DATE
and
team =
'$team'
";
0864.
0865.
$result6
=
$mysqli
->query(
$sql6
);
0866.
while
(
$row6
=
$result6
->fetch_array(MYSQLI_ASSOC)) {
0867.
$pcon
=
$row6
[
'pcon'
];
0868.
}
0869.
0870.
?>
0871.
<tr>
0872.
<td><?=
$team
?></td>
0873.
<td></td>
0874.
0875.
</tr>
0876.
<?php } ?>
0877.
</tbody>
0878.
0879.
</table>
0880.
0881.
</div>
0882.
</div>
0883.
0884.
0885.
0886.
<!-----------------------------------start card tara---------------------------------->
0887.
<!-- sum total pc on-->
0888.
<?php
0889.
$totalpcon
= 0;
0890.
$sql1
= "SELECT location,sum(total)
as
totalpcon FROM monitorpc.v_check_pc_daily
0891.
where location =
'Tara park'
and
timestamp = CURRENT_DATE group by location ;";
0892.
0893.
$result1
=
$mysqli
->query(
$sql1
);
0894.
while
(
$row
=
$result1
->fetch_array(MYSQLI_ASSOC)) {
0895.
$totalpcon
=
$totalpcon
+
$row
[
'totalpcon'
];
0896.
} ?>
0897.
0898.
<!----------statuspc-------->
0899.
<?php
0900.
0901.
0902.
0903.
0904.
$statuspc
= 0;
0905.
$sql
=
"SELECT statuspc, count(ip) as countstatus FROM monitorpc.tbl_detail_pc where statuspc = '2' ;"
;
0906.
0907.
$result2
=
$mysqli
->query(
$sql
);
0908.
while
(
$row
=
$result2
->fetch_array(MYSQLI_ASSOC)) {
0909.
0910.
0911.
0912.
} ?>
0913.
0914.
<!-------
count
total pc ------->
0915.
<?php
0916.
$total
= 0;
0917.
$sql1
= "SELECT team,
count
(no)
as
countpc FROM monitorpc.master_pc
0918.
where location =
'Tara park'
group by team ;";
0919.
0920.
$result1
=
$mysqli
->query(
$sql1
);
0921.
while
(
$row
=
$result1
->fetch_array(MYSQLI_ASSOC)) {
0922.
$total
=
$total
+
$row
[
'countpc'
];
0923.
} ?>
0924.
<div
class
=
"col-md-12 col-xl-4"
>
0925.
<div
class
=
"card card-social "
>
0926.
<div
class
=
"card-block border-bottom"
>
0927.
<div
class
=
"row align-items-center justify-content-center"
>
0928.
<div
class
=
"col-auto"
>
0929.
<i
class
=
"fas fa-desktop text-Info f-36"
></i>
0930.
</div>
0931.
<div
class
=
"col text-right"
>
0932.
<h3>Location Tara</h3>
0933.
<h5
class
=
"text-muted "
>Total PC Off<span
class
=
"text-c-green mb-0 "
> </span></h5>
0934.
</div>
0935.
</div>
0936.
</div>
0937.
0938.
<table
class
=
"table table-bordered text-center"
style=
"font-size:8pt;"
>
0939.
<thead>
0940.
<tr>
0941.
<th>Team</th>
0942.
<th>PC Off</th>
0943.
</tr>
0944.
</thead>
0945.
0946.
<tbody>
0947.
0948.
<!-- <<-------------total
count
opt1 2 3 support------->
0949.
<?php
0950.
$sql
=
"SELECT team FROM monitorpc.master_pc where location ='Tara park' group by team ;"
;
0951.
$result
=
$mysqli
->query(
$sql
);
0952.
while
(
$row
=
$result
->fetch_array(MYSQLI_ASSOC)) {
0953.
$team
=
$row
[
'team'
];
0954.
0955.
0956.
$num2
= 0;
0957.
$sql2
= "SELECT team
as
countpc FROM monitorpc.master_pc where location =
'Tara park'
0958.
and
type =
'pc gosoft'
and
team =
'$team'
;";
0959.
$result2
=
$mysqli
->query(
$sql2
);
0960.
while
(
$row2
=
$result2
->fetch_array(MYSQLI_ASSOC)) {
0961.
0962.
$num2
+= 1;
0963.
}
0964.
0965.
$num3
= 0;
0966.
$sql3
= "SELECT team
as
countpc FROM monitorpc.master_pc where location =
'Tara park'
0967.
and
type =
'pc cpall'
and
team =
'$team'
;";
0968.
$result3
=
$mysqli
->query(
$sql3
);
0969.
while
(
$row3
=
$result3
->fetch_array(MYSQLI_ASSOC)) {
0970.
0971.
$num3
+= 1;
0972.
}
0973.
0974.
0975.
$num4
= 0;
0976.
$sql4
= "SELECT team
as
countpcaio FROM monitorpc.master_pc where location =
'Tara park'
0977.
and
type =
'all in one'
and
team =
'$team'
;";
0978.
$result4
=
$mysqli
->query(
$sql4
);
0979.
while
(
$row4
=
$result4
->fetch_array(MYSQLI_ASSOC)) {
0980.
0981.
$num4
+= 1;
0982.
}
0983.
0984.
0985.
$num5
= 0;
0986.
$sql5
= "SELECT team
as
countnb FROM monitorpc.master_pc where location =
'Tara park'
0987.
and
type =
'notebook gosoft'
and
team =
'$team'
;";
0988.
$result5
=
$mysqli
->query(
$sql5
);
0989.
while
(
$row5
=
$result5
->fetch_array(MYSQLI_ASSOC)) {
0990.
0991.
$num5
+= 1;
0992.
}
0993.
0994.
0995.
$sql6
= "SELECT team,sum(total)
as
pcon FROM monitorpc.v_check_pc_daily where location =
'Tara park'
0996.
and
timestamp = CURRENT_DATE
and
team =
'$team'
";
0997.
0998.
$result6
=
$mysqli
->query(
$sql6
);
0999.
while
(
$row6
=
$result6
->fetch_array(MYSQLI_ASSOC)) {
1000.
$pcon
=
$row6
[
'pcon'
];
1001.
}
1002.
1003.
?>
1004.
<tr>
1005.
<td><?=
$team
?></td>
1006.
<td></td>
1007.
1008.
1009.
</tr>
1010.
<?php } ?>
1011.
</tbody>
1012.
1013.
</table>
1014.
1015.
</div>
1016.
</div>
1017.
1018.
1019.
1020.
<!-----------------------------------start card wfh---------------------------------->
1021.
<!-- start card3 sum total pc on-->
1022.
<!-- sum total pc on-->
1023.
<?php
1024.
$totalpcon
= 0;
1025.
$sql1
= "SELECT location,sum(total)
as
totalpcon FROM monitorpc.v_check_pc_daily
1026.
where location =
'wfh'
and
timestamp = CURRENT_DATE group by location ;";
1027.
1028.
$result1
=
$mysqli
->query(
$sql1
);
1029.
while
(
$row
=
$result1
->fetch_array(MYSQLI_ASSOC)) {
1030.
$totalpcon
=
$totalpcon
+
$row
[
'totalpcon'
];
1031.
} ?>
1032.
1033.
<!----------statuspc-------->
1034.
<?php
1035.
1036.
1037.
1038.
1039.
1040.
1041.
1042.
1043.
$ip
= 10.183;
1044.
$statuspc
= 0;
1045.
$sql
=
"SELECT statuspc, count(ip) as countstatus FROM monitorpc.tbl_detail_pc where statuspc = '2';"
;
1046.
$result2
=
$mysqli
->query(
$sql
);
1047.
while
(
$row
=
$result2
->fetch_array(MYSQLI_ASSOC)) {
1048.
if
(
$ip
==
$statuspc
){
1049.
$statuspc
==
$statuspc
+
$row
[
'countstatus'
];
1050.
}
1051.
}
1052.
?>
1053.
1054.
<!-------
count
total pc ------->
1055.
<?php
1056.
$total
= 0;
1057.
$sql1
= "SELECT team,
count
(no)
as
countpc FROM monitorpc.master_pc
1058.
where location =
'wfh'
group by team ;";
1059.
1060.
$result1
=
$mysqli
->query(
$sql1
);
1061.
while
(
$row
=
$result1
->fetch_array(MYSQLI_ASSOC)) {
1062.
$total
=
$total
+
$row
[
'countpc'
];
1063.
} ?>
1064.
<div
class
=
"col-md-12 col-xl-4"
>
1065.
<div
class
=
"card card-social "
>
1066.
<div
class
=
"card-block border-bottom"
>
1067.
<div
class
=
"row align-items-center justify-content-center"
>
1068.
<div
class
=
"col-auto"
>
1069.
<i
class
=
"fas fa-desktop text-Info f-36"
></i>
1070.
</div>
1071.
<div
class
=
"col text-right"
>
1072.
<h3>Location WFH</h3>
1073.
<h5
class
=
"text-muted "
>Total PC Off <span
class
=
"text-c-green mb-0 "
> </span></h5>
1074.
</div>
1075.
</div>
1076.
</div>
1077.
1078.
<table
class
=
"table table-bordered text-center"
style=
"font-size:8pt;"
>
1079.
<thead>
1080.
<tr>
1081.
<th>Team</th>
1082.
<th>PC Off</th>
1083.
</tr>
1084.
</thead>
1085.
1086.
<tbody>
1087.
<?php
1088.
1089.
1090.
1091.
1092.
1093.
1094.
1095.
1096.
1097.
?>
1098.
1099.
<!-- <<-------------total
count
opt1 2 3 support------->
1100.
<?php
1101.
$sql
=
"SELECT team FROM monitorpc.master_pc where location ='wfh' group by team ;"
;
1102.
$result
=
$mysqli
->query(
$sql
);
1103.
while
(
$row
=
$result
->fetch_array(MYSQLI_ASSOC)) {
1104.
$team
=
$row
[
'team'
];
1105.
1106.
1107.
$num2
= 0;
1108.
$sql2
= "SELECT team
as
countpc FROM monitorpc.master_pc where location =
'wfh'
1109.
and
type =
'pc gosoft'
and
team =
'$team'
;";
1110.
$result2
=
$mysqli
->query(
$sql2
);
1111.
while
(
$row2
=
$result2
->fetch_array(MYSQLI_ASSOC)) {
1112.
1113.
$num2
+= 1;
1114.
}
1115.
1116.
$num3
= 0;
1117.
$sql3
= "SELECT team
as
countpc FROM monitorpc.master_pc where location =
'wfh'
1118.
and
type =
'pc cpall'
and
team =
'$team'
;";
1119.
$result3
=
$mysqli
->query(
$sql3
);
1120.
while
(
$row3
=
$result3
->fetch_array(MYSQLI_ASSOC)) {
1121.
1122.
$num3
+= 1;
1123.
}
1124.
1125.
1126.
$num4
= 0;
1127.
$sql4
= "SELECT team
as
countpcaio FROM monitorpc.master_pc where location =
'wfh'
1128.
and
type =
'all in one'
and
team =
'$team'
;";
1129.
$result4
=
$mysqli
->query(
$sql4
);
1130.
while
(
$row4
=
$result4
->fetch_array(MYSQLI_ASSOC)) {
1131.
1132.
$num4
+= 1;
1133.
}
1134.
1135.
1136.
$num5
= 0;
1137.
$sql5
= "SELECT team
as
countnb FROM monitorpc.master_pc where location =
'wfh'
1138.
and
type =
'notebook gosoft'
and
team =
'$team'
;";
1139.
$result5
=
$mysqli
->query(
$sql5
);
1140.
while
(
$row5
=
$result5
->fetch_array(MYSQLI_ASSOC)) {
1141.
1142.
$num5
+= 1;
1143.
}
1144.
1145.
1146.
$sql6
= "SELECT team,sum(total)
as
pcon FROM monitorpc.v_check_pc_daily where location =
'wfh'
1147.
and
timestamp = CURRENT_DATE
and
team =
'$team'
";
1148.
1149.
$result6
=
$mysqli
->query(
$sql6
);
1150.
while
(
$row6
=
$result6
->fetch_array(MYSQLI_ASSOC)) {
1151.
$pcon
=
$row6
[
'pcon'
];
1152.
}
1153.
?>
1154.
<tr>
1155.
<td><?=
$team
?></td>
1156.
<td></td>
1157.
1158.
</tr>
1159.
<?php } ?>
1160.
</tbody>
1161.
</table>
1162.
</div>
1163.
</div>
1164.
1165.
<script src=
"js/slim.js"
></script>
1166.
<script src=
"js/popper.js"
></script>
1167.
<script src=
"js/bootstrap.js"
></script>
1168.
1169.
</body>
1170.
1171.
</html>