33 lines
1.0 KiB
PHP
33 lines
1.0 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/lis.class.php';
|
||
|
||
if (($_GET['compile'] ?? '') != 'yes'){
|
||
echo '<form action="?compile=yes" method="post" enctype="multipart/form-data">
|
||
Выберите ваш lis файл:<br>
|
||
<input type="file" name="lis"><br>
|
||
<input type="submit" value="Компилировать">
|
||
</form>';
|
||
} else {
|
||
if (is_uploaded_file($_FILES["lis"]["tmp_name"])) {
|
||
$namebas = "bas".rand(1000,99999).".bas";
|
||
$bas = new LIS($_FILES['lis']['tmp_name'], './tmp/'.$namebas);
|
||
$log = $bas->compile();
|
||
if ($log == '') {
|
||
echo 'Файл успешно скомпилирован!<br><a href="tmp/'.$namebas.'">Скачать</a>';
|
||
}
|
||
}
|
||
}
|
||
?>
|
||
</body>
|
||
</html>
|