MMCT TEAM
Server IP : 2a02:4780:11:1359:0:1d43:a566:2  /  Your IP : 216.73.216.161
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/link/../sale_new/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u490972518/domains/ppschool.org.in/public_html/link/../sale_new/withdraw_pair.php
<?php
include('php-includes/connect.php');
include('php-includes/check-login.php');
$userid = $_SESSION['userid'];
$selk="select * from user where email='$userid' ";
$resk=mysqli_query($con,$selk);
$rowk=mysqli_fetch_array($resk,MYSQLI_BOTH);
//echo $userid;
?>
<?PHP include("link/header.php")?>
<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"/>
  <link href="/your-path-to-fontawesome/css/fontawesome.css" rel="stylesheet">
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.4.1.min.js"></script>

<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>
<section id="main-content">
	<section class="wrapper">
	<div id="page-wrapper" style="background-color: white;">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">PAIR AMOUNT WITHDRAW</h1>
						
											<script>
$(document).ready(function(){
    $('#example').DataTable({
        dom: 'Bfrtip',
       buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
    });
	
});


function pay12(id)
			{
			   //  alert(id);
				$("#editmodel123").modal("show");
				$("#editbody123").load("code/student_detailscode.php?flag=56&id="+id);
				
			}
			function payshow12(id)
			{
			   //  alert(id);
				$("#editmodel123").modal("show");
				$("#editbody123").load("code/student_detailscode.php?flag=62&id="+id);
				
			}
			function payment(form)
			{
				$.ajax({
					url:"code/student_detailscode.php?flag=57",
					type:"POST",
					data:new FormData(form),
					
					contentType:false,    // for photo upload ke liye hai
					processData:false,    //for photo upload ke liye hai
					cache:false,
					success:function(res){
						alert(res);
						
						
							
							$("#editmodel123").modal("hide");
							window.location.href='withdraw_pair.php';
						
					},
					error:function(){
						alert("error");
					}
				});
				return false;
			}
</script>
<?php

	$sel1234="select * from  withdraw where userid='$userid' and plan='Pair' ";
	$res1234=mysqli_query($con,$sel1234);
	//$row1234=mysqli_fetch_array($res1234,MYSQLI_BOTH);
	
	$sel12341="select * from  recieve where dis='$userid' and plan='Pair' and status='Yes' ";
	$res12341=mysqli_query($con,$sel12341);
	 $tot1=0;
	while($row12341=mysqli_fetch_array($res12341,MYSQLI_BOTH))
		
	{
		$balance1=$row12341['amount'];
		$date=$row12341['date'];
		$tot1=$balance1+$tot1;
	}
	
	
	//echo $tot1;
	////for name
	$sel="select * from tree where userid='$userid' ";
			$res=mysqli_query($con,$sel);
			$row=mysqli_fetch_array($res,MYSQLI_BOTH);
			$userleft=$row["left"];
			$userright=$row["right"];
			
			$allleftusers=array($userleft);
			$allrightusers=array($userright);
			
			function printleft($user_id)
			{
				global $allleftusers;
				global $con;
				
				$sel1="select * from tree where userid='$user_id' ";
				$res1=mysqli_query($con,$sel1);
				$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
				
				$userleft1=$row1["left"];
				$userright1=$row1["right"];
				
				if($userleft1!="")
				{
					array_push($allleftusers,$userleft1);
				}
				if($userright1!="")
				{
					array_push($allleftusers,$userright1);
				}
				
				if(checkuser($userleft1))
				{
					printleft($userleft1);
				}				
				if(checkuser($userright1))
				{
					printleft($userright1);
				}
				
			}
			function printright($user_id)
			{
				global $allrightusers;
				global $con;
				$sel1="select * from tree where userid='$user_id' ";
				$res1=mysqli_query($con,$sel1);
				$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
				
				$userleft1=$row1["left"];
				$userright1=$row1["right"];
				
				if($userleft1!="")
				{
					array_push($allrightusers,$userleft1);
				}
				if($userright1!="")
				{
					array_push($allrightusers,$userright1);
				}
				
				if(checkuser($userleft1))
				{
					printright($userleft1);
				}
				
				if(checkuser($userright1))
				{
					printright($userright1);
				}
				
			}
			function checkleft($user_id)
			{
				global $con;
				$sel1="select * from tree where userid='$user_id' ";
				$res1=mysqli_query($con,$sel1);
				$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
				if($row1["left"]=="" || $row1["left"]==NULL || $row1["left"]=="NULL")
				{
					return false;
				}
				else
				{
					return true;
				}
			}
			function checkright($user_id)
			{
				global $con;
				$sel1="select * from tree where userid='$user_id' ";
				$res1=mysqli_query($con,$sel1);
				$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
				if($row1["right"]=="" || $row1["right"]==NULL || $row1["right"]=="NULL")
				{
					return false;
				}
				else
				{
					return true;
				}
			}
			
			function checkuser($user_id)
			{
				global $con;
				$sel1="select * from tree where userid='$user_id' ";
				$res1=mysqli_query($con,$sel1);
				$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
				if($row1["right"]=="" && $row1["left"]=="")
				{
					return false;
				}
				else
				{
					return true;
				}
			}
			
			
			printleft($userleft);
			printright($userright);
			
			$countleft=count($allleftusers);
			$countright=count($allrightusers);
				$Total_pairamount=0;
