Example #1
0
$pdf = new FPDF('P', 'mm', array(105, 148));
echo "vor add page<br>\n";
$pdf->AddPage();
echo "vor setfonte<br>\n";
$pdf->SetFont('Helvetica', 'B', 16);
echo "vor cell<br>\n";
$pdf->Cell(40, 10, 'Hello World!');
$pdf->AddPage();
echo "vor setfonte<br>\n";
$pdf->SetFont('Helvetica', 'B', 16);
echo "vor cell<br>\n";
$pdf->Cell(40, 10, 'Hello World! page2');
echo "vor output<br>\n";
$nomFacture = getcwd() . "/upload/facture_" . "test" . ".pdf";
echo getcwd() . "<br>";
echo $nomFacture . "<br>";
$pdf->Output($nomFacture);
echo "end pdf<br>\n";
// magento connect
$servername = "localhost";
$username = "******";
$password = "******";
$dbname = "hififabrik_mag";
// import orders
$orders = ImportOrders($servername, $username, $password, $dbname, '2015-10-22', '14:00:00');
// hifi connect
$servername = "localhost";
$username = "******";
$password = "******";
$dbname = "hififabrik_intern";
PutOrdersInDB($servername, $username, $password, $dbname, $orders);
Example #2
0
function RefreshOrders($datum, $zeit)
{
    echo $datum . "<br>";
    $timestamp = strtotime($datum);
    echo $timestamp . "<br>";
    $datum = date("Y-m-d", $timestamp);
    echo $datum . "<br>";
    // magento connect
    $servername = "localhost";
    $username = "******";
    $password = "******";
    $dbname = "hififabrik_mag";
    // import orders
    $orders = ImportOrders($servername, $username, $password, $dbname, $datum, $zeit);
    // hifi connect
    $servername = "localhost";
    $username = "******";
    $password = "******";
    $dbname = "hififabrik_intern";
    PutOrdersInDB($servername, $username, $password, $dbname, $orders);
    DeleteClosedOrders($servername, $username, $password, $dbname);
    ModifyCompleteOrdersToPrinted($servername, $username, $password, $dbname);
}