<?php
// all this plugin needs to do now is make itself known to Zomplog
ob_start();
include_once("functions.php");
include('config.php');
include("session.php");
include("header.php");
if(!$_SESSION["loggedIn"]){ echo "You are not allowed to view this page, please log in first."; exit; }
if($_GET[action] == 'activate'){
$query = "UPDATE $table_plugins SET active = '1' WHERE name = '$_GET[plugin]'";
mysql_query($query) or die (mysql_error());
$message = urlencode("Plugin activated!");
header("Location: plugins.php?message=$message");
}
if($_GET[action] == 'deactivate'){
$query = "UPDATE $table_plugins SET active = '0' WHERE name = '$_GET[plugin]'";
mysql_query($query) or die (mysql_error());
$message = urlencode("Plugin de-activated!");
header("Location: plugins.php?message=$message");
}
include("footer.php");
?>