projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Image, Shop, Weight wieder rein
[kivitendo-erp.git]
/
lxo-import
/
import_lib.php
diff --git
a/lxo-import/import_lib.php
b/lxo-import/import_lib.php
index
a383e0a
..
d8b2259
100644
(file)
--- a/
lxo-import/import_lib.php
+++ b/
lxo-import/import_lib.php
@@
-123,9
+123,7
@@
$contactscrm = array(
"cp_privatemail" => "private eMail",
"cp_notes" => "Bemerkungen",
"cp_stichwort1" => "Stichwort(e)",
"cp_privatemail" => "private eMail",
"cp_notes" => "Bemerkungen",
"cp_stichwort1" => "Stichwort(e)",
- "katalog" => "Katalog",
- "inhaber" => "Inhaber",
- "contact_id" => "Kontakt ID"
+ "cp_id" => "Kontakt ID"
);
$contacts = array(
);
$contacts = array(
@@
-146,9
+144,7
@@
$contacts = array(
"cp_privatphone" => "Privattelefon",
"cp_privatemail" => "private eMail",
"cp_homepage" => "Homepage",
"cp_privatphone" => "Privattelefon",
"cp_privatemail" => "private eMail",
"cp_homepage" => "Homepage",
- "katalog" => "Katalog",
- "inhaber" => "Inhaber",
- "contact_id" => "Kontakt ID"
+ "cp_id" => "Kontakt ID"
);
function checkCRM() {
);
function checkCRM() {
@@
-177,7
+173,7
@@
global $db,$file,$test;
if ($test) { return "#####"; }
$sql1="select * from defaults";
$sql2="update defaults set ".$file."number = '%s'";
if ($test) { return "#####"; }
$sql1="select * from defaults";
$sql2="update defaults set ".$file."number = '%s'";
- $db->
lock
();
+ $db->
begin
();
$rs=$db->getAll($sql1);
$nr=$rs[0][$file."number"];
preg_match("/^([^0-9]*)([0-9]+)/",$nr,$hits);
$rs=$db->getAll($sql1);
$nr=$rs[0][$file."number"];
preg_match("/^([^0-9]*)([0-9]+)/",$nr,$hits);
@@
-205,7
+201,16
@@
global $db,$file,$test;
return $data;
}
}
return $data;
}
}
-
+function chkContact($id) {
+global $db;
+ $sql="select * from contact where cp_id = $id";
+ $rs=$db->getAll($sql);
+ if ($rs[0]["cp_id"]==$id) {
+ return true;
+ } else {
+ return false;
+ }
+}
function getKdRefId($data) {
// gibt es die Nummer schon?
global $db,$file,$test;
function getKdRefId($data) {
// gibt es die Nummer schon?
global $db,$file,$test;
@@
-358,10
+363,14
@@
function authuser($dbhost,$dbport,$dbuser,$dbpasswd,$dbname,$cookie) {
$db->query($sql2,"authuser_B");
$sql3="insert into session ";*/
}
$db->query($sql2,"authuser_B");
$sql3="insert into session ";*/
}
+ $sql="select * from auth.user where id=".$rs[0]["id"];
+ $rs1=$db->getAll($sql,"authuser_1");
+ if (!$rs1) return false;
+ $auth=array();
+ $auth["login"]=$rs1[0]["login"];
$sql="select * from auth.user_config where user_id=".$rs[0]["id"];
$rs1=$db->getAll($sql,"authuser_2");
$sql="select * from auth.user_config where user_id=".$rs[0]["id"];
$rs1=$db->getAll($sql,"authuser_2");
- $auth=array();
- $keys=array("login","dbname","dbpasswd","dbhost","dbport","dbuser");
+ $keys=array("dbname","dbpasswd","dbhost","dbport","dbuser");
foreach ($rs1 as $row) {
if (in_array($row["cfg_key"],$keys)) {
$auth[$row["cfg_key"]]=$row["cfg_value"];
foreach ($rs1 as $row) {
if (in_array($row["cfg_key"],$keys)) {
$auth[$row["cfg_key"]]=$row["cfg_value"];