Commit 3bd08006 by Tobin

dc

parent 73d6668f
......@@ -114,9 +114,25 @@ class Customer extends CI_Controller {
$this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Customer/addCustomer'));
}
$temp_password = rand(10000000, 99999999);
$_POST['password'] = md5($temp_password);
$status = $this->Customer_model->addCustomer($_POST);
if($status == 1){
$this->load->model('Api_model');
$subject = "Your TimeOut Account is now activated";
$email_id = $_POST['email'];
$template = getNotifTemplate();
$message .= "<html>
<body>
Hi,\n\r Welcome to TimeOut. \r\n Please use username:
".$_POST['email']." and Password: ".$temp_password."
for access your account <br>
".$template['registration_mail']."
</body>
</html>";
$this->Api_model->send_mail($subject,$email_id,$message);
$flashMsg =array('message'=>'Successfully Updated User Details..!','class'=>'success');
$this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/viewCustomers'));
......
......@@ -1037,12 +1037,12 @@ class Api_model extends CI_Model {
$this->db->update('customer',
array('reset_key'=>''),
array('customer_id'=>$cust['customer_id']));
$res= array('status'=>1,'data'=>'Success');
$res= array('status'=>1,'data'=>'Password Updated Successfully');
}else{
$res = array('status'=>0,'message'=>'Ohh No!! Something went South!!','code'=>'ER24');
}
} else {
$res = array('status'=>0,'message'=>'User Doesn\'t Exist','code'=>'ER25');
$res = array('status'=>0,'message'=>'Sorry, Reset Key Expired','code'=>'ER25');
}
}catch(Exception $e){
$res = array('status'=>0,'message'=>'Ohh No!! Something went South!!','code'=>'ER06');
......
......@@ -42,6 +42,7 @@ class Customer_model extends CI_Model {
$status = $this->db->insert('users',
array('username'=>$customer_data['email'],
'password'=>$customer_data['password'],
'display_name'=>$customer_data['name'],
'profile_image'=>$customer_data['profile_image'],
'user_type'=>'3','status'=>'1'));
......
......@@ -46,7 +46,7 @@ x <aside class="main-sidebar">
<li>
<a href="<?= base_url('Region/listRegion') ?>">
<img src="<?=base_url("assets/images/m4.png") ?>">
<span>Region Management</span>
<span>City Management</span>
</a>
</li>
<li>
......
......@@ -80,7 +80,7 @@
<?php } ?>
<div class="form-group">
<label>Venue Details</label>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom required" placeholder="Venue Details" name="venue_details" data-parsley-trigger="change" data-parsley-minlength="1" required="" style="height:34px;"><?= (isset($venue_data->venue_details))?$venue_data->venue_details:'' ?></textarea>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom required" placeholder="Venue Details" name="venue_details" data-parsley-trigger="change" data-parsley-minlength="1" required="" style="height:106px;"><?= (isset($venue_data->venue_details))?$venue_data->venue_details:'' ?></textarea>
<span class="glyphicon form-control-feedback"></span>
</div>
<?php if(!isset($venue_id) || empty($venue_id)){ ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment