isAdmin()) { $plugins = array(); if ($handle = opendir(Absolute_Path."plugins")) { while (false !== ($file = readdir($handle))) { if (substr($file, strlen($file)-4, 4) == ".php") { $plugins[] = substr($file, 0, strlen($file)-4); } } closedir($handle); } $actives = json_decode($conf->active_plugins, 1); $actives = $actives[1]; if (isset($_POST["btnsubmit"])) { $actives = array(); foreach ($_POST['plugins'] as $plugin => $val) { if ($val != 'off') { $file = $plugin.'.php'; $actives[$plugin] = $file; } } if (!$tumble->saveOption(json_encode(array(array('total'=>count($actives)),$actives)), "active_plugins")) { header("Location: ".$conf->urlSorbet."/admin/plugins.php?error=1&desc=".$conf->merror); die(); } header("Location: ".$conf->urlSorbet."/admin/plugins.php?modified=true"); die(); } else { ?>