<?php
session_start();
$userID=$_SESSION["userID"];
if(empty($userID)){
  $error="You have no permission";
  header("location:login.php");
}

?>
<!DOCTYPE html>

<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  
  <meta name="description" content="">
  <meta name="keywords" content="">
  

  <link href="css2" rel="stylesheet">
  
  <link rel="stylesheet" href="bootstrap.min.css">
  <link rel="stylesheet" href="owl.carousel.min.css">
  <link rel="stylesheet" href="owl.theme.default.min.css">
  <link rel="stylesheet" href="jquery.fancybox.min.css">
  <link rel="stylesheet" href="style.css">
  <link rel="stylesheet" href="flaticon.css">
  <link rel="stylesheet" href="aos.css">
  <link rel="stylesheet" href="style(1).css">

  <title>Pay Now Gh</title>
</head>
<body data-aos-easing="slide" data-aos-duration="800" data-aos-delay="0">


  <div class="site-mobile-menu site-navbar-target">
    <div class="site-mobile-menu-header">
      <div class="site-mobile-menu-close">
        <span class="icofont-close js-menu-toggle"></span>
      </div>
    </div>
    <div class="site-mobile-menu-body">

      </div>
  </div>
  
  <nav class="site-nav" style="background-color: #202040;">
  <!-- <div style="background-color: #202040; height: 50px;"> -->
    <div class="container">
      <div class="site-navigation">
        <a href="index.php" class="logo">Pay Now Gh</a>
        <ul class="js-clone-nav d-none d-lg-inline-block text-left site-menu">
        <?php if(($userID !="")){echo "<li class='active'><a href='dash.php'>Dash</a></li>";}
    else {echo "<li class='active'><a href='index.php'>Home</a></li>";}?> 
          <li class="has-children">
            <a href="">Services</a>
            <ul class="dropdown">
              <li><a href="">Births & Deaths</a></li>
              <li class="has-children">
                <a href="">Property Rate</a>
                <ul class="dropdown">
                  <li><a href="">Sub Menu One</a></li>
                  <li><a href="">Sub Menu Two</a></li>
                  <li><a href="">Sub Menu Three</a></li>
                </ul>
              </li>
              <li><a href="">Daily tolls</a></li>
            </ul>
          </li>
          <li><a href="pages.html">Inner Page</a></li>
          <li><a href="contact.html">Contact Us</a></li>
        </ul>

        <ul class="js-clone-nav d-none d-lg-inline-block text-left site-menu float-right menu-absolute">
          <li class="cta-button"><a href="logout.php" target="_blank">Logout</a></li>
        </ul>

        <a href="" class="burger light ml-auto float-right site-menu-toggle js-menu-toggle d-inline-block d-lg-none" data-toggle="collapse" data-target="#main-navbar">
          <span></span>
        </a>

      </div>
    </div>
    <!-- </div> -->
  </nav>


  
<br>
<p> 
<br>
<br>
<br>





  <div class="container mb-5">

  
      <div class="col-lg-6 aos-init aos-animate" data-aos="fade-up" data-aos-delay="0">
        <div class="custom-block aos-init aos-animate" data-aos="fade-up" data-aos-delay="100">
          <h2 class="section-title">Earnings <a class="" href="prop_rate.php?service=Property Rate"> <<< Go Back</a></h2>
          
        </div>

      </div>
    
  


	<div class="table-responsive">
										
  <table class='table table-striped table-no-more table-bordered  mb-none' id='datatable-default'>
      <thead>
        <tr>
        <th><font size="1px">Total Commission Due  </font></th>
          <!-- <th><font size="1px">Full Name </font></th>
          <th><font size="1px">Property ID </font></th>
          <th><font size="1px">Phone </font></th>
          <th><font size="1px">Telco Type </font></th>
          <th><font size="1px">Amount </font></th>
          <th><font size="1px">Commision  </font></th>
          <th><font size="1px">Date </font></th> -->
          
          <!-- <th><font size="1px">Price(Ghc)  </font></th>
          
          
          <th><font size="1px">Availability </font></th> -->
          <!-- 
          <th><font size="1px">Calculate  </font></th> -->
          
        
          
          
          
          
        </tr>
      </thead>
      <?php 
include("config.php");

$transdate=date("Y-m-d");


