Update database_settings.php

This commit is contained in:
jakani24
2024-03-10 09:28:52 +01:00
parent b457bde30d
commit 24cc1bba13

View File

@@ -21,6 +21,13 @@ if($perms[6]!=="1"){
//for the get_perms_str() function //for the get_perms_str() function
include "perms_functions.php"; include "perms_functions.php";
include "../../../config.php"; include "../../../config.php";
//create connection to db
$conn = new mysqli($DB_SERVERNAME, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE);
// Check the connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@@ -63,7 +70,7 @@ async function update_percentage() {
}); });
} }
// Call update_percentage() every 5 seconds // Call update_percentage every 5 seconds
setInterval(update_percentage, 5000); setInterval(update_percentage, 5000);
//update an entry //update an entry
@@ -179,6 +186,7 @@ async function add_item(db,element_id,field){
const nav_tab = document.getElementById(urlParams.get('show')+"_tab"); const nav_tab = document.getElementById(urlParams.get('show')+"_tab");
show_div.style.display="block"; show_div.style.display="block";
nav_tab.setAttribute('class', 'nav-link active'); nav_tab.setAttribute('class', 'nav-link active');
console.log("aaaa");
</script> </script>
</body> </body>
</html> </html>