File Update

indentations
This commit is contained in:
Thomas
2025-10-06 21:16:06 +02:00
parent a184c31cca
commit 655347dbf5
6 changed files with 310 additions and 6 deletions

View File

@@ -1 +1,33 @@
<?php $base=dirname(__DIR__); $stop=$base.'/data/stop.flag'; $bat=$base.'/start_bot.bat'; $a=$_GET['action']??''; if($a==='start'){ $cmd='cmd /c start "" /min "'.$bat.'"'; if(function_exists('popen'))@pclose(@popen($cmd,'r')); else @shell_exec($cmd.' >NUL 2>&1'); header('Location: index.php'); exit; } if($a==='stop'){ file_put_contents($stop,'1'); header('Location: index.php'); exit; } if($a==='restart'){ file_put_contents($stop,'1'); echo '<meta http-equiv="refresh" content="1; url=control.php?action=start">Genstarter...'; exit; } header('Location: index.php');
<?php
$base = dirname(__DIR__);
$stop = $base . '/data/stop.flag';
$bat = $base . '/start_bot.bat';
$action = $_GET['action'] ?? '';
if ($action === 'start') {
$cmd = 'cmd /c start "" /min "' . $bat . '"';
if (function_exists('popen')) {
@pclose(@popen($cmd, 'r'));
} else {
@shell_exec($cmd . ' >NUL 2>&1');
}
header('Location: index.php');
exit;
}
if ($action === 'stop') {
file_put_contents($stop, '1');
header('Location: index.php');
exit;
}
if ($action === 'restart') {
file_put_contents($stop, '1');
echo '<meta http-equiv="refresh" content="1; url=control.php?action=start">Genstarter...';
exit;
}
header('Location: index.php');