ok
Direktori : /home2/selectio/public_html/tnpsctestbatch.com/ |
Current File : /home2/selectio/public_html/tnpsctestbatch.com/profile_transaction.php |
<?php include 'header.php'; error_log("SELECT tbl_students.*,tbl_payment.* FROM tbl_students INNER JOIN tbl_payment ON tbl_students.id=tbl_payment.user_id WHERE tbl_students.id =".$_SESSION['user_exam']['id']." ORDER BY tbl_payment.id DESC LIMIT 1"); $user_details = $pdo->prepare("SELECT tbl_students.*,tbl_payment.* FROM tbl_students INNER JOIN tbl_payment ON tbl_students.id=tbl_payment.user_id WHERE tbl_students.id =".$_SESSION['user_exam']['id']." ORDER BY tbl_payment.id DESC LIMIT 1"); $user_details->execute(); $user_detail_data = $user_details->fetchAll(PDO::FETCH_ASSOC); $user_detail_total = $user_details->rowCount(); ?> <!-- CONTENT START --> <div class="page-content"> <!-- INNER PAGE BANNER --> <div class="wt-bnr-inr overlay-wraper bg-center" style="background-image:url(images/banner/1.jpg);"> <div class="overlay-main site-bg-white opacity-01"></div> <div class="container"> <div class="wt-bnr-inr-entry"> <div class="banner-title-outer"> <div class="banner-title-name"> <h2 class="wt-title">HI ' <?= $_SESSION['user_exam']['name'] ?> </h2> </div> </div> <!-- BREADCRUMB ROW --> <!--<div>--> <!-- <ul class="wt-breadcrumb breadcrumb-style-2">--> <!-- <li><a href="index.html">Home </a></li>--> <!-- <li>Company Profile </li>--> <!-- </ul>--> <!--</div>--> <!-- BREADCRUMB ROW END --> </div> </div> </div> <!-- INNER PAGE BANNER END --> <!-- OUR BLOG START --> <div class="section-full p-t120 p-b90 site-bg-white"> <div class="container"> <div class="row"> <div class="col-xl-3 col-lg-4 col-md-12 rightSidebar m-b30"> <div class="side-bar-st-1"> <div class="twm-nav-list-1"> <ul> <li><a href="my_profile.php"><i class="fa fa-user"></i> My Profile </a></li> <li class="active"><a href="profile_transaction.php"><i class="fa fa-credit-card"></i>My Subscription </a></li> <li><a href="logout.php"><i class="fa fa-share-square"></i> Logout </a></li> </ul> </div> </div> </div> <div class="col-xl-9 col-lg-8 col-md-12 m-b30"> <!--Filter Short By--> <div class="twm-right-section-panel site-bg-gray"> <!--Basic Information--> <div class="panel panel-default"> <div class="panel-heading wt-panel-heading p-a20"> <h4 class="panel-tittle m-a0">Your Details </h4> </div> <div class="panel-body wt-panel-body p-a20 m-b30 "> <div class="row"> <?php if($user_detail_total > 0){ $currentDate = $user_detail_data[0]['created_at']; $futureDate = date('d-m-Y', strtotime($currentDate . ' + 30 days')); if($user_detail_data[0]['payment_type']==1){ ?> <h3> Your subcription is active to access General Studies and Test Batch Series Contents. Your subscription will end in <?=$futureDate?> date .</h3> <?php } else{ ?> <h3> You have not subscribed to access General Studies and Test Batch Series contents. Please Subscribe</h3> <div class="col-md-3"> <a href="pricing.php" class="btn btn-primary" >Please subscribe</a> </div> <?php } }else{ ?> <h3> You have not subscribed to access General Studies and Test Batch Series contents. Please Subscribe</h3> <div class="col-md-3"> <a href="pricing.php" class="btn btn-primary" >Please subscribe</a> </div> <?php }?> </div> </div> </div> </form> </div> </div> </div> </div> </div> <!-- OUR BLOG END --> </div> <!-- CONTENT END --> <?php include 'footer.php' ?> <script> $('#user_details').on('submit', function(e){ console.log("Click And Form Working"); e.preventDefault(); $('#loading-div').show(); $('#content-div').hide(); $('#final_submit').prop('disabled', true); var formData = new FormData(this); formData.append('type', 'user_details_update'); $.ajax({ url: 'api/add_users.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, enctype: 'multipart/form-data', success: function (response) { if(response['status']==200){ alert(response['message']); $('#loading-div').hide(); $('#content-div').show(); }else{ alert(response['message']); $('#loading-div').hide(); $('#content-div').show(); } } }); }); </script>