fix
This commit is contained in:
@@ -83,8 +83,8 @@ class Registration extends CI_Controller {
|
||||
$data['terms'] = $terms_checked;
|
||||
|
||||
|
||||
$this->load->view('users/view_registration', $data);
|
||||
$this->load->view('users/view_external_footer', $data);
|
||||
// $this->load->view('users/view_registration', $data);
|
||||
// $this->load->view('users/view_external_footer', $data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Signup extends CI_Controller {
|
||||
|
||||
public function index() {
|
||||
$data["signup_error"] = "";
|
||||
|
||||
$firstname = NULL;
|
||||
$country = 'NG';
|
||||
$lastname = NULL;
|
||||
$email = NULL;
|
||||
$password = NULL;
|
||||
$terms = NULL;
|
||||
$news = NULL;
|
||||
$terms = NULL;
|
||||
$submit = NULL;
|
||||
|
||||
extract($_POST);
|
||||
|
||||
$data['firstname'] = $firstname;
|
||||
$data['lastname'] = $lastname;
|
||||
$data['email'] = strtolower($email);
|
||||
$data['username'] = strtolower($email);
|
||||
$data['password'] = $password;
|
||||
$data['country'] = $country;
|
||||
$data['news'] = 1; //$news;
|
||||
$data['terms'] = $terms;
|
||||
$ip = $this->input->ip_address();
|
||||
$data['loc'] = $ip; //"38.101.241.200";
|
||||
|
||||
$this->load->model('combo_model');
|
||||
$this->combo_model->defaultComboMessage = 'Select your Country';
|
||||
$data['country_combo'] = $this->combo_model->getCountryCombo('country', $country);
|
||||
$terms_checked = '';
|
||||
// is anybody using this email already
|
||||
$this->load->model('account_model');
|
||||
$data['signup_error'] = '';
|
||||
|
||||
if ($_POST) { // post
|
||||
if ($data['terms'] == 'on') {
|
||||
$terms_checked = 'checked';
|
||||
}
|
||||
|
||||
// $data['terms'] = 1; // note terms is turned to 1
|
||||
//
|
||||
// print_r($_POST);
|
||||
if ($this->account_model->verifySignupInputs($data) == true) {
|
||||
$email_in_use = false;
|
||||
$data['terms'] = 1; // $terms is interger in backend;
|
||||
if ($this->account_model->checkUsernameDuplicate($data) > 0) {
|
||||
$email_in_use = true;
|
||||
}
|
||||
if ($email_in_use == false) {
|
||||
$data['action'] = WRENCHBOARD_ACCOUNT_PENDING;
|
||||
if ($_POST) {
|
||||
if ($firstname !== '' && $lastname !== '') {
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($data, $out);
|
||||
if ($res > 0) {
|
||||
$data['account_email'] = strtolower($email);
|
||||
redirect('outmessage', $data);
|
||||
} else {
|
||||
$data['signup_error'] = "Unable to create account";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$data['signup_error'] = "Please use another username";
|
||||
}
|
||||
} else {
|
||||
$data['signup_error'] = "Enter all required fields";
|
||||
}
|
||||
} // if post
|
||||
$data['signup_error_style'] = '';
|
||||
if (strlen($data['signup_error']) > 0) {
|
||||
$data['signup_error_style'] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">" . $data["signup_error"] . "</div></div>";
|
||||
}
|
||||
|
||||
|
||||
$data['terms'] = $terms_checked;
|
||||
|
||||
|
||||
$this->load->view('users/view_registration', $data);
|
||||
$this->load->view('users/view_external_footer', $data);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -70,7 +70,7 @@
|
||||
<li><a href="#about-us" class="scroll">How it works</a></li>
|
||||
<li><a href="#blog" class="scroll">Create Project</a></li>
|
||||
<!-- li style="background-color:#F0FFFF;"><a href="/login">Login</a></li -->
|
||||
<li style="background-color:#DCDCDC;"><a href="/registration">Sign up</a></li>
|
||||
<li style="background-color:#DCDCDC;"><a href="/signup">Sign up</a></li>
|
||||
|
||||
<!-- li><a href="#contact-us" class="scroll">Contact Us </a></li -->
|
||||
</ul>
|
||||
@@ -82,7 +82,7 @@
|
||||
<li><a href="#about-us" class="scroll">How it works</a></li>
|
||||
<li><a href="#blog" class="scroll">Create Project</a></li>
|
||||
<li style="background-color:#F0FFFF;"><a href="/login" class="scroll">Login</a></li>
|
||||
<li style="background-color:#DCDCDC;"><a href="/registration">Sign up</a></li>
|
||||
<li style="background-color:#DCDCDC;"><a href="/signup">Sign up</a></li>
|
||||
<!-- li><a href="#contact-us" class="scroll">Contact Us </a></li -->
|
||||
</ul>
|
||||
</div>
|
||||
@@ -153,7 +153,7 @@
|
||||
<div class="form-group login-options">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<a href="/registration" class="btn btn-info btn-block content-group">Sign up</a>
|
||||
<a href="/signup" class="btn btn-info btn-block content-group">Sign up</a>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 text-right">
|
||||
@@ -219,7 +219,7 @@
|
||||
</div>
|
||||
|
||||
<div class="caption wrenchboard-promo-description">
|
||||
You can do more with WrenchBoard . Create and manage your preferred workgroup. Organize and manage your teams efficiently. Get started <a href="/registration" class="label label-success">Sign up</a> or <a href="<?php echo $this->lib_login->getLoginUrl(); ?>" class="label label-info" >Login in with Facebook</a>
|
||||
You can do more with WrenchBoard . Create and manage your preferred workgroup. Organize and manage your teams efficiently. Get started <a href="/signup" class="label label-success">Sign up</a> or <a href="<?php echo $this->lib_login->getLoginUrl(); ?>" class="label label-info" >Login in with Facebook</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -451,7 +451,7 @@
|
||||
|
||||
<ul class="list-group">
|
||||
|
||||
<li class="list-group-item list-group-item-success" style="border: none"><a href="/registration">Sign up</a></li>
|
||||
<li class="list-group-item list-group-item-success" style="border: none"><a href="/signup">Sign up</a></li>
|
||||
<li class="list-group-item list-group-item-info" style="border: none"><a href="/login">Log in</a></li>
|
||||
|
||||
<li class="list-group-item" style="border: none"><a href="/privacy" class="text-info">Privacy Policy</a></li>
|
||||
|
||||
Reference in New Issue
Block a user