From bd131cc36cf9a415a56354a1ff50c4e692bf5b4c Mon Sep 17 00:00:00 2001
From: Roland Gruber
\n"; - - // print table example and build sample CSV + // build sample CSV $sampleCSV_head = array(); $sampleCSV_row = array(); - echo "" . _("This is an example how it would look in your spreadsheet program before you convert to CSV:") . "
\n"; - echo "dn_suffix"; - echo " | \n"; - echo "\n"; - echo "dn_rdn"; - echo " | \n"; - // module attributes - for ($m = 0; $m < sizeof($modules); $m++) { - if (sizeof($columns[$modules[$m]]) < 1) continue; - for ($i = 0; $i < sizeof($columns[$modules[$m]]); $i++) { - $sampleCSV_head[] = "\"" . $columns[$modules[$m]][$i]['name'] . "\""; - echo "\n"; - echo $columns[$modules[$m]][$i]['name']; - echo " | \n"; - } + // DN attributes + $sampleCSV_head[] = "\"dn_suffix\""; + $sampleCSV_head[] = "\"dn_rdn\""; + // module attributes + for ($m = 0; $m < sizeof($modules); $m++) { + if (sizeof($columns[$modules[$m]]) < 1) continue; + for ($i = 0; $i < sizeof($columns[$modules[$m]]); $i++) { + $sampleCSV_head[] = "\"" . $columns[$modules[$m]][$i]['name'] . "\""; } - echo "
\n"; - echo $_SESSION['config']->get_Suffix($scope); - echo " | \n"; - echo "\n"; - echo $RDNs[0]; - echo " | \n"; - // module attributes - for ($m = 0; $m < sizeof($modules); $m++) { - if (sizeof($columns[$modules[$m]]) < 1) continue; - for ($i = 0; $i < sizeof($columns[$modules[$m]]); $i++) { - $sampleCSV_row[] = "\"" . $columns[$modules[$m]][$i]['example'] . "\""; - echo "\n"; - echo $columns[$modules[$m]][$i]['example']; - echo " | \n"; - } + } + $RDNs = getRDNAttributes($scope, $selectedModules); + // DN attributes + $sampleCSV_row[] = "\"" . $_SESSION['config']->get_Suffix($scope) . "\""; + $sampleCSV_row[] = "\"" . $RDNs[0] . "\""; + // module attributes + for ($m = 0; $m < sizeof($modules); $m++) { + if (sizeof($columns[$modules[$m]]) < 1) continue; + for ($i = 0; $i < sizeof($columns[$modules[$m]]); $i++) { + $sampleCSV_row[] = "\"" . $columns[$modules[$m]][$i]['example'] . "\""; } - echo "
\n";
- echo "
\n";
- echo "" . _("Download sample CSV file") . "\n";
- echo "
\n";
-
include 'main_footer.php';
die;
}