61 lines
1.8 KiB
PHP
61 lines
1.8 KiB
PHP
<?php
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Vemail extends Start_Controller {
|
|
|
|
public function index() {
|
|
//$this->load->view('home/home');
|
|
$valid_entry = true;
|
|
$valid_login = false;
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
|
|
|
|
$data['verify_link'] = trim($this->input->get('vlnk'));
|
|
|
|
if (true == $valid_entry) {
|
|
if ($data['verify_link'] != '') {
|
|
$out = [];
|
|
$this->coregrade_webapi(COREGRADE_ACCOUNT_CREATEACC, $data, $out);
|
|
//print_r( $data );
|
|
//print_r( $out );
|
|
if (count($out) > 0 && isset($out["session"])) {
|
|
//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);
|
|
|
|
$this->renderMemberPages('view_dash', $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');
|
|
}
|
|
|
|
}
|