<?php include "layouts/menu.php"; ?> <div class="right_col" role="main">
        
            <div class="row">
                 <!-- page header -->
                <div class="col-lg-12">
                    <h1 class="page-header  alert alert-info">Tally</h1>
                </div>
                <!--end page header -->
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <!-- Form Elements -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Details
                        </div>
                        <div class="panel-body">
                            <div class="row">
  <div id="mydiv">
  <input type="button" value="Print" onclick="PrintElem('#mydiv')"  style="margin:20px;">
  <div class="alert alert-info">Tally For Paid Dues</div>
		
                 
			<?php /*....................................................................................*/?>
  <form class="form-horizontal" method="post" action="" enctype="multipart/form-data">
    <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Enter the Date</label>
    <div class="col-sm-4">
    <input type="text" class="form-control" id="datepicker3" name="paydate" value="" placeholder="DD/MM/YYYY" onfocus="insertDate(this,'DD-MM-YYYY')">
    </div>
  </div>
			<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-default" name="s19">Total</button>
    </div>
  </div>
      <div class="alert alert-success">
	  <b><p style="color:#1928CF;margin:10px;">
	  <?php
								if(isset($_POST['s19']))
								{
									extract($_POST);
                                    $sql = "SELECT SUM(invest) FROM invest where mfin='$mfin' &&  date='$paydate'";
                                    $q = mysqli_query($conn, $sql);
                                    $row1 = mysqli_fetch_array($q);
									echo $row1[0];
									
							}?></p></b>
			</form>		
</div>					
  <form class="form-horizontal" method="post" action="" enctype="multipart/form-data">
    <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Name</label>
    <div class="col-sm-4">
    <input type="text" class="form-control" id="tot" name="investor" value="" placeholder="E.g 1008">
    </div>
  </div>
<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-default" name="s10">Get</button>
    </div>
  </div>
  
    <div class="alert alert-success">
	  <b><p style="color:red;margin:10px;"><?php
								if(isset($_POST['s10']))
								{
									extract($_POST);
                                    $sql = "SELECT SUM(invest) FROM invest where mfin='$mfin' &&  investor='$investor'";
                                    $q = mysqli_query($conn, $sql);
                                    $row1 = mysqli_fetch_array($q);
									echo $row1[0];			
								}
							?></p></b>
			</form>		
</div>
</div></div>
</div></div></div>
	   <?php include "layouts/footer.php"; ?>
  </body>
</html>
