Example #1
0
You should have received a copy of the GNU General Public License
along with mreporting. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
if (!isset($_GET["id"])) {
    $_GET["id"] = 0;
}
if (!isset($_GET["preconfig"])) {
    $_GET["preconfig"] = -1;
}
$config = new PluginMreportingConfig();
if (isset($_POST["add"])) {
    Session::checkRight("config", "w");
    $newID = $config->add($_POST);
    Html::back();
} else {
    if (isset($_POST["update"])) {
        Session::checkRight("config", "w");
        $config->update($_POST);
        Html::back();
    } else {
        if (isset($_POST["delete"])) {
            Session::checkRight("config", "w");
            $config->delete($_POST, 1);
            Html::redirect("./config.form.php");
        } else {
            Html::header(__("Setup"), '', "plugins", "mreporting", "config");
            //Link from graph
            if (isset($_GET["name"]) && isset($_GET["classname"])) {