110 |
|
|
111 |
function CreatePreselection($host, $user_login, $user_passwd, $ligne, $id_person) |
function CreatePreselection($host, $user_login, $user_passwd, $ligne, $id_person) |
112 |
{ |
{ |
113 |
dolibarr_syslog("Appel de CreatePreselection($host, $user_login, $user_passwd, $ligne, $id_person)"); |
dolibarr_syslog("Appel de CreatePreselection($host, $user_login, ****, $ligne, $id_person)"); |
114 |
|
|
115 |
$url = "/AzurApp_websvc_b3gdb/account.asmx/CreatePreselection?"; |
$url = "/AzurApp_websvc_b3gdb/account.asmx/CreatePreselection?"; |
116 |
|
|
137 |
|
|
138 |
$parse = 0; |
$parse = 0; |
139 |
$result = "error"; |
$result = "error"; |
140 |
|
|
141 |
|
$fresult = ""; |
142 |
|
|
143 |
while (!feof($fp)) |
while (!feof($fp)) |
144 |
{ |
{ |
157 |
{ |
{ |
158 |
$parse = 1; |
$parse = 1; |
159 |
} |
} |
160 |
|
|
161 |
|
$fresult .= $line; |
162 |
|
|
163 |
} |
} |
164 |
fclose($fp); |
fclose($fp); |
165 |
} |
} |
172 |
else |
else |
173 |
{ |
{ |
174 |
dolibarr_syslog("Presel échouée ligne ".$ligne." id client ".$id_person." $result\n"); |
dolibarr_syslog("Presel échouée ligne ".$ligne." id client ".$id_person." $result\n"); |
175 |
|
|
176 |
|
$fp = fopen("/tmp/$ligne.presel","w"); |
177 |
|
if ($fp) |
178 |
|
{ |
179 |
|
fwrite($fp, $fresult); |
180 |
|
fclose($fp); |
181 |
|
} |
182 |
|
|
183 |
return -1; |
return -1; |
184 |
} |
} |
185 |
} |
} |