| @@ 68-88 (lines=21) @@ | ||
| 65 | // DataBase |
|
| 66 | // Test DB connexion |
|
| 67 | $pass = defuse_return_decrypted($pass); |
|
| 68 | if (mysqli_connect( |
|
| 69 | $server, |
|
| 70 | $user, |
|
| 71 | $pass, |
|
| 72 | $database, |
|
| 73 | $port |
|
| 74 | ) |
|
| 75 | ) { |
|
| 76 | $db_link = mysqli_connect( |
|
| 77 | $server, |
|
| 78 | $user, |
|
| 79 | $pass, |
|
| 80 | $database, |
|
| 81 | $port |
|
| 82 | ); |
|
| 83 | } else { |
|
| 84 | $res = "Impossible to get connected to server. Error is: ".addslashes(mysqli_connect_error()); |
|
| 85 | echo '[{"finish":"1", "msg":"", "error":"Impossible to get connected to server. Error is: '.addslashes(mysqli_connect_error()).'!"}]'; |
|
| 86 | mysqli_close($db_link); |
|
| 87 | exit(); |
|
| 88 | } |
|
| 89 | ||
| 90 | ################ |
|
| 91 | ## Function permits to get the value from a line |
|
| @@ 56-76 (lines=21) @@ | ||
| 53 | // DataBase |
|
| 54 | // Test DB connexion |
|
| 55 | $pass = defuse_return_decrypted($pass); |
|
| 56 | if (mysqli_connect( |
|
| 57 | $server, |
|
| 58 | $user, |
|
| 59 | $pass, |
|
| 60 | $database, |
|
| 61 | $port |
|
| 62 | ) |
|
| 63 | ) { |
|
| 64 | $db_link = mysqli_connect( |
|
| 65 | $server, |
|
| 66 | $user, |
|
| 67 | $pass, |
|
| 68 | $database, |
|
| 69 | $port |
|
| 70 | ); |
|
| 71 | } else { |
|
| 72 | $res = "Impossible to get connected to server. Error is: ".addslashes(mysqli_connect_error()); |
|
| 73 | echo '[{"finish":"1", "msg":"", "error":"Impossible to get connected to server. Error is: '.addslashes(mysqli_connect_error()).'!"}]'; |
|
| 74 | mysqli_close($db_link); |
|
| 75 | exit(); |
|
| 76 | } |
|
| 77 | ||
| 78 | // Load libraries |
|
| 79 | require_once '../includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|