/
admin.php
113 lines (87 loc) · 2.61 KB
/
admin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Administrator Aufgaben</title>
<style>
table, th, td {
border: 1px solid black;
}
body { width: 30em; }
.sans-serif { font-family: sans-serif; }
.serif { font-family: serif; }
.cursive { font-family: cursive; }
.fantasy { font-family: fantasy; }
.monospace { font-family: monospace; }
</style>
</head>
<body>
<?php
/**
* Created by PhpStorm.
* User: Rudi
* Date: 12.10.2015
* Time: 12:44
*/
// debug step
//echo "admin.php start<br>\n";
// includes
require_once ('database.php');
require_once ('menue.php');
require_once ('getorder.php');
$servername = "localhost";
$username = "hififabrik_int";
$password = "Hf54mC74slRw";
$dbname = "hififabrik_intern";
if (CheckDataBaseReady ($servername, $username, $password, $dbname)){
echo "<br>database ready to use<br>\n";
} else {
echo "<br>database NOT ready to use<br>\n";
}
echo "admin.php start<br>\n";
GetMKZandUGP($MKZ,$UGP);
echo "admin.php start<br>\n";
$items = LoadMenuItems ($servername, $username, $password, $dbname, $MKZ, $UGP);
$buchknz = LoadMenuItems($servername, $username, $password, $dbname, 'BUCHKZ', $UGP);
BuildMenuTable ($buchknz, 1050, 1, 3, 6, 50, 350, "center", array("#7fff0", "#f5f5dc", "#6495ed"));
$order = new mag_order();
echo "<br>admin.php end<br>\n";
echo "<br></body><br>\n";
echo "<br></html><br>\n";
echo "vor require<br>\n";
require('fpdf.php');
echo "vor new pdf<br>\n";
//$orientation='P', $unit='mm', $size='A4'
$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 = "hififabrik_mag";
$password = "Hf54mC74slRw";
$dbname = "hififabrik_mag";
// import orders
$orders = ImportOrders ($servername, $username, $password, $dbname, '2015-10-22', '14:00:00');
// hifi connect
$servername = "localhost";
$username = "hififabrik_int";
$password = "Hf54mC74slRw";
$dbname = "hififabrik_intern";
PutOrdersInDB($servername, $username, $password, $dbname, $orders);
?>