'.$_SESSION['username'].' has downloaded the system database.');
} else {
header("Location: preferences.php?do=backup&success=no");
}
} elseif ($do == "rss") {
$phpns['mode'] = 'rss';
include('shownews.php');
$do = 'rss'; //shownews.php resets the $do variable, just resetting it for the rest of the etc.php to avoid error.
} elseif ($do == "news") {
//include news for this part of etc.php
include("shownews.php");
} elseif ($do == "delete_backup") {
//attempt to delete sql file
@unlink($databaseinfo['dbname'].'.sql');
//log
log_this('delete_backup','User '.$_SESSION['username'].' has attempted (successful or not) to delete the database backup.');
//redirect back to page.
header("Location: $return_to");
} elseif ($do == "delete_install") {
//attempt to delete install directory
@unlink('install/index.php');
@unlink('install/install.inc.php');
@unlink('install/install.tmp.php');
@unlink('install/upgrade.php');
if(@rmdir('install/'))
{
log_this('delete_install','User '.$_SESSION['username'].' has successfully deleted the install directory.');;
}else{
log_this('delete_install','User '.$_SESSION['username'].' has failed at deleting the install directory.');
}
header("Location: $return_to");
} elseif ($do == "hide_warnings") {
//set session var, and redirect to index. If TRUE, all warning messages at the top will be hidden.
$_SESSION['hide_sessions'] = TRUE;
header("Location: $return_to");
} elseif ($globalvars['debug'] == "yes" && $do == "phpinfo") {
phpinfo();
} else {
echo 'Bad $do ('.$do.'), could not find associated action.';
}
if ($do == NULL) {
echo "This file is only for special tasks that can't be done on other pages. Go away now. =D";
die();
}
?>