Beispiel #1
0
    print '<input type="hidden" name="max_file_size" value="' . $conf->maxfilesize . '">';
    print $langs->trans("ChooseFormatOfFileToImport", img_picto('', 'filenew')) . '<br>';
    print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
    $filetoimport = '';
    $var = true;
    // Add format informations and link to download example
    print '<tr class="liste_titre"><td colspan="6">';
    print $langs->trans("FileMustHaveOneOfFollowingFormat");
    print '</td></tr>';
    $liste = $objmodelimport->liste_modeles($db);
    foreach ($liste as $key) {
        $var = !$var;
        print '<tr ' . $bc[$var] . '>';
        print '<td width="16">' . img_picto_common($key, $objmodelimport->getPicto($key)) . '</td>';
        $text = $objmodelimport->getDriverDesc($key);
        print '<td>' . $form->textwithpicto($objmodelimport->getDriverLabel($key), $text) . '</td>';
        print '<td align="center"><a href="' . DOL_URL_ROOT . '/imports/emptyexample.php?format=' . $key . $param . '" target="_blank">' . $langs->trans("DownloadEmptyExample") . '</a></td>';
        // Action button
        print '<td align="right">';
        print '<a href="' . DOL_URL_ROOT . '/imports/import.php?step=3&format=' . $key . $param . '">' . img_picto($langs->trans("SelectFormat"), 'filenew') . '</a>';
        print '</td>';
        print '</tr>';
    }
    print '</table></form>';
    dol_fiche_end();
    if ($mesg) {
        print $mesg;
    }
}
// STEP 3: Page to select file
if ($step == 3 && $datatoimport) {
Beispiel #2
0
print '<tr><td valign="top" width="40%" class="notopnoleft">';
// Liste des formats d'imports disponibles
$var = true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">' . $langs->trans("AvailableFormats") . '</td>';
print '<td>' . $langs->trans("LibraryShort") . '</td>';
print '<td align="right">' . $langs->trans("LibraryVersion") . '</td>';
print '</tr>';
include_once DOL_DOCUMENT_ROOT . '/core/modules/import/modules_import.php';
$model = new ModeleImports();
$liste = $model->liste_modeles($db);
foreach ($liste as $key) {
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td width="16">' . img_picto_common($model->getDriverLabel($key), $model->getPicto($key)) . '</td>';
    $text = $model->getDriverDesc($key);
    print '<td>' . $form->textwithpicto($model->getDriverLabel($key), $text) . '</td>';
    print '<td>' . $model->getLibLabel($key) . '</td>';
    print '<td nowrap="nowrap" align="right">' . $model->getLibVersion($key) . '</td>';
    print '</tr>';
}
print '</table>';
print '</td><td valign="top" width="60%" class="notopnoleftnoright">';
// Affiche les modules d'imports
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Module") . '</td>';
print '<td>' . $langs->trans("ImportableDatas") . '</td>';
//print '<td>&nbsp;</td>';
print '</tr>';