M3 Security Fixes for pass 28
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace Modules\M3\Http\Controllers;
|
||||
|
||||
use Ayeo\Barcode;
|
||||
// use Symfony\Component\HttpFoundation\Request;
|
||||
use Cache;
|
||||
use Config;
|
||||
use DB;
|
||||
@@ -58,7 +57,6 @@ class utilitiesContoller extends Controller
|
||||
|
||||
// define several input/output params
|
||||
$params = [];
|
||||
// $params[] = $conn->AddParameterChar('out',7,'eqNumber');
|
||||
|
||||
// AddParameterChar($io, $size, $comment, $varName, $value, $varying, $dimension)
|
||||
// Add Warehouse Param
|
||||
@@ -68,7 +66,6 @@ class utilitiesContoller extends Controller
|
||||
// Add Delivery Note Param
|
||||
$params[] = $conn->AddParameterPackDec('in', 11, 0, 'ParamIn', '', '00000087125');
|
||||
|
||||
// $params[] = $conn->AddParameterZoned('in', 11, 0, 'ParamIn');
|
||||
|
||||
// Start Time Tracking
|
||||
$start = microtime(true);
|
||||
@@ -85,14 +82,11 @@ class utilitiesContoller extends Controller
|
||||
// Successful Call
|
||||
else {
|
||||
dump($result);
|
||||
// $AWREQN = $result['io_param']["var0"];
|
||||
}
|
||||
|
||||
if ($PGMERRORS != '') {
|
||||
// return back()->withMessage('Can not Create PR: '.$PGMERRORS);
|
||||
dump($PGMERRORS);
|
||||
} else {
|
||||
// return $AWREQN;
|
||||
}
|
||||
// Get Execution Time
|
||||
$time = microtime(true) - $start;
|
||||
@@ -108,13 +102,11 @@ class utilitiesContoller extends Controller
|
||||
// Parse PDF file and build necessary objects.
|
||||
$parser = new Parser;
|
||||
|
||||
// $pdf = $parser->parseFile('/www/sentm3test/htdocs/labels/E1232824-10826596.pdf');
|
||||
// dump($pdf);
|
||||
// $text = $pdf->getText();
|
||||
// dump("Text Only");
|
||||
// dump($text);
|
||||
|
||||
// $pdfFile = file_get_contents('/www/sentm3test/htdocs/labels/E1232824-10826596.pdf');
|
||||
$pdfFile = File::get('/www/sentm3test/htdocs/labels/' . $pdfFileName . '.pdf');
|
||||
|
||||
// Transform content to base64
|
||||
@@ -172,9 +164,7 @@ class utilitiesContoller extends Controller
|
||||
->orderBy('A5PICKSTRD', 'ASC')
|
||||
->get();
|
||||
|
||||
// $counter=0;
|
||||
foreach ($ICM688M2SLTMP as $key => $ICM688M2SL) {
|
||||
// $counter++;
|
||||
// $counter == 10 ? exit : '';
|
||||
|
||||
$A5MACPKR = isset($ICM688M2SL->A5MACPKR) ? $ICM688M2SL->A5MACPKR : '';
|
||||
@@ -206,7 +196,6 @@ class utilitiesContoller extends Controller
|
||||
|
||||
// Get Manifest Array
|
||||
$GSArray = $request->query();
|
||||
// dump($GSArray);
|
||||
|
||||
$SHUSER = isset($GSArray['User']) ? trim($GSArray['User']) : '';
|
||||
|
||||
@@ -374,7 +363,6 @@ class utilitiesContoller extends Controller
|
||||
}
|
||||
|
||||
$html .= '</body> </html>';
|
||||
// dump($html);
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -389,7 +377,6 @@ class utilitiesContoller extends Controller
|
||||
// $dompdf->stream();
|
||||
|
||||
$pdfContent = $dompdf->output();
|
||||
// dump($pdfContent);
|
||||
|
||||
$labelsPath = Config::get('arrays.PdfPath'); // '/www/sentm3live/htdocs/labels/';
|
||||
// Put the PDF in labels/CarrierLabel
|
||||
@@ -415,12 +402,10 @@ class utilitiesContoller extends Controller
|
||||
// $ICM695M3SQLInsert = DB::connection(config('m3.connection', 'pgsql'))->table('icm695m3')
|
||||
// ->insert(['A2CO'=> $COMPANY,'A2WHS'=> $WHS,'A2MACPKR'=> $Macpkr,'A2GS1LABEL'=> $gs1_128_bc]);
|
||||
|
||||
// Log::channel('LabelCron')->info("<<< GS1-128...End of Label Creation for Mackpkr: ".$Macpkr);
|
||||
|
||||
return json_encode(['result' => 'success', 'GS1File' => $GS1FileNameNoRoot]);
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
// Log::error($th);
|
||||
Log::channel('LabelCron')->error($th);
|
||||
|
||||
return json_encode(['result' => 'error', 'GS1File' => $th]);
|
||||
@@ -432,10 +417,8 @@ class utilitiesContoller extends Controller
|
||||
{
|
||||
print_r('>>> Generate PDF');
|
||||
|
||||
// $builder = new Barcode\Builder();
|
||||
// $image = $builder->output('(10)123456(400)11(3906)333333');
|
||||
|
||||
// $builder = new Barcode\Builder();
|
||||
// $builder->setBarcodeType('gs1-128');
|
||||
// $builder->setFilename('barcode.png');
|
||||
// $builder->setImageFormat('png');
|
||||
@@ -536,7 +519,6 @@ class utilitiesContoller extends Controller
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
// return ($html);
|
||||
|
||||
// Initialize Dompdf
|
||||
$dompdf = new Dompdf;
|
||||
@@ -615,7 +597,6 @@ class utilitiesContoller extends Controller
|
||||
$response = $controller->processShipment($myRequest);
|
||||
|
||||
$responseData = $response->getData();
|
||||
// dd($responseData);
|
||||
// $responseJSON = json_encode($responseData);
|
||||
// dump($responseJSON);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user