$query="SELECT sum(userCom) as totalUcom FROM transactions where userID='$userID' and status='pending'";
$data=mysqli_query($conn,$query);
while($row=mysqli_fetch_assoc($data)){
  $totalUcom=$row["totalUcom"];
  // $fullName=$row["fullName"];
  // $phone=$row["phone"];
  // $telco=$row["telco"];
  // $amount=$row["amount"];
  // $propRefID=$row["propRefID"];
  // $date_created=$row["date_created"];
  // $token=$row["token"];
  // $userCom=$row["userCom"];



  print"<tbody>
          <tr>
          <td>$totalUcom</td>
      
          <td><a href='receive_pay.php'>Receive Payment</a></td>
          </tr>											
														</tbody>
                           
          ";


}

?>
   </table>
  </div>
  </div>


  <div class="site-footer">
    <div class="container">
      <div class="row justify-content-between">
        <div class="col-lg-4">
          <div class="widget">
            <h3>About</h3>
            <p>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live.</p>
          </div>
          <div class="widget">
            <h3>Connect with us</h3>
            <ul class="social list-unstyled">
              <li><a href="pages.php#"><span class="icon-facebook"></span></a></li>
              <li><a href="pages.php#"><span class="icon-twitter"></span></a></li>
              <li><a href="pages.php#"><span class="icon-instagram"></span></a></li>
              <li><a href="pages.php#"><span class="icon-dribbble"></span></a></li>
              <li><a href="pages.php#"><span class="icon-linkedin"></span></a></li>
            </ul>
          </div>
        </div>
        <div class="col-lg-6">
          <div class="row">
            <div class="col-12">
              <div class="widget">
                <h3>Navigations</h3>
              </div>
            </div>
            <div class="col-6 col-sm-6 col-md-4">
              <div class="widget">
                <ul class="links list-unstyled">
                  <li><a href="pages.php#">Home</a></li>
                  <li><a href="pages.php#">Services</a></li>
                  <li><a href="pages.php#">Work</a></li>
                  <li><a href="pages.php#">Process</a></li>
                  <li><a href="pages.php#">About Us</a></li>
                </ul>
              </div>
            </div>
            <div class="col-6 col-sm-6 col-md-4">
              <div class="widget">
                <ul class="links list-unstyled">
                  <li><a href="pages.php#">Press</a></li>
                  <li><a href="pages.php#">Blog</a></li>
                  <li><a href="pages.php#">Contact</a></li>
                  <li><a href="pages.php#">Support</a></li>
                  <li><a href="pages.php#">Privacy</a></li>
                </ul>
              </div>
            </div>
            <div class="col-6 col-sm-6 col-md-4">
              <div class="widget">
                <ul class="links list-unstyled">
                  <li><a href="pages.php#">Privacy</a></li>
                  <li><a href="pages.php#">FAQ</a></li>
                  <li><a href="pages.php#">Careers</a></li>
                  <li><a href="pages.php#">Process</a></li>
                  <li><a href="pages.php#">About Us</a></li>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="row justify-content-center text-center copyright">
        <div class="col-md-8">
          <p>
            <!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
            Copyright ©<script type="text/javascript" async="" src="analytics.js"></script><script>document.write(new Date().getFullYear());</script> All rights reserved |  by <a href="" target="_blank">Tekpulse Conslut Ltd</a>
            <!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. --></p>
          </div>
        </div>
      </div>
    </div>
    

    <div id="overlayer" style="display: none;"></div>
    <div class="loader" style="display: none;">
      <div class="spinner-border" role="status">
        <span class="sr-only">Loading...</span>
      </div>
    </div>
    
    <script src="jquery-3.4.1.min.js"></script>
    <script src="popper.min.js"></script>
    <script src="bootstrap.min.js"></script>
    <script src="owl.carousel.min.js"></script>
    <script src="aos.js"></script>
    <script src="jquery.animateNumber.min.js"></script>
    <script src="jquery.waypoints.min.js"></script>
    <script src="jquery.fancybox.min.js"></script>
    <script src="aos.js"></script>
    <script src="custom.js"></script>

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async="" src="js"></script>
    <script>
       window.dataLayer = window.dataLayer || [];
       function gtag(){dataLayer.push(arguments);}
       gtag('js', new Date());

       gtag('config', 'UA-23581568-13');
    </script>



  </body></php>
  <?php ?>