diff --git a/server/app-code/install/create_db.php b/server/app-code/install/create_db.php
index 6f42dd9..23056b7 100644
--- a/server/app-code/install/create_db.php
+++ b/server/app-code/install/create_db.php
@@ -85,369 +85,6 @@
';
}
- // Create log table
- $sql = "CREATE TABLE IF NOT EXISTS log (
- id INT AUTO_INCREMENT PRIMARY KEY,
- logtext VARCHAR(500) NOT NULL,
- loglevel VARCHAR(255) NOT NULL,
- machine_id VARCHAR(255),
- time VARCHAR(255)
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table log created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table log: ' . $conn->error .'
-
';
- }
-
- // Create incident table
- $sql = "CREATE TABLE IF NOT EXISTS incidents (
- id INT AUTO_INCREMENT PRIMARY KEY,
- status VARCHAR(50) NOT NULL,
- description VARCHAR(255) NOT NULL,
- opened VARCHAR(50),
- closed VARCHAR(50)
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table incidents created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table incidents: ' . $conn->error .'
-
';
- }
-
- // Create todo_items table
- $sql = "CREATE TABLE IF NOT EXISTS todo_items (
- id INT AUTO_INCREMENT PRIMARY KEY,
- done INT,
- done_by INT,
- belongs_to_list INT,
- text VARCHAR(500) NOT NULL
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table todo_items created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table todo_items: ' . $conn->error .'
-
';
- }
-
- // Create todo lists table
- $sql = "CREATE TABLE IF NOT EXISTS todo_lists (
- id INT AUTO_INCREMENT PRIMARY KEY,
- belongs_to_incident INT,
- name VARCHAR(255) NOT NULL
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table todo_items created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table todo_items: ' . $conn->error .'
-
';
- }
-
- // Create chat table
- $sql = "CREATE TABLE IF NOT EXISTS chats (
- id INT AUTO_INCREMENT PRIMARY KEY,
- belongs_to_incident INT,
- text TEXT NOT NULL,
- sent VARCHAR(50),
- from_userid INT
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table todo_items created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table todo_items: ' . $conn->error .'
-
';
- }
-
-
- // Create server log table
- $sql = "CREATE TABLE IF NOT EXISTS server_log (
- id INT AUTO_INCREMENT PRIMARY KEY,
- logtext VARCHAR(500) NOT NULL,
- loglevel VARCHAR(255) NOT NULL,
- userid INT,
- time VARCHAR(255)
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table log created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table log: ' . $conn->error .'
-
';
- }
-
- // Create settings table
- $sql = "CREATE TABLE IF NOT EXISTS settings (
- id INT AUTO_INCREMENT PRIMARY KEY,
- name VARCHAR(255) NOT NULL UNIQUE,
- value VARCHAR(255) NOT NULL
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table settings created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table settings: ' . $conn->error .'
-
';
- }
- //user tasks table
- $sql = "CREATE TABLE IF NOT EXISTS user_tasks (
- id INT AUTO_INCREMENT PRIMARY KEY,
- task VARCHAR(255) NOT NULL UNIQUE
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table settings created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table settings: ' . $conn->error .'
-
';
- }
- //system tasks table
- $sql = "CREATE TABLE IF NOT EXISTS system_tasks (
- id INT AUTO_INCREMENT PRIMARY KEY,
- task VARCHAR(255) NOT NULL UNIQUE
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table settings created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table settings: ' . $conn->error .'
-
';
- }
- // Create rtp_included table
- $sql = "CREATE TABLE IF NOT EXISTS rtp_included (
- id INT AUTO_INCREMENT PRIMARY KEY,
- path VARCHAR(255) NOT NULL UNIQUE
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table rtp_included created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table rtp_included: ' . $conn->error .'
-
';
- }
- // Create rtp_excluded table
- $sql = "CREATE TABLE IF NOT EXISTS rtp_excluded (
- id INT AUTO_INCREMENT PRIMARY KEY,
- path VARCHAR(255) NOT NULL UNIQUE
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table rtp_excluded created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table rtp_excluded: ' . $conn->error .'
-
';
- }
-
- // Create dissalowed_start table
- $sql = "CREATE TABLE IF NOT EXISTS disallowed_start (
- id INT AUTO_INCREMENT PRIMARY KEY,
- path VARCHAR(255) NOT NULL UNIQUE
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table disalowed_start created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table disalowed_start: ' . $conn->error .'
-
';
- }
-
- // Create api table
- $sql = "CREATE TABLE IF NOT EXISTS api (
- id INT AUTO_INCREMENT PRIMARY KEY,
- apikey VARCHAR(500) NOT NULL,
- machine_id VARCHAR(255) NOT NULL
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table api created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table api: ' . $conn->error .'
-
';
- }
-
- // Create secrets table
- $sql = "CREATE TABLE IF NOT EXISTS secrets (
- id INT AUTO_INCREMENT PRIMARY KEY,
- cert VARCHAR(500) NOT NULL,
- machine_id VARCHAR(255) NOT NULL
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table secrets created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table secrets: ' . $conn->error .'
-
';
- }
-
- // Create machine table
- $sql = "CREATE TABLE IF NOT EXISTS machines (
- id INT AUTO_INCREMENT PRIMARY KEY,
- machine_name VARCHAR(255) NOT NULL,
- machine_location VARCHAR(255) NOT NULL,
- machine_ip VARCHAR(255) NOT NULL
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table machines created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table machines: ' . $conn->error .'
-
';
- }
-
- // Create vir_notify messages table
- $sql = "CREATE TABLE IF NOT EXISTS vir_notify (
- id INT AUTO_INCREMENT PRIMARY KEY,
- machine_id VARCHAR(255) NOT NULL,
- path VARCHAR(255) NOT NULL,
- hash VARCHAR(255) NOT NULL,
- action VARCHAR(255) NOT NULL
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table machines created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table machines: ' . $conn->error .'
-
';
- }
-
- // Create sig_ex messages table
- $sql = "CREATE TABLE IF NOT EXISTS sig_ex (
- id INT AUTO_INCREMENT PRIMARY KEY,
- signature VARCHAR(255) NOT NULL,
- description VARCHAR(255) NOT NULL
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table excluded signatures created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table excluded signatures: ' . $conn->error .'
-
';
- }
-
- // Create sig_in messages table
- $sql = "CREATE TABLE IF NOT EXISTS sig_in (
- id INT AUTO_INCREMENT PRIMARY KEY,
- signature VARCHAR(255) NOT NULL,
- description VARCHAR(255) NOT NULL
- )";
-
- if ($conn->query($sql) === TRUE) {
- echo '
- Table included signatures created successfully!
-
';
- } else {
- $success=0;
- echo '
- Error creating table included signatures: ' . $conn->error .'
-
';
- }
-
- // Attempt to create the directory where export files will be stored later on
- /*if (mkdir("/var/www/html/export", 0777, true)) {
- echo '
- Created export dir successfully.
-
';
- } else {
- $success=0;
- echo '
- Error creating export dir.
-
';
- }
- //Attempt to create the directory where import files will be stored later on
- if (mkdir("/var/www/html/import", 0777, true)) {
- echo '
- Created export dir successfully.
-
';
- } else {
- $success=0;
- echo '
- Error creating export dir.
-
';
- }
-
- //Attempt to create the directory where log backup files will be stored later on
- if (mkdir("/var/www/html/backup", 0777, true)) {
- echo '
- Created backup dir successfully.
-
';
- } else {
- $success=0;
- echo '
- Error creating backup dir.
-
';
- }*/
if($success!==1){
echo '
diff --git a/server/app-code/system/insecure_zone/php/login.php b/server/app-code/system/insecure_zone/php/login.php
index 3d59ed7..6c1646c 100644
--- a/server/app-code/system/insecure_zone/php/login.php
+++ b/server/app-code/system/insecure_zone/php/login.php
@@ -3,8 +3,6 @@ session_start();
if(isset($_SESSION["login"])){
header("LOCATION:/system/secure_zone/php/index.php");
}
-include "../../../api/php/notifications/sendmessage.php"; //to send user notification on login
-include "../../../api/php/log/add_server_entry.php"; //to log things
?>
diff --git a/server/install.sh b/server/install.sh
old mode 100644
new mode 100755