<?php
/**
* Quote Module Uninstaller
*
* This uninstaller makes sure an admin is authenticated
* and checks whether the module is installed or not
* before uninstalling. This file is included by index.php
*
* @author Edward Ritter, hide@address.com
* @version $Id: quotes_uninstall.inc.php,v 1.1 2002/09/03 19:33:03 esritter Exp $
* @module quotes
* @package phpWebSite
*/
/* security check */
global $PHP_SELF;
if (substr_count ($PHP_SELF,"/mod/")) {
$inc_prefix = "../../";
} else if (substr_count ($PHP_SELF,"mod.php") ||
substr_count ($PHP_SELF,"admin.php")) {
$inc_prefix = "./";
} else {
$inc_prefix = "../";
}
include_once ($inc_prefix . 'modsecurity.php');
include ($inc_prefix . 'config.php');
if (!check_internal_call()) {
html_header_location("$phpws_url");
}
/* end security check */
// delete mod_quotes from database
$result = mysql_query ("DROP TABLE IF EXISTS " . $table_prefix ."mod_" . $modname ."");
if (!$result) {
$box_content .= "Error deleting module table:<br/>". mysql_error();
}
// remove row from the modules table
$result = mysql_query ("DELETE FROM " . $table_prefix ."modules WHERE
source_file='mod.php?mod=".$modname."'");
if (!$result) {
$box_content .= "Error removing module from modules table:<br/>". mysql_error();
}
?>