Files
MermsEmrWeb/providerwww/application/controllers/Register.php
T
Olusesan Ameye fbf04adb9a fix
2021-01-31 13:22:28 -05:00

57 lines
1.8 KiB
PHP

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Register extends Web_Controller {
public function index() {
$data = array();
$this->renderExternalPage('register', $data);
}
private function RegisterAccount() {
$data = array();
//#define MERMS_PROVIDERS_STARTPRACTICE 150005
// echo "xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ";
$data["practice_name"] = $this->input->post('practice_name').rand(100,999);
$data["firstname"] = $this->input->post('firstname');
$data["lastname"] = $this->input->post('lastname');
$data["email"] = $this->input->post('email');
$data["password"] = $this->input->post('password');
$data["username"] = $this->input->post('username').rand(100,999);
$data['action'] = MERMS_PROVIDERS_STARTPRACTICE;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->mermsemr_api($data, $out);
$loginReturn = false;
// echo $res;
if ( $res==PHP_API_OK && isset($out["practice_pending_id"]) && $out["practice_pending_id"] > 0 ){
$data["loginReturn"] = true;
}
$this->renderExternalPage('register', $data);
}
public function resetpass() {
$data = array();
$this->renderExternalPage('resetpass', $data);
}
public function startacc() {
// echo "xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ";
$data = array();
if ($this->input->post()) {
$this->RegisterAccount();
} else {
$this->index();
}
}
}