diff --git a/docs/LICENSE b/LICENSE
similarity index 100%
rename from docs/LICENSE
rename to LICENSE
diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..b5f7b216
--- /dev/null
+++ b/docs/CODE_OF_CONDUCT.md
@@ -0,0 +1,10 @@
+Code of conduct
+===============
+
+Pretty simple.. Don't be a jerk.
+
+Treat others as you would want to be treated, Love your neighbor as yourself.
+
+It's not hard.
+
+Thanks.
diff --git a/docs/CODING_STANDARDS b/docs/CODING_STANDARDS
index adb8300c..9f17945b 100644
--- a/docs/CODING_STANDARDS
+++ b/docs/CODING_STANDARDS
@@ -4,7 +4,7 @@ DEVELOPERS
CODING STANDARDS
Synopsis:
* Comments are to begin with two forward slashes: //
- * Use an indent of 4 spaces, with NO TABS!
+ * Use an indent of 2 or 4 spaces, with NO TABS!
* Functions must have a descriptive header with the name, description,
input requirements, output, and example usage.
* At least one command line argument is REQUIRED before a script does
@@ -35,89 +35,3 @@ USE OF THE $_SESSION VARIABLE
* All authentication and user data is stored under $_SESSION['ona']['auth']
When a user logs out, only $_SESSION['ona']['auth'] is deleted.
*
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-----------
-
-
-Upgrading FCKeditor
-
---------------------------------------------------
-CLEAN FILES
---------------------------------------------------
-cd ~/FCKeditor/
-rm -rf _* editor/_source/ fckeditor.afp fckeditor.asp fckeditor.cfc fckeditor.cfm fckeditor.lasso fckeditor.pl fckeditor.py
-
-
---------------------------------------------------
-Customize Config ~/FCKeditor/fckconfig.js
---------------------------------------------------
-
-FCKConfig.ToolbarSets["wincFCKeditor"] = [
- ['Source','-','Save'],
- ['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck'],
- ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
- '/',
- ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
- ['OrderedList','UnorderedList','-','Outdent','Indent'],
- ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
- ['TextColor','BGColor'],
- ['Link','Unlink','Anchor'],
- ['Image','Table','Rule','Smiley','SpecialChar'],
- '/',
- ['Style','FontFormat','FontName','FontSize']
-] ;
-
-
---------------------------------------------------
-Enable File Uploads
---------------------------------------------------
-## Edit ~/FCKeditor/fckconfig.js
-var _FileBrowserLanguage = 'php' ;
-var _QuickUploadLanguage = 'php' ;
-
-## Edit ~/FCKeditor/editor/filemanager/browser/default/connectors/php/config.php
-## Edit ~/FCKeditor/editor/filemanager/upload/default/connectors/php/config.php
-## (same changes in both)
-
-$Config['Enabled'] = true ;
-$base = dirname(__FILE__);
-while ($base and (!is_dir($base.'/include'))) $base = preg_replace('+/[^/]*$+', '', $base);
-$baseURL = str_replace($_SERVER['DOCUMENT_ROOT'], '', $base); $baseURL = rtrim($baseURL, '/');
-$Config['UserFilesPath'] = "{$baseURL}/uploads/" ;
-$Config['UserFilesAbsolutePath'] = "{$base}/uploads/" ;
-
-## Create some folders
-cd document-root
-mkdir -p uploads/file/ uploads/flash/ uploads/image/ uploads/media/
-chmod -R 777 uploads/
-
-
------------------------------------------------------------------------------------------------------------
-Upgrading ADODB
-rm adodb (symlink)
-unzip adodb493.zip
-mv adodb adodb-v493
-ln -s adodb-v493 adodb
-cd adodb
-rm -rf docs/ tests/ cute_icons_for_site/ contrib/ pear/ session/
-
-
------------------------------------------------------------------------------------------------------------
-Upgrading xajax
-To cleanup:
-rm -rf tests/ examples/
-
-
diff --git a/docs/CONTRIBUTING b/docs/CONTRIBUTING
new file mode 100644
index 00000000..df94ddc0
--- /dev/null
+++ b/docs/CONTRIBUTING
@@ -0,0 +1,21 @@
+Contributing
+------------
+
+Thank you for taking the time to look at this. Any help we can get from the
+community is much appreciated and helps the project move forward.
+
+OpenNetAdmin uses the Gitflow workflow. More info here: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
+
+I'm not going to go into a huge description of the process here. The easiest way for others
+to contribute is to use a forking workflow.
+
+Some good info on those workflows are here:
+ * https://help.github.com/articles/fork-a-repo/
+ * https://help.github.com/articles/working-with-forks/
+ * https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow
+
+Then once you have new code checked into your repo fork, submit a pull request for consideration.
+
+More info here: https://help.github.com/articles/creating-a-pull-request-from-a-fork/
+
+Thanks again for your participation.
diff --git a/docs/DEVELOPERS b/docs/DEVELOPERS
deleted file mode 100644
index 29b8acda..00000000
--- a/docs/DEVELOPERS
+++ /dev/null
@@ -1,5 +0,0 @@
-LIST OF DEVELOPERS:
--------------------
-Matt Pascoe
-Brandon Zehm
-Paul Kreiner
diff --git a/docs/INSTALL b/docs/INSTALL
index 3b9c39e5..51d7aaf6 100644
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -1,58 +1,60 @@
-Here are some basic notes on installation of the system.
+INSTALL
+-------
+
+You can access the online documentation for upgrades at https://github.com/opennetadmin/ona/wiki/Install
+
+Requirements
+------------
+
+ONA has a simple set of requirements to run. I will describe them each briefly here.
+
+ * You will need a web server to service the page. Apache was the web server used to do the development and testing.
+ * You will need a database to store the data. MySQL was the database used to develop and test with. We use the ADODB PHP database abstraction layer so using Postgres or Oracle should not be an issue although we have not tested with those backends.
+ * You will need a PHP interpreter. ONA was written in the PHP language. Currently PHP version 5 or newer is required.
+ * In addition to PHP, you will need at least one PHP database module that may or may not be part of your distributions main install. You can check that they exist by issuing the command `php -m |grep mysql` You will see a list of the installed modules and something like "mysql" should be in the list.
+ * You also need to install the `php-gmp` and `php-mbstring` modules as well.
+ * While we are using the database abstraction system ADODB, the database creation scripts are all based off of MySQL . So for the time being, MySQL is the only truly supported database.
+
+Requisite Steps
+---------------
+ * cd /opt (or other directory you wish, all documentation assumes /opt)
+ * git clone https://github.com/opennetadmin/ona.git
+ * You can still use a tar if desired from https://github.com/opennetadmin/ona/releases/latest
+ * Add a symlink in your web server root that points `ona -> /opt/ona/www`. An example would be: `ln -s /opt/ona/www /var/www/ona` assuming your apache root is `/var/www`. An alternative to a symlink could be to add something like the following to your apache configuration:
+
+> Alias /ona "/opt/ona/www/"
+>
+> Options Indexes MultiViews FollowSymLinks
+> AllowOverride All
+> Require all granted
+>
+
+ * `touch /var/log/ona.log` This is the default location for the ONA system log.
+ * `chown www-data /opt/ona/www/local/config /var/log/ona.log` (or whatever your web server user is)
+ * Opensuse uses `wwwrun`
+ * Note that on some systems like Centos, that use SElinux, you may need to adjust the security context for /opt/ona/www/local as [explained here](http://stackoverflow.com/questions/8138288/php-fopen-failed-to-open-stream-permission-denied). `chcon -R -t httpd_sys_script_rw_t /opt/ona/www/local` should do it.
+
+### Web install Method
+ * Point your broswer to http://localhost/ona (replace localhost with your server name if needed) and follow the install steps
+ * If needed you can manually run the installer by adding the following to the url. `http://localhost/ona/?runinstaller=y`
+ * You could also create the following file to invoke the installer: `touch /opt/ona/www/local/config/run_installer`
+ * Accept the GPL license.
+ * A new page with a set of questions will appear.
+ * In the first box, ensure that all of the prerequisite checks are indicating 'Yes'. If not, fix them and reload the page to refresh their status.
+ * Fill out the form (Help information is also in a box at the bottom of the form):
+ * Database host: This is the IP or DNS name of the server hosting your database. This is usually `localhost` but can certainly point to any other server.
+ * Database type: Since we use ADODB we can use many database backends, Currently however only MySQL is actually supported. Hope to fix this soon!
+ * Database admin: This is the username of a user that can create databases and tables on your database server. Many times this is `root`.
+ * Database admin password: The password for the admin user.
+ * Database name: Since ONA supports `contexts` a database name instance should be given. You should always use `default` for your primary install. Only adjust this value if you will be using contexts. This name will be prefixed with `ona_` when created so you will see databases in your system called `ona_default` for example. Also note that if you already have an instance with this name, the database will be dropped and re-created so please back it up and be cautious.
+ * Application database user name: This is a user that will be created on the database server to be used by the application for connections. This user will be granted permissions to update tables in our new database. The default user is `ona_sys`.
+ * Application database user password: The password for our new user.
+ * Default domain name: This is the default name that the system will use when adding new hosts. The domain will be created automatically for you in the system. It would typically be the name of the domain for your organization.
+ * Click create database. **NOTE:** Please remember this will drop any existing database that has the same name as provided in the database name field in order to re-create it.
+ * Click the `CLICK HERE TO START` link to begin.
+
+### CLI install method
+ * run `php /opt/ona/install/installcli.php`
+ * Answer the questions.
-The files in www/local will not be touched and are meant to house local
-configuration and modules/plugins. However a few files will be touched by
-the installer in www/local/config such as the database_settings.inc.php file
-REQUIREMENTS:
- An apache server
- A mysql server
- PHP
- php-mysql module
-
-INSTALL:
-
-1. Download the latest file from http://opennetadmin.com/docs/download
-2. tar -C /opt -zxvf ona-v00.00.00.tar.gz
- This should extract the tar file into /opt/ona
-
-3. Add a symlink in your web server root that points "ona -> /opt/ona/www"
- For example: ln -s /opt/ona/www /var/www/ona
-
- -or-
-
- Add this to your apache configuration file in the approrpiate location:
-
- Alias /ona "/opt/ona/www/"
-
- Options Indexes MultiViews FollowSymLinks
- AllowOverride None
- Order allow,deny
- allow from all
-
-
-4. touch /var/log/ona.log
-5. chmod 666 /var/log/ona.log
-6. chown www-data /opt/ona/www/local/config (or whatever your web server user is)
-7. Point your broswer to http:///ona
-8. You can log in as "admin" with a password of "admin"
-
-
-MISC:
-
-# These steps are not required but are things I might do in the future... They are not recomended at this point
-
-adduser ona
-addgroup ona
-# ona:x:1001:1001:OpenNetAdmin,,,:/opt/ona:/bin/false <-- should look something like this
-chown -R ona:ona /opt/ona
-
-export PATH=$PATH:/opt/ona/bin
-
-add a symlink of /tftpboot/ona -> /opt/ona/
-
-
-OTHER RECOMMENDATIONS:
- 1. Use something like eaccelerator.
- 2. Get the php-gmp modules, or compile php with gmp support. These are used for extended IP functions.
- They are not required as they are used for functions not fully implemented yet.
diff --git a/docs/UPGRADES b/docs/UPGRADES
index cab000ed..ad230543 100644
--- a/docs/UPGRADES
+++ b/docs/UPGRADES
@@ -1,14 +1,26 @@
-Upgrades prior to version 08.02.18 must be manually done by loading the file install/PRE-v08.02.18-to-08.02.18.sql into the database.
-This upgrade step has not been tested and likly has errors.
+UPGRADES
+========
-If you are currently on v08.02.18 and you are upgrading to version v08.04.15 then you must load the following sql file:
+You can access the online documentation for upgrades at https://github.com/opennetadmin/ona/wiki/Upgrades
-mysql -u -p ona < install/v08.02.18-to-v08.04.15.sql
+Upgrades should automatically be detected and performed. As usual MAKE A BACKUP FIRST!
+Its likely that I screwed something up and your data will be ground into a fine dust.
+Currently the autoupgrade of database elements only works when using a MySQL database.
-Updates after version v08.04.15 should automatically process.
+Quick steps for upgrade:
-Also, each time you install a new tar archive, you will most likly need to change
-permissions on the /opt/ona/www/local/config directory to whatever your webserver user is.
+ * edit /opt/ona/www/local/config/database_settings.inc.php
+ * edit the ```db_type``` setting and change it to 'mysqli' if it is not already.
+ * Git pull
+ * cd to /opt/ona or wherever you've installed it
+ * git pull
+ * (OR) Download new tar file
+ * Download the latest tar archive from https://github.com/opennetadmin/ona/archive/master.tar.gz
+ * `tar --strip-components=1 -C /opt/ona -zxvf ona-master.tar.gz` Or change -C /opt/ona to wherever your installed it to on your system
+ * `chown www-data /opt/ona/www/local/config` (or whatever your web server user is)
+ * Point your browser to http://localhost/ona/?runinstaller=y OR use cli installer `php /opt/ona/install/installcli.php`
+ * If you do not run the upgrade installer you may run into issues. You must execute the link above after installing the tar archive.
+ * After the license info you will be informed that an upgrade will occur. Select OK to the upgrade (after your backups n stuff)
+ * If there is any new database updates they should be applied and you should see a note about the upgrade_index being updated as well as version numbers.
+ * Once in, should see the latest version number displayed on the dashboard.
-This can be done with the following command, as an example:
-chown www-data /opt/ona/www/local/config
diff --git a/install/install.php b/install/install.php
index b986766a..7bf5649b 100644
--- a/install/install.php
+++ b/install/install.php
@@ -14,7 +14,7 @@
$runinstall = $onabase.'/www/local/config/run_install';
$xmlfile_tables = $base.'/ona-table_schema.xml';
$xmlfile_data = $base.'/ona-data.xml';
-$license_text = file_get_contents($base.'/../docs/LICENSE');
+$license_text = file_get_contents($base.'/../LICENSE');
$new_ver = trim(file_get_contents($onabase.'/VERSION'));
$curr_ver = '';
diff --git a/install/installcli.php b/install/installcli.php
index 34c0c6b1..292a74e1 100644
--- a/install/installcli.php
+++ b/install/installcli.php
@@ -92,7 +92,7 @@
echo "ONA is licensed under GPL v2.0.\n";
$showlicense = promptUser("Would you like to view license? [y/N] ", 'n');
if ($showlicense == 'y') {
- system("more -80 {$base}/../docs/LICENSE");
+ system("more -80 {$base}/../LICENSE");
promptUser("[Press Enter To Continue]");
}