/[ludap]/ludap/www/xml.php
ViewVC logotype

Diff of /ludap/www/xml.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by mose, Wed Sep 24 12:48:57 2003 UTC revision 1.8 by mose, Thu Oct 23 09:32:35 2003 UTC
# Line 55  if ($xmlaction == 'importer xml') { Line 55  if ($xmlaction == 'importer xml') {
55                  $xmltree = $L->xml2array($obj);                  $xmltree = $L->xml2array($obj);
56                  array_shift($xmltree);                  array_shift($xmltree);
57                  foreach ($xmltree as $insert) {                  foreach ($xmltree as $insert) {
58                          $mes = $L->write_id($insert);                          #$mes = $L->write_id($insert);
59                          if (is_array($mes)) {                          if (is_array($mes)) {
60                                  echo implode("<br>",$mes)."<hr>";                                  echo implode("<br>",$mes)."<hr>";
61                          } else {                          } else {
# Line 69  if ($xmlaction == 'importer xml') { Line 69  if ($xmlaction == 'importer xml') {
69                  if (is_file($xmlimport["tmp_name"])) {                  if (is_file($xmlimport["tmp_name"])) {
70                          $fp = fopen($xmlimport["tmp_name"],'r');                          $fp = fopen($xmlimport["tmp_name"],'r');
71                  } elseif (is_file('xmldata/'.$xdfile)) {                  } elseif (is_file('xmldata/'.$xdfile)) {
72                          $fp = fopen('xmldata/'.$xdfile),'r');                          $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);
# Line 92  if ($xmlaction == 'importer xml') { Line 92  if ($xmlaction == 'importer xml') {
92                                  }                                  }
93                                  if ($insert) {                                  if ($insert) {
94                                          echo "<pre>";print_r($insert);echo "</pre>";                                              echo "<pre>";print_r($insert);echo "</pre>";    
95                                          $mes = $L->write_id($insert);                                          #$mes = $L->write_id($insert);
96                                          if (is_array($mes)) {                                          if (is_array($mes)) {
97                                                  echo implode("<br>",$mes)."<hr>";                                                  echo implode("<br>",$mes)."<hr>";
98                                          } else {                                          } else {
# Line 102  if ($xmlaction == 'importer xml') { Line 102  if ($xmlaction == 'importer xml') {
102                          }                          }
103                  }                  }
104          }          }
105  } elseif ($xmltype and $xmltype == 'ludap') {  } elseif ($xmltype) {
106          $info = $L->get_users_list(array_keys($L->schema_user),$searchx,20,0,20);          $info = $L->get_users_list(array_keys($L->schema_user),$searchx,'',20,0,20);
107          $S->assign('info', $info);          $S->assign('info', $info);
108          $S->assign('list', $L->schema_user);          $S->assign('list', $L->schema_user);
109          $buffer = $S->fetch('xml_ludap.tpl');          if ($xmltype == 'ludapxml') {
110                    $tpl = 'xml_ludap.tpl';
111            } else {
112                    $tpl = 'csv_ludap.tpl';
113            }
114            $buffer = $S->fetch($tpl);
115                    
116          echo "<div class=area><textarea cols=92 rows=40 nowrap class=acto>".htmlentities($buffer)."</textarea></div></form>";          echo "<div class=area><textarea cols=92 rows=40 nowrap class=acto>".htmlentities($buffer)."</textarea></div></form>";
117                    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26