Location: PHPKode > projects > Inspirado > plugins/statistics/uninstall.php
<?php

if (!function_exists("doNothing"))
	die("Hacking attempt!");

$index = fopen("../index.php","r");
$index_code = fread($index,filesize("../index.php"));
fclose($index);

if (strpos($index_code,"<?php include \"./plugins/".$folder."/regstat.php\"; ?>")) {
	
	$index_code = str_replace("<?php include \"./plugins/".$folder."/regstat.php\"; ?>","",$index_code);
	
	unlink("../index.php");
	
	$newindex = fopen("../index.php","w");
	fwrite($newindex,$index_code);
	fclose($newindex);
	
	unlink("../plugins/".$folder."/activate.php");
	unlink("../plugins/".$folder."/deactivate.php");
	unlink("../plugins/".$folder."/install.php");
	unlink("../plugins/".$folder."/readme.php");
	unlink("../plugins/".$folder."/info.php");
	unlink("../plugins/".$folder."/regstat.php");
	unlink("../plugins/".$folder."/page_View-Stats.php");
	unlink("../plugins/".$folder."/uninstall.php");
	rmdir("../plugins/".$folder);
	
	dbQuery("DROP TABLE IF EXISTS ".DBPREFIX."plugin_statistics");
	
} else {
	
	die("Statistics Plugin is not installed!");
	
}


?>
Return current item: Inspirado