Revision 9dda820f
Von Holger Lindemann vor etwa 17 Jahren hinzugefügt
lxo-import/addressB.php | ||
---|---|---|
|
||
*/
|
||
|
||
if ($_GET["login"]) {
|
||
$login=$_GET["login"];
|
||
} else {
|
||
$login=$_POST["login"];
|
||
require ("import_lib.php");
|
||
|
||
if (!$_SESSION["db"]) {
|
||
$conffile="../config/authentication.pl";
|
||
if (!is_file($conffile)) {
|
||
ende(4);
|
||
}
|
||
}
|
||
|
||
if (!anmelden()) ende(5);
|
||
|
||
if ($_POST["ok"]=="Hilfe") {
|
||
echo "Importfelder:<br>";
|
||
echo "Feldname => Bedeutung<br>";
|
||
foreach($address as $key=>$val) {
|
||
echo "$key => $val<br>";
|
||
}
|
||
exit(0);
|
||
};
|
||
|
||
if ($_POST["ok"]) {
|
||
|
||
$nun=time();
|
||
|
||
require ("import_lib.php");
|
||
$db=new myDB($login);
|
||
|
||
/* get DB instance */
|
||
$db=$_SESSION["db"]; //new myDB($login);
|
||
|
||
$crm=checkCRM();
|
||
|
||
function ende($nr) {
|
||
... | ... | |
exit(1);
|
||
}
|
||
|
||
if ($_POST["ok"]=="Hilfe") {
|
||
echo "Importfelder:<br>";
|
||
echo "Feldname => Bedeutung<br>";
|
||
foreach($address as $key=>$val) {
|
||
echo "$key => $val<br>";
|
||
}
|
||
exit(0);
|
||
};
|
||
clearstatcache ();
|
||
//print_r($_FILES);
|
||
$test=$_POST["test"];
|
||
... | ... | |
if (!$file) ende (2);
|
||
|
||
$trenner=($_POST["trenner"])?$_POST["trenner"]:",";
|
||
//echo "../users/$login.conf";
|
||
if (!file_exists("../users/$login.conf")) ende(3);
|
||
|
||
if (!file_exists("$file.csv")) ende(5);
|
||
|
||
$db=new myDB($login);
|
||
|
||
if (!$db->chkcol($file)) ende(6);
|
||
|
||
$employee=chkUsr($login);
|
||
$employee=chkUsr($_SESSION["employee"]);
|
||
if (!$employee) ende(4);
|
||
|
||
$kunde_fld = array_keys($address);
|
||
... | ... | |
<p class="listtop">Adressimport für die ERP<p>
|
||
<br>
|
||
<form name="import" method="post" enctype="multipart/form-data" action="addressB.php">
|
||
<!--form name="import" method="post" action="addressB.php"-->
|
||
<input type="hidden" name="MAX_FILE_SIZE" value="2000000">
|
||
<input type="hidden" name="login" value="<?= $login ?>">
|
||
<table>
|
Auch abrufbar als: Unified diff
Neue Anmeldung berücksichtigt