</nav>
                </div>
                <!--  END TOPBAR  -->

            </ul>

            <ul class="navbar-item flex-row ml-auto">
                <li class="nav-item align-self-center search-animated">
                    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search toggle-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
                    <form class="form-inline search-full form-inline search" role="search">
                        <div class="search-bar">
                            <input type="text" class="form-control search-form-control  ml-lg-auto" placeholder="Search...">
                        </div>
                    </form>
                </li>
            </ul>

            <ul class="navbar-item flex-row nav-dropdowns">
               

               

                <li class="nav-item dropdown notification-dropdown">
                    <a href="javascript:void(0);" class="nav-link dropdown-toggle" id="notificationDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-bell"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg><span class="badge badge-success"></span>
                    </a>
                    <div class="dropdown-menu position-absolute" aria-labelledby="notificationDropdown">
                        <div class="notification-scroll">
						  <?
		   


							 $query_not = $mysqli->prepare("select heading, content from notice");

													$query_not->execute();

													$query_not->bind_result($heading, $content);
		   
		   ?>
		   <?
		                                 while ($query_not->fetch()){
		                                  ?>

                            <div class="dropdown-item">
                                <div class="media server-log">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-server"><rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6" y2="6"></line><line x1="6" y1="18" x2="6" y2="18"></line></svg>
                                    <div class="media-body">
                                        <div class="data-info">
                                            <h6 class=""><? echo $heading;?></h6>
                                            <p class=""><? echo $content;?></p>
                                        </div>

                                        <div class="icon-status">
                                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
                                        </div>
                                    </div>
                                </div>
                            </div>
							<? } ?>

                            

                            
                        </div>
                    </div>
                </li>
				
											<?
$member_id=$_SESSION['member_id'];
$qry2=$mysqli->prepare("select name,ewallet  from member where member_id=?");

$qry2->bind_param("s", $member_id);

  $qry2->execute();

$qry2->bind_result($name,$ewallet); 

	while($qry2->fetch())

	{

	
	$name=$name;
	$ewallet=$ewallet;

	}
?>

                <li class="nav-item dropdown user-profile-dropdown order-lg-0 order-1">
                    <a href="javascript:void(0);" class="nav-link dropdown-toggle user" id="user-profile-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <div class="media">
                            <img src="assets/img/90x90.jpg" class="img-fluid" alt="admin-profile">
                        </div>
                    </a>
                    <div class="dropdown-menu position-absolute" aria-labelledby="userProfileDropdown">
                        <div class="user-profile-section">
                            <div class="media mx-auto">
                                <div class="media-body">
                                    <h5>Name : <? echo $name;?></h5>
                                    <p>Member ID : <? echo $member_id;?></p>
                                </div>
                            </div>
                        </div>
                        <div class="dropdown-item">
                            <a href="update_profile.php">
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg> <span>Profile</span>
                            </a>
                        </div>
                       
                        <div class="dropdown-item">
                            <a href="logout.php">
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg> <span>Log Out</span>
                            </a>
                        </div>
                    </div>

                </li>
            </ul>
        </header>
    </div>
    <!--  END NAVBAR  -->

    <!--  BEGIN MAIN CONTAINER  -->
    <div class="main-container" id="container">

        <div class="overlay"></div>
        <div class="search-overlay"></div>
        
        <!--  BEGIN CONTENT PART  -->
        <div id="content" class="main-content">
            <div class="layout-px-spacing">

                <div class="page-header">
                    <div class="page-title">
                        <h3><? echo $name;?>(<? echo $member_id;?>)</h3>
                    </div>
                    
                    <div class="toggle-switch">
                        <label class="switch s-icons s-outline  s-outline-secondary">
                            <input type="checkbox" checked="" class="theme-shifter">
                            <span class="slider round">
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>

                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
                            </span>
                        </label>
                    </div>
                </div>

                <div class="row layout-top-spacing">

                 <div id="tableSimple" class="col-lg-12 col-12 layout-spacing">
                            <div class="statbox widget box box-shadow">
                                <div class="widget-header">
                                    <div class="row">
                                        <div class="col-xl-12 col-md-12 col-sm-12 col-12">
                                            <h4>Tree View</h4>
                                        </div>
                                    </div>
                                </div>
								<?

 $member_id=base64_decode($_REQUEST['member_id']);

 


 $qq=$mysqli->prepare("select name,id,total_left_point,total_right_point,left_point,right_point,pair_point,joining_date,active,left_business,right_business,total_left_pv,total_right_pv,left_pv,right_pv,pack_id,pricipal_status,prime_status,product_status,left_free,right_free from member where member_id=?");

								 $qq->bind_param("s", $member_id);

								 $qq->execute();

								  $qq->bind_result($name,$id,$total_left_point,$total_right_point,$left_point,$right_point,$pair_point,$joining_date,$active,$left_business,$right_business,$total_left_pv,$total_right_pv,$left_pv,$right_pv,$pack_id,$pricipal_status,$prime_status,$product_status,$left_free,$right_free);

								  while($qq->fetch())

									{

									$name=$name;

									$pid=$id;

									$total_left_point=$total_left_point;

									$total_right_point=$total_right_point;

									$left_point=$left_point;

									$right_point=$right_point;

									$pair_point=$pair_point;

									$joining_date=$joining_date;

									$active=$active;

									$left_business=$left_business;

									$right_business=$right_business;

									$total_left_pv=$total_left_pv;

									$total_right_pv=$total_right_pv;

									$left_pv=$left_pv;
									$pricipal_status=$pricipal_status;
                                     $prime_status=$prime_status;
									 $product_status=$product_status;
									$right_pv=$right_pv;

									$pack_id=$pack_id;
									$left_free=$left_free;
									$right_free=$right_free;

									}

									if($active=="n"){$clr="#FF0000";}else{if($pricipal_status=="y"){$clr="#FFFFFF";}if($prime_status=="y"){$clr="#009900";}if($product_status=="y"){$clr="#FF0066";}}
									
	?>		
                                <div class="widget-content widget-content-area">
                                    <div class="table-responsive">
									<table class="table table-bordered mb-4">

