M3 Security Fixes for pass 28

This commit is contained in:
Mark Gregory
2026-09-17 10:50:37 +01:00
parent 1037c1c202
commit ed3db89018
77 changed files with 82 additions and 2387 deletions
@@ -54,9 +54,7 @@ class userPickingStats4 extends Controller
// while($row = odbc_fetch_object($result)) {
$x = 0;
foreach ($ICM428M as $key => $row) {
// print_r($row);
$user_array[$x]['userprf'] = trim($row->USERPRF);
// $user_array[$x]['name']=trim($row->R428FIRST)+' '+trim($row->R428FAMILY);
$user_array[$x]['name'] = trim($row->NAME);
$user_array[$x]['empno'] = $row->EMPNO;
$x++;
@@ -65,7 +63,6 @@ class userPickingStats4 extends Controller
// fill array of Lines per Hour per Monitor
$lph_per_monitor_array = Config::get('arrays_custom.lph_per_code_array');
// echo "<pre>"; print_r($user_array); echo "</pre>";
if (isset($request->user)) {
$user = $request->user;
$empno = 0;
@@ -95,7 +92,6 @@ class userPickingStats4 extends Controller
and oppno in ($payrollCodes)
group by oppno";
// echo "$sqlstmt<br>";
$lbpf1 = $schema->hasTable('lbpf')
? DB::connection(config('m3.connection', 'pgsql'))->select($sqlstmt)
@@ -107,7 +103,6 @@ class userPickingStats4 extends Controller
}
$sql = "select * from perfstat where dt='$starting' and a5pickcomu='$user' ";
// @dd($sql);
if ((isset($request->dates) || isset($request->user)) && $schema->hasTable('perfstat')) {
$statistic4 = DB::connection(config('m3.connection', 'pgsql'))->select($sql);
@@ -115,9 +110,7 @@ class userPickingStats4 extends Controller
$statistic4 = [];
}
// echo "<pre>"; print_r($statistic4); echo "</pre>";
// $duration = microtime(true) - $start;
// initialize arrays
$monitor_array = $totals_array = $perf_array = [];
@@ -128,7 +121,6 @@ class userPickingStats4 extends Controller
$totals_array['entries'] = 0;
$diff = 0;
// echo "<pre>"; print_r($lbpf1); echo "</pre>";
foreach ($lbpf1 as $key => $val) {
$monitor_array[$val->OPPNO]['tot_hours'] = $val->HRS;
@@ -158,7 +150,6 @@ class userPickingStats4 extends Controller
$monitor_array[$val->CODE]['weight'] = 0;
$monitor_array[$val->CODE]['lines'] = 0;
}
// echo "after 1st init<br>";
// add another element (0) in monitor_array to capture the total blended lph value expected
$monitor_array[0]['lph_blended_per_activity'] = 0;
@@ -258,7 +249,6 @@ class userPickingStats4 extends Controller
}
// echo "<pre>";
// print_r($request);
// print_r($perf_array); print_r($monitor_array);
@@ -294,7 +284,6 @@ class userPickingStats4 extends Controller
'grossHours' => $grossHours,
];
// echo "<pre>"; print_r($json_data);
return json_encode($json_data);
} else {
@@ -305,7 +294,6 @@ class userPickingStats4 extends Controller
$no_data = 'Y';
}
// error_log("Time required to xyz: " . $duration . "\n", 3, "/temp/v4.log");
return view(
'm3::liberty-theme.pages.userPickingStats4',