47 |
$S->assign("xdf",$xmldatafile); |
$S->assign("xdf",$xmldatafile); |
48 |
$S->display("xml_topnav.tpl"); |
$S->display("xml_topnav.tpl"); |
49 |
if ($xmlaction == 'importer xml') { |
if ($xmlaction == 'importer xml') { |
50 |
|
|
51 |
if ($xmlimport) { |
if ($xmlimport) { |
52 |
$xfile = implode('',file($xmlimport["tmp_name"])); |
$xfile = implode('',file($xmlimport["tmp_name"])); |
53 |
$xfile = str_replace('&','&',$xfile); |
$xfile = str_replace('&','&',$xfile); |
66 |
//echo'<pre>';print_r(get_defined_vars());echo'</pre>'; |
//echo'<pre>';print_r(get_defined_vars());echo'</pre>'; |
67 |
} elseif ($xmlaction == 'importer csv') { |
} elseif ($xmlaction == 'importer csv') { |
68 |
if ($xmlimport) { |
if ($xmlimport) { |
69 |
$fp = fopen($xmlimport["tmp_name"],'r'); |
if (is_file($xmlimport["tmp_name"])) { |
70 |
|
$fp = fopen($xmlimport["tmp_name"],'r'); |
71 |
|
} elseif (is_file('xmldata/'.$xdfile)) { |
72 |
|
$fp = fopen('xmldata/'.$xdfile),'r'); |
73 |
|
} |
74 |
$headed = substr(fgets($fp,4096),1); |
$headed = substr(fgets($fp,4096),1); |
75 |
$head = split('","',$headed); |
$head = split('","',$headed); |
76 |
$nbhead = count($head) - 1; |
$nbhead = count($head) - 1; |
86 |
} |
} |
87 |
} |
} |
88 |
if ($insert['cn'] == "Abonné lettre") { |
if ($insert['cn'] == "Abonné lettre") { |
89 |
$insert['cn'] = $insert['mail']; |
// $insert['cn'] = $insert['mail']; |
90 |
} elseif ($insert['cn'] == "Nouveau") { |
} elseif ($insert['cn'] == "Nouveau") { |
91 |
$insert = false; |
$insert = false; |
92 |
} |
} |