示例#1
0
        echo '<div align="left"><form action="' . $href . '" method="POST" enctype="multipart/form-data">';
        echo '<input type="file" name="upfile" class="Formtext" size="60">';
        echo '<input type="submit" name="upload" value="' . $lang['L_FM_FILEUPLOAD'] . '" class="Formbutton">';
        echo '<br>' . $lang['L_MAX_UPLOAD_SIZE'] . ': <strong>' . $config['upload_max_filesize'] . '</strong>';
        echo '<br>' . $lang['L_MAX_UPLOAD_SIZE_INFO'];
        echo '</form></div>';
        echo '<h6>Tools</h6><div align="left">';
        echo '<input type="Button" onclick="document.location=\'filemanagement.php?action=convert\'" class="Formbutton" value="' . $lang['L_CONVERTER'] . '">';
        echo '</div>';
        break;
    case "convert":
        // Konverter
        echo headline($lang['L_CONVERTER']);
        echo '<br><br><form action="filemanagement.php?action=convert" method="post">';
        echo '<table class="bdr"><tr><th colspan="2">' . $lang['L_CONVERT_TITLE'] . '</th></tr>';
        echo '<tr><td>' . $lang['L_CONVERT_FILE'] . '</td><td>' . FilelisteCombo($config['paths']['backup'], $selectfile) . '</td></tr>';
        echo '<tr><td>' . $lang['L_CONVERT_FILENAME'] . ':</td><td><input type="text" name="destfile" size="50" value="' . $destfile . '"></td></tr>';
        echo '<tr><td><input type="checkbox" name="compressed" value="1" ' . ($compressed == 1 ? "checked" : "") . '>&nbsp;' . $lang['L_COMPRESSED'] . '</td>';
        echo '<td><input type="submit" name="startconvert" value=" ' . $lang['L_CONVERT_START'] . ' " class="Formbutton"></td></tr>';
        echo '</table></form><br>';
        if (isset($_POST['startconvert'])) {
            //$destfile.=($compressed==1) ? ".sql.gz" : ".sql";
            echo $lang['L_CONVERTING'] . " {$selectfile} ==&gt; {$destfile}<br>";
            if ($selectfile != "" && file_exists($config['paths']['backup'] . $selectfile) && strlen($destfile) > 2) {
                Converter($selectfile, $destfile, $compressed);
            } else {
                echo $lang['L_CONVERT_WRONG_PARAMETERS'];
            }
        }
}
echo MSDFooter();
        echo '<div align="left"><form action="' . $href . '" method="POST" enctype="multipart/form-data">' . br();
        echo '<input type="file" name="upfile" class="Formbutton" size="60">' . br();
        echo '<input type="submit" name="upload" value="' . $lang['fm_fileupload'] . '" class="Formbutton">' . br();
        echo '<br>' . $lang['max_upload_size'] . ': <strong>' . $config['upload_max_filesize'] . '</strong>';
        echo '<br>' . $lang['max_upload_size_info'];
        echo '</form></div>' . br();
        echo '<h6>Tools</h6><div align="left">';
        echo '<input type="Button" onclick="document.location=\'filemanagement.php?action=convert\'" class="Formbutton" value="' . $lang['converter'] . '">';
        echo '</div>';
        break;
    case "convert":
        // Konverter
        echo headline($lang['converter']);
        echo '<br><br><form action="filemanagement.php?action=convert" method="post">';
        echo '<div align="center"><table class="border"><tr><th colspan="2">' . $lang['convert_title'] . '</th></tr>';
        echo '<tr><td>' . $lang['convert_file'] . '</td><td>' . FilelisteCombo($config['paths']['backup'], $selectfile) . '</td></tr>';
        echo '<tr><td>' . $lang['convert_filename'] . ':</td><td><input type="text" name="destfile" size="50" value="' . $destfile . '"></td></tr>';
        echo '<tr><td><input type="checkbox" name="compressed" value="1" ' . ($compressed == 1 ? "checked" : "") . '>' . $lang['compressed'] . '</td>';
        echo '<td><input type="submit" name="startconvert" value=" ' . $lang['convert_start'] . ' " class="Formbutton"></td></tr>';
        echo '</table></div></form><br>';
        if (isset($_POST['startconvert'])) {
            $destfile .= $compressed == 1 ? ".sql.gz" : ".sql";
            echo $lang['converting'] . " {$selectfile} ==&gt; {$destfile}<br>";
            if ($selectfile != "" && file_exists($config['paths']['backup'] . $selectfile) && strlen($destfile) > 2) {
                Converter($selectfile, $destfile, $compressed);
            } else {
                echo $lang['convert_wrong_parameters'];
            }
        }
}
echo '' . br(3);