Revision 9dda820f
Von Holger Lindemann vor mehr als 16 Jahren hinzugefügt
lxo-import/addressB.php | ||
---|---|---|
12 | 12 |
|
13 | 13 |
*/ |
14 | 14 |
|
15 |
if ($_GET["login"]) { |
|
16 |
$login=$_GET["login"]; |
|
17 |
} else { |
|
18 |
$login=$_POST["login"]; |
|
15 |
require ("import_lib.php"); |
|
16 |
|
|
17 |
if (!$_SESSION["db"]) { |
|
18 |
$conffile="../config/authentication.pl"; |
|
19 |
if (!is_file($conffile)) { |
|
20 |
ende(4); |
|
21 |
} |
|
22 |
} |
|
23 |
|
|
24 |
if (!anmelden()) ende(5); |
|
25 |
|
|
26 |
if ($_POST["ok"]=="Hilfe") { |
|
27 |
echo "Importfelder:<br>"; |
|
28 |
echo "Feldname => Bedeutung<br>"; |
|
29 |
foreach($address as $key=>$val) { |
|
30 |
echo "$key => $val<br>"; |
|
31 |
} |
|
32 |
exit(0); |
|
19 | 33 |
}; |
34 |
|
|
20 | 35 |
if ($_POST["ok"]) { |
21 | 36 |
|
22 | 37 |
$nun=time(); |
23 | 38 |
|
24 |
require ("import_lib.php"); |
|
25 |
$db=new myDB($login); |
|
39 |
|
|
40 |
/* get DB instance */ |
|
41 |
$db=$_SESSION["db"]; //new myDB($login); |
|
42 |
|
|
26 | 43 |
$crm=checkCRM(); |
27 | 44 |
|
28 | 45 |
function ende($nr) { |
... | ... | |
31 | 48 |
exit(1); |
32 | 49 |
} |
33 | 50 |
|
34 |
if ($_POST["ok"]=="Hilfe") { |
|
35 |
echo "Importfelder:<br>"; |
|
36 |
echo "Feldname => Bedeutung<br>"; |
|
37 |
foreach($address as $key=>$val) { |
|
38 |
echo "$key => $val<br>"; |
|
39 |
} |
|
40 |
exit(0); |
|
41 |
}; |
|
42 | 51 |
clearstatcache (); |
43 | 52 |
//print_r($_FILES); |
44 | 53 |
$test=$_POST["test"]; |
... | ... | |
57 | 66 |
if (!$file) ende (2); |
58 | 67 |
|
59 | 68 |
$trenner=($_POST["trenner"])?$_POST["trenner"]:","; |
60 |
//echo "../users/$login.conf"; |
|
61 |
if (!file_exists("../users/$login.conf")) ende(3); |
|
62 | 69 |
|
63 | 70 |
if (!file_exists("$file.csv")) ende(5); |
64 | 71 |
|
65 |
$db=new myDB($login); |
|
66 | 72 |
|
67 | 73 |
if (!$db->chkcol($file)) ende(6); |
68 | 74 |
|
69 |
$employee=chkUsr($login);
|
|
75 |
$employee=chkUsr($_SESSION["employee"]);
|
|
70 | 76 |
if (!$employee) ende(4); |
71 | 77 |
|
72 | 78 |
$kunde_fld = array_keys($address); |
... | ... | |
184 | 190 |
<p class="listtop">Adressimport für die ERP<p> |
185 | 191 |
<br> |
186 | 192 |
<form name="import" method="post" enctype="multipart/form-data" action="addressB.php"> |
193 |
<!--form name="import" method="post" action="addressB.php"--> |
|
187 | 194 |
<input type="hidden" name="MAX_FILE_SIZE" value="2000000"> |
188 | 195 |
<input type="hidden" name="login" value="<?= $login ?>"> |
189 | 196 |
<table> |
Auch abrufbar als: Unified diff
Neue Anmeldung berücksichtigt