foreach($allleftusers as $left_use)
{
	$sel125="select * from  user where  email='$left_use' ";
	$res12l5=mysqli_query($con,$sel125);
	$row12l5=mysqli_fetch_array($res12l5,MYSQLI_BOTH);
	$amount_pair=$row12l5['amount'];
	//echo $amount_pair;
	
	$sel1251="select * from  plan where  plan='$amount_pair' ";
	$res12l51=mysqli_query($con,$sel1251);
	$row12l51=mysqli_fetch_array($res12l51,MYSQLI_BOTH);
	$am=$row12l51['com'];
	$Total_pairamount=$am+$Total_pairamount;
}
$Total_pairamount_right=0;

foreach($allrightusers as $left_use1)
{
	$sel1253="select * from  user where  email='$left_use1' ";
	$res12l53=mysqli_query($con,$sel1253);
	$row12l53=mysqli_fetch_array($res12l53,MYSQLI_BOTH);
	$amount_pair_right=$row12l53['amount'];
	//echo $amount_pair;
	
	$sel12513="select * from  plan where  plan='$amount_pair_right' ";
	$res12l513=mysqli_query($con,$sel12513);
	$row12l513=mysqli_fetch_array($res12l513,MYSQLI_BOTH);
	$am3=$row12l513['com'];
	$Total_pairamount_right=$am3+$Total_pairamount_right;
	////////////////////////for green count
	
	////////////////////////for green count
}
						
				$main=min($Total_pairamount,$Total_pairamount_right)	;
	////for name
	////for tree
	?>

	<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
        <thead>
            <tr>
                <th  style="text-align:center">DIST ID</th><th  style="text-align:center">NAME</th><th  style="text-align:center">PAIR AMOUNT</th><th  style="text-align:center">RECEIVE AMOUNT </th><th  style="text-align:center">REMAIN AMOUNT </th><th  style="text-align:center">ACTION</th>
            </tr>
        </thead>

<tbody>		
  
		 <?php
		 
		 
		 
		 ?>
	<tr class="text-center">
	<td><?PHP echo $userid;?></td><td><?php echo $rowk['name'];?></td><td><?php echo $main;?></td><td><?php echo $tot1;?></td><td><?php echo $main-$tot1;?></td>
	<td><a href="withdraw_pair_request.php?flag=<?php echo  $userid;?>" <span class="fa fa-inr">Request Send</span></a>&emsp;<a href="withdraw_pair_requestshow.php?flag=<?php echo  $userid;?>" <span class="fa fa-inr">Request Show</span></a></td>
	
	
	</tr>
	
	 </tbody>
	 <tfoot>
            <tr>
                <th  style="text-align:center">DIST ID</th><th  style="text-align:center">NAME</th><th  style="text-align:center">PAIR AMOUNT</th><th  style="text-align:center">RECEIVE AMOUNT </th><th  style="text-align:center">REMAIN AMOUNT </th><th  style="text-align:center">ACTION</th>
            </tr>
        </tfoot>
    </table>
	
	</div>
                    </div>
                    <!-- /.col-lg-12 -->

                </div>
                <!-- /.row -->
                <div class="row">
                
                </div><!--/.row-->
            </div>
            <!-- /.container-fluid -->
        </div>
        <!-- /#page-wrapper -->

    </div>

	
