diff --git a/wwwadmin/.htaccess b/wwwadmin/.htaccess new file mode 100644 index 0000000..d1929af --- /dev/null +++ b/wwwadmin/.htaccess @@ -0,0 +1,35 @@ + + +RewriteEngine On +RewriteBase / + +#Removes access to the system folder by users. +#Additionally this will allow you to create a System.php controller, +#previously this would not have been possible. +#'system' can be replaced if you have renamed your system folder. +RewriteCond %{REQUEST_URI} ^system.* +RewriteRule ^(.*)$ /index.php?/$1 [L] + +#When your application folder isn't in the system folder +#This snippet prevents user access to the application folder +#Submitted by: Fabdrol +#Rename 'application' to your applications folder name. +RewriteCond %{REQUEST_URI} ^application.* +RewriteRule ^(.*)$ /index.php?/$1 [L] + +#Checks to +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ index.php?/$1 [L] + + + + + # If we don't have mod_rewrite installed, all 404's + # can be sent to index.php, and everything works as normal. + # Submitted by: ElliotHaughin + +ErrorDocument 404 /index.php + + + diff --git a/wwwadmin/application/config/autoload.php b/wwwadmin/application/config/autoload.php index 7cdc901..c325329 100644 --- a/wwwadmin/application/config/autoload.php +++ b/wwwadmin/application/config/autoload.php @@ -58,7 +58,8 @@ $autoload['packages'] = array(); | | $autoload['libraries'] = array('user_agent' => 'ua'); */ -$autoload['libraries'] = array(); +//$autoload['libraries'] = array(); +$autoload['libraries'] = array('database','session','form_validation'); /* | ------------------------------------------------------------------- @@ -90,7 +91,7 @@ $autoload['drivers'] = array(); | $autoload['helper'] = array('url', 'file'); */ $autoload['helper'] = array(); - +$autoload['helper'] = array('form', 'url'); /* | ------------------------------------------------------------------- | Auto-load Config files diff --git a/wwwadmin/application/config/config.php b/wwwadmin/application/config/config.php index 9ada713..90bf4ed 100644 --- a/wwwadmin/application/config/config.php +++ b/wwwadmin/application/config/config.php @@ -49,7 +49,7 @@ $config['base_url'] = ''; | variable so that it is blank. | */ -$config['index_page'] = 'index.php'; +$config['index_page'] = ''; /* |-------------------------------------------------------------------------- diff --git a/wwwadmin/application/config/database.php b/wwwadmin/application/config/database.php index 0088ef1..cfcf8fb 100644 --- a/wwwadmin/application/config/database.php +++ b/wwwadmin/application/config/database.php @@ -73,7 +73,32 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $active_group = 'default'; $query_builder = TRUE; +global $coregrade; + $db['default'] = array( + 'dsn' => '', + 'hostname' => $coregrade->cfgReadChar('database.host'), /* '10.142.0.10', */ + 'username' => $coregrade->cfgReadChar('database.user'), /* 'savvy', */ + 'password' => $coregrade->cfgReadChar('database.pass'), /* 'savvy001!', */ + 'database' => $coregrade->cfgReadChar('database.name'), /* 'savvy', */ + 'dbdriver' => 'postgre', + 'dbprefix' => '', + 'pconnect' => FALSE, + 'db_debug' => (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/wwwadmin/application/controllers/Logout.php b/wwwadmin/application/controllers/Logout.php new file mode 100644 index 0000000..b6bd57d --- /dev/null +++ b/wwwadmin/application/controllers/Logout.php @@ -0,0 +1,25 @@ +input->post('username'); + $_SESSION['firstname'] = $out["firstname"]; // $ret->firstname; + $_SESSION['lastname'] = $out["lastname"]; // $ret->lastname; + $_SESSION['email'] = $out["email"]; // $ret->email; + $_SESSION['backoffice_id'] = $out["username"]; // $ret->id; + $_SESSION['pid'] = $out["pid"]; // $ret->id; + $_SESSION['loc'] = $out["loc"]; + + + + $data["recent_signup_table"] = ""; + $data["recent_pending_table"] = ""; + + + + // echo rand(100,999); + // $this->load->view('home/view_home', $data); + $this->renderAdminPage("dash", "view_start", $data); + } + + function formatedMesage($msgType, $theMessage) { + return "
" . $theMessage . "
"; + } + +} diff --git a/wwwadmin/application/controllers/Welcome.php b/wwwadmin/application/controllers/Welcome.php index da2b500..88753a1 100644 --- a/wwwadmin/application/controllers/Welcome.php +++ b/wwwadmin/application/controllers/Welcome.php @@ -6,14 +6,14 @@ class Welcome extends Bko_Controller { public function index() { $data['action_message'] = ''; - $data['ip'] =''; + $data['ip'] = ''; if (!empty($_SERVER['HTTP_CLIENT_IP'])) { - $data['ip'] = $_SERVER['HTTP_CLIENT_IP']; + $data['ip'] = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { - $data['ip'] = $_SERVER['HTTP_X_FORWARDED_FOR']; + $data['ip'] = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { - $data['ip'] = $_SERVER['REMOTE_ADDR']; + $data['ip'] = $_SERVER['REMOTE_ADDR']; } diff --git a/wwwadmin/application/core/COR_Controller.php b/wwwadmin/application/core/COR_Controller.php index e0a4797..f6832dd 100644 --- a/wwwadmin/application/core/COR_Controller.php +++ b/wwwadmin/application/core/COR_Controller.php @@ -177,22 +177,14 @@ class COR_Controller extends CI_Controller { return "
" . $theMessage . "
"; } - protected function renderMemberPage($page_name, $data) { - $this->load->view('admin/view_admin_header', $data); - $this->load->view('member/' . $page_name, $data); - $this->load->view('admin/view_admin_footer', $data); - } - protected function renderAdminPage($page_name, $data) { - $this->load->view('admin/view_admin_header', $data); - $this->load->view('admin/' . $page_name, $data); - $this->load->view('admin/view_admin_footer', $data); + + protected function renderAdminPage($page_type, $page_name, $data) { + $this->load->view('admin_template/view_admin_header', $data); + $this->load->view($page_type.'/' . $page_name, $data); + $this->load->view('admin_template/view_admin_footer', $data); } - protected function renderUploadPage($page_name, $data) { - $this->load->view('admin/view_admin_header', $data); - $this->load->view('upload/' . $page_name, $data); - $this->load->view('admin/view_admin_footer', $data); - } + } diff --git a/wwwadmin/application/libraries/Bko_Controller.php b/wwwadmin/application/libraries/Bko_Controller.php index 40acc8e..0e70a80 100644 --- a/wwwadmin/application/libraries/Bko_Controller.php +++ b/wwwadmin/application/libraries/Bko_Controller.php @@ -12,7 +12,7 @@ class Bko_Controller extends COR_Controller { //redirect('site'); } else { // erase the session properly if here - redirect('dash'); + // redirect('start'); } } diff --git a/wwwadmin/application/views/admin_template/common/admin_sidebar.php b/wwwadmin/application/views/admin_template/common/admin_sidebar.php new file mode 100644 index 0000000..60dd3d1 --- /dev/null +++ b/wwwadmin/application/views/admin_template/common/admin_sidebar.php @@ -0,0 +1,136 @@ + + + + + diff --git a/wwwadmin/application/views/admin_template/view_admin_footer.php b/wwwadmin/application/views/admin_template/view_admin_footer.php new file mode 100644 index 0000000..7e27605 --- /dev/null +++ b/wwwadmin/application/views/admin_template/view_admin_footer.php @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wwwadmin/application/views/admin_template/view_admin_header.php b/wwwadmin/application/views/admin_template/view_admin_header.php new file mode 100644 index 0000000..7ad3281 --- /dev/null +++ b/wwwadmin/application/views/admin_template/view_admin_header.php @@ -0,0 +1,358 @@ + + + + + + + + <?php echo SITE_NAME; ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ + + + + + + +
diff --git a/wwwadmin/application/views/dash/view_start.php b/wwwadmin/application/views/dash/view_start.php new file mode 100644 index 0000000..473e5a0 --- /dev/null +++ b/wwwadmin/application/views/dash/view_start.php @@ -0,0 +1,202 @@ + +
+
+ +
+ + + + +
+ +
+ +
+ +
+ + + +
+ +
+ +
+ + + + + + + + + + diff --git a/wwwadmin/backend.php b/wwwadmin/backend.php new file mode 100644 index 0000000..d7e1bae --- /dev/null +++ b/wwwadmin/backend.php @@ -0,0 +1,24 @@ +