diff --git a/adminwww/application/config/autoload.php b/adminwww/application/config/autoload.php index 7cdc901..8db4b16 100644 --- a/adminwww/application/config/autoload.php +++ b/adminwww/application/config/autoload.php @@ -58,8 +58,8 @@ $autoload['packages'] = array(); | | $autoload['libraries'] = array('user_agent' => 'ua'); */ -$autoload['libraries'] = array(); - +//$autoload['libraries'] = array(); +$autoload['libraries'] = array('database','session','form_validation'); /* | ------------------------------------------------------------------- | Auto-load Drivers @@ -89,7 +89,7 @@ $autoload['drivers'] = array(); | | $autoload['helper'] = array('url', 'file'); */ -$autoload['helper'] = array(); +$autoload['helper'] = array('url','form'); /* | ------------------------------------------------------------------- diff --git a/adminwww/application/config/config.php b/adminwww/application/config/config.php index 0707759..aa92559 100644 --- a/adminwww/application/config/config.php +++ b/adminwww/application/config/config.php @@ -9,7 +9,6 @@ spl_autoload_register(function($classname) { } } }); - /* function __autoload($classname) { @@ -20,8 +19,8 @@ function __autoload($classname) { } } } -*/ -///home/sameye/mermsemr/adminwww/application/config + */ +///home/sameye/mermsemr/providerwww/application/config /* |-------------------------------------------------------------------------- @@ -59,7 +58,6 @@ $config['base_url'] = 'https://'.$_SERVER['SERVER_NAME'].'/'; */ //$config['index_page'] = 'index.php'; $config['index_page'] = ''; - /* |-------------------------------------------------------------------------- | URI PROTOCOL @@ -137,7 +135,7 @@ $config['enable_hooks'] = FALSE; | https://codeigniter.com/user_guide/general/creating_libraries.html | */ -$config['subclass_prefix'] = 'MY_'; +$config['subclass_prefix'] = 'MCORE_'; /* |-------------------------------------------------------------------------- diff --git a/adminwww/application/config/constants.php b/adminwww/application/config/constants.php index 18d3b4b..25c6e8a 100644 --- a/adminwww/application/config/constants.php +++ b/adminwww/application/config/constants.php @@ -83,3 +83,16 @@ defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code + +define('PHP_LOGIN_OK', 100 ); +define('PHP_API_OK', 0); + +define('MERMSEMR_BKO_START', 100000 ); +define('MERMSEMR_BKO_LOGIN', 100005); +define('MERMSEMR_BKO_CREATEUSER', 100010); +define('MERMSEMR_BKO_EDITUSER', 100011); +define('MERMSEMR_BKO_UPDATEMEMBER', 100012); +define('MERMSEMR_BKO_ADDREASON', 100020); +define('MERMSEMR_BKO_DELETEALLCARDS', 100022); +define('MERMSEMR_BKO_ADDCARD', 100028); +define('MERMSEMR_BKO_LANGUAGE_STATUS', 100030); \ No newline at end of file diff --git a/adminwww/application/config/database.php b/adminwww/application/config/database.php index d22321e..6ab8d54 100644 --- a/adminwww/application/config/database.php +++ b/adminwww/application/config/database.php @@ -73,7 +73,40 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $active_group = 'default'; $query_builder = TRUE; +require_once('backend.php'); + +$show_database_error = true; +$is_live = $mermsemr->cfgReadChar("system.live"); +if ($is_live == false) { + $show_database_error = false; +} + + $db['default'] = array( + 'dsn' => '', + 'hostname' => $mermsemr->cfgReadChar("database.host"), + 'username' => $mermsemr->cfgReadChar("database.user"), + 'password' => $mermsemr->cfgReadChar("database.pass"), + 'database' => $mermsemr->cfgReadChar("database.name"), + 'dbdriver' => 'postgre', + 'dbprefix' => '', + 'pconnect' => FALSE, + 'db_debug' => $show_database_error, + 'db_debug2' => (ENVIRONMENT !== 'production'), + 'cache_on' => FALSE, + 'cachedir' => '', + 'char_set' => 'utf8', + 'dbcollat' => 'utf8_general_ci', + 'swap_pre' => '', + 'encrypt' => FALSE, + 'compress' => FALSE, + 'stricton' => FALSE, + 'failover' => array(), + 'save_queries' => TRUE +); + + +$db['default_out'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => '', diff --git a/adminwww/application/controllers/Login.php b/adminwww/application/controllers/Login.php index 481b060..9969f2c 100644 --- a/adminwww/application/controllers/Login.php +++ b/adminwww/application/controllers/Login.php @@ -1,13 +1,45 @@ load->view('admin/view_dash'); + $data = array(); + $out = array(); + + // $data["username"] = 'oameye'; + // $data["password"] = 'may12002'; + + // var_dump($this->input->post()); + + $data['username'] = trim($this->input->post('username')); + $data['password'] = htmlspecialchars($this->input->post('password')); + + $data2 = array( + 'username' => $this->input->post('username'), + 'password'=> $this->input->post('password'), + 'is_logged_in' => false + ); + + + // $data["username"] = 'oameye'; + // $data["password"] = 'may12002'; + + $this->loginAdminUser($data, $out); + + //print_r($_SESSION); + + if (isset($_SESSION['session_id']) && $_SESSION['session_id'] !=''){ + redirect('/dash'); + } + $this->load->view('welcome_message'); - } + } } diff --git a/adminwww/application/views/welcome_message.php b/adminwww/application/views/welcome_message.php index 2526c49..b787cd4 100644 --- a/adminwww/application/views/welcome_message.php +++ b/adminwww/application/views/welcome_message.php @@ -43,7 +43,7 @@

MERMS BackOffice

Welcome back, please login to your account.

-
+
@@ -65,21 +65,21 @@ Remember Me
- Forgot Password ? +
- Sign In +
-
+
-
+
diff --git a/adminwww/assets/img/logo.png b/adminwww/assets/img/logo.png index 25f0cf6..46eb892 100644 Binary files a/adminwww/assets/img/logo.png and b/adminwww/assets/img/logo.png differ