This commit is contained in:
Olusesan Ameye
2021-01-30 19:42:19 -05:00
parent 645825eca3
commit ed330762c6
7 changed files with 93 additions and 17 deletions
+3 -3
View File
@@ -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');
/*
| -------------------------------------------------------------------
+3 -5
View File
@@ -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_';
/*
|--------------------------------------------------------------------------
+13
View File
@@ -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);
+33
View File
@@ -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' => '',
+35 -3
View File
@@ -1,13 +1,45 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Login extends CI_Controller {
/*
providers login
*/
class Login extends Start_Controller {
public function index()
{
/* THIS IS HE BACK office Login
*/
//$this->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');
}
}
}
@@ -43,7 +43,7 @@
<div class="login p-50">
<h1 class="mb-2">MERMS BackOffice</h1>
<p>Welcome back, please login to your account.</p>
<form action="/login" class="mt-3 mt-sm-5">
<form id='loginForm' action="/login" method="POST" class="mt-3 mt-sm-5">
<div class="row">
<div class="col-12">
<div class="form-group">
@@ -65,21 +65,21 @@
Remember Me
</label>
</div>
<a href="javascript:void(0);" class="ml-auto">Forgot Password ?</a>
<!-- a href="javascript:void(0);" class="ml-auto">Forgot Password ?</!-->
</div>
</div>
<div class="col-12 mt-3">
<a href="/login" class="btn btn-primary text-uppercase">Sign In</a>
<button type="submit" class="btn btn-primary">Sign In</button>
</div>
<div class="col-12 mt-3">
<!--div class="col-12 mt-3">
<p>Don't have an account ?<a href="/register"> Sign Up</a></p>
</div>
</!--div -->
</div>
</form>
</div>
</div>
</div>
<div class="col-sm-6 col-xxl-9 col-lg-7 o-hidden order-1 order-sm-2" style="background-color:red; background-image: url('assets/img/bg/login.jpg'); background-size: 100% 100%;">
<div class="col-sm-6 col-xxl-9 col-lg-7 o-hidden order-1 order-sm-2" style="background-color:red; background-image: url('/assets/img/bg/login.jpg'); background-size: 100% 100%;">
</div>
</div>
</div>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB