This commit is contained in:
@@ -176,6 +176,30 @@
|
||||
|
||||
|
||||
|
||||
$sql="CREATE TABLE IF NOT EXISTS activity_log (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
user_id INT NOT NULL,
|
||||
action VARCHAR(64) NOT NULL,
|
||||
ip VARCHAR(45),
|
||||
user_agent TEXT,
|
||||
details TEXT,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
INDEX idx_user_id (user_id),
|
||||
INDEX idx_created_at (created_at)
|
||||
);";
|
||||
|
||||
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
echo '<br><div class="alert alert-success" role="alert">
|
||||
Table activity_log created successfully!
|
||||
</div>';
|
||||
} else {
|
||||
$success=0;
|
||||
echo '<br><div class="alert alert-danger" role="alert">
|
||||
Error creating activity_log: ' . $conn->error .'
|
||||
</div>';
|
||||
}
|
||||
|
||||
if($success!==1){
|
||||
echo '<br><div class="alert alert-danger" role="alert">
|
||||
There was an error creating the databases. Please try again or contact support at: <a href="mailto:info.jakach@gmail.com">info.jakach@gmail.com</a>
|
||||
|
||||
Reference in New Issue
Block a user