| Server IP : 198.244.165.102 / Your IP : 216.73.216.218 [ Web Server : nginx/1.24.0 System : Linux modovh-ub-01 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : colleary ( 1011) PHP Version : 8.3.23 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/sfpcplanning/public_html/lib/ |
Upload File : |
<?
require_once('../Connections/main.php');
include("db.php");
require('structures/DataGrid.php');
// Data Source Name: This is the universal connection string
// example "mysql://root:root@localhost/webber";
$dsn = "MySql" . "://" . $username_main . ":" . $password_main . "@" . $hostname_main . "/" . $database_main;
// DB::connect will return a PEAR DB object on success
// or an PEAR DB Error object on error
$db = DB::connect($dsn);
// With DB::isError you can differentiate between an error or
// a valid connection.
if (DB::isError($db)) {
die ($db->getMessage());
}
require_once('./aprint.php');
$query2 = "SELECT * FROM containermove where containermove.cid = '" . $_GET['cid'] . "'";
$result2 = mysql_query($query2) or die(mysql_error());
$row = mysql_fetch_assoc($result2);
if ($row['print_date'] == "") {
$print_date = date("Y-m-d G:i:s");
$query2 = "UPDATE containermove SET
print_date = '" . $print_date . "'
where containermove.cid = '" . $_GET['cid'] . "'";
$result2 = mysql_query($query2) or die(mysql_error());
}
else
{
$print_date = $row['print_date'];
}
$p=new aprint($_GET['doc'],$row['ourpin']);
// Margins setup: top, bottom, and left
$p->SetMargin(400,600,250);
// Open the connection to the printer. It is required to create the
// fonts
$p->OpenPrinter();
// Create the font to use for the header.
// Two fonts: one big, one normal
$fnt1=$p->CreateFont("Arial",720,360,800);
$fnt2=$p->CreateFont("Arial",360,180,400);
$fnt3=$p->CreateFont("Arial",260,120,200,true);
$fnt4=$p->CreateFont("Arial",260,120,400,false);
/* Now setup the header.
* First array, the header is made by 3 rows,
* Second array the font to use foe each row.
* I want use the big font for the first and third row.
*/
$p->SetPageHeader(array("R.A. Burke (Foynes) Ltd"),
array($fnt2) // different font foe each row
);
// Line1
$text_line = "Document:";
$p->TextXY(400,800,$text_line,$fnt3);
if ($_GET['doc'] == "Laydown") $text_line = "Laydown Export"; else $text_line = "Release Import";
$p->TextXY(2250,800,$text_line,$fnt4);
if ($_GET['doc'] == "Laydown") $text_line = "Line:"; else $text_line = "Agent:";
$p->TextXY(5800,800,$text_line,$fnt3);
$text_line = $row['shipper'];
$p->TextXY(7900,800,$text_line,$fnt4);
// Line 2
$text_line = "Date / Time:";
$p->TextXY(400,1200,$text_line,$fnt3);
$text_line = $print_date;
$p->TextXY(2250,1200,$text_line,$fnt4);
if ($_GET['doc'] == "Laydown") $text_line = "Order / Ref. No:"; else $text_line = "Release no:";
$p->TextXY(5800,1200,$text_line,$fnt3);
if ($_GET['doc'] == "Laydown") $text_line = $row['release_no']; else $text_line = $row['booking_ref'];
$p->TextXY(7900,1200,$text_line,$fnt4);
// Line 3
$text_line = "Haulier:";
$p->TextXY(400,1600,$text_line,$fnt3);
$text_line = $row['haulier'];
$p->TextXY(2250,1600,$text_line,$fnt4);
if ($_GET['doc'] == "Laydown") $text_line = "Delivered By:"; else $text_line = "Collected By:";
$p->TextXY(5800,1600,$text_line,$fnt3);
if ($_GET['doc'] == "Laydown") $text_line = "Truck"; else $text_line = "Truck";
$p->TextXY(7900,1600,$text_line,$fnt4);
// Line 4
$text_line = "Unit No:";
$p->TextXY(400,2000,$text_line,$fnt3);
$text_line = $row['box_no'];
$p->TextXY(2250,2000,$text_line,$fnt4);
$text_line = "Reg No:";
$p->TextXY(5800,2000,$text_line,$fnt3);
$text_line = $row['veh_reg'];
$p->TextXY(7900,2000,$text_line,$fnt4);
// Line 5
$text_line = "Full / Empty:";
$p->TextXY(400,2400,$text_line,$fnt3);
$text_line = $row['cfull'];
$p->TextXY(2250,2400,$text_line,$fnt4);
$text_line = "Unit Type:";
$p->TextXY(5800,2400,$text_line,$fnt3);
$text_line = $row['box_size'];
$p->TextXY(7900,2400,$text_line,$fnt4);
// Line 6
$text_line = "Weight:";
$p->TextXY(400,2800,$text_line,$fnt3);
$text_line = "N:" . $row['cargo_weight'] . " T:" . $row['container_weight'] ;
$p->TextXY(2250,2800,$text_line,$fnt4);
$text_line = "Seal No:";
$p->TextXY(5800,2800,$text_line,$fnt3);
$text_line = $row['seal_no'];
$p->TextXY(7900,2800,$text_line,$fnt4);
// Line 7
$text_line = "Vessel:";
$p->TextXY(400,3200,$text_line,$fnt3);
$text_line = "Pride Of Foynes";
$p->TextXY(2250,3200,$text_line,$fnt4);
if ($_GET['doc'] == "Laydown") $text_line = "Discharge Port:"; else $text_line = "Load Port:";
$p->TextXY(5800,3200,$text_line,$fnt3);
if ($_GET['doc'] == "Laydown") $text_line = "Rotterdam"; else $text_line = "N/A";
$p->TextXY(7900,3200,$text_line,$fnt4);
// Line 8
$text_line = "Voyage No:";
$p->TextXY(400,3600,$text_line,$fnt3);
$text_line = $row['voyage_no'];
$p->TextXY(2250,3600,$text_line,$fnt4);
if ($_GET['doc'] == "Laydown") $text_line = "ETA / ETS:"; else $text_line = "Date Landed:";
$p->TextXY(5800,3600,$text_line,$fnt3);
if ($_GET['doc'] == "Laydown") $text_line = "(T.B.A)"; else $text_line = $row['date_in'];
$p->TextXY(7900,3600,$text_line,$fnt4);
// Line 9
$text_line = "Hazardous:";
$p->TextXY(400,4000,$text_line,$fnt3);
$text_line = $row['hazardous'];
$p->TextXY(2250,4000,$text_line,$fnt4);
$text_line = "Reefer / temp:";
$p->TextXY(5800,4000,$text_line,$fnt3);
$text_line = "No";
$p->TextXY(7900,4000,$text_line,$fnt4);
// Line 10
$text_line = "Remarks:";
$p->TextXY(400,4400,$text_line,$fnt3);
$text_line = $row['cnotes'];
$p->TextXY(2250,4400,$text_line,$fnt4);
$text_line = "To Customs:";
$p->TextXY(5800,4400,$text_line,$fnt3);
$text_line = $row['customs'];
$p->TextXY(7900,4400,$text_line,$fnt4);
// Line 11
$text_line = "Equipment Condition Report";
$p->TextXY(400,5200,$text_line,$fnt3);
// Line 12
$text_line = "Containers";
$p->TextXY(400,5800,$text_line,$fnt3);
$text_line = "Roof:";
$p->TextXY(2250,5800,$text_line,$fnt4);
// Line 13
$text_line = "RHS:";
$p->TextXY(2250,6200,$text_line,$fnt4);
// Line 14
$text_line = "LHS:";
$p->TextXY(2250,6600,$text_line,$fnt4);
// Line 15
$text_line = "Front:";
$p->TextXY(2250,7000,$text_line,$fnt4);
// Line 16
$text_line = "Rear:";
$p->TextXY(2250,7400,$text_line,$fnt4);
// Line 17
$text_line = "Doors:";
$p->TextXY(2250,7800,$text_line,$fnt4);
// Line 18
$text_line = "Flat Units";
$p->TextXY(400,8200,$text_line,$fnt3);
$text_line = "No. of Covers:";
$p->TextXY(2250,8200,$text_line,$fnt4);
// Line 19
$text_line = "No. of straps:";
$p->TextXY(2250,8600,$text_line,$fnt4);
// Line 20
$text_line = "No. of stancions:";
$p->TextXY(2250,9000,$text_line,$fnt4);
// Line 21
if ($_GET['doc'] == "Laydown")
$text_line = "Received the above mentioned unit in good order and condition with seal numbers,";
else
$text_line = "Drivers should always check equipment as RABF is not responsible if rejected by";
$p->TextXY(400,9600,$text_line,$fnt4);
// Line 22
if ($_GET['doc'] == "Laydown")
$text_line = "as shown, intact.";
else
$text_line = "Shipper / Exporter. Received the above mentioned unit in good order and condition.";
$p->TextXY(400,9850,$text_line,$fnt4);
// Line 23
$text_line = "Location:";
$p->TextXY(400,10400,$text_line,$fnt3);
$text_line = "Hauliers Signature:________________________________________";
$p->TextXY(4000,10400,$text_line,$fnt4);
// Line 24
$text_line = "Equipment:";
$p->TextXY(400,11000,$text_line,$fnt3);
$text_line = "Date: " . date("Y-m-d") . " Time: " . date("G:i:s") ;
$p->TextXY(4000,11000,$text_line,$fnt4);
// Line 25
$text_line = "Damage:";
$p->TextXY(400,11600,$text_line,$fnt3);
$text_line = "R.A. Burke (Foynes) Ltd.";
$p->TextXY(4000,11600,$text_line,$fnt4);
// Line 26
$text_line = "signature:____________________________________";
$p->TextXY(4000,11850,$text_line,$fnt4);
$p->run();
die( "<script>window.close();</script>");
?>