26 |
\version $Revision$ |
\version $Revision$ |
27 |
*/ |
*/ |
28 |
|
|
29 |
require("./pre.inc.php"); |
require_once("./pre.inc.php"); |
30 |
|
require_once(DOL_DOCUMENT_ROOT."/exports/export.class.php"); |
31 |
|
|
32 |
$langs->load("commercial"); |
$langs->load("exports"); |
|
$langs->load("orders"); |
|
33 |
|
|
34 |
$user->getrights(); |
$user->getrights(); |
35 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
$export=new Export($db); |
42 |
|
$export->load_arrays($user,isset($datatoexport)?$datatoexport:''); |
43 |
|
|
44 |
|
|
45 |
|
if (! isset($datatoexport)) |
46 |
llxHeader('',$langs->trans("NewExport")); |
{ |
47 |
|
llxHeader('',$langs->trans("NewExport")); |
48 |
print_fiche_titre($langs->trans("NewExport")); |
|
49 |
|
print_fiche_titre($langs->trans("NewExport")); |
50 |
print '<table class="notopnoleftnoright" width="100%">'; |
|
51 |
|
print '<table class="notopnoleftnoright" width="100%">'; |
52 |
|
|
53 |
|
print $langs->trans("SelectExportDataSet").'<br>'; |
54 |
|
print '<br>'; |
55 |
|
|
56 |
|
// Affiche les modules d'exports |
57 |
|
print '<table class="noborder" width="100%">'; |
58 |
|
print '<tr class="liste_titre">'; |
59 |
|
print '<td width="120">'.$langs->trans("Module").'</td>'; |
60 |
|
print '<td>'.$langs->trans("ExportableDatas").'</td>'; |
61 |
|
print '<td> </td>'; |
62 |
|
print '</tr>'; |
63 |
|
$val=true; |
64 |
|
if (sizeof($export->array_export_code)) |
65 |
|
{ |
66 |
|
foreach ($export->array_export_code as $key => $value) |
67 |
|
{ |
68 |
|
$val=!$val; |
69 |
|
print '<tr '.$bc[$val].'><td>'; |
70 |
|
print img_object($export->array_export_module[$key]->getName(),$export->array_export_module[$key]->picto).' '; |
71 |
|
print $export->array_export_module[$key]->getName(); |
72 |
|
print '</td><td>'; |
73 |
|
print $export->array_export_label[$key]; |
74 |
|
print '</td><td>'; |
75 |
|
print '<a href="'.DOL_URL_ROOT.'/exports/export.php?datatoexport='.$export->array_export_code[$key].'">'.img_picto($langs->trans("NewExport"),'filenew').'</a>'; |
76 |
|
print '</td></tr>'; |
77 |
|
} |
78 |
|
} |
79 |
|
else |
80 |
|
{ |
81 |
|
print '<tr><td '.$bc[false].' colspan="2">'.$langs->trans("NoExportableData").'</td></tr>'; |
82 |
|
} |
83 |
|
print '</table>'; |
84 |
|
|
85 |
|
print '</table>'; |
86 |
|
} |
87 |
|
|
88 |
|
if (isset($datatoexport)) |
89 |
|
{ |
90 |
|
llxHeader('',$langs->trans("NewExport")); |
91 |
|
|
92 |
|
print_fiche_titre($langs->trans("NewExport")." - ".$export->array_export_label[0]); |
93 |
|
|
94 |
|
print '<table class="notopnoleftnoright" width="100%">'; |
95 |
|
|
96 |
|
print $langs->trans("SelectExportFields").'<br>'; |
97 |
|
print '<br>'; |
98 |
|
|
99 |
|
print '<table>'; |
100 |
|
print '<tr><td>'.$langs->trans("ExportableFields").'</td>'; |
101 |
|
print '<td> </td>'; |
102 |
|
print '<td>'.$langs->trans("ExportedFields").'</td>'; |
103 |
|
print '</tr>'; |
104 |
|
|
105 |
|
print '<tr><td>'; |
106 |
|
|
107 |
|
// Champs exportables |
108 |
|
$fieldscode=split(',',$export->array_export_fields_code); |
109 |
|
$fieldslib=split(',',$export->array_export_fields_lib); |
110 |
|
foreach($fieldscode as $i=>$code) |
111 |
|
{ |
112 |
|
|
113 |
|
|
114 |
|
} |
115 |
|
|
116 |
|
print '</td></tr>'; |
117 |
|
|
118 |
|
print '</table>'; |
119 |
|
} |
120 |
|
|
121 |
|
|
|
print '</table>'; |
|
|
|
|
122 |
$db->close(); |
$db->close(); |
123 |
|
|
|
|
|
124 |
llxFooter('$Date$ - $Revision$'); |
llxFooter('$Date$ - $Revision$'); |
125 |
|
|
126 |
?> |
?> |