36 lines
1.2 KiB
PHP
36 lines
1.2 KiB
PHP
|
<html>
|
|||
|
<head>
|
|||
|
<meta http-equiv="Content-Type" content="application/html; charset=utf-8"/>
|
|||
|
<meta http-equiv="Copyright" content="Андрей Рейгант (HoldFast)"/>
|
|||
|
<link rel="stylesheet" media="all" type="text/css" href="mbstyle/mbs.css"/>
|
|||
|
<title>Сервис для работы с BAS файлами</title>
|
|||
|
</head>
|
|||
|
|
|||
|
<body>
|
|||
|
<h2>Декомпилятор</h2>
|
|||
|
<?php
|
|||
|
include 'classes/bas.class.php';
|
|||
|
|
|||
|
if (($_GET['decompile'] ?? '') != 'yes') {
|
|||
|
echo '<form action="?decompile=yes" method="post" enctype="multipart/form-data">
|
|||
|
Выберите ваш BAS файл:<br>
|
|||
|
<input type="file" name="bas"><br>
|
|||
|
<input type="submit" value="Декомпилировать">
|
|||
|
</form>';
|
|||
|
} else {
|
|||
|
if (is_uploaded_file($_FILES["bas"]["tmp_name"])) {
|
|||
|
$namebas = "bas" . rand(1000, 99999) . ".lis";
|
|||
|
$bas = new BAS($_FILES["bas"]["tmp_name"]);
|
|||
|
$log = $bas->decompile();
|
|||
|
if ($log != "-2" && $log != "-1" && $log != "0") {
|
|||
|
file_put_contents('tmp/' . $namebas, $log);
|
|||
|
echo 'Файл успешно декомпилирован!<br><a href="tmp/' . $namebas . '">Скачать</a>';
|
|||
|
} else {
|
|||
|
echo 'Ошибка декомпиляции!';
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
?>
|
|||
|
</body>
|
|||
|
</html>
|