<commit_before><?php

//Burden, Copyright <NAME> (http://github.com/joshf/Burden)

if (!file_exists("../config.php")) {
    header("Location: index.php");
}

require_once("../config.php");

?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Burden &middot; Upgrade</title>
<meta name="robots" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../resources/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet">
<link href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css" rel="stylesheet">
<style type="text/css">
body {
    padding-top: 60px;
}
@media (max-width: 980px) {
    body {
        padding-top: 0;
    }
}
</style>
<!-- Javascript start -->
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="../resources/jquery.min.js"></script>
<script src="../resources/bootstrap/js/bootstrap.min.js"></script>
<!-- Javascript end -->
</head>
<body>
<!-- Nav start -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="#">Burden</a>
</div>
</div>
</div>
<!-- Nav end -->
<!-- Content start -->
<div class="container">
<div class="page-header">
<h1>Upgrade</h1>
</div>
<?php

//Version
$version = "1.5";

if ($version == VERSION) {
    die("<div class=\"alert alert-info\"><h4 class=\"alert-heading\">Upgrade Notice</h4><p>Burden does not require an upgrade.<p><a href=\"../login.php\" class=\"btn btn-info\">Go To Login</a></p></div></div></body></html>");
    
}

$dbhost = DB_HOST;
$dbuser = DB_USER;
$dbpassword = DB_PASSWORD;
$dbname = DB_NAME;
$adminuser = ADMIN_USER;

//$adminpassword = <PASSWORD>;
//$salt = SALT;

//Salt and hash passwords
//From 1.4 --> 1.5
$temppassword = substr(str_shuffle("abcdefghijklmnopqrstuvwxyz<PASSWORD>9"), 0, 6);
$randsalt = md5(uniqid(rand(), true));
$salt = substr($randsalt, 0, 3);
$hashedpassword = hash("<PASSWORD>", $temppassword);
$adminpassword = hash("sha256", $salt . $hashedpassword);
$uniquekey = UNIQUE_KEY;<commit_msg>Add option to upgrade on heroku<commit_after><?php

//Burden, Copyright <NAME> (http://github.com/joshf/Burden)

if (isset($_GET["heroku"]) {
    if (getenv("DB_HOST")) {
        $installstring = "<?php\n\n//Database Settings\ndefine('DB_HOST', '" . getenv("DB_HOST") . "');\ndefine('DB_USER', '" . getenv("DB_USER") . "');\ndefine('DB_PASSWORD', '" . getenv("DB_PASSWORD") . "');\ndefine('DB_NAME', '" . getenv("DB_NAME") . "');\n\n//Admin Details\ndefine('ADMIN_USER', '" . getenv("ADMIN_USER") . "');\ndefine('ADMIN_PASSWORD', '" . getenv("ADMIN_PASSWORD") . "');\ndefine('SALT', '" . getenv("SALT") . "');\n\n//Other Settings\ndefine('UNIQUE_KEY', '" . getenv("UNIQUE_KEY") . "');\ndefine('THEME', '" . getenv("THEME") . "');\n\ndefine('VERSION', '" . getenv("VERSION") . "');\n\n?>";
        $configfile = fopen("../config.php", "w");
        fwrite($configfile, $installstring);
        fclose($configfile);
    }
}

if (!file_exists("../config.php")) {
    header("Location: index.php");
}

require_once("../config.php");

?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Burden &middot; Upgrade</title>
<meta name="robots" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../resources/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet">
<link href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css" rel="stylesheet">
<style type="text/css">
body {
    padding-top: 60px;
}
@media (max-width: 980px) {
    body {
        padding-top: 0;
    }
}
</style>
<!-- Javascript start -->
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="../resources/jquery.min.js"></script>
<script src="../resources/bootstrap/js/bootstrap.min.js"></script>
<!-- Javascript end -->
</head>
<body>
<!-- Nav start -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="#">Burden</a>
</div>
</div>
</div>
<!-- Nav end -->
<!-- Content start -->
<div class="container">
<div class="page-header">
<h1>Upgrade</h1>
</div>
<?php

//Version
$version = "1.5";
    
if ($version == VERSION) {
    die("<div class=\"alert alert-info\"><h4 class=\"alert-heading\">Upgrade Notice</h4><p>Burden does not require an upgrade.<p><a href=\"../login.php\" class=\"btn btn-info\">Go To Login</a></p></div></div></body></html>");
    
}

$dbhost = DB_HOST;
$dbuser = DB_USER;
$dbpassword = <PASSWORD>;
$dbname = DB_NAME;
$adminuser = ADMIN_USER;

//$adminpassword = <PASSWORD>;
//$salt = SALT;

//Salt and hash passwords
//From 1.4 --> 1.5
$temppassword = substr(str_shuffle("abcdefghijklmnopqrstuvwxyz<PASSWORD>"), 0, 6);
$randsalt = md5(uniqid(rand(), true));
$salt = substr($randsalt, 0, 3);
$hashedpassword = hash("<PASSWORD>", $temppassword);
$adminpassword = hash("<PASSWORD>", $salt . $hashedpassword);
$uniquekey = UNIQUE_KEY;
{'fraction_non_alphanumeric': 0.24035493827160495, 'fraction_numerical': 0.01273148148148148, 'mean_word_length': 4.440713536201469, 'pattern_counts': {'":': 0, '<': 124, '<?xml version=': 0, '>': 124, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2719146', 'n_tokens_mistral': 1960, 'n_tokens_neox': 1882, 'n_words': 361}