diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index dbc83e5..e29393a 100644
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -56,6 +56,7 @@ $routes->match(['get','post'],'/member_deactivate/(:any)','Member_controller::me
$routes->match(['get','post'],'/member_activate/(:any)','Member_controller::member_activate/$1');
$routes->match(['get'],'/scheduler','Member_controller::scheduler');
+
$routes->get('/payment', 'PaymentController::index');
$routes->get('/payment_success/(:any)', 'PaymentController::payment_success/$1');
$routes->get('/payment_failed/(:any)', 'PaymentController::payment_failed/$1');
@@ -109,11 +110,13 @@ $routes->match(['get'],'fetch_country','Common_controller::fetch_country');
$routes->match(['get','post'],'fetch_state','Common_controller::fetch_state');
$routes->match(['get','post'],'fetch_city','Common_controller::fetch_city');
$routes->match(['get','post'],'/check_if_mail_exists','Common_controller::check_if_mail_exists');
+$routes->match(['get','post'],'/forgot_password','Common_controller::forgot_password');
+
$routes->match(['get','post'],'/mail/(:any)','Sendmail_controller::index/$1');
$routes->match(['get','post'],'/verify_email/(:any)','Sendmail_controller::verify_email/$1');
-$routes->match(['get','post'],'/forgot_password','Sendmail_controller::forgot_password');
+// $routes->match(['get','post'],'/forgot_password','Sendmail_controller::forgot_password');
$routes->match(['get','post'],'/verify_update_email/(:any)','Sendmail_controller::verify_update_email/$1');
diff --git a/app/Controllers/Admin_controller.php b/app/Controllers/Admin_controller.php
index 57d3f06..14ec912 100644
--- a/app/Controllers/Admin_controller.php
+++ b/app/Controllers/Admin_controller.php
@@ -582,12 +582,11 @@ class Admin_controller extends BaseController
if($this->request->getmethod() == 'post')
{
-
//insert member details
$PackData = $this->request->getVar();
- $this->UserModel->save($PackData);
+ $this->PackagesModel->save($PackData);
return redirect()->to(base_url()."credits_pack_list");
diff --git a/app/Controllers/Cart_controller.php b/app/Controllers/Cart_controller.php
index e7dfb23..6bfac29 100644
--- a/app/Controllers/Cart_controller.php
+++ b/app/Controllers/Cart_controller.php
@@ -52,9 +52,9 @@ class Cart_controller extends BaseController
if (!session()->has('logged_user'))
{
$token = rand(10 , 99 ).rand(10 , 99 ).rand(10 , 99 );
- if ($this->request->getVar('c_token'))
+ if (session()->has('token'))
{
- $tokendata = $this->Cart_token_model->where('md5(token)', $this->request->getVar('c_token') )->find();
+ $tokendata = $this->Cart_token_model->where('md5(token)', $this->session->get('token') )->find();
$data['token'] = $tokendata[0]['token'];
foreach ($tokendata as $key => $value)
@@ -79,7 +79,7 @@ class Cart_controller extends BaseController
else
{
$this->session->set('user_token',$token);
- $this->session->set('token',$token);
+ $this->session->set('token',md5($token));
$data['token'] = $token;
$data['primary_id'] = $this->request->getVar('id');
$data['table_name'] = 'package_and_pricing';
@@ -89,8 +89,8 @@ class Cart_controller extends BaseController
}
- if ($this->request->getVar('c_token')) {
- $tokendata = $this->Cart_token_model->where('md5(token)', $this->request->getVar('c_token') )->find();
+ if (session()->has('token')) {
+ $tokendata = $this->Cart_token_model->where('md5(token)', $this->session->get('token') )->find();
$data['token'] = md5($tokendata[0]['token']);
}
else {
diff --git a/app/Controllers/Common_controller.php b/app/Controllers/Common_controller.php
index 3432fea..7736a8d 100644
--- a/app/Controllers/Common_controller.php
+++ b/app/Controllers/Common_controller.php
@@ -118,6 +118,64 @@ class Common_controller extends BaseController
}
+ public function forgot_password()
+
+ {
+
+ $this->session->setTempdata('user',"member",3);
+
+ if($this->request->getmethod() == 'get')
+
+ {
+
+ return view('forgot_password_otp.php');
+
+ }
+
+ else if($this->request->getmethod() == 'post')
+
+ {
+
+
+
+ $email = $this->request->getVar('email');
+
+ $user_data = $this->MemberModel->where('email', $email)->where('is_email_verified', 1 )->find();
+
+ if ($user_data)
+
+ {
+
+ $otp = rand(1000 , 9999);
+
+ $sendmail_controller = new Sendmail_controller();
+
+ $sendmail_controller->index($this->request->getVar('email') , $otp , 2 );
+
+ $data['status'] = 'success';
+
+ $data['otp'] = $otp;
+
+ echo json_encode($data);
+
+ }
+
+ else
+
+ {
+
+ $data['status'] = 'failed';
+
+ echo json_encode($data);
+
+ }
+
+
+
+ }
+
+ }
+
diff --git a/app/Controllers/Member_controller.php b/app/Controllers/Member_controller.php
index 4a67c05..536d530 100644
--- a/app/Controllers/Member_controller.php
+++ b/app/Controllers/Member_controller.php
@@ -79,7 +79,7 @@ class Member_controller extends BaseController
$this->CountryModel = new Country_model();
helper('form');
-
+
}
public function index()
@@ -1313,6 +1313,8 @@ class Member_controller extends BaseController
+
+
diff --git a/app/Controllers/PaymentController.php b/app/Controllers/PaymentController.php
index 4808dab..25d4de7 100644
--- a/app/Controllers/PaymentController.php
+++ b/app/Controllers/PaymentController.php
@@ -775,7 +775,9 @@ class PaymentController extends BaseController
if($data['TransactionData']){
-
+ $sendmail_controller = new Sendmail_controller();
+
+ $mail = $sendmail_controller->index(session()->get('logged_user_email') , $local_order_id , 7);
$data['category'] = json_decode($data['TransactionData'][0]['transaction'] , true)[0]['category'];
diff --git a/app/Controllers/Sendmail_controller.php b/app/Controllers/Sendmail_controller.php
index 245437a..3a67389 100644
--- a/app/Controllers/Sendmail_controller.php
+++ b/app/Controllers/Sendmail_controller.php
@@ -299,7 +299,7 @@ class Sendmail_controller extends BaseController
}
- // payment => type 5
+ // payment success => type 5
else if($return == 5)
@@ -417,6 +417,75 @@ class Sendmail_controller extends BaseController
$email->setSubject('Verify your email address');
}
+ // payment failure => type 7
+
+ else if($return == 7)
+
+ {
+
+
+
+ // $TransactionData = $this->TransactionModel->where('member_id', session()->get('logged_user'))->orderBy('created_at', 'DESC')->first();
+
+ // $Transaction_id = $TransactionData['transaction_id'];
+
+ // $timestamp = strtotime($TransactionData['created_at']);
+
+ // $Transaction_date = date('l, F j, Y', $timestamp);
+
+ // $amount = json_decode($TransactionData['transaction'] , true)['payment']['amount_money']['amount'];
+
+ // $payment_method = json_decode($TransactionData['transaction'] , true)['payment']['source_type'];
+
+
+
+ $data['id'] = $return;
+
+ $temp_data = $this->MailModel->where('type' , $return)->where('is_active' , 1)->find();
+
+ if ($temp_data[0]['to'])
+
+ $email->setCC($temp_data[0]['to']);
+
+ $data['TransactionData'] = $this->TransactionModel->where('order_id', $code )->where('member_id', session()->get('logged_user'))->find();
+ $data['category'] = json_decode($data['TransactionData'][0]['transaction'] , true)[0]['category'];
+ $data['code'] = json_decode($data['TransactionData'][0]['transaction'] , true)[0]['code'];
+ $data['detail'] = json_decode($data['TransactionData'][0]['transaction'] , true)[0]['detail'];
+ $data['order_id'] = $data['TransactionData'][0]['order_id'];
+ $timestamp = strtotime($data['TransactionData'][0]['created_at']);
+ $data['formattedDate'] = date('l, F j, Y', $timestamp);
+ $data['html'] = view('failed_mail',$data);
+
+ // if ($temp_data) {
+
+ // $data['html'] = str_replace("%name%",session()->get('logged_user_name'),$temp_data[0]['html']);
+
+ // $data['html'] = str_replace("%id%",$Transaction_id,$temp_data[0]['html']);
+
+ // $data['html'] = str_replace("%method%",$payment_method,$temp_data[0]['html']);
+
+ // $data['html'] = str_replace("%date%", $Transaction_date,$temp_data[0]['html']);
+
+ // $data['html'] = str_replace("%amount%",$amount,$temp_data[0]['html']);
+
+
+
+
+
+ $message = view('verification_mail_temp',$data);
+
+ // }
+
+ if ($temp_data[0]['is_active'] == 1)
+
+ $email->setSubject($temp_data[0]['subject']);
+
+ else
+
+ $email->setSubject('Username Password');
+
+ }
+
$email->setMessage($message);
if ($email->send())
@@ -424,13 +493,11 @@ class Sendmail_controller extends BaseController
{
if ($return == 1)
-
$this->session->setTempdata('mail_success', "We have send an email for verification. please check your mail account",3);
if ($return == 5)
-
return true;
diff --git a/app/Views/cart.php b/app/Views/cart.php
index 97ebfe4..eab64fa 100644
--- a/app/Views/cart.php
+++ b/app/Views/cart.php
@@ -136,7 +136,17 @@
} ?>
diff --git a/app/Views/changepassword.php b/app/Views/changepassword.php
index 5311638..2de79dd 100644
--- a/app/Views/changepassword.php
+++ b/app/Views/changepassword.php
@@ -29,6 +29,11 @@
+
@@ -60,11 +65,6 @@
Password
-
-
diff --git a/app/Views/failed_mail.php b/app/Views/failed_mail.php
index c456e9b..dc17855 100644
--- a/app/Views/failed_mail.php
+++ b/app/Views/failed_mail.php
@@ -1,71 +1,82 @@
-
+
+
-
Payment Failed - Golf Evolution
-
-
-
-
/assets/member_images/favicon.png" sizes="192x192" />
-
/assets/member_images/favicon.png" />
-
-
-
-
/assets/member_css/front-style.css">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Payment Failed!
-
-
-
-
-
-
-
-
-
-
Order Id
-
= $order_id; ?>
-
-
-
Transaction Date
-
= $formattedDate; ?>
-
-
-
Payment Failed Details
-
= $detail; ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Payment Failed!
+
+
+
+
+
+
+
+
+
+
+ Order Id :
+
+ = $order_id; ?>
+
+
+
+ Transaction Date :
+
+ = $formattedDate; ?>
+
+
+
+ Payment Failed Details :
+
+ = $detail; ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/forgot_password_otp.php b/app/Views/forgot_password_otp.php
index 904b070..4316e6f 100644
--- a/app/Views/forgot_password_otp.php
+++ b/app/Views/forgot_password_otp.php
@@ -23,7 +23,7 @@
- Get OTP
+ Get OTP
@@ -76,11 +76,12 @@ $(document).on('click','#submit1',function(){
response = jQuery.parseJSON(response);
if (response.status == "success")
{
+ window.stop();
+ $("#form").attr('action', 'change_password_form');
$('#alert1').html('');
$(".disable").show();
$('#verify_otp').val(response.otp);
$("#re-sub").html('
Submit ');
- window.stop();
}
else
{
diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php
index b0da273..400c3d4 100644
--- a/app/Views/layout/header.php
+++ b/app/Views/layout/header.php
@@ -43,7 +43,11 @@
-
+
+
\ No newline at end of file
diff --git a/app/Views/transactions_list.php b/app/Views/transactions_list.php
index d43e47c..636c2a2 100644
--- a/app/Views/transactions_list.php
+++ b/app/Views/transactions_list.php
@@ -1,3 +1,14 @@
+
@@ -112,7 +123,7 @@ $(document).on('click','.order_details',function(){
// var order_id = $(this).closest('i').attr('value');
var member_id = $(this).closest('tr').attr('id');
- var order_id = $(this).children("td:nth-child(1)").text();
+ var order_id = $(this).children("td:nth-child(1)").text();
$.ajax({
url:"= base_url(); ?>/order_details",
@@ -135,14 +146,14 @@ $(document).on('click','.order_details',function(){
\ No newline at end of file
+ });
+
\ No newline at end of file
diff --git a/app/Views/user_form.php b/app/Views/user_form.php
index 28a8d43..c42c7e5 100644
--- a/app/Views/user_form.php
+++ b/app/Views/user_form.php
@@ -41,7 +41,6 @@
Coach
Frontdesk
-
@@ -70,37 +69,6 @@
-
-
-
-
diff --git a/app/Views/users_list.php b/app/Views/users_list.php
index 53d7c29..5fbb39f 100644
--- a/app/Views/users_list.php
+++ b/app/Views/users_list.php
@@ -1,4 +1,15 @@
-
+
+