Merge branch 'master' of bitbucket.org:venbainformationtechnology/golf_backend

This commit is contained in:
sriramv 2023-06-15 15:26:57 +05:30
commit cd7cce3cb8
9 changed files with 30 additions and 37 deletions

View File

@ -139,17 +139,16 @@ class Member_controller extends BaseController
if ($token) if ($token)
{ {
$tokendata = $this->Cart_token_model->where('md5(token)', $token )->findAll(); $tokendata = $this->Cart_token_model->where('md5(token)', $token )->findAll();
foreach ($tokendata as $value) foreach ($tokendata as $value)
{ {
$data = $this->cartModel->where('pack_id', $value['primary_id'] )->find(); $data = $this->cartModel->where('pack_id', $value['primary_id'] )->where('member_id', $this->session->get('logged_user') )->find();
if($data) if($data)
{ {
$successdata = $this->cartModel->where('pack_id', $value['primary_id'] )->set(array( 'count' => $data[0]['count'] + 1 ))->update(); $successdata = $this->cartModel->where('pack_id', $value['primary_id'] )->where('member_id', $this->session->get('logged_user') )->set(array( 'count' => $data[0]['count'] + 1 ))->update();
if ($successdata) if ($successdata)
{ {
$deletedata = $this->Cart_token_model->where('id', $value['id'] )->delete(); $deletedata = $this->Cart_token_model->where('id', $value['id'] )->delete();

View File

@ -130,7 +130,7 @@ class PaymentController extends BaseController
} else { } else {
// echo $this->session->get('logged_user');die();
$this->payment_form(); $this->payment_form();
} }
@ -151,13 +151,13 @@ class PaymentController extends BaseController
{ {
if(!session()->has('logged_user')) // if(!session()->has('logged_user'))
{ // {
return redirect()->to(base_url()); // return redirect()->to(base_url());
} // }
$CartData = $this->cartModel->where('member_id',session()->get('logged_user'))->findAll(); $CartData = $this->cartModel->where('member_id',session()->get('logged_user'))->findAll();

View File

@ -514,7 +514,15 @@ class Sendmail_controller extends BaseController
// echo 'Email already verified.'; // echo 'Email already verified.';
return redirect()->to(base_url()."set_password/".md5($user_data[0]['id'])); if($user_data[0]['password'] == '')
{
return redirect()->to(base_url()."set_password/".md5($user_data[0]['id']));
}
else
{
return redirect()->to(base_url());
}
} }

View File

@ -1 +0,0 @@
{"web":{"client_id":"1091575547896-uksojot6eohd8i2mg7dcga9t0rn430ie.apps.googleusercontent.com","project_id":"titanium-genre-389806","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"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","redirect_uris":["http://localhost/golf_backend/test2"],"javascript_origins":["http://localhost"]}}

View File

@ -1,6 +0,0 @@
{
"access_token": "your-access-token",
"refresh_token": "your-refresh-token",
"expires_in": 3600,
"created": 1678934567
}

View File

@ -30,7 +30,7 @@
</p> --> </p> -->
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100"> <table id="datatable" class="table table-striped dt-responsive nowrap w-100">
<thead> <thead>
<tr> <tr>
<th>Pack Name</th> <th>Pack Name</th>

View File

@ -50,16 +50,18 @@
<div class="col-lg-2 text-center"> <div class="col-lg-2 text-center">
<div> <div>
<a href="https://<?php echo $_SERVER['SERVER_NAME']; ?>" class="custom-logo-link" rel="home"><img src="<?= base_url()."/public"; ?>/assets/member_images/GolfEvolution-Logo-Colour.png" alt="" width="120" height="89"></a> <a class="custom-logo-link" rel="home"><img src="<?= base_url()."/public"; ?>/assets/member_images/GolfEvolution-Logo-Colour.png" alt="" width="120" height="89"></a>
</div> </div>
</div> </div>
<div class="col-lg-5 header2"> <div class="col-lg-5 header2">
<ul> <ul>
<li><a href="<?php if(session()->has('logged_user')) { echo base_url()."member_home"; }else{ echo base_url(); } ?>" <li><a href="<?php if(session()->has('logged_user')) { echo base_url()."member_home"; }else{ echo base_url(); } ?>"
class="nav-button"><img src="<?= base_url()."/public"; ?>/assets/member_images/button-logo.png" width="20" height="20"> class="nav-button">
<img src="<?= base_url()."/public"; ?>/assets/member_images/button-logo.png" width="20" height="20">
<?php if(session()->has('logged_user')) { echo session()->get('logged_user_name'); }else{ ?>MEMBER ACCESS<?php } ?></a></li> <?php if(session()->has('logged_user')) { echo session()->get('logged_user_name'); }else{ ?>MEMBER ACCESS<?php } ?></a></li>
<li><a href="<?php if(session()->has('logged_user')) { echo base_url()."view_cart/".md5(session()->get('logged_user')).""; }else{ echo base_url()."view_cart/".md5(session()->get('user_token')).""; } ?>" <li><a href="<?php if(session()->has('logged_user')) { echo base_url()."view_cart/".md5(session()->get('logged_user')).""; }else{ echo base_url()."view_cart/".md5(session()->get('user_token')).""; } ?>"
class="cart-menu" title="View Cart"><img src="<?= base_url()."/public"; ?>/assets/member_images/header-cart-icon.png" width="22" height="22"/>My Cart</a></li> class="cart-menu" title="View Cart">
<img src="<?= base_url()."/public"; ?>/assets/member_images/header-cart-icon.png" width="22" height="22"/>My Cart</a></li>
</ul> </ul>
</div> </div>

View File

@ -105,7 +105,7 @@
</tr> </tr>
<?php for( $i = count($credit_data) - 1; $i >= 0 ; $i--) { ?> <?php for( $i = count($credit_data) - 1; $i >= 0 ; $i--) { ?>
<tr> <tr>
<td><?php $date = new DateTime($credit_data[$i]['created_at']); echo $date->format('M-d-Y'); ?></td> <td><?php $date = new DateTime($credit_data[$i]['created_at']); echo $date->format('M d , Y'); ?></td>
<td> <td>
<?php <?php
if($credit_data[$i]['expiring_date'] < date('m-d-Y', time())) if($credit_data[$i]['expiring_date'] < date('m-d-Y', time()))
@ -113,7 +113,7 @@
else else
echo '<p>'.$credit_data[$i]['package_name'].'</p>'; echo '<p>'.$credit_data[$i]['package_name'].'</p>';
?> ?>
<p class="mb-0">Expiry Date : <?php $date = new DateTime($credit_data[$i]['expiring_date']); echo $date->format('M-d-Y'); ?></p> <p class="mb-0">Expiry Date : <?php $date = new DateTime($credit_data[$i]['expiring_date']); echo $date->format('M d , Y'); ?></p>
<p>Order Id : <?php echo $credit_data[$i]['order_id'] ?></p></td> <p>Order Id : <?php echo $credit_data[$i]['order_id'] ?></p></td>
<?php <?php
if($credit_data[$i]['running_balance'] > 0) if($credit_data[$i]['running_balance'] > 0)
@ -135,7 +135,7 @@
<div>Credits: <span><?= $no_of_credits ?></span></div> <div>Credits: <span><?= $no_of_credits ?></span></div>
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">
<div>Expiry Date: <span><?php if($expiring_date){ $date = new DateTime($expiring_date); echo $date->format('M-d-Y'); }?></span></div> <div>Expiry Date: <span><?php if($expiring_date){ $date = new DateTime($expiring_date); echo $date->format('M d , Y'); }?></span></div>
</div> </div>
</div> </div>
@ -158,14 +158,14 @@
<?php foreach ($TransactionData as $key => $value) { ?> <?php foreach ($TransactionData as $key => $value) { ?>
<tr id="<?= $key."_table-grey" ?>"> <tr id="<?= $key."_table-grey" ?>">
<td>#<?= $value['order_id'] ?></td> <td>#<?= $value['order_id'] ?></td>
<td><?php $date = new DateTime($value['created_at']); echo $date->format('M-d-Y'); ?></td> <td><?php $date = new DateTime($value['created_at']); echo $date->format('M d , Y'); ?></td>
<td>$<?= json_decode($value['transaction'] , true)['payment']['amount_money']['amount']; ?></td> <td>$<?= json_decode($value['transaction'] , true)['payment']['amount_money']['amount']; ?></td>
<td></td> <td></td>
<td class="down-icon" id="<?= $key."_table-grey" ?>"><div class="order-down"><i id="<?= $key."_table-grey_down-icon" ?>" class="fa fa-caret-down" aria-hidden="true"></i></div></td> <td class="down-icon" id="<?= $key."_table-grey" ?>"><div class="order-down"><i id="<?= $key."_table-grey_down-icon" ?>" class="fa fa-caret-down" aria-hidden="true"></i></div></td>
</tr> </tr>
<!-- <tr class="table-grey <?= $key."_table-grey" ?>"> <!-- <tr class="table-grey <?= $key."_table-grey" ?>">
<td><?= $value['order_id'] ?></td> <td><?= $value['order_id'] ?></td>
<td><?php $date = new DateTime($value['created_at']); echo $date->format('M-d-Y'); ?></td> <td><?php $date = new DateTime($value['created_at']); echo $date->format('M d , Y'); ?></td>
<td>$<?= json_decode($value['transaction'] , true)['payment']['amount_money']['amount']; ?></td> <td>$<?= json_decode($value['transaction'] , true)['payment']['amount_money']['amount']; ?></td>
<td><img src="<?= base_url()."/public/"; ?>assets/member_images/table-order-icon-white.png" alt=""> - </td> <td><img src="<?= base_url()."/public/"; ?>assets/member_images/table-order-icon-white.png" alt=""> - </td>
<td></td> <td></td>
@ -180,7 +180,7 @@
<?php foreach ($value['credit_data'] as $credit_datakey => $credit_data_value) { ?> <?php foreach ($value['credit_data'] as $credit_datakey => $credit_data_value) { ?>
<tr class="table-grey <?= $key."_table-grey" ?>"> <tr class="table-grey <?= $key."_table-grey" ?>">
<td><?= $credit_data_value['package_name'] ?></td> <td><?= $credit_data_value['package_name'] ?></td>
<td><p>Pack Cost : $<?= $credit_data_value['cost'] ?></p><p>Pack Credits : <?= $credit_data_value['credit_points'] ?> Nos</p><p>Pack Expiry : <?php $date = new DateTime($credit_data_value['expiring_date']); echo $date->format('M-d-Y'); ?></p></td> <td><p>Pack Cost : $<?= $credit_data_value['cost'] ?></p><p>Pack Credits : <?= $credit_data_value['credit_points'] ?> Nos</p><p>Pack Expiry : <?php $date = new DateTime($credit_data_value['expiring_date']); echo $date->format('M d , Y'); ?></p></td>
<td><?= $credit_data_value['pack_count'] ?></td> <td><?= $credit_data_value['pack_count'] ?></td>
<td><span>$</span><?= $credit_data_value['costSum'] ?></td> <td><span>$</span><?= $credit_data_value['costSum'] ?></td>
<td></td> <td></td>

View File

@ -114,16 +114,7 @@ $(document).on('click','.credit_usage',function(){
}); });
}); });
// $(document).ready(function(){
// var table = $('#datatable-buttons').DataTable();
// table.destroy();
// $('#datatable-buttons').DataTable({
// "order": [[ 0, "desc" ]]
// });
// });
</script>
<script> <script>
$(document).ready(function() { $(document).ready(function() {