Location: PHPKode > scripts > Multi Search Module > multi-search-module/search_uninstall.inc.php
<?php
/**
 * Search 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: search_uninstall.inc.php,v 1.1 2002/09/06 06:09:26 esritter Exp $
 * @module search
 * @package phpWebSite
 */

// DON'T CHANGE THIS
/* 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 search data table
$result = mysql_query ("DROP TABLE IF EXISTS " . $table_prefix."mod_".$modname."_data");
// display error if delete failed
if (!$result) {
	$box_content .= "Error deleting search data table:<br/>". mysql_error();
}

// remove module from modules table
$result = mysql_query ("DELETE FROM ".$table_prefix."modules WHERE 
	source_file='mod.php?mod=".$modname."'");
// display error if delete failed
if (!$result) {
	$box_content .= "Error removing module:<br/>". mysql_error();
}

?>
Return current item: Multi Search Module