Commit 40f8354a by Tobin

dc

parent c82f55e5
...@@ -108,6 +108,12 @@ class CMS extends CI_Controller { ...@@ -108,6 +108,12 @@ class CMS extends CI_Controller {
if(!isset($_POST['registration_sms']) || empty($_POST['registration_sms'])){ if(!isset($_POST['registration_sms']) || empty($_POST['registration_sms'])){
unset($_POST['registration_sms']); unset($_POST['registration_sms']);
} }
if(!isset($_POST['checker_activation_mail']) || empty($_POST['checker_activation_mail'])){
unset($_POST['checker_activation_mail']);
}
if(!isset($_POST['provider_activation_mail']) || empty($_POST['provider_activation_mail'])){
unset($_POST['provider_activation_mail']);
}
$status = $this->Cms_model->updateNotif($_POST); $status = $this->Cms_model->updateNotif($_POST);
if($status){ if($status){
......
...@@ -110,15 +110,20 @@ class Checker extends CI_Controller { ...@@ -110,15 +110,20 @@ class Checker extends CI_Controller {
$subject = "Your Checker Account is now activated"; $subject = "Your Checker Account is now activated";
$email_id = $checkerData->username; $email_id = $checkerData->username;
$template = getNotifTemplate(); $message = "<html>
$message .= "<html>
<body> <body>
Your Checker Account for the username Your Checker Account for the username
<strong>".$checkerData->username."</strong> is now activated.<br> <strong>".$email_id."</strong> is now activated.
".$template['checker_activation_mail']."
</body> </body>
</html>"; </html>";
$template = getNotifTemplate();
if(isset($template['checker_activation_mail']) &&
!empty($template['checker_activation_mail'])){
$message = str_replace(array('{:user_name}'),array($email_id),
$template['checker_activation_mail']);
}
$this->Api_model->send_mail($subject,$email_id,$message); $this->Api_model->send_mail($subject,$email_id,$message);
} }
} }
......
...@@ -123,14 +123,20 @@ class Customer extends CI_Controller { ...@@ -123,14 +123,20 @@ class Customer extends CI_Controller {
$subject = "Your TimeOut Account is now activated"; $subject = "Your TimeOut Account is now activated";
$email_id = $_POST['email']; $email_id = $_POST['email'];
$template = getNotifTemplate(); $template = getNotifTemplate();
$message .= "<html>
$message = "<html>
<body> <body>
Hi,\n\r Welcome to TimeOut. \r\n Please use username: Hi,\n\r Welcome to TimeOut. \r\n Please use username:
".$_POST['email']." and Password: ".$temp_password." ".$_POST['email']." and Password: ".$temp_password."
for access your account <br> for access your account <br>
".$template['registration_mail']."
</body> </body>
</html>"; </html>";
if(isset($template['registration_mail']) && !empty($template['registration_mail'])){
$message = str_replace(array('{:email}','{:password}'),array($email_id,$temp_password),
$template['registration_mail']);
}
$this->Api_model->send_mail($subject,$email_id,$message); $this->Api_model->send_mail($subject,$email_id,$message);
$flashMsg =array('message'=>'Successfully Updated User Details..!','class'=>'success'); $flashMsg =array('message'=>'Successfully Updated User Details..!','class'=>'success');
......
...@@ -72,15 +72,21 @@ class Provider extends CI_Controller { ...@@ -72,15 +72,21 @@ class Provider extends CI_Controller {
$email_id = $providerData->email; $email_id = $providerData->email;
$template = getNotifTemplate(); $template = getNotifTemplate();
$message .= "<html> $message = "<html>
<body> <body>
Your Organizer Account for the username Your Organizer Account for the username
<strong>".$providerData->username."</strong> is now activated. Please use this link for access your account <strong>".$providerData->username."</strong> is now activated. Please use this link for access your account
<a href='".base_url()."'>".base_url()."</a><br> <a href='".base_url()."'>".base_url()."</a><br>
".$template['provider_activation_mail']."
</body> </body>
</html>"; </html>";
if(isset($template['provider_activation_mail']) &&
!empty($template['provider_activation_mail'])){
$message = str_replace(array('{:user_name}','{:url}'),
array($providerData->username,base_url()),
$template['provider_activation_mail']);
}
$this->Api_model->send_mail($subject,$email_id,$message); $this->Api_model->send_mail($subject,$email_id,$message);
} }
} }
......
...@@ -74,15 +74,20 @@ class Api_model extends CI_Model { ...@@ -74,15 +74,20 @@ class Api_model extends CI_Model {
$subject = "New account created successfully"; $subject = "New account created successfully";
$email_id = $data['email_id']; $email_id = $data['email_id'];
$template = getNotifTemplate(); $message = "<html>
$message = "<html> <body>
<body> Hi,\n\r Welcome to TimeOut. \r\n Please use username:
Hi,\n\r Welcome to TimeOut. \r\n Please use username: ".$email_id." and Password: ".$temp_password."
".$email_id." and Password: ".$temp_password." for access your account <br>
for access your account <br> </body>
".$template['registration_mail']." </html>";
</body>
</html>"; $template = getNotifTemplate();
if(isset($template['registration_mail']) && !empty($template['registration_mail'])){
$message = str_replace(array('{:email}','{:password}'),
array($email_id,$temp_password),
$template['registration_mail']);
}
$this->send_mail($subject,$email_id,$message); $this->send_mail($subject,$email_id,$message);
$this->db->select('customer.name,customer.dob,customer.phone,customer.email,customer.profile_image AS image,customer.gender,users.id AS userId, customer.city'); $this->db->select('customer.name,customer.dob,customer.phone,customer.email,customer.profile_image AS image,customer.gender,users.id AS userId, customer.city');
...@@ -139,19 +144,21 @@ class Api_model extends CI_Model { ...@@ -139,19 +144,21 @@ class Api_model extends CI_Model {
if($res_count > 0) { if($res_count > 0) {
$unique_id = uniqid().time(); $unique_id = uniqid().time();
$this->db->where('email',$data['email_id'])->update('customer',array('reset_key'=>$unique_id)); $this->db->where('email',$data['email_id'])->update('customer',array('reset_key'=>$unique_id));
$subject = "TimeOut: Forgot Password"; $subject = "TimeOut: Forgot Password";
$url = 'https://projects.nuvento.com/forgot/?reset_key='.$unique_id; $url = 'https://projects.nuvento.com/forgot/?reset_key='.$unique_id;
$template = getNotifTemplate();
$message = "<html> $message = "<html>
<body> <body>
<p>Please use mentioned link for reset your password: ".$url."</p> <p>Please use mentioned link for reset your password: ".$url."</p>
<br>
".$template['forgot_mail']."
</body> </body>
</html>"; </html>";
$email = $data['email_id']; $template = getNotifTemplate();
if(isset($template['forgot_mail']) && !empty($template['forgot_mail'])){
$message = str_replace(array('{:url}'),array($url),$template['forgot_mail']);
}
$result = $this->send_mail($subject,$email,$message); $result = $this->send_mail($subject,$email,$message);
if($result){ if($result){
$res = array('status'=>1,'data'=>null); $res = array('status'=>1,'data'=>null);
......
...@@ -45,6 +45,23 @@ ...@@ -45,6 +45,23 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label>Checker Activation Mail</label>
<textarea id="rich_editor_2" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Checker Activation Mail" name="checker_activation_mail" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->checker_activation_mail ?></textarea>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Provider Activation Mail</label>
<textarea id="rich_editor_6" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Provider Activation Mail" style="height:108px;"
name="provider_activation_mail" data-parsley-trigger="change"><?= $notificationData->provider_activation_mail ?></textarea>
</div>
</div>
</div>
</div> </div>
<div class="box-header with-border"> <div class="box-header with-border">
......
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