|
Server IP : 2a02:4780:11:1359:0:1d43:a566:2 / Your IP : 216.73.216.20 Web Server : LiteSpeed System : Linux in-mum-web1259.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u490972518 ( 490972518) PHP Version : 5.6.40 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u490972518/domains/ppschool.org.in/public_html/code/../sale/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
include('php-includes/connect.php');
include('php-includes/check-login.php');
$userid = $_SESSION['userid'];
$dis = $_REQUEST['flag'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>SARK MART - Income</title>
<!-- Bootstrap Core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- MetisMenu CSS -->
<link href="vendor/metisMenu/metisMenu.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="dist/css/sb-admin-2.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="jq/jquery.dataTables.min.css" type="text/css" rel="stylesheet"/>
<link href="jq/buttons.dataTables.min.css" type="text/css" rel="stylesheet"/>
<script src="jq/jquery.dataTables.min.js"></script>
<script src="jq/dataTables.buttons.min.js"></script>
<script src="jq/buttons.flash.min.js"></script>
<script src="jq/jszip.min.js"></script>
<script src="jq/pdfmake.min.js"></script>
<script src="jq/vfs_fonts.js"></script>
<script src="jq/buttons.html5.min.js"></script>
<script src="jq/buttons.print.min.js"></script>
<script>
$(document).ready(function(){
$('#example').DataTable({
dom: 'Bfrtip',
buttons: ['print','pdf']
});
});
</script>
</head>
<body>
<div id="wrapper">
<!-- Navigation -->
<?php include('php-includes/menu.php'); ?>
<!-- Page Content -->
<div id="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Income Of Product Purchage</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
<?php
$query = mysqli_query($con,"select * from income where userid='$userid'");
$result = mysqli_fetch_array($query);
$total=$result['total_bal'];
///////for recieve amount paid
$sel="select * from recieve where dis='$userid'";
$res=mysqli_query($con,$sel);
$tot="0";
while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
{
$amount1= $row['amount'];
$tot=$tot+$amount1;
}
////////for amount paid
///////for calculation amount
$due= $total-$tot;
//////// for calculation amount end
$sel123="select * from incomen where userid='$userid' ";
$res123=mysqli_query($con,$sel123);
$row123=mysqli_fetch_array($res123,MYSQLI_BOTH);
$income1=$row123['total_bal'];
// echo $income1;
if($income1>=300 and $income1<1200 )
{
$pay='200';
// echo $pay;
}
if($income1>=1200 and $income1<11200)
{
$pay='1000';
// echo $pay;
}
if($income1>11200)
{
$pay='7400';
// echo $pay;
}
if($income1<300)
{
$pay='0';
}
/////for bonus
$sel1231="select * from saleproductdata where disid='$userid' ";
$res1231=mysqli_query($con,$sel1231);
//$row1231=mysqli_fetch_array($res1231,MYSQLI_BOTH);
//
//echo $bv1;
?>
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading">
<div class="panel-title">BV INCOME</div>
</div>
<div class="panel-body">
<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
<thead>
<tr>
<th style="text-align:center">Sr.</th><th style="text-align:center">Product</th><th style="text-align:center">Rate</th><th style="text-align:center">Quantity</th> <th style="text-align:center">Total Amount</th><th style="text-align:center">Level</th><th style="text-align:center">BV</th><th style="text-align:center">Commission</th><th style="text-align:center">Date</th><th style="text-align:center">Time</th>
</tr>
</thead>
<tbody>
<?php
$totbv="0";
$tot="0";
$q="0";
$s=1;
$bv4=0;
$bv="0";
$bvamount="0";
while($row1231=mysqli_fetch_array($res1231,MYSQLI_BOTH))
{
$bv1=$row1231['bv'];
$pro=$row1231['product'];
$quantity=$row1231['quantity'];
$rate=$row1231['rate'];
$bvamount1=$row1231['bvamount'];
$total1=$row1231['total'];
$tot=$tot+$total1;
$q=$q+$quantity;
$bv=$bv+$bv1;
$bvamount=$bvamount+$bvamount1;
$sel1231p="select * from product where product='$pro' ";
$res1231p=mysqli_query($con,$sel1231p);
$row1231p=mysqli_fetch_array($res1231p,MYSQLI_BOTH);
$bvp=$row1231p['bv'];
$bv1=$bvp*$quantity;
$bv4=$bv4+$bv1;
?>
<tr class="text-center">
<td><?php echo $s;?></td><td><?php echo $row1231['product'];?></td><td><?php echo $row1231['rate'];?></td><td><?php echo $row1231['quantity'] ;?></td><td><?php echo $row1231['total'];?></td><td><?php echo $row1231['bv'];?></td><td><?php echo $bv1;?></td><td><?php echo $row1231['bvamount'];?></td><td><?php echo $row1231['date'];?></td><td><?php echo $row1231['time'];?></td>
</tr>
<?php
$s++;
}
?>
<tfoot>
<tr>
<th style="text-align:center">Sr.</th><th style="text-align:center">Total</th><th style="text-align:center">Rate</th><th style="text-align:center"><?php echo $q ;?></th> <th style="text-align:center"><?php echo $tot;?></th><th style="text-align:center">Level</th><th style="text-align:center"><?php echo $bv4;?></th><th style="text-align:center"><?php echo $bvamount?></th><th style="text-align:center">Date</th><th style="text-align:center">Time</th>
</tr>
</tfoot>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div><!--/.row-->
</div>
<!-- /.container-fluid -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="vendor/jquery/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src="vendor/metisMenu/metisMenu.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="dist/js/sb-admin-2.js"></script>
</body>
</html>