function removethemeprocess() { checktoken(); $theme = $_GET['data']; if ($theme != 'default' && $theme != 'dark' && $theme != 'base' && $theme != 'lite' && !empty($theme)) { if ($handle = opendir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $file) && file_exists(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'code.php')) { if (is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme)) { deletedirectory(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme); } } } closedir($handle); } if ($handle = opendir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'plugins')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . $file) && file_exists(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'code.php')) { if (is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme)) { deletedirectory(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme); } } } closedir($handle); } if ($handle = opendir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'extensions')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR . $file) && file_exists(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'code.php')) { if (is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme)) { deletedirectory(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme); } } } closedir($handle); } if (is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'i' . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme)) { deletedirectory(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'i' . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme); } if (is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'm' . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme)) { deletedirectory(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'm' . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme); } if (is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'desktop' . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme)) { deletedirectory(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'desktop' . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme); } if (is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme)) { deletedirectory(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme); } $_SESSION['cometchat']['error'] = 'Theme deleted successfully'; } else { $_SESSION['cometchat']['error'] = 'Sorry, this theme cannot be deleted. Please manually remove the theme from the "themes" folder.'; } header("Location:?module=themes"); }
if ($key == $readinhalts) { $alert = '<div class="alert alert-success" role="alert"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>Erfolgreich eingeloggt</div>'; $_SESSION['angemeldet'] = true; $_SESSION['key'] = $_POST['loginkey']; } else { $alert = '<div class="alert alert-danger" role="alert">Sicherheits Code ist falsch</div>'; } fclose($readhandle); } } else { if (isset($_POST['setupkey']) && !empty($_POST['setupkey'])) { @unlink($filename); $securitycode = password_hash(md51000($_POST['setupkey'] . 'Pi-Safe_DataSafebySimolation'), PASSWORD_DEFAULT, $options); $dateihtaccess = fopen($filename, "w+"); fwrite($dateihtaccess, $securitycode); deletedirectory('data/'); header('Location: index.php?setupok'); } } } if (isset($_SESSION['angemeldet']) && isset($_SESSION['key'])) { if (!isset($notshow)) { ?> <!DOCTYPE html> <html lang="de"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1">
function removecolorprocess() { global $ts; $color = $_GET['data']; if ($color != 'standard' && !empty($color)) { if ($handle = opendir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $file) && file_exists(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'code.php')) { if (is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $color)) { deletedirectory(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $color); } } } closedir($handle); } if ($handle = opendir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'plugins')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . $file) && file_exists(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'code.php')) { if (is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $color)) { deletedirectory(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $color); } } } closedir($handle); } if ($handle = opendir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'extensions')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR . $file) && file_exists(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'code.php')) { if (is_dir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $color)) { deletedirectory(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $color); } } } closedir($handle); } if (file_exists(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'colors' . DIRECTORY_SEPARATOR . $color . '.php')) { unlink(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'colors' . DIRECTORY_SEPARATOR . $color . '.php'); } $_SESSION['cometchat']['error'] = 'Color scheme deleted successfully'; } else { $_SESSION['cometchat']['error'] = 'Sorry, this color scheme cannot be deleted. Please manually remove the theme from the "themes/color" folder.'; } header("Location:?module=themes&ts={$ts}"); }