2020-10-25 23:01:30 +00:00
|
|
|
<?php
|
|
|
|
if (!empty ($_POST)){
|
|
|
|
if (
|
2020-10-30 14:25:34 +00:00
|
|
|
isset ($_POST['name']) &&
|
|
|
|
$_POST['name'] != '' &&
|
|
|
|
!isset ($_POST['remove'])
|
|
|
|
) {
|
2020-10-26 15:45:45 +00:00
|
|
|
if ($_POST['status'] == "true") {
|
|
|
|
if (file_exists ($_SERVER['DOCUMENT_ROOT'] . BASEDIR . 'app/plugins/!' . $_POST['name'] . ".php")) {
|
|
|
|
rename($_SERVER['DOCUMENT_ROOT'] . BASEDIR . 'app/plugins/!' . $_POST['name'] . ".php", $_SERVER['DOCUMENT_ROOT'] . BASEDIR . 'app/plugins/' . $_POST['name'] . ".php");
|
|
|
|
}
|
2020-10-25 23:01:30 +00:00
|
|
|
} else {
|
2020-10-26 15:45:45 +00:00
|
|
|
if (file_exists ($_SERVER['DOCUMENT_ROOT'] . BASEDIR . 'app/plugins/' . $_POST['name'] . ".php")) {
|
|
|
|
rename($_SERVER['DOCUMENT_ROOT'] . BASEDIR . 'app/plugins/' . $_POST['name'] . ".php", $_SERVER['DOCUMENT_ROOT'] . BASEDIR . 'app/plugins/!' . $_POST['name'] . ".php");
|
|
|
|
}
|
2020-10-25 23:01:30 +00:00
|
|
|
}
|
|
|
|
header('Location: ./plugins');
|
|
|
|
die();
|
|
|
|
}
|
2020-10-30 14:25:34 +00:00
|
|
|
|
|
|
|
if (
|
|
|
|
isset ($_POST['name']) &&
|
|
|
|
$_POST['name'] != '' &&
|
|
|
|
isset ($_POST['remove'])
|
|
|
|
) {
|
|
|
|
//
|
|
|
|
}
|
2020-10-25 23:01:30 +00:00
|
|
|
}
|