</section>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>

<script>
  $.validate({
    modules : 'html5',
	modules : 'file'
  });
</script>
 <!-- footer -->
		  <div class="footer">
			<div class="wthree-copyright">
			  <p>© 2018 Visitors. All rights reserved | Design by <a href="#">ICONS FUTURE</a></p>
			</div>
		  </div>
  <!-- / footer -->
</section>
<!--main content end-->
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
<!-- morris JavaScript -->	
<script>
	$(document).ready(function() {
		//BOX BUTTON SHOW AND CLOSE
	   jQuery('.small-graph-box').hover(function() {
		  jQuery(this).find('.box-button').fadeIn('fast');
	   }, function() {
		  jQuery(this).find('.box-button').fadeOut('fast');
	   });
	   jQuery('.small-graph-box .box-close').click(function() {
		  jQuery(this).closest('.small-graph-box').fadeOut(200);
		  return false;
	   });
	   
	    //CHARTS
	    function gd(year, day, month) {
			return new Date(year, month - 1, day).getTime();
		}
		
		graphArea2 = Morris.Area({
			element: 'hero-area',
			padding: 10,
        behaveLikeLine: true,
        gridEnabled: false,
        gridLineColor: '#dddddd',
        axes: true,
        resize: true,
        smooth:true,
        pointSize: 0,
        lineWidth: 0,
        fillOpacity:0.85,
			data: [
				{period: '2015 Q1', iphone: 2668, ipad: null, itouch: 2649},
				{period: '2015 Q2', iphone: 15780, ipad: 13799, itouch: 12051},
				{period: '2015 Q3', iphone: 12920, ipad: 10975, itouch: 9910},
				{period: '2015 Q4', iphone: 8770, ipad: 6600, itouch: 6695},
				{period: '2016 Q1', iphone: 10820, ipad: 10924, itouch: 12300},
				{period: '2016 Q2', iphone: 9680, ipad: 9010, itouch: 7891},
				{period: '2016 Q3', iphone: 4830, ipad: 3805, itouch: 1598},
				{period: '2016 Q4', iphone: 15083, ipad: 8977, itouch: 5185},
				{period: '2017 Q1', iphone: 10697, ipad: 4470, itouch: 2038},
			
			],
			lineColors:['#eb6f6f','#926383','#eb6f6f'],
			xkey: 'period',
            redraw: true,
            ykeys: ['iphone', 'ipad', 'itouch'],
            labels: ['All Visitors', 'Returning Visitors', 'Unique Visitors'],
			pointSize: 2,
			hideHover: 'auto',
			resize: true
		});
		
	   
	});
	</script>
<!-- calendar -->
	<script type="text/javascript" src="js/monthly.js"></script>
	<script type="text/javascript">
		$(window).load( function() {

			$('#mycalendar').monthly({
				mode: 'event',
				
			});

			$('#mycalendar2').monthly({
				mode: 'picker',
				target: '#mytarget',
				setWidth: '250px',
				startHidden: true,
				showTrigger: '#mytarget',
				stylePast: true,
				disablePast: true
			});

		switch(window.location.protocol) {
		case 'http:':
		case 'https:':
		// running on a server, should be good.
		break;
		case 'file:':
		alert('Just a heads-up, events will not work when run locally.');
		}

		});
	</script>
	<!-- //calendar -->
	
	<div  class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" id="editmodel123">
<div class="modal-dialog modal-lg"> 
<div class="modal-content"> 
<div class="modal-heading"> 
<button class="close" data-dismiss="modal"> <span> &times; </span> </button>
<center><h2 class="modal-title" style="color:green;background-color:yellow"> PAIR PAID REQUEST</h2> </center>
</div>
<div class="modal-body" id="editbody123">


 </div>
<div class="modal-footer"> 



</div>


</div>
</div>


 </div>
</body>
</html>

MMCT - 2023