forked from GDRCD/GDRCD
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupgrade.php
More file actions
43 lines (42 loc) · 1.32 KB
/
upgrade.php
File metadata and controls
43 lines (42 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
$dont_check = true;
$check_for_update = true;
require 'header.inc.php'; /*Header comune*/
?>
<div class="pagina_ambientazione">
<?php
if ( ! isset($updating_queryes[0]) || empty($updating_queryes[0])) {
echo '<div="error">' . $MESSAGE['homepage']['updater']['no_fields'] . '</div>';
} else {
/** * Aggiornamento delle tabelle
* @author Blancks
*/
foreach ($updating_queryes as $query) {
gdrcd_query($query);
}
/** * Aggiornamento delle password
* @author Blancks
*/
if ($PARAMETERS['mode']['encriptpassword'] == 'ON') {
if ($updating_password) {
switch (strtolower($PARAMETERS['mode']['encriptalgorithm'])) {
case 'md5':
$query = "UPDATE personaggio SET pass = MD5(pass)";
break;
case 'sha-1':
$query = "UPDATE personaggio SET pass = SHA1(pass)";
break;
}
gdrcd_query($query);
}
}
echo '<div class="warning">' . gdrcd_filter('out', $MESSAGE['homepage']['updater']['done']) . '</div>';
} ?>
<!-- Link di ritorno alla homepage -->
<div class="link_back">
<a href="index.php">
<?php echo gdrcd_filter('out', $PARAMETERS['info']['homepage_name']); ?>
</a>
</div>
</div>
<?php require 'footer.inc.php'; /*Footer comune*/ ?>