mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Make plugins list and switcher
This commit is contained in:
1 parent
64ccd91469
commit
ea00f7a295
13 files changed
+303
-15
No files matched your search
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if (!empty ($_POST)){
|
||||
if (
|
||||
isset($_POST['name']) &&
|
||||
$_POST['name'] != '' &&
|
||||
isset($_POST['actualStatus'])
|
||||
){
|
||||
if ($_POST['actualStatus']) {
|
||||
rename($_SERVER['DOCUMENT_ROOT'] . BASEDIR . 'app/plugins/' . $_POST['name'] . ".php", $_SERVER['DOCUMENT_ROOT'] . BASEDIR . 'app/plugins/!' . $_POST['name'] . ".php");
|
||||
} else {
|
||||
rename($_SERVER['DOCUMENT_ROOT'] . BASEDIR . 'app/plugins/!' . $_POST['name'] . ".php", $_SERVER['DOCUMENT_ROOT'] . BASEDIR . 'app/plugins/' . $_POST['name'] . ".php");
|
||||
}
|
||||
header('Location: ./plugins');
|
||||
die();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user