Delete unused files
This commit is contained in:
parent
78ae5cebff
commit
647955fdf0
@ -1,12 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head lang="en">
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<script>
|
|
||||||
window.location.replace("modsForHesk.php");
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,182 +0,0 @@
|
|||||||
<?php
|
|
||||||
define('IN_SCRIPT', 1);
|
|
||||||
define('HESK_PATH', '../../');
|
|
||||||
require(HESK_PATH . 'install/install_functions.inc.php');
|
|
||||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
|
||||||
|
|
||||||
if (!isset($_GET['v'])) {
|
|
||||||
die('Starting version not set!');
|
|
||||||
}
|
|
||||||
$startingVersion = intval($_GET['v']);
|
|
||||||
|
|
||||||
$buildToVersionMap = array(
|
|
||||||
2 => 'Pre-1.4.0',
|
|
||||||
3 => '1.4.0',
|
|
||||||
4 => '1.4.1',
|
|
||||||
5 => '1.5.0',
|
|
||||||
6 => '1.6.0',
|
|
||||||
7 => '1.6.1',
|
|
||||||
8 => '1.7.0',
|
|
||||||
9 => '2.0.0',
|
|
||||||
10 => '2.0.1',
|
|
||||||
11 => '2.1.0',
|
|
||||||
12 => '2.1.1',
|
|
||||||
13 => '2.2.0',
|
|
||||||
14 => '2.2.1',
|
|
||||||
15 => '2.3.0',
|
|
||||||
16 => '2.3.1',
|
|
||||||
17 => '2.3.2',
|
|
||||||
18 => '2.4.0',
|
|
||||||
19 => '2.4.1',
|
|
||||||
20 => '2.4.2',
|
|
||||||
21 => '2.5.0',
|
|
||||||
22 => '2.5.1',
|
|
||||||
23 => '2.5.2',
|
|
||||||
24 => '2.5.3',
|
|
||||||
25 => '2.5.4',
|
|
||||||
26 => '2.5.5',
|
|
||||||
27 => '2.6.0',
|
|
||||||
28 => '2.6.1',
|
|
||||||
29 => '2.6.2',
|
|
||||||
30 => '2.6.3',
|
|
||||||
31 => '2.6.4',
|
|
||||||
32 => '3.0.0 beta 1',
|
|
||||||
33 => '3.0.0 RC 1',
|
|
||||||
34 => '3.0.0',
|
|
||||||
35 => '3.0.1',
|
|
||||||
36 => '3.0.2',
|
|
||||||
37 => '3.0.3',
|
|
||||||
38 => '3.0.4',
|
|
||||||
39 => '3.0.5',
|
|
||||||
40 => '3.0.6',
|
|
||||||
41 => '3.0.7',
|
|
||||||
42 => '3.1.0',
|
|
||||||
43 => '3.1.1',
|
|
||||||
);
|
|
||||||
|
|
||||||
function echoInitialVersionRows($version, $build_to_version_map)
|
|
||||||
{
|
|
||||||
foreach ($build_to_version_map as $build => $display_text) {
|
|
||||||
if ($version < $build) {
|
|
||||||
printRow($display_text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function printRow($version)
|
|
||||||
{
|
|
||||||
$versionId = str_replace('.', '', $version);
|
|
||||||
$versionId = str_replace('Pre-', 'p', $versionId);
|
|
||||||
$versionId = str_replace(' beta ', 'b', $versionId);
|
|
||||||
$versionId = str_replace(' RC ', 'rc', $versionId);
|
|
||||||
echo '<tr id="row-' . $versionId . '">';
|
|
||||||
echo '<td>' . $version . '</td>';
|
|
||||||
echo '<td><i id="spinner-' . $versionId . '" class="fa fa-spinner"></i> <span id="span-' . $versionId . '">Waiting...</span></td>';
|
|
||||||
echo '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Installing / Updating Mods for HESK</title>
|
|
||||||
<link href="../../hesk_style.css?<?php echo HESK_NEW_VERSION; ?>" type="text/css" rel="stylesheet"/>
|
|
||||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css?v=<?php echo $hesk_settings['hesk_version']; ?>"
|
|
||||||
type="text/css" rel="stylesheet"/>
|
|
||||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css?v=<?php echo $hesk_settings['hesk_version']; ?>"
|
|
||||||
type="text/css" rel="stylesheet"/>
|
|
||||||
<link href="//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
|
|
||||||
<link href="../../css/hesk_newStyle.css" type="text/css" rel="stylesheet"/>
|
|
||||||
<script src="<?php echo HESK_PATH; ?>js/jquery-1.10.2.min.js"></script>
|
|
||||||
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap.min.js"></script>
|
|
||||||
<script language="Javascript" type="text/javascript"
|
|
||||||
src="<?php echo HESK_PATH; ?>js/modsForHesk-javascript.js"></script>
|
|
||||||
<script language="JavaScript" type="text/javascript"
|
|
||||||
src="<?php echo HESK_PATH; ?>install/mods-for-hesk/js/ui-scripts.js"></script>
|
|
||||||
<script language="JavaScript" type="text/javascript"
|
|
||||||
src="<?php echo HESK_PATH; ?>install/mods-for-hesk/js/version-scripts.js"></script>
|
|
||||||
<script language="JavaScript" type="text/javascript"
|
|
||||||
src="<?php echo HESK_PATH; ?>js/bootstrap-datepicker.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="headersm">Installing / Updating Mods for HESK</div>
|
|
||||||
<div class="container">
|
|
||||||
<div class="page-header">
|
|
||||||
<h1>Installing / Updating Mods for HESK</h1>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">Installation Progress</div>
|
|
||||||
<div id="install-information">
|
|
||||||
<table class="table table-striped" style="table-layout:fixed;">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Version</th>
|
|
||||||
<th>Status</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php echoInitialVersionRows($startingVersion, $buildToVersionMap); ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<?php if ($startingVersion < 18) { ?>
|
|
||||||
<table class="table table-striped" style="table-layout: fixed">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Task</th>
|
|
||||||
<th>Status</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php if ($startingVersion < 9): ?>
|
|
||||||
<tr id="row-banmigrate">
|
|
||||||
<td>Migrate IP / Email Bans</td>
|
|
||||||
<td><i id="spinner-banmigrate" class="fa fa-spinner"></i> <span
|
|
||||||
id="span-banmigrate">Waiting...</span></td>
|
|
||||||
</tr>
|
|
||||||
<?php endif; ?>
|
|
||||||
<tr id="row-initialize-statuses">
|
|
||||||
<td>Initialize Statuses</td>
|
|
||||||
<td><i id="spinner-initialize-statuses" class="fa fa-spinner"></i> <span
|
|
||||||
id="span-initialize-statuses">Waiting...</span></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row" id="attention-row" style="display:none">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<div class="panel panel-warning">
|
|
||||||
<div class="panel-heading">Your Attention is Needed!</div>
|
|
||||||
<div class="panel-body" id="attention-body">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">Console</div>
|
|
||||||
<div style="max-height: 400px; overflow: auto;">
|
|
||||||
<table class="table table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Severity</th>
|
|
||||||
<th>Message</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody id="consoleBody"></tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
processUpdates(<?php echo intval($startingVersion); ?>);
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,109 +0,0 @@
|
|||||||
function disableAllDisablable(exclusion) {
|
|
||||||
$('.disablable').attr('disabled', 'disabled');
|
|
||||||
$('#' + exclusion).removeAttr('disabled');
|
|
||||||
}
|
|
||||||
|
|
||||||
function enableAllDisablable() {
|
|
||||||
$('.disablable').removeAttr('disabled');
|
|
||||||
$('#updateText').hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateLink() {
|
|
||||||
var version = $('select[name="current-version"]').val();
|
|
||||||
var format = 'installModsForHesk.php?v={0}';
|
|
||||||
|
|
||||||
var formattedLink = format.replace('{0}', version);
|
|
||||||
$('#upgrade-link').attr('href', formattedLink);
|
|
||||||
}
|
|
||||||
|
|
||||||
function startVersionUpgrade(version) {
|
|
||||||
$('#spinner-' + version)
|
|
||||||
.removeClass('fa-exclamation-triangle')
|
|
||||||
.addClass('fa-spinner')
|
|
||||||
.addClass('fa-pulse');
|
|
||||||
changeRowTo('row', version, 'info');
|
|
||||||
changeTextTo('span', version, 'In Progress');
|
|
||||||
}
|
|
||||||
|
|
||||||
function markUpdateAsSuccess(version, formattedVersion) {
|
|
||||||
removeSpinner(version);
|
|
||||||
$('#spinner-' + version).addClass('fa-check-circle');
|
|
||||||
changeTextTo('span', version, 'Completed Successfully');
|
|
||||||
changeRowTo('row', version, 'success');
|
|
||||||
appendToInstallConsole('<tr><td><span class="label label-success">SUCCESS</span></td><td>Updates for ' + formattedVersion + ' complete</td></tr>');
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeSpinner(version) {
|
|
||||||
$('#spinner-' + version)
|
|
||||||
.removeClass('fa-pulse')
|
|
||||||
.removeClass('fa-spinner');
|
|
||||||
}
|
|
||||||
|
|
||||||
function markUpdateAsAttention(version) {
|
|
||||||
removeSpinner(version);
|
|
||||||
$('#spinner-' + version).addClass('fa-exclamation-triangle');
|
|
||||||
changeRowTo('row', version, 'warning');
|
|
||||||
changeTextTo('span', version, 'Attention! See below for more information');
|
|
||||||
}
|
|
||||||
|
|
||||||
function markUpdateAsFailure(version) {
|
|
||||||
removeSpinner(version);
|
|
||||||
$('#spinner-' + version).addClass('fa-times-circle');
|
|
||||||
changeRowTo('row', version, 'danger');
|
|
||||||
changeTextTo('span', version, 'Update failed! Check the console for more information');
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeTextTo(prefix, version, text) {
|
|
||||||
$('#' + prefix + '-' + version).text(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeRowTo(prefix, version, clazz) {
|
|
||||||
//-- Remove all classes
|
|
||||||
$('#' + prefix + '-' + version)
|
|
||||||
.removeClass('info')
|
|
||||||
.removeClass('warning')
|
|
||||||
.removeClass('danger')
|
|
||||||
.removeClass('success');
|
|
||||||
|
|
||||||
//-- Re-add the requested class
|
|
||||||
$('#' + prefix + '-' + version).addClass(clazz);
|
|
||||||
}
|
|
||||||
|
|
||||||
function appendToInstallConsole(text) {
|
|
||||||
$('#consoleBody').append(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
function installationFinished() {
|
|
||||||
appendToInstallConsole('<tr><td><span class="label label-success">SUCCESS</span></td><td>Installation complete</td></tr>');
|
|
||||||
var output = '<div class="panel-body">' +
|
|
||||||
'<div class="col-md-12 text-center">' +
|
|
||||||
'<i class="fa fa-check-circle fa-4x" style="color: #008000"></i><br><br>' +
|
|
||||||
'<h4>Awesome! The installation / upgrade has completed. Please delete the <code>install</code> directory and then proceed to your helpdesk!</h4>' +
|
|
||||||
'</div>' +
|
|
||||||
'</div>';
|
|
||||||
$('#install-information').html(output);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getContentForMigratePrompt(users) {
|
|
||||||
var beginningText = '<h2>Migrating IP / E-mail Bans</h2><p>Mods for HESK has detected that you have added IP address ' +
|
|
||||||
'and/or email bans using Mods for HESK. As part of the upgrade process, Mods for HESK will migrate these bans ' +
|
|
||||||
'for you to HESK 2.6.0\'s IP/email ban feature. Select the user below that will be the "creator" of the bans, ' +
|
|
||||||
'then click "Submit".</p>';
|
|
||||||
var selectMarkup = '<div class="row form-horizontal"><div class="control-label col-md-3 col-xs-12" style="text-align: right;vertical-align: middle"><b>User:</b></div>' +
|
|
||||||
'<div class="col-md-9 col-x-12"><select name="user" class="form-control" id="user-dropdown">';
|
|
||||||
users.forEach(function (user) {
|
|
||||||
selectMarkup += '<option value="' + user.id + '">' + user.name + '</option>';
|
|
||||||
});
|
|
||||||
selectMarkup += '</select></div></div><br>';
|
|
||||||
var submitMarkup = '<div class="row"><div class="col-md-9 col-md-offset-3 col-xs-12"><button onclick="runMigration()" class="btn btn-default">Migrate</button> ' +
|
|
||||||
'<a href="javascript:void(0)" onclick="migrateComplete()" class="btn btn-danger">Don\'t Migrate</a> </div></div>';
|
|
||||||
|
|
||||||
return beginningText + selectMarkup + submitMarkup;
|
|
||||||
}
|
|
||||||
|
|
||||||
function prepareAttentionPanel(content) {
|
|
||||||
$('#attention-body').html(content);
|
|
||||||
$('#attention-row').show();
|
|
||||||
}
|
|
||||||
|
|
||||||
jQuery(document).ready(loadJquery);
|
|
@ -1,230 +0,0 @@
|
|||||||
function processUpdates(startingVersion) {
|
|
||||||
if (startingVersion < 2) {
|
|
||||||
startVersionUpgrade('p140');
|
|
||||||
executeUpdate(2, 'p140', 'Pre 1.4.0');
|
|
||||||
} else if (startingVersion < 3) {
|
|
||||||
startVersionUpgrade('140');
|
|
||||||
executeUpdate(3, '140', '1.4.0');
|
|
||||||
} else if (startingVersion < 4) {
|
|
||||||
startVersionUpgrade('141');
|
|
||||||
executeUpdate(4, '141', '1.4.1');
|
|
||||||
} else if (startingVersion < 5) {
|
|
||||||
startVersionUpgrade('150');
|
|
||||||
executeUpdate(5, '150', '1.5.0');
|
|
||||||
} else if (startingVersion < 6) {
|
|
||||||
startVersionUpgrade('160');
|
|
||||||
executeUpdate(6, '160', '1.6.0');
|
|
||||||
} else if (startingVersion < 7) {
|
|
||||||
startVersionUpgrade('161');
|
|
||||||
executeUpdate(7, '161', '1.6.1');
|
|
||||||
} else if (startingVersion < 8) {
|
|
||||||
startVersionUpgrade('170');
|
|
||||||
executeUpdate(8, '170', '1.7.0');
|
|
||||||
} else if (startingVersion < 9) {
|
|
||||||
startVersionUpgrade('200');
|
|
||||||
executeUpdate(9, '200', '2.0.0');
|
|
||||||
} else if (startingVersion < 10) {
|
|
||||||
startVersionUpgrade('201');
|
|
||||||
executeUpdate(10, '201', '2.0.1');
|
|
||||||
} else if (startingVersion < 11) {
|
|
||||||
startVersionUpgrade('210');
|
|
||||||
executeUpdate(11, '210', '2.1.0');
|
|
||||||
} else if (startingVersion < 12) {
|
|
||||||
startVersionUpgrade('211');
|
|
||||||
executeUpdate(12, '211', '2.1.1');
|
|
||||||
} else if (startingVersion < 13) {
|
|
||||||
startVersionUpgrade('220');
|
|
||||||
executeUpdate(13, '220', '2.2.0');
|
|
||||||
} else if (startingVersion < 14) {
|
|
||||||
startVersionUpgrade('221');
|
|
||||||
executeUpdate(14, '221', '2.2.1');
|
|
||||||
} else if (startingVersion < 15) {
|
|
||||||
startVersionUpgrade('230');
|
|
||||||
executeUpdate(15, '230', '2.3.0');
|
|
||||||
} else if (startingVersion < 16) {
|
|
||||||
startVersionUpgrade('231');
|
|
||||||
executeUpdate(16, '231', '2.3.1');
|
|
||||||
} else if (startingVersion < 17) {
|
|
||||||
startVersionUpgrade('232');
|
|
||||||
executeUpdate(17, '232', '2.3.2');
|
|
||||||
} else if (startingVersion < 18) {
|
|
||||||
startVersionUpgrade('240');
|
|
||||||
executeUpdate(18, '240', '2.4.0');
|
|
||||||
} else if (startingVersion < 19) {
|
|
||||||
startVersionUpgrade('241');
|
|
||||||
executeUpdate(19, '241', '2.4.1');
|
|
||||||
} else if (startingVersion < 20) {
|
|
||||||
startVersionUpgrade('242');
|
|
||||||
executeUpdate(20, '242', '2.4.2');
|
|
||||||
} else if (startingVersion < 21) {
|
|
||||||
startVersionUpgrade('250');
|
|
||||||
executeUpdate(21, '250', '2.5.0');
|
|
||||||
} else if (startingVersion < 22) {
|
|
||||||
startVersionUpgrade('251');
|
|
||||||
executeUpdate(22, '251', '2.5.1');
|
|
||||||
} else if (startingVersion < 23) {
|
|
||||||
startVersionUpgrade('252');
|
|
||||||
executeUpdate(23, '252', '2.5.2');
|
|
||||||
} else if (startingVersion < 24) {
|
|
||||||
startVersionUpgrade('253');
|
|
||||||
executeUpdate(24, '253', '2.5.3');
|
|
||||||
} else if (startingVersion < 25) {
|
|
||||||
startVersionUpgrade('254');
|
|
||||||
executeUpdate(25, '254', '2.5.4');
|
|
||||||
} else if (startingVersion < 26) {
|
|
||||||
startVersionUpgrade('255');
|
|
||||||
executeUpdate(26, '255', '2.5.5');
|
|
||||||
} else if (startingVersion < 27) {
|
|
||||||
startVersionUpgrade('260');
|
|
||||||
executeUpdate(27, '260', '2.6.0');
|
|
||||||
} else if (startingVersion < 28) {
|
|
||||||
startVersionUpgrade('261');
|
|
||||||
executeUpdate(28, '261', '2.6.1');
|
|
||||||
} else if (startingVersion < 29) {
|
|
||||||
startVersionUpgrade('262');
|
|
||||||
executeUpdate(29, '262', '2.6.2');
|
|
||||||
} else if (startingVersion < 30) {
|
|
||||||
startVersionUpgrade('263');
|
|
||||||
executeUpdate(30, '263', '2.6.3');
|
|
||||||
} else if (startingVersion < 31) {
|
|
||||||
startVersionUpgrade('264');
|
|
||||||
executeUpdate(31, '264', '2.6.4');
|
|
||||||
} else if (startingVersion < 32) {
|
|
||||||
startVersionUpgrade('300b1');
|
|
||||||
executeUpdate(32, '300b1', '3.0.0 beta 1');
|
|
||||||
} else if (startingVersion < 33) {
|
|
||||||
startVersionUpgrade('300rc1');
|
|
||||||
executeUpdate(33, '300rc1', '3.0.0 RC 1');
|
|
||||||
} else if (startingVersion < 34) {
|
|
||||||
startVersionUpgrade('300');
|
|
||||||
executeUpdate(34, '300', '3.0.0');
|
|
||||||
} else if (startingVersion < 35) {
|
|
||||||
startVersionUpgrade('301');
|
|
||||||
executeUpdate(35, '301', '3.0.1');
|
|
||||||
} else if (startingVersion < 36) {
|
|
||||||
startVersionUpgrade('302');
|
|
||||||
executeUpdate(36, '302', '3.0.2');
|
|
||||||
} else if (startingVersion < 37) {
|
|
||||||
startVersionUpgrade('303');
|
|
||||||
executeUpdate(37, '303', '3.0.3');
|
|
||||||
} else if (startingVersion < 38) {
|
|
||||||
startVersionUpgrade('304');
|
|
||||||
executeUpdate(38, '304', '3.0.4');
|
|
||||||
} else if (startingVersion < 39) {
|
|
||||||
startVersionUpgrade('305');
|
|
||||||
executeUpdate(39, '305', '3.0.5');
|
|
||||||
} else if (startingVersion < 40) {
|
|
||||||
startVersionUpgrade('306');
|
|
||||||
executeUpdate(40, '306', '3.0.6');
|
|
||||||
} else if (startingVersion < 41) {
|
|
||||||
startVersionUpgrade('307');
|
|
||||||
executeUpdate(41, '307', '3.0.7');
|
|
||||||
} else if (startingVersion < 42) {
|
|
||||||
startVersionUpgrade('310');
|
|
||||||
executeUpdate(42, '310', '3.1.0');
|
|
||||||
} else if (startingVersion < 43) {
|
|
||||||
startVersionUpgrade('311');
|
|
||||||
executeUpdate(43, '311', '3.1.1');
|
|
||||||
} else {
|
|
||||||
installationFinished();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function executeUpdate(version, cssclass, formattedVersion) {
|
|
||||||
appendToInstallConsole('<tr><td><span class="label label-info">INFO</span></td><td>Starting updates for ' + formattedVersion + '</td></tr>');
|
|
||||||
$.ajax({
|
|
||||||
type: 'POST',
|
|
||||||
url: 'ajax/install-database-ajax.php',
|
|
||||||
data: {version: version},
|
|
||||||
success: function () {
|
|
||||||
markUpdateAsSuccess(cssclass, formattedVersion);
|
|
||||||
if (version == 9) {
|
|
||||||
migrateIpEmailBans('banmigrate', 'banmigrate');
|
|
||||||
} else if (version == 18) {
|
|
||||||
initializeStatuses('initialize-statuses', 'initialize-statuses');
|
|
||||||
} else {
|
|
||||||
processUpdates(version);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (data) {
|
|
||||||
appendToInstallConsole('<tr><td><span class="label label-danger">ERROR</span></td><td>' + data.responseText + '</td></tr>');
|
|
||||||
markUpdateAsFailure(cssclass);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function migrateIpEmailBans(version, cssclass) {
|
|
||||||
startVersionUpgrade(version);
|
|
||||||
appendToInstallConsole('<tr><td><span class="label label-info">INFO</span></td><td>Checking for IP / Email address bans to migrate</td></tr>');
|
|
||||||
$.ajax({
|
|
||||||
type: 'POST',
|
|
||||||
url: 'ajax/task-ajax.php',
|
|
||||||
data: {task: 'ip-email-bans'},
|
|
||||||
success: function (data) {
|
|
||||||
var parsedData = $.parseJSON(data);
|
|
||||||
if (parsedData.status == 'ATTENTION') {
|
|
||||||
appendToInstallConsole('<tr><td><span class="label label-warning">WARNING</span></td><td>Your response is needed. Please check above.</td></tr>');
|
|
||||||
markUpdateAsAttention(version);
|
|
||||||
prepareAttentionPanel(getContentForMigratePrompt(parsedData.users));
|
|
||||||
} else {
|
|
||||||
migrateComplete();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (data) {
|
|
||||||
appendToInstallConsole('<tr><td><span class="label label-danger">ERROR</span></td><td>' + data.responseText + '</td></tr>');
|
|
||||||
markUpdateAsFailure(version);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function initializeStatuses(version, cssclass) {
|
|
||||||
startVersionUpgrade(version);
|
|
||||||
appendToInstallConsole('<tr><td><span class="label label-info">INFO</span></td><td>Initializing Statuses</td></tr>');
|
|
||||||
$.ajax({
|
|
||||||
type: 'POST',
|
|
||||||
url: 'ajax/task-ajax.php',
|
|
||||||
data: {task: 'initialize-statuses'},
|
|
||||||
success: function (data) {
|
|
||||||
markUpdateAsSuccess(cssclass, 'Initializing Statuses');
|
|
||||||
statusesInitialized();
|
|
||||||
},
|
|
||||||
error: function (data) {
|
|
||||||
appendToInstallConsole('<tr><td><span class="label label-danger">ERROR</span></td><td>' + data.responseText + '</td></tr>');
|
|
||||||
markUpdateAsFailure(version);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function statusesInitialized() {
|
|
||||||
processUpdates(18);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function runMigration() {
|
|
||||||
// Get user ID that is selected
|
|
||||||
var userId = $('#user-dropdown').val();
|
|
||||||
// Hide the div, switch back to in progress
|
|
||||||
$('#attention-row').hide();
|
|
||||||
startVersionUpgrade('banmigrate');
|
|
||||||
$.ajax({
|
|
||||||
type: 'POST',
|
|
||||||
url: 'ajax/task-ajax.php',
|
|
||||||
data: {task: 'migrate-bans', user: userId},
|
|
||||||
success: function (data) {
|
|
||||||
migrateComplete();
|
|
||||||
},
|
|
||||||
error: function (data) {
|
|
||||||
appendToInstallConsole('ERROR: ' + data.responseText);
|
|
||||||
markUpdateAsFailure('banmigrate');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function migrateComplete() {
|
|
||||||
$('#attention-row').hide();
|
|
||||||
markUpdateAsSuccess('banmigrate', 'IP and Email address bans');
|
|
||||||
processUpdates(9);
|
|
||||||
}
|
|
||||||
|
|
||||||
jQuery(document).ready(loadJquery);
|
|
@ -1,245 +0,0 @@
|
|||||||
<?php
|
|
||||||
define('IN_SCRIPT', 1);
|
|
||||||
define('HESK_PATH', '../../');
|
|
||||||
require(HESK_PATH . 'install/install_functions.inc.php');
|
|
||||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
|
||||||
|
|
||||||
hesk_dbConnect();
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Mods For HESK <?php echo MODS_FOR_HESK_NEW_VERSION; ?> Install / Upgrade</title>
|
|
||||||
<link href="../../hesk_style.css?<?php echo HESK_NEW_VERSION; ?>" type="text/css" rel="stylesheet"/>
|
|
||||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css?v=<?php echo $hesk_settings['hesk_version']; ?>"
|
|
||||||
type="text/css" rel="stylesheet"/>
|
|
||||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css?v=<?php echo $hesk_settings['hesk_version']; ?>"
|
|
||||||
type="text/css" rel="stylesheet"/>
|
|
||||||
<link href="//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
|
|
||||||
<link href="../../css/hesk_newStyle.css" type="text/css" rel="stylesheet"/>
|
|
||||||
<script src="<?php echo HESK_PATH; ?>js/jquery-1.10.2.min.js"></script>
|
|
||||||
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap.min.js"></script>
|
|
||||||
<script language="Javascript" type="text/javascript"
|
|
||||||
src="<?php echo HESK_PATH; ?>js/modsForHesk-javascript.js"></script>
|
|
||||||
<script language="JavaScript" type="text/javascript"
|
|
||||||
src="<?php echo HESK_PATH; ?>install/mods-for-hesk/js/ui-scripts.js"></script>
|
|
||||||
<script language="JavaScript" type="text/javascript"
|
|
||||||
src="<?php echo HESK_PATH; ?>install/mods-for-hesk/js/version-scripts.js"></script>
|
|
||||||
<script language="JavaScript" type="text/javascript"
|
|
||||||
src="<?php echo HESK_PATH; ?>js/bootstrap-datepicker.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="headersm">Mods for HESK <?php echo MODS_FOR_HESK_NEW_VERSION; ?> Install / Upgrade</div>
|
|
||||||
<div class="container">
|
|
||||||
<div class="page-header">
|
|
||||||
<h1>Mods for HESK <?php echo MODS_FOR_HESK_NEW_VERSION; ?> Install / Upgrade</h1>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
$allowInstallation = true;
|
|
||||||
?>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-5 col-sm-12">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">Database/File Requirements</div>
|
|
||||||
<table class="table table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">Database Information / File Permissions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>Database Host:</td>
|
|
||||||
<td><?php echo $hesk_settings['db_host']; ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Database Name:</td>
|
|
||||||
<td><?php echo $hesk_settings['db_name']; ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Database User:</td>
|
|
||||||
<td><?php echo $hesk_settings['db_user']; ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Database Password:</td>
|
|
||||||
<td><?php echo $hesk_settings['db_pass']; ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Database Prefix:</td>
|
|
||||||
<td><?php echo $hesk_settings['db_pfix']; ?></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
$tableSql = hesk_dbQuery('SHOW TABLES LIKE \'' . hesk_dbEscape($hesk_settings['db_pfix']) . 'settings\'');
|
|
||||||
$version = NULL;
|
|
||||||
$disableAllExcept = NULL;
|
|
||||||
if (hesk_dbNumRows($tableSql) > 0) {
|
|
||||||
$versionRS = hesk_dbQuery('SELECT `Value` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'settings` WHERE `Key` = \'modsForHeskVersion\'');
|
|
||||||
$versionArray = hesk_dbFetchAssoc($versionRS);
|
|
||||||
$version = $versionArray['Value'];
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<div class="col-md-7 col-sm-12">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">Install / Upgrade</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<?php if ($allowInstallation) {
|
|
||||||
$prereqDiv = 'none';
|
|
||||||
$installDiv = 'block';
|
|
||||||
} else {
|
|
||||||
$prereqDiv = 'block';
|
|
||||||
$installDiv = 'none';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<div class="prereqsFailedDiv" style="display:<?php echo $prereqDiv; ?>">
|
|
||||||
<div class="alert alert-danger">
|
|
||||||
<p><i class="fa fa-times-circle"></i> You cannot install/upgrade Mods for HESK until the
|
|
||||||
requirements on the left have been met.</p>
|
|
||||||
|
|
||||||
<p><a href="modsForHesk.php" class="btn btn-default">Refresh</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="installDiv" style="display:<?php echo $installDiv; ?>">
|
|
||||||
<div class="alert alert-info">
|
|
||||||
<p><i class="fa fa-exclamation-triangle"></i> Make sure that you have updated / installed
|
|
||||||
HESK first; otherwise installation will <b>fail</b>!</p>
|
|
||||||
</div>
|
|
||||||
<p>Select your current Mods for HESK version and click "Upgrade" to upgrade your installation.
|
|
||||||
If you have never installed Mods for HESK before, click "No previous installation".</p>
|
|
||||||
<hr>
|
|
||||||
<div class="row">
|
|
||||||
<form class="form-horizontal">
|
|
||||||
<input type="hidden" name="current-version-hidden" value="<?php echo $version != NULL && $version != MODS_FOR_HESK_NEW_VERSION ? $version : 0; ?>">
|
|
||||||
<label for="current-version" class="col-sm-3 control-label">Current Version</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<select name="current-version" class="form-control">
|
|
||||||
<option disabled>Select One, or "No Previous Installation" Below</option>
|
|
||||||
<optgroup label="Mods for HESK 3">
|
|
||||||
<option value="42">3.1.0</option>
|
|
||||||
<option value="41">3.0.7</option>
|
|
||||||
<option value="40">3.0.6</option>
|
|
||||||
<option value="39">3.0.5</option>
|
|
||||||
<option value="38">3.0.4</option>
|
|
||||||
<option value="37">3.0.3</option>
|
|
||||||
<option value="36">3.0.2</option>
|
|
||||||
<option value="35">3.0.1</option>
|
|
||||||
<option value="34">3.0.0</option>
|
|
||||||
<option value="33">3.0.0 RC 1 [Prerelease Build]</option>
|
|
||||||
<option value="32">3.0.0 beta 1 [Prerelease Build]</option>
|
|
||||||
</optgroup>
|
|
||||||
<optgroup label="Mods for HESK 2">
|
|
||||||
<option value="31">2.6.4</option>
|
|
||||||
<option value="30">2.6.3</option>
|
|
||||||
<option value="29">2.6.2</option>
|
|
||||||
<option value="28">2.6.1</option>
|
|
||||||
<option value="27">2.6.0</option>
|
|
||||||
<option value="26">2.5.5</option>
|
|
||||||
<option value="25">2.5.4</option>
|
|
||||||
<option value="24">2.5.3</option>
|
|
||||||
<option value="23">2.5.2</option>
|
|
||||||
<option value="22">2.5.1</option>
|
|
||||||
<option value="21">2.5.0</option>
|
|
||||||
<option value="20">2.4.2</option>
|
|
||||||
<option value="19">2.4.1</option>
|
|
||||||
<option value="18">2.4.0</option>
|
|
||||||
<option value="17">2.3.2</option>
|
|
||||||
<option value="16">2.3.1</option>
|
|
||||||
<option value="15">2.3.0</option>
|
|
||||||
<option value="14">2.2.1</option>
|
|
||||||
<option value="13">2.2.0</option>
|
|
||||||
<option value="12">2.1.1</option>
|
|
||||||
<option value="11">2.1.0</option>
|
|
||||||
<option value="10">2.0.1</option>
|
|
||||||
<option value="9">2.0.0</option>
|
|
||||||
</optgroup>
|
|
||||||
<optgroup label="Mods for HESK 1">
|
|
||||||
<option value="8">1.7.0</option>
|
|
||||||
<option value="7">1.6.1</option>
|
|
||||||
<option value="6">1.6.0</option>
|
|
||||||
<option value="5">1.5.0</option>
|
|
||||||
<option value="4">1.5.1</option>
|
|
||||||
<option value="3">1.4.0</option>
|
|
||||||
<option value="2">1.3.0</option>
|
|
||||||
<option value="1">1.2.4</option>
|
|
||||||
</optgroup>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<a href="#" class="btn btn-success" id="upgrade-link">Upgrade</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="row" style="margin-top: 20px">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<div class="btn-group-vertical" role="group" style="width: 100%">
|
|
||||||
<a class="btn btn-primary btn-block disablable" href="installModsForHesk.php?v=0">No
|
|
||||||
previous installation</a>
|
|
||||||
<button type="button" class="btn btn-danger btn-block" data-toggle="modal"
|
|
||||||
data-target="#uninstallModal"><i class="fa fa-trash"></i> Uninstall Mods for
|
|
||||||
HESK
|
|
||||||
</button>
|
|
||||||
<a class="btn btn-default btn-block" href="database-validation.php">
|
|
||||||
<i class="fa fa-check-circle"></i> Validate Database
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
By proceeding, you agree to the terms of the <a
|
|
||||||
href="http://opensource.org/licenses/MIT" target="_blank">MIT License.</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Modal -->
|
|
||||||
<div class="modal fade" id="uninstallModal" tabindex="-1" role="dialog" aria-labelledby="uninstallModalLabel"
|
|
||||||
aria-hidden="true">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title" id="uninstallModalTitle"><i class="fa fa-trash"></i> Uninstall Mods for HESK
|
|
||||||
</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<p>Are you sure you want to uninstall Mods for HESK?</p>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<a class="btn btn-success" href="uninstallModsForHesk.php"><i class="fa fa-check"></i> Yes</a>
|
|
||||||
<button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i> No
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
if ($disableAllExcept !== NULL) {
|
|
||||||
echo '<script>disableAllDisablable(\'' . $disableAllExcept . '\')</script>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<script>
|
|
||||||
var dropdown = $('select[name="current-version"]');
|
|
||||||
dropdown.change(updateLink);
|
|
||||||
|
|
||||||
var currentVersion = $('input[name="current-version-hidden"]').val();
|
|
||||||
dropdown.find('option').each(function() {
|
|
||||||
var $that = $(this);
|
|
||||||
|
|
||||||
if ($that.text() == currentVersion) {
|
|
||||||
$that.attr('selected', true);
|
|
||||||
updateLink();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
x
Reference in New Issue
Block a user