Merge branch 'master' of git@lx-office.linet-services.de:lx-office-erp
[kivitendo-erp.git] / xtcom / trans.php
1 <?
2 /***************************************************************
3 * $Id: trans.php,v 1.1 2004/06/29 08:50:30 hli Exp $
4 *Author: Holger Lindemann
5 *Copyright: (c) 2004 Lx-System
6 *License: non free
7 *eMail: info@lx-system.de
8 *Version: 1.0.0
9 *Shop: xt:Commerce 2.2
10 *ERP: Lx-Office ERP
11 ***************************************************************/
12 $login=($_GET["login"])?$_GET["login"]:$_POST["login"];
13 require_once "DB.php";
14 if (file_exists ("conf$login.php")) {
15                 require "conf$login.php";
16         } else {
17                 require "conf.php";
18         }
19 $ERPdsn = array(
20                     'phptype'  => 'pgsql',
21                     'username' => $ERPuser,
22                     'password' => $ERPpass,
23                     'hostspec' => $ERPhost,
24                     'database' => $ERPdbname,
25                     'port'     => $ERPport
26                 );
27
28 $LAND=array("Germany"=>"D");
29 $db=@DB::connect($SHOPdns);
30 if (DB::isError($db)||!$db) { $shop="<font color='red'>Fehler</font>"; } else { $shop="ok"; };
31 $db2=DB::connect($ERPdsn);
32 if (DB::isError($db2)||!$db2) { $erp="<font color='red'>Fehler</font>"; } else { $erp="ok"; };
33
34 ?>
35 <html>
36         <head>
37                 <title>Datenaustausch ERP-xt:Commerce</title>
38         </head>
39 <body>
40 <center>
41 <table>
42         <tr>
43                 <td colspan="2">
44                         Eine direkte Verbindung beider Datenbanken ist erforderlich!<br>
45                         Folgende Verbindungsdaten wurden gefunden:
46                 </td>
47         </tr>
48         <tr>
49                 <td>
50                         <b>Lx-ERP</b>
51                 </td>
52                 <td><?= $erp ?></td>
53         </tr>
54         <tr>
55                 <td>Datenbank-Server</td>
56                 <td><?= $ERPhost ?></td>
57         </tr>
58         <tr>
59                 <td>Datenbank</td>
60                 <td><?= $ERPdbname ?></td>
61         </tr>
62         <tr>
63                 <td>
64                         <b>xt:Commerce</b>
65                 </td>
66                 <td><?= $shop ?></td>
67         </tr>
68         <tr>
69                 <td>Datenbank-Server</td>
70                 <td><?= $SHOPhost ?></td>
71         </tr>
72         <tr>
73                 <td>Datenbank</td>
74                 <td><?= $SHOPdbname ?></td>
75         </tr>
76         <tr>
77                 <td colspan="2">
78                         <hr>
79                 </td>
80         </tr>
81         <tr>
82                 <td align="center"><a href="shopimport_db.php"><img src="e2s.gif" border="0"></a></td>
83                 <td align="center"><a href="xtcomexport.php"><img src="s2e.gif" border="0"></a></td>
84         </tr>
85         <tr>
86                 <td colspan="2">
87                         <hr>
88                 </td>
89         </tr>
90         <tr>
91                 <td colspan="2">
92                         F&uuml;r den Export der Artikeldaten aus der ERP in eine CSV-Datei<br>
93                         oder den Import der Artikeldaten in den Shop ist nur die Verbindung<br>
94                         zur entsprechenden      Datenbank notwendig.<br>
95                         Die CSV-Dateien werden in den konfigurierten Verzeichnissen erwartet.<br>
96                         Der Webserver ben&ouml;tigt hier Schreibrechte.
97                 </td>
98         </tr>
99         <tr>
100                 <td>
101                         <b>Lx-ERP</b>
102                 </td>
103                 <td><a href="<?= $ERPdir ?>"><?= $ERPdir ?></a></td>
104         </tr>
105         <tr>
106                 <td>
107                         <b>xt:Commerce</b>
108                 </td>
109                 <td><a href="<?= $SHOPdir ?>"><?= $SHOPdir ?></a></td>
110         </tr>
111         <tr>
112                 <td align="center"><a href="erpexport.php"><img src="e2c.gif" border="0"></a></td>
113                 <td align="center"><a href="shopimport_csv.php"><img src="c2s.gif" border="0"></a></td>
114         </tr>
115         <tr>
116                 <td colspan="2">
117                         <hr>
118                 </td>
119         </tr>
120         <tr>
121                 <td colspan="2">
122                         Copyright (c) 2004 Lx-System - Version: 1.0 - <a href="mailto:info@lx-system.de">info@lx-system.de</a>
123                 </td>
124         </tr>
125 </table>
126 </center>
127 </body>
128 </html>