diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..a12d2d6
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,5 @@
+.gitignore
+.git/
+Dockerfile
+docker-compose.yml
+docker/secrets
diff --git a/.gitignore b/.gitignore
index 3fc0235..10dc4d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
.idea/*
.DS_Store
config.php
+
+docker/secrets/
+docker/ssl/**/*.pem
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..88a6cc5
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,37 @@
+FROM php:8.3-apache
+
+COPY ./docker/ssl/configure_ssl.sh /usr/local/bin/configure_ssl.sh
+RUN chmod +x /usr/local/bin/configure_ssl.sh
+
+COPY ./docker/ssl /docker/ssl
+
+ARG SSL_ENABLED
+
+RUN /usr/local/bin/configure_ssl.sh
+
+EXPOSE 80
+EXPOSE 443
+
+RUN apt-get update && apt-get install -y \
+ libpng-dev \
+ cron \
+ && docker-php-ext-install mysqli gd
+
+# Uncomment the next line when deploying to production
+# RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
+
+# This is to prevent removing config.php from gitignore for now. Might be removed when non-docker install gets improved.
+COPY ./config.docker.php ./config.php
+COPY . /var/www/html
+
+COPY ./docker/run_cron_job.sh /usr/local/bin/run_cron_job.sh
+COPY ./docker/cron_jobs /etc/cron.d/cron_jobs
+
+# Ensure the script and cron job files are executable
+RUN chmod +x /usr/local/bin/run_cron_job.sh
+RUN chmod 0644 /etc/cron.d/cron_jobs
+
+RUN crontab /etc/cron.d/cron_jobs
+
+RUN chmod +x ./docker/start_cron.sh
+CMD ./docker/start_cron.sh
diff --git a/README.md b/README.md
index 3e02980..4e4ea29 100644
--- a/README.md
+++ b/README.md
@@ -9,13 +9,18 @@ New to MCCodes? Or simply wanting reference on a simple task? That's what this b
Contents
--------
-* [1\. Installation](#1p0)
- * [1.1 Basic Installation](#1p1)
- * [1.2 Cronjobs](#1p2)
- * [1.3 PayPal Configuration](#1p3)
-* [2\. Basic Usage & Tips](#2p0)
- * [2.1 Setting up Will Potions](#2p1)
- * [2.2 Tips for running a game](#2p2)
+- [MCCodes 2.0](#mccodes-20)
+ - [Introduction](#introduction)
+ - [Contents](#contents)
+ - [1. Installation](#1-installation)
+ - [ 1.1 Basic Installation](#-11-basic-installation)
+ - [ 1.2 Docker Installation](#-12-docker-installation)
+ - [Enabling SSL (Optional)](#enabling-ssl-optional)
+ - [ 1.3 Cronjobs](#-13-cronjobs)
+ - [ 1.4 PayPal Configuration.](#-14-paypal-configuration)
+ - [2. Basic Usage \& Tips](#2-basic-usage--tips)
+ - [ 2.1 Setting up Will Potions](#-21-setting-up-will-potions)
+ - [ 2.2 Tips for running a game](#-22-tips-for-running-a-game)
1\. Installation
----------------
@@ -31,8 +36,54 @@ Got all the above? Good. Upload all the files and directories in the upload fold
webserver. Normally, you will be uploading to either the public\_html folder, or the root level folder. A good way to check this is to upload one file then try to access it through your domain and see if it works. If it doesn't, you've got the path wrong. Once done, run install.php. First, your server diagnostics will be checked. If one of these tests fails, you will need to correct it before moving on. Next, you need to fill in your database info, and a few basic
settings. Make sure the PayPal email you specify is the main email of the PayPal account, and that the account is at least Premier. Otherwise, the basic settings are up to you. After you submit this form, the installer should hopefully run, and insert all the tables and entries into SQL you need. If not, go back and check your config. Now the basic installation is complete, and you're ready to move on to setting up the Cron Jobs.
-* * *
-### 1.2 Cronjobs
+* * *
+### 1.2 Docker Installation
+
+This mode of installation is currently intended for development but might be suitable for production with the appropriate adjustments.
+
+First, ensure you have [Docker](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/) installed.
+
+Create the files `db_password.txt` and `app_key.txt` in the `docker/secrets/` folder within your project. The `db_password.txt` file stores the root user password for the database, and the `app_key.txt` file stores the code (usually randomly generated in `installer.php`) used to secure certain scripts, such as cron scripts.
+
+> [!NOTE]
+> Before running for the first time, you can modify the `db/initial_data.sql` file, where the admin user and some settings are created. After the initial run, this file is ignored, and changes must be made directly in the database.
+
+Once everything is set up, run the following command to deploy the containers and synchronize all changes to the source files after saving:
+
+```shell
+docker compose watch
+```
+
+Alternatively, the containers can be run without syncing by using:
+
+```shell
+docker compose up -d
+```
+
+#### Enabling SSL (Optional)
+
+A self signed certificate can be created with `mkcert`. Follow the [installation instructions](https://github.com/FiloSottile/mkcert?tab=readme-ov-file#installation) and run:
+
+```shell
+mkcert -cert-file docker/ssl/cert.pem -key-file docker/ssl/cert-key.pem localhost 127.0.0.1 ::1
+```
+
+With the certificate files created in the `docker/ssl/` folder, add the SSL_ENABLED=true argument to your docker-compose:
+
+```YAML
+services:
+ web:
+ build:
+ context: .
+ args:
+ SSL_ENABLED: true
+```
+
+* * *
+### 1.3 Cronjobs
+
+> [!NOTE]
+> If you are using Docker for the build process, you can skip this step. The cron jobs are already included in the Docker image.
The Cronjobs are the thing most people are confused on, or they simply do not work for them. However, if you follow the below instructions correctly, your crons should work fine, unless your server is configured differently to a normal cPanel server. If you are not using cPanel, you will need Shell access to your server (through SSH or SFTP).
@@ -67,7 +118,7 @@ The Cronjobs are the thing most people are confused on, or they simply do not wo
* If everything goes to plan, you should now have working crons.
* * *
-### 1.3 PayPal Configuration.
+### 1.4 PayPal Configuration.
MCC2 uses several PayPal devices to ensure that donations are credited securely and accurately. However, some of these devices must be enabled in your PayPal account before MCC2 can use them. If these steps are not followed, your donation system will not work properly. Follow these steps to get it up and working:
diff --git a/config.docker.php b/config.docker.php
new file mode 100644
index 0000000..a28646a
--- /dev/null
+++ b/config.docker.php
@@ -0,0 +1,22 @@
+ getenv('DB_HOST'),
+ 'username' => getenv('DB_USER'),
+ 'password' => read_secret('DB_PASS'),
+ 'database' => getenv('DB_NAME'),
+ 'persistent' => 0,
+ 'driver' => 'mysqli',
+ 'code' => read_secret('APP_KEY'),
+);
diff --git a/db/initial_data.sql b/db/initial_data.sql
new file mode 100644
index 0000000..d2a905d
--- /dev/null
+++ b/db/initial_data.sql
@@ -0,0 +1,18 @@
+INSERT INTO `users` (
+ `username`, `login_name`, `userpass`, `level`, `money`, `crystals`, `donatordays`, `user_level`, `energy`,
+ `maxenergy`, `will`, `maxwill`, `brave`, `maxbrave`, `hp`, `maxhp`, `location`, `gender`, `signedup`, `email`,
+ `bankmoney`, `lastip`, `lastip_signup`, `pass_salt`, `display_pic`, `staffnotes`, `voted`, `user_notepad`
+) VALUES (
+ 'admin', 'admin', '862b159a2262556d8c077fbf4353e32a', 1, 100, 0, 0, 2, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'Male',
+ '1719158844', 'admin@localhost.com', -1, '127.0.0.1', '127.0.0.1', 'a7487647', '', '', '', ''
+);
+
+INSERT INTO `userstats` VALUES (LAST_INSERT_ID(), 10, 10, 10, 10, 10);
+
+INSERT INTO `settings`
+ (conf_name, conf_value, data_type)
+VALUES
+ ('game_name', 'MCCodes v2', 'string'),
+ ('game_owner', 'Owner Name', 'string'),
+ ('paypal', NULL, 'string'),
+ ('game_description', 'Game made on the MCCodes engine', 'string');
\ No newline at end of file
diff --git a/dbdata.sql b/db/schema.sql
similarity index 96%
rename from dbdata.sql
rename to db/schema.sql
index 3df57f7..845b145 100644
--- a/dbdata.sql
+++ b/db/schema.sql
@@ -1,1310 +1,1310 @@
--- --------------------------------------------------------
-
---
--- Table structure for table `announcements`
---
-
-CREATE TABLE `announcements` (
- `a_text` text NOT NULL,
- `a_time` int(11) NOT NULL default '0'
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `announcements`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `applications`
---
-
-CREATE TABLE `applications` (
- `appID` int(11) NOT NULL auto_increment,
- `appUSER` int(11) NOT NULL default '0',
- `appGANG` int(11) NOT NULL default '0',
- `appTEXT` text NOT NULL,
- PRIMARY KEY (`appID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `applications`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `attacklogs`
---
-
-CREATE TABLE `attacklogs` (
- `log_id` int(11) NOT NULL auto_increment,
- `attacker` int(11) NOT NULL default '0',
- `attacked` int(11) NOT NULL default '0',
- `result` enum('won','lost') NOT NULL default 'won',
- `time` int(11) NOT NULL default '0',
- `stole` int(11) NOT NULL default '0',
- `attacklog` longtext NOT NULL,
- PRIMARY KEY (`log_id`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `attacklogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `bankxferlogs`
---
-
-CREATE TABLE `bankxferlogs` (
- `cxID` int(11) NOT NULL auto_increment,
- `cxFROM` int(11) NOT NULL default '0',
- `cxTO` int(11) NOT NULL default '0',
- `cxAMOUNT` int(11) NOT NULL default '0',
- `cxTIME` int(11) NOT NULL default '0',
- `cxFROMIP` varchar(15) NOT NULL default '127.0.0.1',
- `cxTOIP` varchar(15) NOT NULL default '127.0.0.1',
- `cxBANK` enum('bank','cyber') NOT NULL default 'bank',
- PRIMARY KEY (`cxID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `bankxferlogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `blacklist`
---
-
-CREATE TABLE `blacklist` (
- `bl_ID` int(11) NOT NULL auto_increment,
- `bl_ADDER` int(11) NOT NULL default '0',
- `bl_ADDED` int(11) NOT NULL default '0',
- `bl_COMMENT` varchar(255) NOT NULL default '',
- PRIMARY KEY (`bl_ID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `blacklist`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `cashxferlogs`
---
-
-CREATE TABLE `cashxferlogs` (
- `cxID` int(11) NOT NULL auto_increment,
- `cxFROM` int(11) NOT NULL default '0',
- `cxTO` int(11) NOT NULL default '0',
- `cxAMOUNT` int(11) NOT NULL default '0',
- `cxTIME` int(11) NOT NULL default '0',
- `cxFROMIP` varchar(15) NOT NULL default '127.0.0.1',
- `cxTOIP` varchar(15) NOT NULL default '127.0.0.1',
- PRIMARY KEY (`cxID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `cashxferlogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `challengebots`
---
-
-CREATE TABLE `challengebots` (
- `cb_npcid` int(11) NOT NULL default '0',
- `cb_money` int(11) NOT NULL default '0'
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `challengebots`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `challengesbeaten`
---
-
-CREATE TABLE `challengesbeaten` (
- `userid` int(11) NOT NULL default '0',
- `npcid` int(11) NOT NULL default '0'
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `challengesbeaten`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `cities`
---
-
-CREATE TABLE `cities` (
- `cityid` int(11) NOT NULL auto_increment,
- `cityname` varchar(255) NOT NULL default '',
- `citydesc` longtext NOT NULL,
- `cityminlevel` int(11) NOT NULL default '0',
- PRIMARY KEY (`cityid`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `cities`
---
-
-INSERT INTO `cities` (`cityid`, `cityname`, `citydesc`, `cityminlevel`) VALUES
-(1, 'Default City', 'A standard city added to start you off', 1);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `contactlist`
---
-
-CREATE TABLE `contactlist` (
- `cl_ID` int(11) NOT NULL auto_increment,
- `cl_ADDER` int(11) NOT NULL default '0',
- `cl_ADDED` int(11) NOT NULL default '0',
- PRIMARY KEY (`cl_ID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `contactlist`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `courses`
---
-
-CREATE TABLE `courses` (
- `crID` int(11) NOT NULL auto_increment,
- `crNAME` varchar(255) NOT NULL default '',
- `crDESC` text NOT NULL,
- `crCOST` int(11) NOT NULL default '0',
- `crENERGY` int(11) NOT NULL default '0',
- `crDAYS` int(11) NOT NULL default '0',
- `crSTR` int(11) NOT NULL default '0',
- `crGUARD` int(11) NOT NULL default '0',
- `crLABOUR` int(11) NOT NULL default '0',
- `crAGIL` int(11) NOT NULL default '0',
- `crIQ` int(11) NOT NULL default '0',
- PRIMARY KEY (`crID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `courses`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `coursesdone`
---
-
-CREATE TABLE `coursesdone` (
- `userid` int(11) NOT NULL default '0',
- `courseid` int(11) NOT NULL default '0'
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `coursesdone`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `crimegroups`
---
-
-CREATE TABLE `crimegroups` (
- `cgID` int(11) NOT NULL auto_increment,
- `cgNAME` varchar(255) NOT NULL default '',
- `cgORDER` int(11) NOT NULL default '0',
- PRIMARY KEY (`cgID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `crimegroups`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `crimes`
---
-
-CREATE TABLE `crimes` (
- `crimeID` int(11) NOT NULL auto_increment,
- `crimeNAME` varchar(255) NOT NULL default '',
- `crimeBRAVE` int(11) NOT NULL default '0',
- `crimePERCFORM` text NOT NULL,
- `crimeSUCCESSMUNY` int(11) NOT NULL default '0',
- `crimeSUCCESSCRYS` int(11) NOT NULL default '0',
- `crimeSUCCESSITEM` int(11) NOT NULL default '0',
- `crimeGROUP` int(11) NOT NULL default '0',
- `crimeITEXT` text NOT NULL,
- `crimeSTEXT` text NOT NULL,
- `crimeFTEXT` text NOT NULL,
- `crimeJTEXT` text NOT NULL,
- `crimeJAILTIME` int(10) NOT NULL default '0',
- `crimeJREASON` varchar(255) NOT NULL default '',
- `crimeXP` int(11) NOT NULL default '0',
- PRIMARY KEY (`crimeID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `crimes`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `crystalmarket`
---
-
-CREATE TABLE `crystalmarket` (
- `cmID` int(11) NOT NULL auto_increment,
- `cmQTY` int(11) NOT NULL default '0',
- `cmADDER` int(11) NOT NULL default '0',
- `cmPRICE` int(11) NOT NULL default '0',
- PRIMARY KEY (`cmID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `crystalmarket`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `crystalxferlogs`
---
-
-CREATE TABLE `crystalxferlogs` (
- `cxID` int(11) NOT NULL auto_increment,
- `cxFROM` int(11) NOT NULL default '0',
- `cxTO` int(11) NOT NULL default '0',
- `cxAMOUNT` int(11) NOT NULL default '0',
- `cxTIME` int(11) NOT NULL default '0',
- `cxFROMIP` varchar(15) NOT NULL default '127.0.0.1',
- `cxTOIP` varchar(15) NOT NULL default '127.0.0.1',
- PRIMARY KEY (`cxID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `crystalxferlogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `dps_accepted`
---
-
-CREATE TABLE `dps_accepted` (
- `dpID` int(11) NOT NULL auto_increment,
- `dpBUYER` int(11) NOT NULL default '0',
- `dpFOR` int(11) NOT NULL default '0',
- `dpTYPE` varchar(255) NOT NULL default '',
- `dpTIME` int(11) NOT NULL default '0',
- `dpTXN` varchar(255) NOT NULL default '',
- PRIMARY KEY (`dpID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `dps_accepted`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `events`
---
-
-CREATE TABLE `events` (
- `evID` int(11) NOT NULL auto_increment,
- `evUSER` int(11) NOT NULL default '0',
- `evTIME` int(11) NOT NULL default '0',
- `evREAD` int(11) NOT NULL default '0',
- `evTEXT` text NOT NULL,
- PRIMARY KEY (`evID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `events`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `fedjail`
---
-
-CREATE TABLE `fedjail` (
- `fed_id` int(11) NOT NULL auto_increment,
- `fed_userid` int(11) NOT NULL default '0',
- `fed_days` int(11) NOT NULL default '0',
- `fed_jailedby` int(11) NOT NULL default '0',
- `fed_reason` text NOT NULL,
- PRIMARY KEY (`fed_id`),
- UNIQUE (`fed_userid`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `fedjail`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `forum_forums`
---
-
-CREATE TABLE IF NOT EXISTS `forum_forums` (
- `ff_id` int(11) NOT NULL auto_increment,
- `ff_name` varchar(255) NOT NULL default '',
- `ff_desc` varchar(255) NOT NULL default '',
- `ff_posts` int(11) NOT NULL default '0',
- `ff_topics` int(11) NOT NULL default '0',
- `ff_lp_time` int(11) NOT NULL default '0',
- `ff_lp_poster_id` int(11) NOT NULL default '0',
- `ff_lp_poster_name` text NOT NULL,
- `ff_lp_t_id` int(11) NOT NULL default '0',
- `ff_lp_t_name` varchar(255) NOT NULL default '',
- `ff_auth` enum('public','gang','staff') NOT NULL default 'public',
- `ff_owner` int(11) NOT NULL default '0',
- PRIMARY KEY (`ff_id`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `forum_forums`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `forum_posts`
---
-
-CREATE TABLE IF NOT EXISTS `forum_posts` (
- `fp_id` int(11) NOT NULL auto_increment,
- `fp_topic_id` int(11) NOT NULL default '0',
- `fp_forum_id` int(11) NOT NULL default '0',
- `fp_poster_id` int(11) NOT NULL default '0',
- `fp_poster_name` text NOT NULL,
- `fp_time` int(11) NOT NULL default '0',
- `fp_subject` varchar(255) NOT NULL default '',
- `fp_text` text NOT NULL,
- `fp_editor_id` int(11) NOT NULL default '0',
- `fp_editor_name` text NOT NULL,
- `fp_editor_time` int(11) NOT NULL default '0',
- `fp_edit_count` int(11) NOT NULL default '0',
- PRIMARY KEY (`fp_id`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `forum_posts`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `forum_topics`
---
-
-CREATE TABLE IF NOT EXISTS `forum_topics` (
- `ft_id` int(11) NOT NULL auto_increment,
- `ft_forum_id` int(11) NOT NULL default '0',
- `ft_name` varchar(150) NOT NULL default '',
- `ft_desc` varchar(255) NOT NULL default '',
- `ft_posts` int(11) NOT NULL default '0',
- `ft_owner_id` int(11) NOT NULL default '0',
- `ft_owner_name` text NOT NULL,
- `ft_start_time` int(11) NOT NULL default '0',
- `ft_last_id` int(11) NOT NULL default '0',
- `ft_last_name` text NOT NULL,
- `ft_last_time` int(11) NOT NULL default '0',
- `ft_pinned` tinyint(4) NOT NULL default '0',
- `ft_locked` tinyint(4) NOT NULL default '0',
- PRIMARY KEY (`ft_id`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `forum_topics`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `friendslist`
---
-
-CREATE TABLE `friendslist` (
- `fl_ID` int(11) NOT NULL auto_increment,
- `fl_ADDER` int(11) NOT NULL default '0',
- `fl_ADDED` int(11) NOT NULL default '0',
- `fl_COMMENT` varchar(255) NOT NULL default '',
- PRIMARY KEY (`fl_ID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `friendslist`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `gangevents`
---
-
-CREATE TABLE `gangevents` (
- `gevID` int(11) NOT NULL auto_increment,
- `gevGANG` int(11) NOT NULL default '0',
- `gevTIME` int(11) NOT NULL default '0',
- `gevTEXT` text NOT NULL,
- PRIMARY KEY (`gevID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `gangevents`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `gangs`
---
-
-CREATE TABLE `gangs` (
- `gangID` int(11) NOT NULL auto_increment,
- `gangNAME` varchar(255) NOT NULL default '',
- `gangDESC` text NOT NULL,
- `gangPREF` varchar(12) NOT NULL default '',
- `gangSUFF` varchar(12) NOT NULL default '',
- `gangMONEY` int(11) NOT NULL default '0',
- `gangCRYSTALS` int(11) NOT NULL default '0',
- `gangRESPECT` int(11) NOT NULL default '0',
- `gangPRESIDENT` int(11) NOT NULL default '0',
- `gangVICEPRES` int(11) NOT NULL default '0',
- `gangCAPACITY` int(11) NOT NULL default '0',
- `gangCRIME` int(11) NOT NULL default '0',
- `gangCHOURS` int(11) NOT NULL default '0',
- `gangAMENT` longtext NOT NULL,
- PRIMARY KEY (`gangID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `gangs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `gangwars`
---
-
-CREATE TABLE `gangwars` (
- `warID` int(11) NOT NULL auto_increment,
- `warDECLARER` int(11) NOT NULL default '0',
- `warDECLARED` int(11) NOT NULL default '0',
- `warTIME` int(11) NOT NULL default '0',
- PRIMARY KEY (`warID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `gangwars`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `houses`
---
-
-CREATE TABLE `houses` (
- `hID` int(11) NOT NULL auto_increment,
- `hNAME` varchar(255) NOT NULL default '',
- `hPRICE` int(11) NOT NULL default '0',
- `hWILL` int(11) NOT NULL default '0',
- PRIMARY KEY (`hID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `houses`
---
-
-INSERT INTO `houses` (`hID`, `hNAME`, `hPRICE`, `hWILL`) VALUES
-(1, 'Default House', 0, 100);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `imarketaddlogs`
---
-
-CREATE TABLE `imarketaddlogs` (
- `imaID` int(11) NOT NULL auto_increment,
- `imaITEM` int(11) NOT NULL default '0',
- `imaPRICE` int(11) NOT NULL default '0',
- `imaINVID` int(11) NOT NULL default '0',
- `imaADDER` int(11) NOT NULL default '0',
- `imaTIME` int(11) NOT NULL default '0',
- `imaCONTENT` text NOT NULL,
- PRIMARY KEY (`imaID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `imarketaddlogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `imbuylogs`
---
-
-CREATE TABLE `imbuylogs` (
- `imbID` int(11) NOT NULL auto_increment,
- `imbITEM` int(11) NOT NULL default '0',
- `imbADDER` int(11) NOT NULL default '0',
- `imbBUYER` int(11) NOT NULL default '0',
- `imbPRICE` int(11) NOT NULL default '0',
- `imbIMID` int(11) NOT NULL default '0',
- `imbINVID` int(11) NOT NULL default '0',
- `imbTIME` int(11) NOT NULL default '0',
- `imbCONTENT` text NOT NULL,
- PRIMARY KEY (`imbID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `imbuylogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `imremovelogs`
---
-
-CREATE TABLE `imremovelogs` (
- `imrID` int(11) NOT NULL auto_increment,
- `imrITEM` int(11) NOT NULL default '0',
- `imrADDER` int(11) NOT NULL default '0',
- `imrREMOVER` int(11) NOT NULL default '0',
- `imrIMID` int(11) NOT NULL default '0',
- `imrINVID` int(11) NOT NULL default '0',
- `imrTIME` int(11) NOT NULL default '0',
- `imrCONTENT` text NOT NULL,
- PRIMARY KEY (`imrID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `imremovelogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `inventory`
---
-
-CREATE TABLE `inventory` (
- `inv_id` int(11) NOT NULL auto_increment,
- `inv_itemid` int(11) NOT NULL default '0',
- `inv_userid` int(11) NOT NULL default '0',
- `inv_qty` int(11) NOT NULL default '0',
- PRIMARY KEY (`inv_id`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `inventory`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `itembuylogs`
---
-
-CREATE TABLE `itembuylogs` (
- `ibID` int(11) NOT NULL auto_increment,
- `ibUSER` int(11) NOT NULL default '0',
- `ibITEM` int(11) NOT NULL default '0',
- `ibTOTALPRICE` int(11) NOT NULL default '0',
- `ibQTY` int(11) NOT NULL default '0',
- `ibTIME` int(11) NOT NULL default '0',
- `ibCONTENT` text NOT NULL,
- PRIMARY KEY (`ibID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `itembuylogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `itemmarket`
---
-
-CREATE TABLE `itemmarket` (
- `imID` int(11) NOT NULL auto_increment,
- `imITEM` int(11) NOT NULL default '0',
- `imADDER` int(11) NOT NULL default '0',
- `imPRICE` int(11) NOT NULL default '0',
- `imCURRENCY` enum('money','crystals') NOT NULL default 'money',
- `imQTY` int(11) NOT NULL default '0',
- PRIMARY KEY (`imID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `itemmarket`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `items`
---
-
-CREATE TABLE `items` (
- `itmid` int(11) NOT NULL auto_increment,
- `itmtype` int(11) NOT NULL default '0',
- `itmname` varchar(255) NOT NULL default '',
- `itmdesc` text NOT NULL,
- `itmbuyprice` int(11) NOT NULL default '0',
- `itmsellprice` int(11) NOT NULL default '0',
- `itmbuyable` int(11) NOT NULL default '0',
- `effect1_on` tinyint(4) NOT NULL default '0',
- `effect1` text NOT NULL,
- `effect2_on` tinyint(4) NOT NULL default '0',
- `effect2` text NOT NULL,
- `effect3_on` tinyint(4) NOT NULL default '0',
- `effect3` text NOT NULL,
- `weapon` int(11) NOT NULL default '0',
- `armor` int(11) NOT NULL default '0',
- PRIMARY KEY (`itmid`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `items`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `itemselllogs`
---
-
-CREATE TABLE `itemselllogs` (
- `isID` int(11) NOT NULL auto_increment,
- `isUSER` int(11) NOT NULL default '0',
- `isITEM` int(11) NOT NULL default '0',
- `isTOTALPRICE` int(11) NOT NULL default '0',
- `isQTY` int(11) NOT NULL default '0',
- `isTIME` int(11) NOT NULL default '0',
- `isCONTENT` text NOT NULL,
- PRIMARY KEY (`isID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `itemselllogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `itemtypes`
---
-
-CREATE TABLE `itemtypes` (
- `itmtypeid` int(11) NOT NULL auto_increment,
- `itmtypename` varchar(255) NOT NULL default '',
- PRIMARY KEY (`itmtypeid`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `itemtypes`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `itemxferlogs`
---
-
-CREATE TABLE `itemxferlogs` (
- `ixID` int(11) NOT NULL auto_increment,
- `ixFROM` int(11) NOT NULL default '0',
- `ixTO` int(11) NOT NULL default '0',
- `ixITEM` int(11) NOT NULL default '0',
- `ixQTY` int(11) NOT NULL default '0',
- `ixTIME` int(11) NOT NULL default '0',
- `ixFROMIP` varchar(255) NOT NULL default '',
- `ixTOIP` varchar(255) NOT NULL default '',
- PRIMARY KEY (`ixID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `itemxferlogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `jaillogs`
---
-
-CREATE TABLE `jaillogs` (
- `jaID` int(11) NOT NULL auto_increment,
- `jaJAILER` int(11) NOT NULL default '0',
- `jaJAILED` int(11) NOT NULL default '0',
- `jaDAYS` int(11) NOT NULL default '0',
- `jaREASON` longtext NOT NULL,
- `jaTIME` int(11) NOT NULL default '0',
- PRIMARY KEY (`jaID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `jaillogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `jobranks`
---
-
-CREATE TABLE `jobranks` (
- `jrID` int(11) NOT NULL auto_increment,
- `jrNAME` varchar(255) NOT NULL default '',
- `jrJOB` int(11) NOT NULL default '0',
- `jrPAY` int(11) NOT NULL default '0',
- `jrIQG` int(11) NOT NULL default '0',
- `jrLABOURG` int(11) NOT NULL default '0',
- `jrSTRG` int(11) NOT NULL default '0',
- `jrIQN` int(11) NOT NULL default '0',
- `jrLABOURN` int(11) NOT NULL default '0',
- `jrSTRN` int(11) NOT NULL default '0',
- PRIMARY KEY (`jrID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `jobranks`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `jobs`
---
-
-CREATE TABLE `jobs` (
- `jID` int(11) NOT NULL auto_increment,
- `jNAME` varchar(255) NOT NULL default '',
- `jFIRST` int(11) NOT NULL default '0',
- `jDESC` varchar(255) NOT NULL default '',
- `jOWNER` varchar(255) NOT NULL default '',
- PRIMARY KEY (`jID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `jobs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `mail`
---
-
-CREATE TABLE `mail` (
- `mail_id` int(11) NOT NULL auto_increment,
- `mail_read` int(11) NOT NULL default '0',
- `mail_from` int(11) NOT NULL default '0',
- `mail_to` int(11) NOT NULL default '0',
- `mail_time` int(11) NOT NULL default '0',
- `mail_subject` varchar(255) NOT NULL default '',
- `mail_text` text NOT NULL,
- PRIMARY KEY (`mail_id`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `mail`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `oclogs`
---
-
-CREATE TABLE `oclogs` (
- `oclID` int(11) NOT NULL auto_increment,
- `oclOC` int(11) NOT NULL default '0',
- `oclGANG` int(11) NOT NULL default '0',
- `oclLOG` text NOT NULL,
- `oclRESULT` enum('success','failure') NOT NULL default 'success',
- `oclMONEY` int(11) NOT NULL default '0',
- `ocCRIMEN` varchar(255) NOT NULL default '',
- `ocTIME` int(11) NOT NULL default '0',
- PRIMARY KEY (`oclID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `oclogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `orgcrimes`
---
-
-CREATE TABLE `orgcrimes` (
- `ocID` int(11) NOT NULL auto_increment,
- `ocNAME` varchar(255) NOT NULL default '',
- `ocUSERS` int(11) NOT NULL default '0',
- `ocSTARTTEXT` text NOT NULL,
- `ocSUCCTEXT` text NOT NULL,
- `ocFAILTEXT` text NOT NULL,
- `ocMINMONEY` int(11) NOT NULL default '0',
- `ocMAXMONEY` int(11) NOT NULL default '0',
- PRIMARY KEY (`ocID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `orgcrimes`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `papercontent`
---
-
-CREATE TABLE `papercontent` (
- `content` longtext NOT NULL
-) ENGINE=MyISAM ;
-
-INSERT INTO `papercontent` VALUES('Here you can put game news, or prehaps an update log.');
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `polls`
---
-
-CREATE TABLE `polls` (
- `id` int(11) NOT NULL auto_increment,
- `active` enum('0','1') NOT NULL default '0',
- `question` varchar(255) NOT NULL default '',
- `choice1` varchar(255) NOT NULL default '',
- `choice2` varchar(255) NOT NULL default '',
- `choice3` varchar(255) NOT NULL default '',
- `choice4` varchar(255) NOT NULL default '',
- `choice5` varchar(255) NOT NULL default '',
- `choice6` varchar(255) NOT NULL default '',
- `choice7` varchar(255) NOT NULL default '',
- `choice8` varchar(255) NOT NULL default '',
- `choice9` varchar(255) NOT NULL default '',
- `choice10` varchar(255) NOT NULL default '',
- `voted1` int(11) NOT NULL default '0',
- `voted2` int(11) NOT NULL default '0',
- `voted3` int(11) NOT NULL default '0',
- `voted4` int(11) NOT NULL default '0',
- `voted5` int(11) NOT NULL default '0',
- `voted6` int(11) NOT NULL default '0',
- `voted7` int(11) NOT NULL default '0',
- `voted8` int(11) NOT NULL default '0',
- `voted9` int(11) NOT NULL default '0',
- `voted10` int(11) NOT NULL default '0',
- `votes` int(11) NOT NULL default '0',
- `winner` int(11) NOT NULL default '0',
- `hidden` tinyint(4) NOT NULL default '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `polls`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `preports`
---
-
-CREATE TABLE `preports` (
- `prID` int(11) NOT NULL auto_increment,
- `prREPORTER` int(11) NOT NULL default '0',
- `prREPORTED` int(11) NOT NULL default '0',
- `prTEXT` longtext NOT NULL,
- PRIMARY KEY (`prID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `preports`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `referals`
---
-
-CREATE TABLE `referals` (
- `refID` int(11) NOT NULL auto_increment,
- `refREFER` int(11) NOT NULL default '0',
- `refREFED` int(11) NOT NULL default '0',
- `refTIME` int(11) NOT NULL default '0',
- `refREFERIP` varchar(15) NOT NULL default '127.0.0.1',
- `refREFEDIP` varchar(15) NOT NULL default '127.0.0.1',
- PRIMARY KEY (`refID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `referals`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `settings`
---
-
-CREATE TABLE `settings` (
- `conf_id` int(11) NOT NULL auto_increment,
- `conf_name` varchar(255) NOT NULL default '',
- `conf_value` text NOT NULL,
- `data_type` varchar(16) NOT NULL default 'string',
- PRIMARY KEY (`conf_id`)
-) ENGINE=MyISAM ;
-
-INSERT INTO `settings` VALUES (NULL, 'validate_period', '15', 'string');
-INSERT INTO `settings` VALUES (NULL, 'validate_on', '0', 'bool');
-INSERT INTO `settings` VALUES (NULL, 'regcap_on', '0', 'bool');
-INSERT INTO `settings` VALUES (NULL, 'hospital_count', '0', 'int');
-INSERT INTO `settings` VALUES (NULL, 'jail_count', '0', 'int');
-INSERT INTO `settings` VALUES (NULL, 'sendcrys_on', '1', 'bool');
-INSERT INTO `settings` VALUES (NULL, 'sendbank_on', '1', 'bool');
-INSERT INTO `settings` VALUES (NULL, 'ct_refillprice', '12', 'int');
-INSERT INTO `settings` VALUES (NULL, 'ct_iqpercrys', '5', 'int');
-INSERT INTO `settings` VALUES (NULL, 'ct_moneypercrys', '200', 'int');
-INSERT INTO `settings` VALUES (NULL, 'staff_pad', 'Here you can store notes for all staff to see.', 'string');
-INSERT INTO `settings` VALUES (NULL, 'willp_item', '0', 'int');
-INSERT INTO `settings` VALUES (NULL, 'jquery_location', 'js/jquery-1.7.1.min.js', 'string');
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `shopitems`
---
-
-CREATE TABLE `shopitems` (
- `sitemID` int(11) NOT NULL auto_increment,
- `sitemSHOP` int(11) NOT NULL default '0',
- `sitemITEMID` int(11) NOT NULL default '0',
- PRIMARY KEY (`sitemID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `shopitems`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `shops`
---
-
-CREATE TABLE `shops` (
- `shopID` int(11) NOT NULL auto_increment,
- `shopLOCATION` int(11) NOT NULL default '0',
- `shopNAME` varchar(255) NOT NULL default '',
- `shopDESCRIPTION` text NOT NULL,
- PRIMARY KEY (`shopID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `shops`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `stafflog`
---
-
-CREATE TABLE `stafflog` (
- `id` int(11) NOT NULL auto_increment,
- `user` int(11) NOT NULL default '0',
- `time` int(11) NOT NULL default '0',
- `action` varchar(255) NOT NULL default '',
- `ip` varchar(15) NOT NULL default '',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `stafflog`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `staffnotelogs`
---
-
-CREATE TABLE `staffnotelogs` (
- `snID` int(11) NOT NULL auto_increment,
- `snCHANGER` int(11) NOT NULL default '0',
- `snCHANGED` int(11) NOT NULL default '0',
- `snTIME` int(11) NOT NULL default '0',
- `snOLD` longtext NOT NULL,
- `snNEW` longtext NOT NULL,
- PRIMARY KEY (`snID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `staffnotelogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `surrenders`
---
-
-CREATE TABLE `surrenders` (
- `surID` int(11) NOT NULL auto_increment,
- `surWAR` int(11) NOT NULL default '0',
- `surWHO` int(11) NOT NULL default '0',
- `surTO` int(11) NOT NULL default '0',
- `surMSG` varchar(255) NOT NULL default '',
- PRIMARY KEY (`surID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `surrenders`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `unjaillogs`
---
-
-CREATE TABLE `unjaillogs` (
- `ujaID` int(11) NOT NULL auto_increment,
- `ujaJAILER` int(11) NOT NULL default '0',
- `ujaJAILED` int(11) NOT NULL default '0',
- `ujaTIME` int(11) NOT NULL default '0',
- PRIMARY KEY (`ujaID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `unjaillogs`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `users`
---
-
-CREATE TABLE IF NOT EXISTS `users` (
- `userid` int(11) NOT NULL auto_increment,
- `username` varchar(255) NOT NULL default '',
- `userpass` varchar(255) NOT NULL default '',
- `level` int(11) NOT NULL default '0',
- `exp` decimal(11,4) NOT NULL default '0.0000',
- `money` int(11) NOT NULL default '0',
- `crystals` int(11) NOT NULL default '0',
- `laston` int(11) NOT NULL default '0',
- `lastip` varchar(255) NOT NULL default '',
- `job` int(11) NOT NULL default '0',
- `energy` int(11) NOT NULL default '0',
- `will` int(11) NOT NULL default '0',
- `maxwill` int(11) NOT NULL default '0',
- `brave` int(11) NOT NULL default '0',
- `maxbrave` int(11) NOT NULL default '0',
- `maxenergy` int(11) NOT NULL default '0',
- `hp` int(11) NOT NULL default '0',
- `maxhp` int(11) NOT NULL default '0',
- `lastrest_life` int(11) NOT NULL default '0',
- `lastrest_other` int(11) NOT NULL default '0',
- `location` int(11) NOT NULL default '0',
- `hospital` int(11) NOT NULL default '0',
- `jail` int(11) NOT NULL default '0',
- `jail_reason` varchar(255) NOT NULL default '',
- `fedjail` int(11) NOT NULL default '0',
- `user_level` int(11) NOT NULL default '1',
- `gender` enum('Male','Female') NOT NULL default 'Male',
- `daysold` int(11) NOT NULL default '0',
- `signedup` int(11) NOT NULL default '0',
- `gang` int(11) NOT NULL default '0',
- `daysingang` int(11) NOT NULL default '0',
- `course` int(11) NOT NULL default '0',
- `cdays` int(11) NOT NULL default '0',
- `jobrank` int(11) NOT NULL default '0',
- `donatordays` int(11) NOT NULL default '0',
- `email` varchar(255) NOT NULL default '',
- `login_name` varchar(255) NOT NULL default '',
- `display_pic` text NOT NULL,
- `duties` varchar(255) NOT NULL default 'N/A',
- `bankmoney` int(11) NOT NULL default '0',
- `cybermoney` int(11) NOT NULL default '-1',
- `staffnotes` longtext NOT NULL,
- `mailban` int(11) NOT NULL default '0',
- `mb_reason` varchar(255) NOT NULL default '',
- `hospreason` varchar(255) NOT NULL default '',
- `lastip_login` varchar(255) NOT NULL default '127.0.0.1',
- `lastip_signup` varchar(255) NOT NULL default '127.0.0.1',
- `last_login` int(11) NOT NULL default '0',
- `voted` text NOT NULL,
- `crimexp` int(11) NOT NULL default '0',
- `attacking` int(11) NOT NULL default '0',
- `verified` int(11) NOT NULL default '0',
- `forumban` int(11) NOT NULL default '0',
- `fb_reason` varchar(255) NOT NULL default '',
- `posts` int(11) NOT NULL default '0',
- `forums_avatar` varchar(255) NOT NULL default '',
- `forums_signature` varchar(250) NOT NULL default '',
- `new_events` int(11) NOT NULL default '0',
- `new_mail` int(11) NOT NULL default '0',
- `friend_count` int(11) NOT NULL default '0',
- `enemy_count` int(11) NOT NULL default '0',
- `new_announcements` int(11) NOT NULL default '0',
- `boxes_opened` int(11) NOT NULL default '0',
- `user_notepad` text NOT NULL,
- `equip_primary` int(11) NOT NULL default '0',
- `equip_secondary` int(11) NOT NULL default '0',
- `equip_armor` int(11) NOT NULL default '0',
- `force_logout` tinyint(4) NOT NULL default '0',
- `pass_salt` varchar(8) NOT NULL default '',
- PRIMARY KEY (`userid`)
-) ENGINE=MyISAM ;
---
--- Dumping data for table `users`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `userstats`
---
-
-CREATE TABLE `userstats` (
- `userid` int(11) NOT NULL default '0',
- `strength` float NOT NULL default '0',
- `agility` float NOT NULL default '0',
- `guard` float NOT NULL default '0',
- `labour` float NOT NULL default '0',
- `IQ` float NOT NULL default '0',
- PRIMARY KEY (`userid`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `userstats`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `votes`
---
-
-CREATE TABLE `votes` (
- `userid` int(11) NOT NULL default '0',
- `list` varchar(255) NOT NULL default ''
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `votes`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `willps_accepted`
---
-
-CREATE TABLE `willps_accepted` (
- `dpID` int(11) NOT NULL auto_increment,
- `dpBUYER` int(11) NOT NULL default '0',
- `dpFOR` int(11) NOT NULL default '0',
- `dpAMNT` varchar(255) NOT NULL default '',
- `dpTIME` int(11) NOT NULL default '0',
- `dpTXN` varchar(255) NOT NULL default '',
- PRIMARY KEY (`dpID`)
-) ENGINE=MyISAM ;
-
---
--- Dumping data for table `willps_accepted`
---
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `announcements`
+--
+
+CREATE TABLE `announcements` (
+ `a_text` text NOT NULL,
+ `a_time` int(11) NOT NULL default '0'
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `announcements`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `applications`
+--
+
+CREATE TABLE `applications` (
+ `appID` int(11) NOT NULL auto_increment,
+ `appUSER` int(11) NOT NULL default '0',
+ `appGANG` int(11) NOT NULL default '0',
+ `appTEXT` text NOT NULL,
+ PRIMARY KEY (`appID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `applications`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `attacklogs`
+--
+
+CREATE TABLE `attacklogs` (
+ `log_id` int(11) NOT NULL auto_increment,
+ `attacker` int(11) NOT NULL default '0',
+ `attacked` int(11) NOT NULL default '0',
+ `result` enum('won','lost') NOT NULL default 'won',
+ `time` int(11) NOT NULL default '0',
+ `stole` int(11) NOT NULL default '0',
+ `attacklog` longtext NOT NULL,
+ PRIMARY KEY (`log_id`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `attacklogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `bankxferlogs`
+--
+
+CREATE TABLE `bankxferlogs` (
+ `cxID` int(11) NOT NULL auto_increment,
+ `cxFROM` int(11) NOT NULL default '0',
+ `cxTO` int(11) NOT NULL default '0',
+ `cxAMOUNT` int(11) NOT NULL default '0',
+ `cxTIME` int(11) NOT NULL default '0',
+ `cxFROMIP` varchar(15) NOT NULL default '127.0.0.1',
+ `cxTOIP` varchar(15) NOT NULL default '127.0.0.1',
+ `cxBANK` enum('bank','cyber') NOT NULL default 'bank',
+ PRIMARY KEY (`cxID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `bankxferlogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `blacklist`
+--
+
+CREATE TABLE `blacklist` (
+ `bl_ID` int(11) NOT NULL auto_increment,
+ `bl_ADDER` int(11) NOT NULL default '0',
+ `bl_ADDED` int(11) NOT NULL default '0',
+ `bl_COMMENT` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`bl_ID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `blacklist`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `cashxferlogs`
+--
+
+CREATE TABLE `cashxferlogs` (
+ `cxID` int(11) NOT NULL auto_increment,
+ `cxFROM` int(11) NOT NULL default '0',
+ `cxTO` int(11) NOT NULL default '0',
+ `cxAMOUNT` int(11) NOT NULL default '0',
+ `cxTIME` int(11) NOT NULL default '0',
+ `cxFROMIP` varchar(15) NOT NULL default '127.0.0.1',
+ `cxTOIP` varchar(15) NOT NULL default '127.0.0.1',
+ PRIMARY KEY (`cxID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `cashxferlogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `challengebots`
+--
+
+CREATE TABLE `challengebots` (
+ `cb_npcid` int(11) NOT NULL default '0',
+ `cb_money` int(11) NOT NULL default '0'
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `challengebots`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `challengesbeaten`
+--
+
+CREATE TABLE `challengesbeaten` (
+ `userid` int(11) NOT NULL default '0',
+ `npcid` int(11) NOT NULL default '0'
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `challengesbeaten`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `cities`
+--
+
+CREATE TABLE `cities` (
+ `cityid` int(11) NOT NULL auto_increment,
+ `cityname` varchar(255) NOT NULL default '',
+ `citydesc` longtext NOT NULL,
+ `cityminlevel` int(11) NOT NULL default '0',
+ PRIMARY KEY (`cityid`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `cities`
+--
+
+INSERT INTO `cities` (`cityid`, `cityname`, `citydesc`, `cityminlevel`) VALUES
+(1, 'Default City', 'A standard city added to start you off', 1);
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `contactlist`
+--
+
+CREATE TABLE `contactlist` (
+ `cl_ID` int(11) NOT NULL auto_increment,
+ `cl_ADDER` int(11) NOT NULL default '0',
+ `cl_ADDED` int(11) NOT NULL default '0',
+ PRIMARY KEY (`cl_ID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `contactlist`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `courses`
+--
+
+CREATE TABLE `courses` (
+ `crID` int(11) NOT NULL auto_increment,
+ `crNAME` varchar(255) NOT NULL default '',
+ `crDESC` text NOT NULL,
+ `crCOST` int(11) NOT NULL default '0',
+ `crENERGY` int(11) NOT NULL default '0',
+ `crDAYS` int(11) NOT NULL default '0',
+ `crSTR` int(11) NOT NULL default '0',
+ `crGUARD` int(11) NOT NULL default '0',
+ `crLABOUR` int(11) NOT NULL default '0',
+ `crAGIL` int(11) NOT NULL default '0',
+ `crIQ` int(11) NOT NULL default '0',
+ PRIMARY KEY (`crID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `courses`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `coursesdone`
+--
+
+CREATE TABLE `coursesdone` (
+ `userid` int(11) NOT NULL default '0',
+ `courseid` int(11) NOT NULL default '0'
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `coursesdone`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `crimegroups`
+--
+
+CREATE TABLE `crimegroups` (
+ `cgID` int(11) NOT NULL auto_increment,
+ `cgNAME` varchar(255) NOT NULL default '',
+ `cgORDER` int(11) NOT NULL default '0',
+ PRIMARY KEY (`cgID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `crimegroups`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `crimes`
+--
+
+CREATE TABLE `crimes` (
+ `crimeID` int(11) NOT NULL auto_increment,
+ `crimeNAME` varchar(255) NOT NULL default '',
+ `crimeBRAVE` int(11) NOT NULL default '0',
+ `crimePERCFORM` text NOT NULL,
+ `crimeSUCCESSMUNY` int(11) NOT NULL default '0',
+ `crimeSUCCESSCRYS` int(11) NOT NULL default '0',
+ `crimeSUCCESSITEM` int(11) NOT NULL default '0',
+ `crimeGROUP` int(11) NOT NULL default '0',
+ `crimeITEXT` text NOT NULL,
+ `crimeSTEXT` text NOT NULL,
+ `crimeFTEXT` text NOT NULL,
+ `crimeJTEXT` text NOT NULL,
+ `crimeJAILTIME` int(10) NOT NULL default '0',
+ `crimeJREASON` varchar(255) NOT NULL default '',
+ `crimeXP` int(11) NOT NULL default '0',
+ PRIMARY KEY (`crimeID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `crimes`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `crystalmarket`
+--
+
+CREATE TABLE `crystalmarket` (
+ `cmID` int(11) NOT NULL auto_increment,
+ `cmQTY` int(11) NOT NULL default '0',
+ `cmADDER` int(11) NOT NULL default '0',
+ `cmPRICE` int(11) NOT NULL default '0',
+ PRIMARY KEY (`cmID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `crystalmarket`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `crystalxferlogs`
+--
+
+CREATE TABLE `crystalxferlogs` (
+ `cxID` int(11) NOT NULL auto_increment,
+ `cxFROM` int(11) NOT NULL default '0',
+ `cxTO` int(11) NOT NULL default '0',
+ `cxAMOUNT` int(11) NOT NULL default '0',
+ `cxTIME` int(11) NOT NULL default '0',
+ `cxFROMIP` varchar(15) NOT NULL default '127.0.0.1',
+ `cxTOIP` varchar(15) NOT NULL default '127.0.0.1',
+ PRIMARY KEY (`cxID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `crystalxferlogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dps_accepted`
+--
+
+CREATE TABLE `dps_accepted` (
+ `dpID` int(11) NOT NULL auto_increment,
+ `dpBUYER` int(11) NOT NULL default '0',
+ `dpFOR` int(11) NOT NULL default '0',
+ `dpTYPE` varchar(255) NOT NULL default '',
+ `dpTIME` int(11) NOT NULL default '0',
+ `dpTXN` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`dpID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `dps_accepted`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `events`
+--
+
+CREATE TABLE `events` (
+ `evID` int(11) NOT NULL auto_increment,
+ `evUSER` int(11) NOT NULL default '0',
+ `evTIME` int(11) NOT NULL default '0',
+ `evREAD` int(11) NOT NULL default '0',
+ `evTEXT` text NOT NULL,
+ PRIMARY KEY (`evID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `events`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `fedjail`
+--
+
+CREATE TABLE `fedjail` (
+ `fed_id` int(11) NOT NULL auto_increment,
+ `fed_userid` int(11) NOT NULL default '0',
+ `fed_days` int(11) NOT NULL default '0',
+ `fed_jailedby` int(11) NOT NULL default '0',
+ `fed_reason` text NOT NULL,
+ PRIMARY KEY (`fed_id`),
+ UNIQUE (`fed_userid`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `fedjail`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `forum_forums`
+--
+
+CREATE TABLE IF NOT EXISTS `forum_forums` (
+ `ff_id` int(11) NOT NULL auto_increment,
+ `ff_name` varchar(255) NOT NULL default '',
+ `ff_desc` varchar(255) NOT NULL default '',
+ `ff_posts` int(11) NOT NULL default '0',
+ `ff_topics` int(11) NOT NULL default '0',
+ `ff_lp_time` int(11) NOT NULL default '0',
+ `ff_lp_poster_id` int(11) NOT NULL default '0',
+ `ff_lp_poster_name` text NOT NULL,
+ `ff_lp_t_id` int(11) NOT NULL default '0',
+ `ff_lp_t_name` varchar(255) NOT NULL default '',
+ `ff_auth` enum('public','gang','staff') NOT NULL default 'public',
+ `ff_owner` int(11) NOT NULL default '0',
+ PRIMARY KEY (`ff_id`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `forum_forums`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `forum_posts`
+--
+
+CREATE TABLE IF NOT EXISTS `forum_posts` (
+ `fp_id` int(11) NOT NULL auto_increment,
+ `fp_topic_id` int(11) NOT NULL default '0',
+ `fp_forum_id` int(11) NOT NULL default '0',
+ `fp_poster_id` int(11) NOT NULL default '0',
+ `fp_poster_name` text NOT NULL,
+ `fp_time` int(11) NOT NULL default '0',
+ `fp_subject` varchar(255) NOT NULL default '',
+ `fp_text` text NOT NULL,
+ `fp_editor_id` int(11) NOT NULL default '0',
+ `fp_editor_name` text NOT NULL,
+ `fp_editor_time` int(11) NOT NULL default '0',
+ `fp_edit_count` int(11) NOT NULL default '0',
+ PRIMARY KEY (`fp_id`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `forum_posts`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `forum_topics`
+--
+
+CREATE TABLE IF NOT EXISTS `forum_topics` (
+ `ft_id` int(11) NOT NULL auto_increment,
+ `ft_forum_id` int(11) NOT NULL default '0',
+ `ft_name` varchar(150) NOT NULL default '',
+ `ft_desc` varchar(255) NOT NULL default '',
+ `ft_posts` int(11) NOT NULL default '0',
+ `ft_owner_id` int(11) NOT NULL default '0',
+ `ft_owner_name` text NOT NULL,
+ `ft_start_time` int(11) NOT NULL default '0',
+ `ft_last_id` int(11) NOT NULL default '0',
+ `ft_last_name` text NOT NULL,
+ `ft_last_time` int(11) NOT NULL default '0',
+ `ft_pinned` tinyint(4) NOT NULL default '0',
+ `ft_locked` tinyint(4) NOT NULL default '0',
+ PRIMARY KEY (`ft_id`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `forum_topics`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `friendslist`
+--
+
+CREATE TABLE `friendslist` (
+ `fl_ID` int(11) NOT NULL auto_increment,
+ `fl_ADDER` int(11) NOT NULL default '0',
+ `fl_ADDED` int(11) NOT NULL default '0',
+ `fl_COMMENT` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`fl_ID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `friendslist`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `gangevents`
+--
+
+CREATE TABLE `gangevents` (
+ `gevID` int(11) NOT NULL auto_increment,
+ `gevGANG` int(11) NOT NULL default '0',
+ `gevTIME` int(11) NOT NULL default '0',
+ `gevTEXT` text NOT NULL,
+ PRIMARY KEY (`gevID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `gangevents`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `gangs`
+--
+
+CREATE TABLE `gangs` (
+ `gangID` int(11) NOT NULL auto_increment,
+ `gangNAME` varchar(255) NOT NULL default '',
+ `gangDESC` text NOT NULL,
+ `gangPREF` varchar(12) NOT NULL default '',
+ `gangSUFF` varchar(12) NOT NULL default '',
+ `gangMONEY` int(11) NOT NULL default '0',
+ `gangCRYSTALS` int(11) NOT NULL default '0',
+ `gangRESPECT` int(11) NOT NULL default '0',
+ `gangPRESIDENT` int(11) NOT NULL default '0',
+ `gangVICEPRES` int(11) NOT NULL default '0',
+ `gangCAPACITY` int(11) NOT NULL default '0',
+ `gangCRIME` int(11) NOT NULL default '0',
+ `gangCHOURS` int(11) NOT NULL default '0',
+ `gangAMENT` longtext NOT NULL,
+ PRIMARY KEY (`gangID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `gangs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `gangwars`
+--
+
+CREATE TABLE `gangwars` (
+ `warID` int(11) NOT NULL auto_increment,
+ `warDECLARER` int(11) NOT NULL default '0',
+ `warDECLARED` int(11) NOT NULL default '0',
+ `warTIME` int(11) NOT NULL default '0',
+ PRIMARY KEY (`warID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `gangwars`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `houses`
+--
+
+CREATE TABLE `houses` (
+ `hID` int(11) NOT NULL auto_increment,
+ `hNAME` varchar(255) NOT NULL default '',
+ `hPRICE` int(11) NOT NULL default '0',
+ `hWILL` int(11) NOT NULL default '0',
+ PRIMARY KEY (`hID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `houses`
+--
+
+INSERT INTO `houses` (`hID`, `hNAME`, `hPRICE`, `hWILL`) VALUES
+(1, 'Default House', 0, 100);
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `imarketaddlogs`
+--
+
+CREATE TABLE `imarketaddlogs` (
+ `imaID` int(11) NOT NULL auto_increment,
+ `imaITEM` int(11) NOT NULL default '0',
+ `imaPRICE` int(11) NOT NULL default '0',
+ `imaINVID` int(11) NOT NULL default '0',
+ `imaADDER` int(11) NOT NULL default '0',
+ `imaTIME` int(11) NOT NULL default '0',
+ `imaCONTENT` text NOT NULL,
+ PRIMARY KEY (`imaID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `imarketaddlogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `imbuylogs`
+--
+
+CREATE TABLE `imbuylogs` (
+ `imbID` int(11) NOT NULL auto_increment,
+ `imbITEM` int(11) NOT NULL default '0',
+ `imbADDER` int(11) NOT NULL default '0',
+ `imbBUYER` int(11) NOT NULL default '0',
+ `imbPRICE` int(11) NOT NULL default '0',
+ `imbIMID` int(11) NOT NULL default '0',
+ `imbINVID` int(11) NOT NULL default '0',
+ `imbTIME` int(11) NOT NULL default '0',
+ `imbCONTENT` text NOT NULL,
+ PRIMARY KEY (`imbID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `imbuylogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `imremovelogs`
+--
+
+CREATE TABLE `imremovelogs` (
+ `imrID` int(11) NOT NULL auto_increment,
+ `imrITEM` int(11) NOT NULL default '0',
+ `imrADDER` int(11) NOT NULL default '0',
+ `imrREMOVER` int(11) NOT NULL default '0',
+ `imrIMID` int(11) NOT NULL default '0',
+ `imrINVID` int(11) NOT NULL default '0',
+ `imrTIME` int(11) NOT NULL default '0',
+ `imrCONTENT` text NOT NULL,
+ PRIMARY KEY (`imrID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `imremovelogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `inventory`
+--
+
+CREATE TABLE `inventory` (
+ `inv_id` int(11) NOT NULL auto_increment,
+ `inv_itemid` int(11) NOT NULL default '0',
+ `inv_userid` int(11) NOT NULL default '0',
+ `inv_qty` int(11) NOT NULL default '0',
+ PRIMARY KEY (`inv_id`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `inventory`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `itembuylogs`
+--
+
+CREATE TABLE `itembuylogs` (
+ `ibID` int(11) NOT NULL auto_increment,
+ `ibUSER` int(11) NOT NULL default '0',
+ `ibITEM` int(11) NOT NULL default '0',
+ `ibTOTALPRICE` int(11) NOT NULL default '0',
+ `ibQTY` int(11) NOT NULL default '0',
+ `ibTIME` int(11) NOT NULL default '0',
+ `ibCONTENT` text NOT NULL,
+ PRIMARY KEY (`ibID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `itembuylogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `itemmarket`
+--
+
+CREATE TABLE `itemmarket` (
+ `imID` int(11) NOT NULL auto_increment,
+ `imITEM` int(11) NOT NULL default '0',
+ `imADDER` int(11) NOT NULL default '0',
+ `imPRICE` int(11) NOT NULL default '0',
+ `imCURRENCY` enum('money','crystals') NOT NULL default 'money',
+ `imQTY` int(11) NOT NULL default '0',
+ PRIMARY KEY (`imID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `itemmarket`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `items`
+--
+
+CREATE TABLE `items` (
+ `itmid` int(11) NOT NULL auto_increment,
+ `itmtype` int(11) NOT NULL default '0',
+ `itmname` varchar(255) NOT NULL default '',
+ `itmdesc` text NOT NULL,
+ `itmbuyprice` int(11) NOT NULL default '0',
+ `itmsellprice` int(11) NOT NULL default '0',
+ `itmbuyable` int(11) NOT NULL default '0',
+ `effect1_on` tinyint(4) NOT NULL default '0',
+ `effect1` text NOT NULL,
+ `effect2_on` tinyint(4) NOT NULL default '0',
+ `effect2` text NOT NULL,
+ `effect3_on` tinyint(4) NOT NULL default '0',
+ `effect3` text NOT NULL,
+ `weapon` int(11) NOT NULL default '0',
+ `armor` int(11) NOT NULL default '0',
+ PRIMARY KEY (`itmid`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `items`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `itemselllogs`
+--
+
+CREATE TABLE `itemselllogs` (
+ `isID` int(11) NOT NULL auto_increment,
+ `isUSER` int(11) NOT NULL default '0',
+ `isITEM` int(11) NOT NULL default '0',
+ `isTOTALPRICE` int(11) NOT NULL default '0',
+ `isQTY` int(11) NOT NULL default '0',
+ `isTIME` int(11) NOT NULL default '0',
+ `isCONTENT` text NOT NULL,
+ PRIMARY KEY (`isID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `itemselllogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `itemtypes`
+--
+
+CREATE TABLE `itemtypes` (
+ `itmtypeid` int(11) NOT NULL auto_increment,
+ `itmtypename` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`itmtypeid`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `itemtypes`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `itemxferlogs`
+--
+
+CREATE TABLE `itemxferlogs` (
+ `ixID` int(11) NOT NULL auto_increment,
+ `ixFROM` int(11) NOT NULL default '0',
+ `ixTO` int(11) NOT NULL default '0',
+ `ixITEM` int(11) NOT NULL default '0',
+ `ixQTY` int(11) NOT NULL default '0',
+ `ixTIME` int(11) NOT NULL default '0',
+ `ixFROMIP` varchar(255) NOT NULL default '',
+ `ixTOIP` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`ixID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `itemxferlogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `jaillogs`
+--
+
+CREATE TABLE `jaillogs` (
+ `jaID` int(11) NOT NULL auto_increment,
+ `jaJAILER` int(11) NOT NULL default '0',
+ `jaJAILED` int(11) NOT NULL default '0',
+ `jaDAYS` int(11) NOT NULL default '0',
+ `jaREASON` longtext NOT NULL,
+ `jaTIME` int(11) NOT NULL default '0',
+ PRIMARY KEY (`jaID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `jaillogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `jobranks`
+--
+
+CREATE TABLE `jobranks` (
+ `jrID` int(11) NOT NULL auto_increment,
+ `jrNAME` varchar(255) NOT NULL default '',
+ `jrJOB` int(11) NOT NULL default '0',
+ `jrPAY` int(11) NOT NULL default '0',
+ `jrIQG` int(11) NOT NULL default '0',
+ `jrLABOURG` int(11) NOT NULL default '0',
+ `jrSTRG` int(11) NOT NULL default '0',
+ `jrIQN` int(11) NOT NULL default '0',
+ `jrLABOURN` int(11) NOT NULL default '0',
+ `jrSTRN` int(11) NOT NULL default '0',
+ PRIMARY KEY (`jrID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `jobranks`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `jobs`
+--
+
+CREATE TABLE `jobs` (
+ `jID` int(11) NOT NULL auto_increment,
+ `jNAME` varchar(255) NOT NULL default '',
+ `jFIRST` int(11) NOT NULL default '0',
+ `jDESC` varchar(255) NOT NULL default '',
+ `jOWNER` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`jID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `jobs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `mail`
+--
+
+CREATE TABLE `mail` (
+ `mail_id` int(11) NOT NULL auto_increment,
+ `mail_read` int(11) NOT NULL default '0',
+ `mail_from` int(11) NOT NULL default '0',
+ `mail_to` int(11) NOT NULL default '0',
+ `mail_time` int(11) NOT NULL default '0',
+ `mail_subject` varchar(255) NOT NULL default '',
+ `mail_text` text NOT NULL,
+ PRIMARY KEY (`mail_id`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `mail`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `oclogs`
+--
+
+CREATE TABLE `oclogs` (
+ `oclID` int(11) NOT NULL auto_increment,
+ `oclOC` int(11) NOT NULL default '0',
+ `oclGANG` int(11) NOT NULL default '0',
+ `oclLOG` text NOT NULL,
+ `oclRESULT` enum('success','failure') NOT NULL default 'success',
+ `oclMONEY` int(11) NOT NULL default '0',
+ `ocCRIMEN` varchar(255) NOT NULL default '',
+ `ocTIME` int(11) NOT NULL default '0',
+ PRIMARY KEY (`oclID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `oclogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `orgcrimes`
+--
+
+CREATE TABLE `orgcrimes` (
+ `ocID` int(11) NOT NULL auto_increment,
+ `ocNAME` varchar(255) NOT NULL default '',
+ `ocUSERS` int(11) NOT NULL default '0',
+ `ocSTARTTEXT` text NOT NULL,
+ `ocSUCCTEXT` text NOT NULL,
+ `ocFAILTEXT` text NOT NULL,
+ `ocMINMONEY` int(11) NOT NULL default '0',
+ `ocMAXMONEY` int(11) NOT NULL default '0',
+ PRIMARY KEY (`ocID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `orgcrimes`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `papercontent`
+--
+
+CREATE TABLE `papercontent` (
+ `content` longtext NOT NULL
+) ENGINE=MyISAM ;
+
+INSERT INTO `papercontent` VALUES('Here you can put game news, or prehaps an update log.');
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `polls`
+--
+
+CREATE TABLE `polls` (
+ `id` int(11) NOT NULL auto_increment,
+ `active` enum('0','1') NOT NULL default '0',
+ `question` varchar(255) NOT NULL default '',
+ `choice1` varchar(255) NOT NULL default '',
+ `choice2` varchar(255) NOT NULL default '',
+ `choice3` varchar(255) NOT NULL default '',
+ `choice4` varchar(255) NOT NULL default '',
+ `choice5` varchar(255) NOT NULL default '',
+ `choice6` varchar(255) NOT NULL default '',
+ `choice7` varchar(255) NOT NULL default '',
+ `choice8` varchar(255) NOT NULL default '',
+ `choice9` varchar(255) NOT NULL default '',
+ `choice10` varchar(255) NOT NULL default '',
+ `voted1` int(11) NOT NULL default '0',
+ `voted2` int(11) NOT NULL default '0',
+ `voted3` int(11) NOT NULL default '0',
+ `voted4` int(11) NOT NULL default '0',
+ `voted5` int(11) NOT NULL default '0',
+ `voted6` int(11) NOT NULL default '0',
+ `voted7` int(11) NOT NULL default '0',
+ `voted8` int(11) NOT NULL default '0',
+ `voted9` int(11) NOT NULL default '0',
+ `voted10` int(11) NOT NULL default '0',
+ `votes` int(11) NOT NULL default '0',
+ `winner` int(11) NOT NULL default '0',
+ `hidden` tinyint(4) NOT NULL default '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `polls`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `preports`
+--
+
+CREATE TABLE `preports` (
+ `prID` int(11) NOT NULL auto_increment,
+ `prREPORTER` int(11) NOT NULL default '0',
+ `prREPORTED` int(11) NOT NULL default '0',
+ `prTEXT` longtext NOT NULL,
+ PRIMARY KEY (`prID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `preports`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `referals`
+--
+
+CREATE TABLE `referals` (
+ `refID` int(11) NOT NULL auto_increment,
+ `refREFER` int(11) NOT NULL default '0',
+ `refREFED` int(11) NOT NULL default '0',
+ `refTIME` int(11) NOT NULL default '0',
+ `refREFERIP` varchar(15) NOT NULL default '127.0.0.1',
+ `refREFEDIP` varchar(15) NOT NULL default '127.0.0.1',
+ PRIMARY KEY (`refID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `referals`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `settings`
+--
+
+CREATE TABLE `settings` (
+ `conf_id` int(11) NOT NULL auto_increment,
+ `conf_name` varchar(255) NOT NULL default '',
+ `conf_value` text NOT NULL,
+ `data_type` varchar(16) NOT NULL default 'string',
+ PRIMARY KEY (`conf_id`)
+) ENGINE=MyISAM ;
+
+INSERT INTO `settings` VALUES (NULL, 'validate_period', '15', 'string');
+INSERT INTO `settings` VALUES (NULL, 'validate_on', '0', 'bool');
+INSERT INTO `settings` VALUES (NULL, 'regcap_on', '0', 'bool');
+INSERT INTO `settings` VALUES (NULL, 'hospital_count', '0', 'int');
+INSERT INTO `settings` VALUES (NULL, 'jail_count', '0', 'int');
+INSERT INTO `settings` VALUES (NULL, 'sendcrys_on', '1', 'bool');
+INSERT INTO `settings` VALUES (NULL, 'sendbank_on', '1', 'bool');
+INSERT INTO `settings` VALUES (NULL, 'ct_refillprice', '12', 'int');
+INSERT INTO `settings` VALUES (NULL, 'ct_iqpercrys', '5', 'int');
+INSERT INTO `settings` VALUES (NULL, 'ct_moneypercrys', '200', 'int');
+INSERT INTO `settings` VALUES (NULL, 'staff_pad', 'Here you can store notes for all staff to see.', 'string');
+INSERT INTO `settings` VALUES (NULL, 'willp_item', '0', 'int');
+INSERT INTO `settings` VALUES (NULL, 'jquery_location', 'js/jquery-1.7.1.min.js', 'string');
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `shopitems`
+--
+
+CREATE TABLE `shopitems` (
+ `sitemID` int(11) NOT NULL auto_increment,
+ `sitemSHOP` int(11) NOT NULL default '0',
+ `sitemITEMID` int(11) NOT NULL default '0',
+ PRIMARY KEY (`sitemID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `shopitems`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `shops`
+--
+
+CREATE TABLE `shops` (
+ `shopID` int(11) NOT NULL auto_increment,
+ `shopLOCATION` int(11) NOT NULL default '0',
+ `shopNAME` varchar(255) NOT NULL default '',
+ `shopDESCRIPTION` text NOT NULL,
+ PRIMARY KEY (`shopID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `shops`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `stafflog`
+--
+
+CREATE TABLE `stafflog` (
+ `id` int(11) NOT NULL auto_increment,
+ `user` int(11) NOT NULL default '0',
+ `time` int(11) NOT NULL default '0',
+ `action` varchar(255) NOT NULL default '',
+ `ip` varchar(15) NOT NULL default '',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `stafflog`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `staffnotelogs`
+--
+
+CREATE TABLE `staffnotelogs` (
+ `snID` int(11) NOT NULL auto_increment,
+ `snCHANGER` int(11) NOT NULL default '0',
+ `snCHANGED` int(11) NOT NULL default '0',
+ `snTIME` int(11) NOT NULL default '0',
+ `snOLD` longtext NOT NULL,
+ `snNEW` longtext NOT NULL,
+ PRIMARY KEY (`snID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `staffnotelogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `surrenders`
+--
+
+CREATE TABLE `surrenders` (
+ `surID` int(11) NOT NULL auto_increment,
+ `surWAR` int(11) NOT NULL default '0',
+ `surWHO` int(11) NOT NULL default '0',
+ `surTO` int(11) NOT NULL default '0',
+ `surMSG` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`surID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `surrenders`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `unjaillogs`
+--
+
+CREATE TABLE `unjaillogs` (
+ `ujaID` int(11) NOT NULL auto_increment,
+ `ujaJAILER` int(11) NOT NULL default '0',
+ `ujaJAILED` int(11) NOT NULL default '0',
+ `ujaTIME` int(11) NOT NULL default '0',
+ PRIMARY KEY (`ujaID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `unjaillogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `users`
+--
+
+CREATE TABLE IF NOT EXISTS `users` (
+ `userid` int(11) NOT NULL auto_increment,
+ `username` varchar(255) NOT NULL default '',
+ `userpass` varchar(255) NOT NULL default '',
+ `level` int(11) NOT NULL default '0',
+ `exp` decimal(11,4) NOT NULL default '0.0000',
+ `money` int(11) NOT NULL default '0',
+ `crystals` int(11) NOT NULL default '0',
+ `laston` int(11) NOT NULL default '0',
+ `lastip` varchar(255) NOT NULL default '',
+ `job` int(11) NOT NULL default '0',
+ `energy` int(11) NOT NULL default '0',
+ `will` int(11) NOT NULL default '0',
+ `maxwill` int(11) NOT NULL default '0',
+ `brave` int(11) NOT NULL default '0',
+ `maxbrave` int(11) NOT NULL default '0',
+ `maxenergy` int(11) NOT NULL default '0',
+ `hp` int(11) NOT NULL default '0',
+ `maxhp` int(11) NOT NULL default '0',
+ `lastrest_life` int(11) NOT NULL default '0',
+ `lastrest_other` int(11) NOT NULL default '0',
+ `location` int(11) NOT NULL default '0',
+ `hospital` int(11) NOT NULL default '0',
+ `jail` int(11) NOT NULL default '0',
+ `jail_reason` varchar(255) NOT NULL default '',
+ `fedjail` int(11) NOT NULL default '0',
+ `user_level` int(11) NOT NULL default '1',
+ `gender` enum('Male','Female') NOT NULL default 'Male',
+ `daysold` int(11) NOT NULL default '0',
+ `signedup` int(11) NOT NULL default '0',
+ `gang` int(11) NOT NULL default '0',
+ `daysingang` int(11) NOT NULL default '0',
+ `course` int(11) NOT NULL default '0',
+ `cdays` int(11) NOT NULL default '0',
+ `jobrank` int(11) NOT NULL default '0',
+ `donatordays` int(11) NOT NULL default '0',
+ `email` varchar(255) NOT NULL default '',
+ `login_name` varchar(255) NOT NULL default '',
+ `display_pic` text NOT NULL,
+ `duties` varchar(255) NOT NULL default 'N/A',
+ `bankmoney` int(11) NOT NULL default '0',
+ `cybermoney` int(11) NOT NULL default '-1',
+ `staffnotes` longtext NOT NULL,
+ `mailban` int(11) NOT NULL default '0',
+ `mb_reason` varchar(255) NOT NULL default '',
+ `hospreason` varchar(255) NOT NULL default '',
+ `lastip_login` varchar(255) NOT NULL default '127.0.0.1',
+ `lastip_signup` varchar(255) NOT NULL default '127.0.0.1',
+ `last_login` int(11) NOT NULL default '0',
+ `voted` text NOT NULL,
+ `crimexp` int(11) NOT NULL default '0',
+ `attacking` int(11) NOT NULL default '0',
+ `verified` int(11) NOT NULL default '0',
+ `forumban` int(11) NOT NULL default '0',
+ `fb_reason` varchar(255) NOT NULL default '',
+ `posts` int(11) NOT NULL default '0',
+ `forums_avatar` varchar(255) NOT NULL default '',
+ `forums_signature` varchar(250) NOT NULL default '',
+ `new_events` int(11) NOT NULL default '0',
+ `new_mail` int(11) NOT NULL default '0',
+ `friend_count` int(11) NOT NULL default '0',
+ `enemy_count` int(11) NOT NULL default '0',
+ `new_announcements` int(11) NOT NULL default '0',
+ `boxes_opened` int(11) NOT NULL default '0',
+ `user_notepad` text NOT NULL,
+ `equip_primary` int(11) NOT NULL default '0',
+ `equip_secondary` int(11) NOT NULL default '0',
+ `equip_armor` int(11) NOT NULL default '0',
+ `force_logout` tinyint(4) NOT NULL default '0',
+ `pass_salt` varchar(8) NOT NULL default '',
+ PRIMARY KEY (`userid`)
+) ENGINE=MyISAM ;
+--
+-- Dumping data for table `users`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `userstats`
+--
+
+CREATE TABLE `userstats` (
+ `userid` int(11) NOT NULL default '0',
+ `strength` float NOT NULL default '0',
+ `agility` float NOT NULL default '0',
+ `guard` float NOT NULL default '0',
+ `labour` float NOT NULL default '0',
+ `IQ` float NOT NULL default '0',
+ PRIMARY KEY (`userid`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `userstats`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `votes`
+--
+
+CREATE TABLE `votes` (
+ `userid` int(11) NOT NULL default '0',
+ `list` varchar(255) NOT NULL default ''
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `votes`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `willps_accepted`
+--
+
+CREATE TABLE `willps_accepted` (
+ `dpID` int(11) NOT NULL auto_increment,
+ `dpBUYER` int(11) NOT NULL default '0',
+ `dpFOR` int(11) NOT NULL default '0',
+ `dpAMNT` varchar(255) NOT NULL default '',
+ `dpTIME` int(11) NOT NULL default '0',
+ `dpTXN` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`dpID`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `willps_accepted`
+--
diff --git a/docker-compose.yml b/docker-compose.yml
index d74c461..d33f976 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,21 +1,47 @@
services:
web:
- image: php:8.3-apache
+ build:
+ context: .
ports:
- - "4567:80"
- - "4568:443"
+ - 9000:80
+ - 9001:443
depends_on:
- - db
- volumes:
- - .:/var/www/html/.
- restart: "no"
+ db:
+ condition: service_healthy
+ restart: unless-stopped
+ environment:
+ DB_HOST: db
+ DB_NAME: mccodes
+ DB_USER: root
+ DB_PASS_FILE: /run/secrets/db_password
+ APP_KEY_FILE: /run/secrets/app_key
+ secrets:
+ - db_password
+ - app_key
+ develop:
+ watch:
+ - action: sync
+ path: .
+ target: /var/www/html
db:
- image: mysql
+ image: mysql:8.4.0
ports:
- "3306:3306"
+ restart: unless-stopped
+ volumes:
+ - db_data:/var/lib/mysql
+ - ./db/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql
+ - ./db/initial_data.sql:/docker-entrypoint-initdb.d/02-initial_data.sql
+ healthcheck:
+ test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent"]
+ interval: 10s
+ timeout: 15s
+ retries: 5
environment:
- MYSQL_ROOT_PASSWORD: rootpass1
- MYSQL_DATABASE: mccv2
+ MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_password
+ MYSQL_DATABASE: mccodes
+ secrets:
+ - db_password
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
@@ -26,6 +52,13 @@ services:
- web
environment:
PMA_HOST: db
+secrets:
+ db_password:
+ file: docker/secrets/db_password.txt
+ app_key:
+ file: docker/secrets/app_key.txt
+volumes:
+ db_data:
# Note:
# If you encounter either mysqli not being found or captcha images not loading, chances are that the docker image was updated and those modules are no longer part of it
@@ -38,6 +71,3 @@ services:
# After installation, the extensions should automatically be enabled (where applicable). If not, you can enable them manually.
# docker-php-ext-enable mysqli gd
-
-# Note (cont.)
-# Be sure to restart the Apache container to apply your changes!
diff --git a/docker/SECRETS_FILES b/docker/SECRETS_FILES
new file mode 100644
index 0000000..3eb3a5c
--- /dev/null
+++ b/docker/SECRETS_FILES
@@ -0,0 +1,4 @@
+Before running docker compose up, the files with the application secrets must be created on a child secrets/ folder:
+
+- app_key.txt = Holds the value for the condig 'code' usually generated by the installer.php
+- db_password.txt = Holds the password for the database root user
\ No newline at end of file
diff --git a/docker/cron_jobs b/docker/cron_jobs
new file mode 100644
index 0000000..357617b
--- /dev/null
+++ b/docker/cron_jobs
@@ -0,0 +1,5 @@
+# must be ended with a new line "LF" (Unix) and not "CRLF" (Windows)
+*/5 * * * * /usr/local/bin/run_cron_job.sh cron_fivemins.php
+* * * * * /usr/local/bin/run_cron_job.sh cron_minute.php
+0 * * * * /usr/local/bin/run_cron_job.sh cron_hour.php
+0 0 * * * /usr/local/bin/run_cron_job.sh cron_day.php
diff --git a/docker/run_cron_job.sh b/docker/run_cron_job.sh
new file mode 100644
index 0000000..a1eb907
--- /dev/null
+++ b/docker/run_cron_job.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Source the environment variables
+. /etc/environment
+
+APP_KEY=$(cat /run/secrets/app_key)
+
+# Get the PHP script to run from the first argument
+SCRIPT_TO_RUN=$1
+
+LOG_FILE="/var/log/$(basename "$SCRIPT_TO_RUN" .php).log"
+
+/usr/local/bin/php /var/www/html/$SCRIPT_TO_RUN $APP_KEY >> $LOG_FILE 2>&1; echo "" >> $LOG_FILE
\ No newline at end of file
diff --git a/docker/ssl/000-default.conf b/docker/ssl/000-default.conf
new file mode 100644
index 0000000..ed12540
--- /dev/null
+++ b/docker/ssl/000-default.conf
@@ -0,0 +1,23 @@
+
+
+ ServerAdmin admin@localhost
+ DocumentRoot /var/www/html
+
+ ErrorLog ${APACHE_LOG_DIR}/error.log
+ CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+
+
+
+
+ SSLEngine on
+ SSLCertificateFile /etc/apache2/ssl/cert.pem
+ SSLCertificateKeyFile /etc/apache2/ssl/cert-key.pem
+
+ ServerAdmin admin@localhost
+ DocumentRoot /var/www/html
+
+ ErrorLog ${APACHE_LOG_DIR}/error.log
+ CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+
\ No newline at end of file
diff --git a/docker/ssl/configure_ssl.sh b/docker/ssl/configure_ssl.sh
new file mode 100644
index 0000000..1290bad
--- /dev/null
+++ b/docker/ssl/configure_ssl.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+echo "SSL_ENABLED = $SSL_ENABLED"
+
+if [ $SSL_ENABLED = true ]; then
+ # Enable Apache SSL and rewrite modules
+ a2enmod ssl
+ a2enmod rewrite
+
+ mkdir -p /etc/apache2/ssl
+
+ # Copy SSL certificates
+ cp /docker/ssl/*.pem /etc/apache2/ssl/
+
+ # Copy Apache configuration to host the 443 port
+ cp /docker/ssl/000-default.conf /etc/apache2/sites-available/000-default.conf
+fi
\ No newline at end of file
diff --git a/docker/start_cron.sh b/docker/start_cron.sh
new file mode 100644
index 0000000..a2d66b5
--- /dev/null
+++ b/docker/start_cron.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+touch /var/log/cron_minute.log /var/log/cron_fivemins.log /var/log/cron_hour.log /var/log/cron_day.log
+
+# Copy the env variables needed for the cron jobs
+printenv | grep "DB_HOST\|DB_NAME\|DB_USER\|DB_PASS\|DB_PASS_FILE\|APP_KEY\|APP_KEY_FILE" >> /etc/environment
+
+cron
+
+apache2-foreground
diff --git a/installer.php b/installer.php
index 7da87bb..693ba2b 100644
--- a/installer.php
+++ b/installer.php
@@ -429,7 +429,7 @@ function install(): void
fclose($f);
echo '... file written.
';
echo 'Writing base database schema...
';
- $fo = fopen('dbdata.sql', 'r');
+ $fo = fopen('db/schema.sql', 'r');
$query = '';
$lines = explode("\n", fread($fo, 1024768));
fclose($fo);