Пример #1
0
</form>';
echo $content;
$content = '
        <table class="table table-striped">
            <thead>
                <tr>
                    <th></th>
                    <th>' . rex_i18n::msg('im_export_filename') . '</th>
                    <th>' . rex_i18n::msg('im_export_filesize') . '</th>
                    <th>' . rex_i18n::msg('im_export_createdate') . '</th>
                    <th colspan="3">' . rex_i18n::msg('im_export_function') . '</th>
                </tr>
            </thead>
            <tbody>';
$dir = getImportDir();
$folder = readImportFolder('.tar.gz');
foreach ($folder as $file) {
    $filepath = $dir . '/' . $file;
    $filec = date('d.m.Y H:i', filemtime($filepath));
    $filesize = rex_file::formattedSize($filepath);
    $content .= '<tr>
                    <td><i class="rex-icon rex-icon-file-archive"></i></td>
                    <td>' . $file . '</td>
                    <td>' . $filesize . '</td>
                    <td>' . $filec . '</td>
                    <td><a href="' . rex_url::currentBackendPage(['function' => 'fileimport', 'impname' => $file]) . '" title="' . rex_i18n::msg('im_export_import_file') . '" data-confirm="' . rex_i18n::msg('im_export_proceed_file_import') . '"><i class="rex-icon rex-icon-import"></i> ' . rex_i18n::msg('im_export_to_import') . '</a></td>
                    <td><a href="' . rex_url::currentBackendPage(['function' => 'download', 'impname' => $file]) . '" title="' . rex_i18n::msg('im_export_download_file') . '"><i class="rex-icon rex-icon-download"></i> ' . rex_i18n::msg('im_export_download') . '</a></td>
                    <td><a href="' . rex_url::currentBackendPage(['function' => 'delete', 'impname' => $file]) . '" title="' . rex_i18n::msg('im_export_delete_file') . '" data-confirm="' . rex_i18n::msg('im_export_delete') . ' ?"><i class="rex-icon rex-icon-delete"></i> ' . rex_i18n::msg('im_export_delete') . '</a></td>
                </tr>';
}
$content .= '
Пример #2
0
$dir = getImportDir();
$folder = readImportFolder(".sql");
foreach ($folder as $file) {
    $filepath = $dir . '/' . $file;
    $filec = date("d.m.Y H:i", filemtime($filepath));
    echo "<tr>\r\n                <td class=lgrey><b>{$file}</b></td>\r\n                <td class=lgrey>{$filec}</td>\r\n                <td class=lgrey><a href=index.php?page={$page}&amp;function=dbimport&amp;impname={$file} title='" . $I18N_IM_EXPORT->msg('import_file') . "' onclick=\"return confirm('" . $I18N_IM_EXPORT->msg('proceed_db_import') . "')\">" . $I18N_IM_EXPORT->msg("import") . "</a></td>\r\n                <td class=lgrey><a href=index.php?page={$page}&amp;function=delete&amp;impname={$file} title='" . $I18N_IM_EXPORT->msg('delete_file') . "' onclick=\"return confirm('" . $I18N->msg('delete') . " ?')\">" . $I18N_IM_EXPORT->msg("delete") . "</a></td></tr>";
}
echo "</table>";
// FILE IMPORT
echo "<br><table width=100% border=0 cellspacing=1 cellpadding=4 bgcolor=#ffffff>\r\n  <tr><td align=left colspan=2 class=lgrey>" . $I18N_IM_EXPORT->msg("files") . "</td>\r\n  <form action=index.php method=post enctype='multipart/form-data'>\r\n  <input type=hidden name=page value={$page}>\r\n  <input type=hidden name=function value=fileimport>\r\n  <tr>\r\n    <td class=lgrey><input type=file name=FORM[importfile]></td>\r\n    <td class=lgrey width=130><input type=submit value='" . $I18N_IM_EXPORT->msg("db_import") . "'></td>\r\n  </tr>\r\n  </form>\r\n  </table>";
echo "<br><table width=100% border=0 cellspacing=1 cellpadding=4 bgcolor=#ffffff>" . "\n";
echo "<tr>\r\n      <td align=left class=lgrey>" . $I18N_IM_EXPORT->msg("filename") . "</td>\r\n      <td width=60 class=lgrey>" . $I18N_IM_EXPORT->msg("createdate") . "</td>\r\n      <td width=60 class=lgrey>&nbsp;</td>\r\n      <td width=60 class=lgrey>&nbsp;</td>" . "\n";
// FILE IMPORT LIST
// all files in files with .tar.gz als endung
$dir = getImportDir();
$folder = readImportFolder(".tar.gz");
foreach ($folder as $file) {
    $filepath = $dir . '/' . $file;
    $filec = date("d.m.Y H:i", filemtime($filepath));
    echo "<tr>\r\n                <td class=lgrey><b>{$file}</b></td>\r\n                <td class=lgrey>{$filec}</td>\r\n                <td class=lgrey><a href=index.php?page={$page}&function=fileimport&impname={$file} title='" . $I18N_IM_EXPORT->msg('import_file') . "' onclick=\"return confirm('" . $I18N_IM_EXPORT->msg('proceed_file_import') . "')\">" . $I18N_IM_EXPORT->msg("import") . "</a></td>\r\n                <td class=lgrey><a href=index.php?page={$page}&function=delete&impname={$file} title='" . $I18N_IM_EXPORT->msg('delete_file') . "' onclick=\"return confirm('" . $I18N->msg('delete') . " ?')\">" . $I18N_IM_EXPORT->msg("delete") . "</a></td></tr>";
}
echo "</table><br />" . "\n";
// ----------------------------------------------------------------- /IMPORT
?>
</td><td valign="top" class="dgrey"><?php 
// ----------------------------------------------------------------- EXPORT
echo "<br />" . $I18N_IM_EXPORT->msg("intro_export") . "<br /><br />" . "\n";
echo "<table width=100% border=0 cellspacing=1 cellpadding=4 bgcolor=#ffffff>\r\n  \r\n  <form action=index.php method=post enctype='multipart/form-data'>\r\n  <input type=hidden name=page value={$page}>\r\n  <input type=hidden name=function value=export>  \r\n  " . "\n";
$checkedsql = "";
$checkedfiles = "";
if (isset($exporttype) and $exporttype == "files") {
Пример #3
0
?>
</th>
                        <th><?php 
echo $I18N->msg('im_export_createdate');
?>
</th>
                        <th colspan="3"><?php 
echo $I18N->msg('im_export_function');
?>
</th>
                    </tr>
                </thead>
                <tbody>
<?php 
$dir = getImportDir();
$files = readImportFolder('.tar.gz');
sort($files);
foreach ($files as $file) {
    $filepath = $dir . '/' . $file;
    $filec = date('d.m.Y H:i', filemtime($filepath));
    $filesize = OOMedia::_getFormattedSize(filesize($filepath));
    echo '<tr>
                        <td>' . $file . '</td>
                        <td>' . $filesize . '</td>
                        <td>' . $filec . '</td>
                        <td><a href="index.php?page=import_export&amp;subpage=import&amp;function=fileimport&amp;impname=' . $file . '" title="' . $I18N->msg('im_export_import_file') . '" onclick="return confirm(\'' . $I18N->msg('im_export_proceed_file_import') . '\')">' . $I18N->msg('im_export_to_import') . '</a></td>
                        <td><a href="index.php?page=import_export&amp;subpage=import&amp;function=download&amp;impname=' . $file . '" title="' . $I18N->msg('im_export_download_file') . '">' . $I18N->msg('im_export_download') . '</a></td>
                        <td><a href="index.php?page=import_export&amp;subpage=import&amp;function=delete&amp;impname=' . $file . '" title="' . $I18N->msg('im_export_delete_file') . '" onclick="return confirm(\'' . $I18N->msg('im_export_delete') . ' ?\')">' . $I18N->msg('im_export_delete') . '</a></td>
                    </tr>';
}
?>