üstüne bu kodları ekleyin
[code]//######### MySQL Database Backup/Restore Hack Ver. 1.0 ###########
//######### by Birdie501 ###########
//######### Variable, please modify ###########
$db_host="Host-name";
$db_username="mysql-username";
$db_passwort="mysql-passwort";
$db_name="database-name";
$pfad="root/your folder to your forum/admin/backup"; // root without / at the end
// If you don't know the root, just upload root.php on your server and call it!
$download_url="http://"; // http://... with / at the end
$dateiname=date('U'); // not to change!. Unique filename will be used
//######### please do not modify lines below ###########
// ###################### Start Backup #######################
if ($action=="backup") {
doformheader("template","dobackup");
makehiddencode("templateid",$templateid);
makehiddencode("group",$group);
maketableheader("Confirm backup");
makedescription("Are you sure you want to backup your mysql database?");
doformfooter("Yes","",2,"No");
}
// ###################### Start Dobackup #######################
if ($HTTP_POST_VARS['action']=="dobackup") {
$programm="mysqldump";
$parameter=" -l --add-drop-table -h ".$db_host." -u".$db_username." -p".$db_passwort." ".$db_name." 2>".$pfad."/error.txt >".$pfad."/".$dateiname.".sql";
echo("<b>Start MySQL Dump:</b> \n");
exec($programm . " " . $parameter, $lines, $result);
echo("done!<br>\n");
echo("<b>compress file:</b> \n");
exec("gzip -c ".$pfad."/".$dateiname.".sql > ".$pfad."/".$dateiname.".sql.gz", $lines, $result);
echo("done!<br>\n");
echo("<b>delete not compressed file:</b> \n");
exec("rm ".$pfad."/".$dateiname.".sql", $lines, $result);
echo("done! \n");
echo("<b><br>Before you can restore this file, you have to rename to backp.sql.gz:</b> \n");
echo("<p>\n");
echo("<a href=\"".$download_url.$dateiname.".sql.gz\" target=\"_blank\">Download File</a>");
}
// ###################### Start Restore #######################
if ($action=="backup") {
doformheader("template","dorestore");
makehiddencode("templateid",$templateid);
makehiddencode("group",$group);
maketableheader("Confirm restore");
makedescription("Are you sure you want to restore your mysql database? <font color='red'>Attention: All datas will be overwritten!</font>");
doformfooter("Yes","",2,"No");
}