rpicms

A CMS for the Raspberry Pi
git clone git://archive.git.mtrnord.blog/RpicmsTeam/rpicms.git
Log | Files | Refs | README | LICENSE

commit 0bbd24b5a541364ac097595ad00b0a02c1f3dd66
parent a362e27ff9e768135f386fef441a2fd769792d21
Author: MTRNord <mtrnord1@gmail.com>
Date:   Tue, 17 Mar 2015 18:07:24 +0100

there was an gitignore to much xD

Diffstat:
Dcore/config/.gitignore | 5-----
Acore/config/api.php | 28++++++++++++++++++++++++++++
2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/core/config/.gitignore b/core/config/.gitignore @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore -\ No newline at end of file diff --git a/core/config/api.php b/core/config/api.php @@ -0,0 +1,27 @@ +<?php +/** + * Database configuration + */ +############################### +# include files from root dir # +############################### +$root_1 = realpath($_SERVER["DOCUMENT_ROOT"]); +$currentdir = getcwd(); +$root_2 = str_replace($root_1, '', $currentdir); +$root_3 = explode("/", $root_2); +if ($root_3[1] == 'core') { + echo $root_3[1]; + $root = realpath($_SERVER["DOCUMENT_ROOT"]); +}else{ + $root = $root_1 . '/' . $root_3[1]; +} +require $root . "/core/config/connect.db.inc.php"; +define('DB_USERNAME', $db_username); +define('DB_PASSWORD', $db_password); +define('DB_HOST', $db_servername); +define('DB_NAME', $db_name); + +define('USER_CREATED_SUCCESSFULLY', 0); +define('USER_CREATE_FAILED', 1); +define('USER_ALREADY_EXISTED', 2); +?> +\ No newline at end of file