| @@ 198-208 (lines=11) @@ | ||
| 195 | ||
| 196 | // check that SYSLOG doesn't exist |
|
| 197 | $tmp = mysqli_fetch_row(mysqli_query($dbTmp, "SELECT COUNT(*) FROM `".$_SESSION['pre']."misc` WHERE type = 'admin' AND intitule = 'syslog_enable'")); |
|
| 198 | if ($tmp[0] == 0 || empty($tmp[0])) { |
|
| 199 | mysqli_query($dbTmp, |
|
| 200 | "INSERT INTO `".$_SESSION['pre']."misc` (`type`, `intitule`, `valeur`) VALUES ('admin', 'syslog_enable', '0')" |
|
| 201 | ); |
|
| 202 | mysqli_query($dbTmp, |
|
| 203 | "INSERT INTO `".$_SESSION['pre']."misc` (`type`, `intitule`, `valeur`) VALUES ('admin', 'syslog_host', 'localhost')" |
|
| 204 | ); |
|
| 205 | mysqli_query($dbTmp, |
|
| 206 | "INSERT INTO `".$_SESSION['pre']."misc` (`type`, `intitule`, `valeur`) VALUES ('admin', 'syslog_port', '514')" |
|
| 207 | ); |
|
| 208 | } |
|
| 209 | ||
| 210 | ||
| 211 | // alter table Items |
|
| @@ 617-626 (lines=10) @@ | ||
| 614 | //convert tables |
|
| 615 | $res = mysqli_query($dbTmp, "SHOW TABLES FROM `".$_SESSION['database']."`"); |
|
| 616 | while ($table = mysqli_fetch_row($res)) { |
|
| 617 | if (substr($table[0], 0, 4) != "old_") { |
|
| 618 | mysqli_query($dbTmp, |
|
| 619 | "ALTER TABLE ".$_SESSION['database'].".`{$table[0]}` |
|
| 620 | CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci" |
|
| 621 | ); |
|
| 622 | mysqli_query($dbTmp, |
|
| 623 | "ALTER TABLE".$_SESSION['database'].".`{$table[0]}` |
|
| 624 | DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci" |
|
| 625 | ); |
|
| 626 | } |
|
| 627 | } |
|
| 628 | ||
| 629 | echo 'document.getElementById("res_step3").innerHTML = "Done!";'; |
|