<tr>

	<td align="center">

	<table cellpadding="0" cellspacing="0" border="0" bordercolor="#000000" width="100%">

	

	

	

	

	
<tr>

		<td width="50%"><b>Total Left Member :</b><? echo $left_free;?></td>

		<td width="50%" align="right"><b>Total Right Member :</b><? echo $right_free;?></td>

	</tr>
	
	

	
<tr>

		<td width="50%"><b>Current Left Business :</b><? echo $left_pv;?></td>

		<td width="50%" align="right"><b>Current Right Business :</b><? echo $right_pv;?></td>

	</tr>
	
	<tr>

		<td width="50%"><b>Total Left Business :</b><? echo $total_left_pv;?></td>

		<td width="50%" align="right"><b>Total Right Business :</b><? echo $total_right_pv;?></td>

	</tr>
	


	<tr>

		<td colspan="2" align="center"><b>Current Matching  :</b><? echo $pair_point;?></td>

		

	</tr>

	
	

	

	<tr>

		<td colspan="2" align="center"><input type="button" onclick="history.go(-1);" value="BACK TO PRREVIOUS" /></td>

		

	</tr>

	</table>	

	</td>

</tr>

<tr>

	<td>	



<table align="left" border="0" cellpadding="0" cellspacing="0" width="100%">

	<tbody><tr>

		<td colspan="8" align="center" height="120" valign="top"><img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br>

		  <a href="tree_view.php?member_id=<?php  echo base64_encode($member_id);?>"><font color="<? echo $clr;?>"><? echo $name;?></a><br><? echo $member_id;?><br><b><? echo $joining_date;?></b></td>

	</tr>

	<tr>

		<td colspan="8" style="margin: 0px; padding: 0px; height: 1px;" align="center" valign="top"><img alt="" src="binary/Line.gif" border="0"></td>

	</tr>

	<tr>

		<td colspan="4" align="center" height="120" valign="top">

		

		<?

		$flag=1;

		 $prt_id=$pid;

		$pos="L";

		 include("member_details.php");

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"> <font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?>

		</td>

		<td colspan="4" align="center" height="120" valign="top">

		<?

		$flag=2;

		 $prt_id=$pid;

		$pos="R";

		 include("member_details.php");

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?>

		

		</td>

	</tr>

	<tr>

		<td colspan="4" align="center" valign="top"><img alt="" src="binary/Line1.GIF" border="0"></td>

		<td colspan="4" align="center" valign="top"><img alt="" src="binary/Line1.GIF" border="0"></td>

	</tr>

	<tr>

		<td colspan="2" align="center" height="120" valign="top">

		<?

		$flag=3;

		$prt_id=$id1;

		$pos="L";

		 include("member_details.php");

		 $id3=$ids;

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?>

	</td>

		<td colspan="2" align="center" height="120" valign="top">

		<?

		$flag=4;

		$prt_id=$id1;


		$pos="R";

		 include("member_details.php");

		 $id4=$ids;

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?>

		</td>

		<td colspan="2" align="center" height="120" valign="top">

		<?

		$flag=5;

		$prt_id=$id2;

		$pos="L";

		 include("member_details.php");

		 $id5=$ids;

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?>

		</td>

		<td colspan="2" align="center" height="120" valign="top">

		

		<?

		$flag=6;

		$prt_id=$id2;

		$pos="R";

		 include("member_details.php");

		 $id6=$ids;

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?>

		

		</td>

	</tr>

	

	

	<tr>

		<td width="6%" colspan="2" align="center" valign="top"><img alt="" src="binary/Line2.GIF" border="0"></td>

		

		<td width="13%" colspan="2" align="center" valign="top"><img alt="" src="binary/Line2.GIF" border="0"></td>

		<td width="15%" colspan="2" align="center" valign="top"><img alt="" src="binary/Line2.GIF" border="0"></td>

	

		<td width="12%" colspan="2" align="center" valign="top" ><img alt="" src="binary/Line2.GIF" border="0"></td>

		

	</tr>

	

	<tr>

		<td width="6%" colspan="1" align="center" valign="top"><?

		//$flag=6;

		$prt_id=$id3;

		$pos="L";

		 include("member_details.php");

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?></td>

		<td width="6%" colspan="1" align="center" valign="top"><?

		//$flag=6;

		$prt_id=$id3;

		$pos="R";

		 include("member_details.php");

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?></td>

		<td width="6%" colspan="1" align="center" valign="top"><?

		//$flag=6;

		$prt_id=$id4;

		$pos="L";

		 include("member_details.php");

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?></td>

		<td width="6%" colspan="1" align="center" valign="top"><?

		//$flag=6;

		$prt_id=$id4;

		$pos="R";

		 include("member_details.php");

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?></td>

		<td width="6%" colspan="1" align="center" valign="top"><?

		//$flag=6;

		$prt_id=$id5;

		$pos="L";

		 include("member_details.php");

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?></td>

		<td width="6%" colspan="1" align="center" valign="top"><?

		//$flag=6;

		$prt_id=$id5;

		$pos="R";

		 include("member_details.php");

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?></td>

		<td width="6%" colspan="1" align="center" valign="top"><?

		$flag=6;

		$prt_id=$id6;

		$pos="L";

		 include("member_details.php");

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?></td>

		<td width="6%" colspan="1" align="center" valign="top"><?

		//$flag=6;

		$prt_id=$id6;

		$pos="R";

		 include("member_details.php");

		?>

		<? if($non!=0){?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img0" src="binary/1.png" style="border-width:0px;"><br />

		<a href="tree_view.php?member_id=<?php  echo base64_encode($mem_id);?>"><font color="<? echo $colr;?>"><? echo $name;?></a><br><? echo $mem_id;?><br><b><? echo $joining_date;?></b></font>

		<? } else { ?>

		<img alt="" id="ctl00_ContentPlaceHolder1_Img1" src="binary/b.png" style="border-width:0px;">

		<br />

		Join Now

		<? } ?></td>

	</tr>

</tbody></table>



</td>

</tr>

</table>
                                        
                                    </div>

                                    

                                </div>
                            </div>
                        </div>

                    
                

                    

                    

                </div>