Location: PHPKode > projects > phpSC > modules/plus-installer.php
<?PHP
$addon_dir = $_POST['addon'];
require_once($addon_dir."addon_info.php");

//Check for all needed files //
if($addon_sql == TRUE) {
	if(!file_exists($addon_dir."addon_sql.php")) {
		die("<center><font color='red'>Incomplete package, aborting installation.</font></center>");
	} else {
	require_once($addon_dir."addon_sql.php");
	if($sql_message == TRUE) {
	$install_sql = "SQL Inserted Successfully.";
	} else {
	$install_sql = "There was an error inserting the SQL files for this addon.";
	}
}
} else {
$sql_message = TRUE;
}
require_once($addon_dir."addon_install.php");
if($install_message == TRUE && $sql_message == TRUE) {
$sql = 'INSERT INTO `plus` (`id`, `package`, `version`, `date_installed`) VALUES (NULL, "'.$addon_name.'", "'.$addon_version.'", "'.date('n/j/Y').'")';
mysql_query($sql,$conn) or die (mysql_error());
echo "<center><strong>$addon_name</strong> package installed!</center><br /><a href='index.php?module=plus'>Back</a>";
}
?>
Return current item: phpSC