You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
682 lines
22 KiB
682 lines
22 KiB
<?php
|
|
// ini_set('display_errors', 'on');
|
|
|
|
// 新梯
|
|
// $Adata
|
|
// 出貨台數 = 有實際出貨日期
|
|
// $Adata2
|
|
// 在裝台數 = 已出貨且官檢日跟移交日都沒填日期
|
|
// $Adata3
|
|
// 工收台數 = 已出貨且官檢日或移交日其中一個有日期
|
|
|
|
// 合計
|
|
// $data
|
|
// 出貨台數 = 有實際出貨日期
|
|
// $data2
|
|
// 在裝台數 = 已出貨且官檢日跟移交日都沒填日期
|
|
// $data3
|
|
// 工收台數 = 已出貨且官檢日或移交日其中一個有日期
|
|
|
|
$real_arrival_date_start = empty($_REQUEST['real_arrival_date_start']) ? date("Y") . '-01' : $_REQUEST['real_arrival_date_start'];
|
|
$real_arrival_date_end = empty($_REQUEST['real_arrival_date_end']) ? date("Y-m") : $_REQUEST['real_arrival_date_end'];
|
|
$radsY = SUBSTR($real_arrival_date_start, 0, 4);
|
|
$radsM = SUBSTR($real_arrival_date_start, 5, 2);
|
|
$radeY = SUBSTR($real_arrival_date_end, 0, 4);
|
|
$radeM = SUBSTR($real_arrival_date_end, 5, 2);
|
|
|
|
include "header.php";
|
|
|
|
// 新梯-出貨台數
|
|
$sql = "
|
|
SELECT
|
|
SUBSTR(real_arrival_date,1,4) AS year,
|
|
SUBSTR(real_arrival_date,6,2) AS month,
|
|
COUNT(real_arrival_date) AS all_count
|
|
FROM wipwholestatus
|
|
WHERE status = '1'
|
|
AND contract_type = 'A'
|
|
AND (
|
|
real_arrival_date IS NOT NULL
|
|
AND real_arrival_date != ''
|
|
)
|
|
GROUP BY year, month
|
|
";
|
|
$result = mysqli_query($link, $sql);
|
|
$data_count = $result->num_rows;
|
|
$Adata = $result->fetch_all(MYSQLI_ASSOC);
|
|
|
|
// 新梯-在裝台數
|
|
$sql = "
|
|
SELECT
|
|
SUBSTR(real_arrival_date,1,4) AS year,
|
|
SUBSTR(real_arrival_date,6,2) AS month,
|
|
COUNT(real_arrival_date) AS all_count
|
|
FROM wipwholestatus
|
|
WHERE status = '1'
|
|
AND contract_type = 'A'
|
|
AND (
|
|
real_arrival_date IS NOT NULL
|
|
AND real_arrival_date != ''
|
|
)AND (
|
|
delivery_date IS NULL
|
|
OR delivery_date = ''
|
|
)AND (
|
|
official_check_date IS NULL
|
|
OR official_check_date = ''
|
|
)
|
|
GROUP BY year, month
|
|
";
|
|
$result = mysqli_query($link, $sql);
|
|
$data_count = $result->num_rows;
|
|
$Adata2 = $result->fetch_all(MYSQLI_ASSOC);
|
|
|
|
// 新梯-工收台數
|
|
$sql = "
|
|
SELECT
|
|
SUBSTR(real_arrival_date,1,4) AS year,
|
|
SUBSTR(real_arrival_date,6,2) AS month,
|
|
COUNT(real_arrival_date) AS all_count
|
|
FROM wipwholestatus
|
|
WHERE status = '1'
|
|
AND contract_type = 'A'
|
|
AND (
|
|
real_arrival_date IS NOT NULL
|
|
AND real_arrival_date != ''
|
|
)AND ((
|
|
delivery_date IS NOT NULL
|
|
AND delivery_date != ''
|
|
)OR (
|
|
official_check_date IS NOT NULL
|
|
AND official_check_date != ''
|
|
))
|
|
GROUP BY year, month
|
|
";
|
|
$result = mysqli_query($link, $sql);
|
|
$data_count = $result->num_rows;
|
|
$Adata3 = $result->fetch_all(MYSQLI_ASSOC);
|
|
|
|
|
|
// M1-出貨台數
|
|
$sql = "
|
|
SELECT
|
|
SUBSTR(real_arrival_date,1,4) AS year,
|
|
SUBSTR(real_arrival_date,6,2) AS month,
|
|
COUNT(real_arrival_date) AS all_count
|
|
FROM wipwholestatus
|
|
WHERE status = '1'
|
|
AND contract_type = 'B'
|
|
AND renovate_type like '%M1%'
|
|
AND (
|
|
real_arrival_date IS NOT NULL
|
|
AND real_arrival_date != ''
|
|
)
|
|
GROUP BY year, month
|
|
";
|
|
$result = mysqli_query($link, $sql);
|
|
$data_count = $result->num_rows;
|
|
$M1data = $result->fetch_all(MYSQLI_ASSOC);
|
|
|
|
// M1-在裝台數
|
|
$sql = "
|
|
SELECT
|
|
SUBSTR(real_arrival_date,1,4) AS year,
|
|
SUBSTR(real_arrival_date,6,2) AS month,
|
|
COUNT(real_arrival_date) AS all_count
|
|
FROM wipwholestatus
|
|
WHERE status = '1'
|
|
AND contract_type = 'B'
|
|
AND renovate_type like '%M1%'
|
|
AND (
|
|
real_arrival_date IS NOT NULL
|
|
AND real_arrival_date != ''
|
|
)AND (
|
|
delivery_date IS NULL
|
|
OR delivery_date = ''
|
|
)AND (
|
|
official_check_date IS NULL
|
|
OR official_check_date = ''
|
|
)
|
|
GROUP BY year, month
|
|
";
|
|
$result = mysqli_query($link, $sql);
|
|
$data_count = $result->num_rows;
|
|
$M1data2 = $result->fetch_all(MYSQLI_ASSOC);
|
|
|
|
// M1-工收台數
|
|
$sql = "
|
|
SELECT
|
|
SUBSTR(real_arrival_date,1,4) AS year,
|
|
SUBSTR(real_arrival_date,6,2) AS month,
|
|
COUNT(real_arrival_date) AS all_count
|
|
FROM wipwholestatus
|
|
WHERE status = '1'
|
|
AND contract_type = 'B'
|
|
AND renovate_type like '%M1%'
|
|
AND (
|
|
real_arrival_date IS NOT NULL
|
|
AND real_arrival_date != ''
|
|
)AND ((
|
|
delivery_date IS NOT NULL
|
|
AND delivery_date != ''
|
|
)OR (
|
|
official_check_date IS NOT NULL
|
|
AND official_check_date != ''
|
|
))
|
|
GROUP BY year, month
|
|
";
|
|
$result = mysqli_query($link, $sql);
|
|
$data_count = $result->num_rows;
|
|
$M1data3 = $result->fetch_all(MYSQLI_ASSOC);
|
|
|
|
|
|
// MA-出貨台數
|
|
$sql = "
|
|
SELECT
|
|
SUBSTR(real_arrival_date,1,4) AS year,
|
|
SUBSTR(real_arrival_date,6,2) AS month,
|
|
COUNT(real_arrival_date) AS all_count
|
|
FROM wipwholestatus
|
|
WHERE status = '1'
|
|
AND contract_type = 'B'
|
|
AND renovate_type like '%MA%'
|
|
AND (
|
|
real_arrival_date IS NOT NULL
|
|
AND real_arrival_date != ''
|
|
)
|
|
GROUP BY year, month
|
|
";
|
|
$result = mysqli_query($link, $sql);
|
|
$data_count = $result->num_rows;
|
|
$Madata = $result->fetch_all(MYSQLI_ASSOC);
|
|
|
|
// MA-在裝台數
|
|
$sql = "
|
|
SELECT
|
|
SUBSTR(real_arrival_date,1,4) AS year,
|
|
SUBSTR(real_arrival_date,6,2) AS month,
|
|
COUNT(real_arrival_date) AS all_count
|
|
FROM wipwholestatus
|
|
WHERE status = '1'
|
|
AND contract_type = 'B'
|
|
AND renovate_type like '%MA%'
|
|
AND (
|
|
real_arrival_date IS NOT NULL
|
|
AND real_arrival_date != ''
|
|
)AND (
|
|
delivery_date IS NULL
|
|
OR delivery_date = ''
|
|
)AND (
|
|
official_check_date IS NULL
|
|
OR official_check_date = ''
|
|
)
|
|
GROUP BY year, month
|
|
";
|
|
$result = mysqli_query($link, $sql);
|
|
$data_count = $result->num_rows;
|
|
$Madata2 = $result->fetch_all(MYSQLI_ASSOC);
|
|
|
|
// MA-工收台數
|
|
$sql = "
|
|
SELECT
|
|
SUBSTR(real_arrival_date,1,4) AS year,
|
|
SUBSTR(real_arrival_date,6,2) AS month,
|
|
COUNT(real_arrival_date) AS all_count
|
|
FROM wipwholestatus
|
|
WHERE status = '1'
|
|
AND contract_type = 'B'
|
|
AND renovate_type like '%MA%'
|
|
AND (
|
|
real_arrival_date IS NOT NULL
|
|
AND real_arrival_date != ''
|
|
)AND ((
|
|
delivery_date IS NOT NULL
|
|
AND delivery_date != ''
|
|
)OR (
|
|
official_check_date IS NOT NULL
|
|
AND official_check_date != ''
|
|
))
|
|
GROUP BY year, month
|
|
";
|
|
$result = mysqli_query($link, $sql);
|
|
$data_count = $result->num_rows;
|
|
$Madata3 = $result->fetch_all(MYSQLI_ASSOC);
|
|
|
|
|
|
// 合計-出貨台數
|
|
$sql = "
|
|
SELECT
|
|
SUBSTR(real_arrival_date,1,4) AS year,
|
|
SUBSTR(real_arrival_date,6,2) AS month,
|
|
COUNT(real_arrival_date) AS all_count
|
|
FROM wipwholestatus
|
|
WHERE status = '1'
|
|
AND (
|
|
real_arrival_date IS NOT NULL
|
|
AND real_arrival_date != ''
|
|
)
|
|
GROUP BY year, month
|
|
";
|
|
$result = mysqli_query($link, $sql);
|
|
$data_count = $result->num_rows;
|
|
$data = $result->fetch_all(MYSQLI_ASSOC);
|
|
|
|
// 合計-在裝台數
|
|
$sql = "
|
|
SELECT
|
|
SUBSTR(real_arrival_date,1,4) AS year,
|
|
SUBSTR(real_arrival_date,6,2) AS month,
|
|
COUNT(real_arrival_date) AS all_count
|
|
FROM wipwholestatus
|
|
WHERE status = '1'
|
|
AND (
|
|
real_arrival_date IS NOT NULL
|
|
AND real_arrival_date != ''
|
|
)AND (
|
|
delivery_date IS NULL
|
|
OR delivery_date = ''
|
|
)AND (
|
|
official_check_date IS NULL
|
|
OR official_check_date = ''
|
|
)
|
|
GROUP BY year, month
|
|
";
|
|
$result = mysqli_query($link, $sql);
|
|
$data_count = $result->num_rows;
|
|
$data2 = $result->fetch_all(MYSQLI_ASSOC);
|
|
|
|
// 合計-工收台數
|
|
$sql = "
|
|
SELECT
|
|
SUBSTR(real_arrival_date,1,4) AS year,
|
|
SUBSTR(real_arrival_date,6,2) AS month,
|
|
COUNT(real_arrival_date) AS all_count
|
|
FROM wipwholestatus
|
|
WHERE status = '1'
|
|
AND (
|
|
real_arrival_date IS NOT NULL
|
|
AND real_arrival_date != ''
|
|
)AND ((
|
|
delivery_date IS NOT NULL
|
|
AND delivery_date != ''
|
|
)OR (
|
|
official_check_date IS NOT NULL
|
|
AND official_check_date != ''
|
|
))
|
|
GROUP BY year, month
|
|
";
|
|
$result = mysqli_query($link, $sql);
|
|
$data_count = $result->num_rows;
|
|
$data3 = $result->fetch_all(MYSQLI_ASSOC);
|
|
|
|
?>
|
|
<form id='myForm' method='post' action='wipwhole-wipinstallstatus-index.php?<?= $token_link ?>'>
|
|
<table class='table query-table table-striped table-bordered display compact' style='width:98%;text-align:center;margin:0 auto'>
|
|
<thead>
|
|
<tr>
|
|
<td>
|
|
<h3 style='text-align:center'>在裝中統計表</h3>
|
|
</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td style='text-align:center'>
|
|
<?php
|
|
if ((int)$radsY . $radsM > (int)$radeY . $radeM) {
|
|
echo "<span class='text-danger'>結束時間不可小於開始時間</span>";
|
|
}
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style='text-align:center'>
|
|
<input type="month" class='form-control' id='real_contract_arrival_date_start' name='real_arrival_date_start' value="<?php echo $real_arrival_date_start; ?>" style='width:20%;display:inline;'>
|
|
~
|
|
<input type="month" class='form-control' id='real_arrival_date_end' name='real_arrival_date_end' value="<?php echo $real_arrival_date_end; ?>" style='width:20%;display:inline;'>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style='text-align:center'>
|
|
<button type="submit" style='text-align:center; margin:0 auto' class="btn btn-primary btn-sm">查詢</button>
|
|
<button type="button" style='text-align:center; margin:0 auto' class="btn btn-primary btn-sm" onclick='clean_all_input()'>清除</button>
|
|
<!-- <button type="button" style='text-align:center; margin:0 auto' class="btn btn-primary btn-sm" onclick='generateButton()'>匯出excel</button> -->
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</form>
|
|
<?php
|
|
if ((int)$radsY . $radsM > (int)$radeY . $radeM) {
|
|
exit;
|
|
}
|
|
?>
|
|
<table class="table table-striped table-bordered" style="width:98.5%;overflow-x:auto">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:150px;" rowspan="2">出貨年月</th>
|
|
<?php
|
|
$start_y = $radsY;
|
|
for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) {
|
|
$start_month = 1;
|
|
$end_month = 12;
|
|
|
|
// 迴圈第一年
|
|
if ($start_y == $radsYi) {
|
|
$start_month = $radsM;
|
|
} else {
|
|
$start_month = 1;
|
|
}
|
|
// 迴圈最後一年
|
|
if ($radsYi == $radeY) {
|
|
$end_month = $radeM;
|
|
}
|
|
?>
|
|
<th style='text-align:center;' colspan="<?php echo $end_month * 3 ?>"><?php echo $radsYi . '年'; ?></th>
|
|
<?php
|
|
}
|
|
?>
|
|
<th style='width:200px' colspan="3" rowspan="2">總計(全部)</th>
|
|
</tr>
|
|
<tr>
|
|
<!-- <th style="width:150px;"></th> -->
|
|
<?php
|
|
$start_y = $radsY;
|
|
for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) {
|
|
$start_month = 1;
|
|
$end_month = 12;
|
|
|
|
// 迴圈第一年
|
|
if ($start_y == $radsYi) {
|
|
$start_month = $radsM;
|
|
} else {
|
|
$start_month = 1;
|
|
}
|
|
// 迴圈最後一年
|
|
if ($radsYi == $radeY) {
|
|
$end_month = $radeM;
|
|
}
|
|
|
|
for ($start_month; $start_month <= $end_month; $start_month++) {
|
|
?>
|
|
<th style='width:200px' colspan="3"><?php echo (int)$start_month . '月'; ?></th>
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
}
|
|
?>
|
|
<!-- <th style='width:200px' colspan="3" rowspan="2"></th> -->
|
|
</tr>
|
|
<tr>
|
|
<th>種類</th>
|
|
<?php
|
|
$start_y = $radsY;
|
|
for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) {
|
|
$start_month = 1;
|
|
$end_month = 12;
|
|
|
|
// 迴圈第一年
|
|
if ($start_y == $radsYi) {
|
|
$start_month = $radsM;
|
|
} else {
|
|
$start_month = 1;
|
|
}
|
|
// 迴圈最後一年
|
|
if ($radsYi == $radeY) {
|
|
$end_month = $radeM;
|
|
}
|
|
|
|
for ($start_month; $start_month <= $end_month; $start_month++) {
|
|
?>
|
|
<th style="background-color:#CECECE;">出貨</th>
|
|
<th style="background-color:#DEDEDE;">工收</th>
|
|
<th>在裝</th>
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
}
|
|
?>
|
|
<th style="background-color:#FF8040;">出貨</th>
|
|
<th style="background-color:#FFAF60;">工收</th>
|
|
<th style="background-color:#9D9D9D;">在裝</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>新梯</td>
|
|
<?php
|
|
$a_count = 0;
|
|
$b_count = 0;
|
|
$c_count = 0;
|
|
for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) {
|
|
$start_month = 1;
|
|
$end_month = 12;
|
|
|
|
// 迴圈第一年
|
|
if ($start_y == $radsYi) {
|
|
$start_month = $radsM;
|
|
} else {
|
|
$start_month = 1;
|
|
}
|
|
// 迴圈最後一年
|
|
if ($radsYi == $radeY) {
|
|
$end_month = $radeM;
|
|
}
|
|
|
|
for ($start_month; $start_month <= $end_month; $start_month++) {
|
|
$all_count = 0;
|
|
foreach ($Adata as $row) {
|
|
if ($radsYi == $row['year'] && $start_month == $row['month']) {
|
|
$all_count = $row['all_count'];
|
|
$a_count += $all_count;
|
|
break;
|
|
}
|
|
}
|
|
echo "<td style='background-color:#CECECE;'>$all_count</td>";
|
|
$all_count = 0;
|
|
foreach ($Adata3 as $row) {
|
|
if ($radsYi == $row['year'] && $start_month == $row['month']) {
|
|
$all_count = $row['all_count'];
|
|
$b_count += $all_count;
|
|
break;
|
|
}
|
|
}
|
|
echo "<td style='background-color:#DEDEDE;'>$all_count</td>";
|
|
$all_count = 0;
|
|
foreach ($Adata2 as $row) {
|
|
if ($radsYi == $row['year'] && $start_month == $row['month']) {
|
|
$all_count = $row['all_count'];
|
|
$c_count += $all_count;
|
|
break;
|
|
}
|
|
}
|
|
echo "<td>$all_count</td>";
|
|
}
|
|
?>
|
|
<?php
|
|
}
|
|
echo "<td style='background-color:#FF8040;'>$a_count</td>";
|
|
echo "<td style='background-color:#FFAF60;'>$b_count</td>";
|
|
echo "<td style='background-color:#9D9D9D;'>$c_count</td>";
|
|
?>
|
|
</tr>
|
|
<tr>
|
|
<td>M1</td>
|
|
<?php
|
|
$a_count = 0;
|
|
$b_count = 0;
|
|
$c_count = 0;
|
|
for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) {
|
|
$start_month = 1;
|
|
$end_month = 12;
|
|
|
|
// 迴圈第一年
|
|
if ($start_y == $radsYi) {
|
|
$start_month = $radsM;
|
|
} else {
|
|
$start_month = 1;
|
|
}
|
|
// 迴圈最後一年
|
|
if ($radsYi == $radeY) {
|
|
$end_month = $radeM;
|
|
}
|
|
|
|
for ($start_month; $start_month <= $end_month; $start_month++) {
|
|
$all_count = 0;
|
|
foreach ($M1data as $row) {
|
|
if ($radsYi == $row['year'] && $start_month == $row['month']) {
|
|
$all_count = $row['all_count'];
|
|
$a_count += $all_count;
|
|
break;
|
|
}
|
|
}
|
|
echo "<td style='background-color:#CECECE;'>$all_count</td>";
|
|
$all_count = 0;
|
|
foreach ($M1data3 as $row) {
|
|
if ($radsYi == $row['year'] && $start_month == $row['month']) {
|
|
$all_count = $row['all_count'];
|
|
$b_count += $all_count;
|
|
break;
|
|
}
|
|
}
|
|
echo "<td style='background-color:#DEDEDE;'>$all_count</td>";
|
|
$all_count = 0;
|
|
foreach ($M1data2 as $row) {
|
|
if ($radsYi == $row['year'] && $start_month == $row['month']) {
|
|
$all_count = $row['all_count'];
|
|
$c_count += $all_count;
|
|
break;
|
|
}
|
|
}
|
|
echo "<td>$all_count</td>";
|
|
}
|
|
?>
|
|
<?php
|
|
}
|
|
echo "<td style='background-color:#FF8040;'>$a_count</td>";
|
|
echo "<td style='background-color:#FFAF60;'>$b_count</td>";
|
|
echo "<td style='background-color:#9D9D9D;'>$c_count</td>";
|
|
?>
|
|
</tr>
|
|
<tr>
|
|
<td>MA</td>
|
|
<?php
|
|
$a_count = 0;
|
|
$b_count = 0;
|
|
$c_count = 0;
|
|
for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) {
|
|
$start_month = 1;
|
|
$end_month = 12;
|
|
|
|
// 迴圈第一年
|
|
if ($start_y == $radsYi) {
|
|
$start_month = $radsM;
|
|
} else {
|
|
$start_month = 1;
|
|
}
|
|
// 迴圈最後一年
|
|
if ($radsYi == $radeY) {
|
|
$end_month = $radeM;
|
|
}
|
|
|
|
for ($start_month; $start_month <= $end_month; $start_month++) {
|
|
$all_count = 0;
|
|
foreach ($Madata as $row) {
|
|
if ($radsYi == $row['year'] && $start_month == $row['month']) {
|
|
$all_count = $row['all_count'];
|
|
$a_count += $all_count;
|
|
break;
|
|
}
|
|
}
|
|
echo "<td style='background-color:#CECECE;'>$all_count</td>";
|
|
$all_count = 0;
|
|
foreach ($Madata3 as $row) {
|
|
if ($radsYi == $row['year'] && $start_month == $row['month']) {
|
|
$all_count = $row['all_count'];
|
|
$b_count += $all_count;
|
|
break;
|
|
}
|
|
}
|
|
echo "<td style='background-color:#DEDEDE;'>$all_count</td>";
|
|
$all_count = 0;
|
|
foreach ($Madata2 as $row) {
|
|
if ($radsYi == $row['year'] && $start_month == $row['month']) {
|
|
$all_count = $row['all_count'];
|
|
$c_count += $all_count;
|
|
break;
|
|
}
|
|
}
|
|
echo "<td>$all_count</td>";
|
|
}
|
|
?>
|
|
<?php
|
|
}
|
|
echo "<td style='background-color:#FF8040;'>$a_count</td>";
|
|
echo "<td style='background-color:#FFAF60;'>$b_count</td>";
|
|
echo "<td style='background-color:#9D9D9D;'>$c_count</td>";
|
|
?>
|
|
</tr>
|
|
<tr>
|
|
<td>合計</td>
|
|
<?php
|
|
$a_count = 0;
|
|
$b_count = 0;
|
|
$c_count = 0;
|
|
for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) {
|
|
$start_month = 1;
|
|
$end_month = 12;
|
|
|
|
// 迴圈第一年
|
|
if ($start_y == $radsYi) {
|
|
$start_month = $radsM;
|
|
} else {
|
|
$start_month = 1;
|
|
}
|
|
// 迴圈最後一年
|
|
if ($radsYi == $radeY) {
|
|
$end_month = $radeM;
|
|
}
|
|
|
|
for ($start_month; $start_month <= $end_month; $start_month++) {
|
|
$all_count = 0;
|
|
foreach ($data as $row) {
|
|
if ($radsYi == $row['year'] && $start_month == $row['month']) {
|
|
$all_count = $row['all_count'];
|
|
$a_count += $all_count;
|
|
break;
|
|
}
|
|
}
|
|
echo "<td style='background-color:#CECECE;'>$all_count</td>";
|
|
$all_count = 0;
|
|
foreach ($data3 as $row) {
|
|
if ($radsYi == $row['year'] && $start_month == $row['month']) {
|
|
$all_count = $row['all_count'];
|
|
$b_count += $all_count;
|
|
break;
|
|
}
|
|
}
|
|
echo "<td style='background-color:#DEDEDE;'>$all_count</td>";
|
|
$all_count = 0;
|
|
foreach ($data2 as $row) {
|
|
if ($radsYi == $row['year'] && $start_month == $row['month']) {
|
|
$all_count = $row['all_count'];
|
|
$c_count += $all_count;
|
|
break;
|
|
}
|
|
}
|
|
echo "<td>$all_count</td>";
|
|
}
|
|
?>
|
|
<?php
|
|
}
|
|
echo "<td style='background-color:#FF8040;'>$a_count</td>";
|
|
echo "<td style='background-color:#FFAF60;'>$b_count</td>";
|
|
echo "<td style='background-color:#9D9D9D;'>$c_count</td>";
|
|
?>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<script>
|
|
|
|
</script>
|