Merge branch 'master' of https://gitlab.chiefsoft.net/Chiefsoft/CoreGrade
Conflicts: www/application/controllers/Auth.php
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Auth extends Start_Controller {
|
||||
|
||||
public function index() {
|
||||
$login_done = false;
|
||||
$data = array();
|
||||
$username = '';
|
||||
$password = '';
|
||||
$error_message = '';
|
||||
$valid_entry = false;
|
||||
$valid_login = false;
|
||||
$out = [];
|
||||
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
|
||||
|
||||
$this->testLoginInput($username, $password, $error_message, $valid_entry);
|
||||
|
||||
if (true == $valid_entry) {
|
||||
if ($username != '' && $password != '') {
|
||||
|
||||
$data["page_title"] = "";
|
||||
$data["username"] = $username; //"auxsupport";
|
||||
$data["password"] = $password;
|
||||
$data["sessionid"] ="12345678901234567890";
|
||||
$out = [];
|
||||
$this->coregrade_webapi(COREGRADE_ACCOUNT_LOGIN, $data, $out);
|
||||
//print_r( $data );
|
||||
//print_r( $out );
|
||||
if (count($out) > 0 && isset($out["sessionid"]) && isset($out["member_id"]) && $out["member_id"] > 0 ) {
|
||||
// print_r($out);
|
||||
//$this->getSessionData($out[0], $session_data); // just for testing
|
||||
|
||||
$this->buildUserSession(PHP_API_OK, $out);
|
||||
$valid_login = true;
|
||||
$this->session->set_flashdata('in', $out);
|
||||
redirect("member/index");
|
||||
$login_done = true;
|
||||
} else {
|
||||
$error_message = "Invalid Username/Password";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// $this->renderMemberPages('view_dash', $data);
|
||||
// $login_done = true;
|
||||
|
||||
// exit();
|
||||
}
|
||||
// echo 'hhhh jjjj';
|
||||
//$this->coregrade_webapi(100, $data, $out);
|
||||
// print_r($out);
|
||||
|
||||
if (false == $login_done) {
|
||||
$this->renderAuthPages('view_login', $data);
|
||||
}
|
||||
}
|
||||
|
||||
public function newuser() {
|
||||
//$this->load->view('home/home');
|
||||
$data["firstname"] = $data["lastname"] = $data["password"] = $data["email"] = "";
|
||||
$valid_entry = true;
|
||||
$valid_login = false;
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
|
||||
$data['firstname'] = trim($this->input->post('firstname'));
|
||||
$data['lastname'] = trim($this->input->post('lastname'));
|
||||
$data['username'] = trim($this->input->post('username'));
|
||||
$data['password'] = trim($this->input->post('pass1'));
|
||||
$data['email'] = $data['username'];
|
||||
|
||||
if (true == $valid_entry) {
|
||||
if ($data['username'] != '' && $data['password'] != '') {
|
||||
$out = [];
|
||||
$this->coregrade_webapi(COREGRADE_ACCOUNT_PENDING, $data, $out);
|
||||
|
||||
//print_r( $data );
|
||||
// print_r($out);
|
||||
if (count($out) > 0 && isset($out["pending_id"]) && $out["pending_id"] > 0) {
|
||||
//print_r($out);
|
||||
//$this->getSessionData($out[0], $session_data); // just for testing
|
||||
|
||||
$this->renderAuthPages('view_pending', $data);
|
||||
$login_done = true;
|
||||
// redirect("page/index");
|
||||
} else {
|
||||
$error_message = "Invalid Username/Password";
|
||||
}
|
||||
}
|
||||
}
|
||||
// exit();
|
||||
}
|
||||
|
||||
|
||||
$this->load->view('auth/view_head');
|
||||
$this->load->view('auth/view_register');
|
||||
$this->load->view('auth/view_foot');
|
||||
}
|
||||
|
||||
public function resetpass() {
|
||||
//$this->load->view('home/home');
|
||||
//echo "START RESET 1";
|
||||
$this->load->view('auth/view_head');
|
||||
$this->load->view('auth/view_reset_password');
|
||||
$this->load->view('auth/view_foot');
|
||||
}
|
||||
|
||||
public function logout() {
|
||||
$this->index();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
<p>Candy canes donut chupa chups candy canes lemon drops oat cake wafer. Cotton candy candy canes
|
||||
marzipan carrot cake. Sesame snaps lemon drops candy marzipan donut brownie tootsie roll. Icing
|
||||
croissant bonbon biscuit gummi bears.</p>
|
||||
<p></p>
|
||||
|
||||
|
||||
<div class="row">
|
||||
@@ -10,8 +8,7 @@
|
||||
<div class="card-content">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Menu</h4>
|
||||
<p class="card-text">Some quick example text to build on the card title and make up the bulk of
|
||||
the card's content.</p>
|
||||
<p class="card-text">Welcome to your Classy Learning Platform.</p>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush" style="font-size:18px;">
|
||||
<li class="list-group-item">
|
||||
@@ -20,15 +17,15 @@
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span class="badge badge-pill bg-info float-right">2</span>
|
||||
Dapibus ac facilisis in
|
||||
<a href="/member/configure">Invite Buddy</a>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span class="badge badge-pill bg-warning float-right">1</span>
|
||||
Morbi leo risus
|
||||
<a href="/member/configure">Go Dutch</a>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span class="badge badge-pill bg-success float-right">3</span>
|
||||
Porta ac consectetur ac
|
||||
<a href="/member/configure">Get Started</a>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span class="badge badge-pill bg-danger float-right">8</span>
|
||||
@@ -62,15 +59,13 @@
|
||||
</div>
|
||||
<div class="card-content collapse show" aria-expanded="true">
|
||||
<div class="card-body">
|
||||
<p class="card-text">Thank you for purchasing Vuexy admin template. If you have any queries that are beyond the scope of this help file, please feel free to create a support ticket on our support portal : <a href="https://pixinvent.ticksy.com/">https://pixinvent.ticksy.com/</a></p>
|
||||
<p class="card-text">Streamline your goals into cards.Makes Learning achievable and fun</p>
|
||||
|
||||
<p class="card-text">Vuexy admin is super flexible, powerful, clean & modern responsive bootstrap admin template with unlimited possibilities. It includes 4 pre-built templates with organized folder structure, clean & commented code, 100+ pages, 70+ components, 50+ charts, 50+ advance cards (widgets) and many more.</p>
|
||||
<p> Vuexy admin provides searchable navigation, unique menu layouts, advance cards and incredible support. Vuexy admin can be used for any type of web applications: Project Management, eCommerce backends, CRM, Analytics, Fitness or any custom admin panels.</p>
|
||||
<p> It comes with 2 niche dashboards. Vuexy admin template is powered with HTML 5, SASS & Twitter Bootstrap 4 which looks great on Desktops, Tablets, and Mobile Devices. Vuexy admin template comes with starter kit which will help developers to get started quickly.</p>
|
||||
<p class="card-text">Coregrade is an influential Learning Platform. With coregrade, personalized short- and long term learning goals are experiential to enhance intellect, sense of ownership, and or control over your learning and pace. An achievable personal goal with excellent crisp, motivation, and consistency.dmin template comes with starter kit which will help developers to get started quickly.</p>
|
||||
<p></p>
|
||||
<p><strong>Updated:</strong> 13/11/2019 - V4.1 <strong>Vuesax is now Vuexy :)</strong></p>
|
||||
<p><strong>By:</strong> PIXINVENT Team</strong></p>
|
||||
<p><strong>Support Portal:</strong> <a href="https://pixinvent.ticksy.com/">https://pixinvent.ticksy.com/</a></strong></p>
|
||||
<p><strong>Updated:</strong> 02/19/2020- V4.1 <strong>Coregrade</strong></p>
|
||||
<p><strong>By:</strong> COREGRADE Team</strong></p>
|
||||
<p><strong>Support Portal:</strong> <a href="support@coregrade.com/">support@coregrade.com/</a></strong></p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user