<?php   
	include_once("../view/header-footer/header.php");  
?>  
   
   
   <link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
  <script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>
  <script>
  $( function() {
    $( "#accordion" ).accordion();
  } );
  </script>
   <!-- Features -->
   <div class="innerDeader">
      <div class="container">
        <a href="javascript:void(0);" id="go-back" class="goBack PaySound">
           <img src="<?php echo ROOTPATH;?>/images/Arrow 1.svg" alt="back">
       </a>  
       <?php 
        if(isset($_REQUEST['LevelB']))  
            echo "<h4>LEVEL BUSINESS</h4>";
        else if(isset($_REQUEST['ActiveT']))  
            echo "<h4>MY ACTIVE TEAM</h4>";
        else if(isset($_REQUEST['MyTeam']))
            echo "<h4>MY TEAM</h4>";
        else
            echo "<h4>DOWNLINE TEAM</h4>";
    ?>  
    
     </div>    
   </div>
   
   
   
   
<div class="innerBody">
            
       
<div id="accordion">
  <h3>Level 1</h3>
  <div>
               
        		<div class="tableBox">
                        <table>
                            
                            <tr>
                                    <th   >S No.</th> 
                                    <th   >Id</th>   
                                    <th   >Full Name</th> 
                                    <?php 
                                    if(isset($_REQUEST['LevelB'])) {
                                    ?>
                                    <th   >Amount</th> 
                                    <?php  } ?>
                                    <th   >Top Up On</th>  
                                    <th   >Registered On</th> 
                            </tr>
                            
                                
                                <?php 
                                    $sr=1;  
                                    foreach($stepCt['step1']['id'] as $dtm) 
                                    {        
                                    $stmt=$conn->prepare("select *  from UI__Rgst where cuurentId=:cuurentId ");   
                                    $stmt->bindValue(':cuurentId', $dtm , PDO::PARAM_STR);  
                                    $stmt->execute(); 
                                    $Result = $stmt->fetch(PDO::FETCH_OBJ); 
                                    
                                    
                                    $stmt=$conn->prepare("select *  from UI__DChstr where Rid=:Rid and typ=1");   
                                    $stmt->bindValue(':Rid', $dtm , PDO::PARAM_STR);  
                                    $stmt->execute(); 
                                    $Resultx = $stmt->fetchAll(PDO::FETCH_OBJ);   
                                    
                                    foreach($Resultx  as $mmt)
                                    {
                                    ?>  
                                <tr>
                                <th><?php echo $sr++;?></th>
                                <td><?php echo $dtm;?></td>
                                <td><?php echo $Result->nm;?></td>
                                <?php 
									    if(isset($_REQUEST['LevelB'])) {
									?>
								<td><?php echo $mmt->amt;?></td>
								<?php } ?>
                                <td><?php echo $mmt->Tdate;?></td>
                                <td><?php echo $Result->RegOn;?></td> 
						    	</tr> 		    	
                                <?php  
                                     }
                                 }
                                ?>      
                                
                                 <?php 
                                 
                                foreach($stepCt['step1']['id'] as $dtm) 
                                {        
                                    $stmt=$conn->prepare("select *  from UI__Rgst where cuurentId=:cuurentId ");   
                                    $stmt->bindValue(':cuurentId', $dtm , PDO::PARAM_STR);  
                                    $stmt->execute(); 
                                    $Result = $stmt->fetch(PDO::FETCH_OBJ); 
                                    
                                    
                                    $stmt=$conn->prepare("select *  from UI__DChstr where Rid=:Rid and typ=1");   
                                    $stmt->bindValue(':Rid', $dtm , PDO::PARAM_STR);  
                                    $stmt->execute();
                                    
                                    if( ($stmt->rowCount() < 1)  && (!isset($_REQUEST['ActiveT'])) )
                                    {
                                    $Resultx = $stmt->fetch(PDO::FETCH_OBJ);    
                             ?> 
                             
                              <tr>
                              <th scope="row"><?php echo $sr++;?></th>
                              <td><?php echo $dtm;?></td>
                              <td><?php echo $Result->nm;?></td>
                              <?php 
									    if(isset($_REQUEST['LevelB'])) {
									?>
								<td><?php echo $Resultx->amt;?></td>
								<?php } ?>
                              <td><?php echo $Resultx->Tdate;?></td>
                              <td><?php echo $Result->RegOn;?></td> 
                            </tr>  
                            <?php  
                                    } 
                                }
                            ?>
                             
                          </table>
                     </div>                        
   
   
  </div>
  
  <h3>Level 2</h3>
  <div>  
    		
    		<div class="tableBox">
            <table>
                
                <tr>
                        <th   >S No.</th> 
                        <th   >Id</th>   
                        <th   >Full Name</th> 
                        <?php 
                        if(isset($_REQUEST['LevelB'])) {
                        ?>
                        <th   >Amount</th> 
                        <?php  } ?>
                        <th   >Top Up On</th>  
                        <th   >Registered On</th>    
                </tr>
                
                    
                    <?php 
                                            $sr=1;  
                                            foreach($stepCt['step2']['id'] as $dtm) 
                                            {      
                                            
                                            foreach($dtm as $dtmx) 
                                            {
                                            $stmt=$conn->prepare("select *  from UI__Rgst where cuurentId=:cuurentId ");   
                                            $stmt->bindValue(':cuurentId', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            $Result = $stmt->fetch(PDO::FETCH_OBJ);   
                                            
                                            $stmt=$conn->prepare("select *  from UI__DChstr where Rid=:Rid and typ=1");   
                                            $stmt->bindValue(':Rid', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            
                                            if($stmt->rowCount() > 0) 
                                            {
                                            $Resultx = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                            foreach($Resultx as $mpp)
                                            {
                        ?> 
                    <tr>
                            <th><?php echo $sr++;?></th>
                            <td><?php echo $dtmx->cuurentId;?></td>
                            <td><?php echo $Result->nm;?></td>
                            <?php 
                            if(isset($_REQUEST['LevelB'])) {
                            ?>
                            <td><?php echo $mpp->amt;?></td>
                            <?php } ?>
                            <td><?php echo $mpp->Tdate;?></td>
                            <td><?php echo $Result->RegOn;?></td> 
                    </tr>
                     <?php  
                                            }
                                            
                                            }
                                            else  if(!isset($_REQUEST['ActiveT']))
                                            {
                                                 
                    ?>
                     <tr>
                                    <th><?php echo $sr++;?></th>
                                    <td><?php echo $dtmx->cuurentId;?></td>
                                    <td><?php echo $Result->nm;?></td>
                                    <?php 
									    if(isset($_REQUEST['LevelB'])) {
									?>
                                    <td> </td>
                                    <?php } ?>
                                    <td> </td>
                                    <td><?php echo $Result->RegOn;?></td> 
						    	</tr> 	        
                                        <?php    }
                                            
                                            
                                        }
                                     }
                    ?>  
                 
              </table>
         </div>
         
    
  </div>
  
  <h3>Level 3</h3>
  <div>
     
        
           					 
           					 
           					 
           					 <div class="tableBox">
            <table>
                
                <tr>
                        <th   >S No.</th> 
                        <th   >Id</th>   
                        <th   >Full Name</th> 
                        <?php 
                        if(isset($_REQUEST['LevelB'])) {
                        ?>
                        <th   >Amount</th> 
                        <?php  } ?>
                        <th   >Top Up On</th>  
                        <th   >Registered On</th>    
                </tr>
                
                    
                    <?php 
                                            $sr=1;  
                                            foreach($stepCt['step3']['id'] as $dtm) 
                                            {      
                                            
                                            foreach($dtm as $dtmx) 
                                            {
                                            $stmt=$conn->prepare("select *  from UI__Rgst where cuurentId=:cuurentId ");   
                                            $stmt->bindValue(':cuurentId', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            $Result = $stmt->fetch(PDO::FETCH_OBJ);   
                                            
                                            $stmt=$conn->prepare("select *  from UI__DChstr where Rid=:Rid and typ=1");   
                                            $stmt->bindValue(':Rid', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            
                                            if($stmt->rowCount() > 0) 
                                            {
                                            $Resultx = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                            foreach($Resultx as $mpp)
                                            {
                        ?> 
                    <tr>
                            <th><?php echo $sr++;?></th>
                            <td><?php echo $dtmx->cuurentId;?></td>
                            <td><?php echo $Result->nm;?></td>
                            <?php 
                            if(isset($_REQUEST['LevelB'])) {
                            ?>
                            <td><?php echo $mpp->amt;?></td>
                            <?php } ?>
                            <td><?php echo $mpp->Tdate;?></td>
                            <td><?php echo $Result->RegOn;?></td> 
                    </tr>
                     <?php  
                                            }
                                            
                                            }
                                            else  if(!isset($_REQUEST['ActiveT']))
                                            {
                                                 
                    ?>
                     <tr>
                                    <th><?php echo $sr++;?></th>
                                    <td><?php echo $dtmx->cuurentId;?></td>
                                    <td><?php echo $Result->nm;?></td>
                                    <?php 
									    if(isset($_REQUEST['LevelB'])) {
									?>
                                    <td> </td>
                                    <?php } ?>
                                    <td> </td>
                                    <td><?php echo $Result->RegOn;?></td> 
						    	</tr> 	        
                                        <?php    }
                                            
                                            
                                        }
                                     }
                    ?>  
                 
              </table>
         </div>
  </div>
  <h3>Level 4</h3>
  <div>
     
        <div class="tableBox">
            <table>
                
                <tr>
                        <th   >S No.</th> 
                        <th   >Id</th>   
                        <th   >Full Name</th> 
                        <?php 
                        if(isset($_REQUEST['LevelB'])) {
                        ?>
                        <th   >Amount</th> 
                        <?php  } ?>
                        <th   >Top Up On</th>  
                        <th   >Registered On</th>    
                </tr>
                
                    
                    <?php 
                                            $sr=1;  
                                            foreach($stepCt['step4']['id'] as $dtm) 
                                            {      
                                            
                                            foreach($dtm as $dtmx) 
                                            {
                                            $stmt=$conn->prepare("select *  from UI__Rgst where cuurentId=:cuurentId ");   
                                            $stmt->bindValue(':cuurentId', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            $Result = $stmt->fetch(PDO::FETCH_OBJ);   
                                            
                                            $stmt=$conn->prepare("select *  from UI__DChstr where Rid=:Rid and typ=1");   
                                            $stmt->bindValue(':Rid', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            
                                            if($stmt->rowCount() > 0) 
                                            {
                                            $Resultx = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                            foreach($Resultx as $mpp)
                                            {
                        ?> 
                    <tr>
                            <th><?php echo $sr++;?></th>
                            <td><?php echo $dtmx->cuurentId;?></td>
                            <td><?php echo $Result->nm;?></td>
                            <?php 
                            if(isset($_REQUEST['LevelB'])) {
                            ?>
                            <td><?php echo $mpp->amt;?></td>
                            <?php } ?>
                            <td><?php echo $mpp->Tdate;?></td>
                            <td><?php echo $Result->RegOn;?></td> 
                    </tr>
                     <?php  
                                            }
                                            
                                            }
                                            else  if(!isset($_REQUEST['ActiveT']))
                                            {
                                                 
                    ?>
                     <tr>
                                    <th><?php echo $sr++;?></th>
                                    <td><?php echo $dtmx->cuurentId;?></td>
                                    <td><?php echo $Result->nm;?></td>
                                    <?php 
									    if(isset($_REQUEST['LevelB'])) {
									?>
                                    <td> </td>
                                    <?php } ?>
                                    <td> </td>
                                    <td><?php echo $Result->RegOn;?></td> 
						    	</tr> 	        
                                        <?php    }
                                            
                                            
                                        }
                                     }
                    ?>  
                 
              </table>
         </div>
                            
  </div>   
  <h3>Level 5</h3>
  <div>
     
        
           				<div class="tableBox">
            <table>
                
                <tr>
                        <th   >S No.</th> 
                        <th   >Id</th>   
                        <th   >Full Name</th> 
                        <?php 
                        if(isset($_REQUEST['LevelB'])) {
                        ?>
                        <th   >Amount</th> 
                        <?php  } ?>
                        <th   >Top Up On</th>  
                        <th   >Registered On</th>    
                </tr>
                
                    
                    <?php 
                                            $sr=1;  
                                            foreach($stepCt['step5']['id'] as $dtm) 
                                            {      
                                            
                                            foreach($dtm as $dtmx) 
                                            {
                                            $stmt=$conn->prepare("select *  from UI__Rgst where cuurentId=:cuurentId ");   
                                            $stmt->bindValue(':cuurentId', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            $Result = $stmt->fetch(PDO::FETCH_OBJ);   
                                            
                                            $stmt=$conn->prepare("select *  from UI__DChstr where Rid=:Rid and typ=1");   
                                            $stmt->bindValue(':Rid', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            
                                            if($stmt->rowCount() > 0) 
                                            {
                                            $Resultx = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                            foreach($Resultx as $mpp)
                                            {
                        ?> 
                    <tr>
                            <th><?php echo $sr++;?></th>
                            <td><?php echo $dtmx->cuurentId;?></td>
                            <td><?php echo $Result->nm;?></td>
                            <?php 
                            if(isset($_REQUEST['LevelB'])) {
                            ?>
                            <td><?php echo $mpp->amt;?></td>
                            <?php } ?>
                            <td><?php echo $mpp->Tdate;?></td>
                            <td><?php echo $Result->RegOn;?></td> 
                    </tr>
                     <?php  
                                            }
                                            
                                            }
                                            else  if(!isset($_REQUEST['ActiveT']))
                                            {
                                                 
                    ?>
                     <tr>
                                    <th><?php echo $sr++;?></th>
                                    <td><?php echo $dtmx->cuurentId;?></td>
                                    <td><?php echo $Result->nm;?></td>
                                    <?php 
									    if(isset($_REQUEST['LevelB'])) {
									?>
                                    <td> </td>
                                    <?php } ?>
                                    <td> </td>
                                    <td><?php echo $Result->RegOn;?></td> 
						    	</tr> 	        
                                        <?php    }
                                            
                                            
                                        }
                                     }
                    ?>  
                 
              </table>
         </div>
         
                            
  </div>    
  <h3>Level 6</h3>
  <div>
     <div class="tableBox">
            <table>
                
                <tr>
                        <th   >S No.</th> 
                        <th   >Id</th>   
                        <th   >Full Name</th> 
                        <?php 
                        if(isset($_REQUEST['LevelB'])) {
                        ?>
                        <th   >Amount</th> 
                        <?php  } ?>
                        <th   >Top Up On</th>  
                        <th   >Registered On</th>    
                </tr>
                
                    
                    <?php 
                                            $sr=1;  
                                            foreach($stepCt['step6']['id'] as $dtm) 
                                            {      
                                            
                                            foreach($dtm as $dtmx) 
                                            {
                                            $stmt=$conn->prepare("select *  from UI__Rgst where cuurentId=:cuurentId ");   
                                            $stmt->bindValue(':cuurentId', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            $Result = $stmt->fetch(PDO::FETCH_OBJ);   
                                            
                                            $stmt=$conn->prepare("select *  from UI__DChstr where Rid=:Rid and typ=1");   
                                            $stmt->bindValue(':Rid', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            
                                            if($stmt->rowCount() > 0) 
                                            {
                                            $Resultx = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                            foreach($Resultx as $mpp)
                                            {
                        ?> 
                    <tr>
                            <th><?php echo $sr++;?></th>
                            <td><?php echo $dtmx->cuurentId;?></td>
                            <td><?php echo $Result->nm;?></td>
                            <?php 
                            if(isset($_REQUEST['LevelB'])) {
                            ?>
                            <td><?php echo $mpp->amt;?></td>
                            <?php } ?>
                            <td><?php echo $mpp->Tdate;?></td>
                            <td><?php echo $Result->RegOn;?></td> 
                    </tr>
                     <?php  
                                            }
                                            
                                            }
                                            else  if(!isset($_REQUEST['ActiveT']))
                                            {
                                                 
                    ?>
                     <tr>
                                    <th><?php echo $sr++;?></th>
                                    <td><?php echo $dtmx->cuurentId;?></td>
                                    <td><?php echo $Result->nm;?></td>
                                    <?php 
									    if(isset($_REQUEST['LevelB'])) {
									?>
                                    <td> </td>
                                    <?php } ?>
                                    <td> </td>
                                    <td><?php echo $Result->RegOn;?></td> 
						    	</tr> 	        
                                        <?php    }
                                            
                                            
                                        }
                                     }
                    ?>  
                 
              </table>
         </div>
                            
  </div>
  
  <h3>Level 7</h3>
  <div>
     
        <div class="tableBox">
            <table>
                
                <tr>
                        <th   >S No.</th> 
                        <th   >Id</th>   
                        <th   >Full Name</th> 
                        <?php 
                        if(isset($_REQUEST['LevelB'])) {
                        ?>
                        <th   >Amount</th> 
                        <?php  } ?>
                        <th   >Top Up On</th>  
                        <th   >Registered On</th>    
                </tr>
                
                    
                    <?php 
                                            $sr=1;  
                                            foreach($stepCt['step7']['id'] as $dtm) 
                                            {      
                                            
                                                
                                                    foreach($dtm as $dtmx) 
                                                    {
                                                        $Idp = 0; 
                                                        if( (($_SESSION['userId']=='DP647792') ||  ($_SESSION['userId']=='DP609575')  ||  ($_SESSION['userId']=='DP889773')) && (($dtmx->cuurentId=='DP213439') || ($dtmx->cuurentId=='DP360639'))   )
                                                            $Idp = 1;     
                                                        
                                                        if($Idp==0)
                                                        {
                                                      
                                                    $stmt=$conn->prepare("select *  from UI__Rgst where cuurentId=:cuurentId ");   
                                                    $stmt->bindValue(':cuurentId', $dtmx->cuurentId , PDO::PARAM_STR);  
                                                    $stmt->execute(); 
                                                    $Result = $stmt->fetch(PDO::FETCH_OBJ);   
                                                    
                                                    $stmt=$conn->prepare("select *  from UI__DChstr where Rid=:Rid and typ=1");   
                                                    $stmt->bindValue(':Rid', $dtmx->cuurentId , PDO::PARAM_STR);  
                                                    $stmt->execute(); 
                                                    
                                                    if($stmt->rowCount() > 0) 
                                                    {
                                                    $Resultx = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                                    foreach($Resultx as $mpp)
                                                    {
                                ?> 
                    <tr>
                                    <th><?php echo $sr++;?></th>
                                    <td><?php echo $dtmx->cuurentId;?></td>
                                    <td><?php echo $Result->nm;?></td>
                                    <?php 
                                    if(isset($_REQUEST['LevelB'])) {
                                    ?>
                                    <td><?php echo $mpp->amt;?></td>
                                    <?php } ?>
                                    <td><?php echo $mpp->Tdate;?></td>
                                    <td><?php echo $Result->RegOn;?></td> 
                            </tr>
                             <?php  
                                                    }
                                                    
                                                    }
                                                    else  if(!isset($_REQUEST['ActiveT']))
                                                    {
                                                         
                            ?>
                             <tr>
                                            <th><?php echo $sr++;?></th>
                                            <td><?php echo $dtmx->cuurentId;?></td>
                                            <td><?php echo $Result->nm;?></td>
                                            <?php 
        									    if(isset($_REQUEST['LevelB'])) {
        									?>
                                            <td> </td>
                                            <?php } ?>
                                            <td> </td>
                                            <td><?php echo $Result->RegOn;?></td> 
        						    	</tr> 	        
                                                <?php    }
                                                
                                                
                                                    }
                                                    
                                                }
                                     }
                    ?>  
                 
              </table>
         </div>
                            
  </div>
  
  
  <h3>Level 8</h3>
  <div>
     
        <div class="tableBox">
            <table>
                
                <tr>
                        <th   >S No.</th> 
                        <th   >Id</th>   
                        <th   >Full Name</th> 
                        <?php 
                        if(isset($_REQUEST['LevelB'])) {
                        ?>
                        <th   >Amount</th> 
                        <?php  } ?>
                        <th   >Top Up On</th>  
                        <th   >Registered On</th>    
                </tr>
                
                    
                    <?php 
                                            $sr=1;  
                                            foreach($stepCt['step8']['id'] as $dtm) 
                                            {      
                                            
                                            foreach($dtm as $dtmx) 
                                            {
                                                
                                                $Idp = 0; 
                                                        if( (($_SESSION['userId']=='DP647792') ||  ($_SESSION['userId']=='DP609575')  ||  ($_SESSION['userId']=='DP889773')) && (($dtmx->cuurentId=='DP213439') || ($dtmx->cuurentId=='DP360639'))   )
                                                            $Idp = 1;     
                                                        
                                            if($Idp==0)
                                            {         
                                            $stmt=$conn->prepare("select *  from UI__Rgst where cuurentId=:cuurentId ");   
                                            $stmt->bindValue(':cuurentId', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            $Result = $stmt->fetch(PDO::FETCH_OBJ);   
                                            
                                            $stmt=$conn->prepare("select *  from UI__DChstr where Rid=:Rid and typ=1");   
                                            $stmt->bindValue(':Rid', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            
                                            if($stmt->rowCount() > 0) 
                                            {
                                            $Resultx = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                            foreach($Resultx as $mpp)
                                            {
                        ?> 
                    <tr>
                            <th><?php echo $sr++;?></th>
                            <td><?php echo $dtmx->cuurentId;?></td>
                            <td><?php echo $Result->nm;?></td>
                            <?php 
                            if(isset($_REQUEST['LevelB'])) {
                            ?>
                            <td><?php echo $mpp->amt;?></td>
                            <?php } ?>
                            <td><?php echo $mpp->Tdate;?></td>
                            <td><?php echo $Result->RegOn;?></td> 
                    </tr>
                     <?php  
                                            }
                                            
                                            }
                                            else  if(!isset($_REQUEST['ActiveT']))
                                            {
                                                 
                    ?>
                     <tr>
                                    <th><?php echo $sr++;?></th>
                                    <td><?php echo $dtmx->cuurentId;?></td>
                                    <td><?php echo $Result->nm;?></td>
                                    <?php 
									    if(isset($_REQUEST['LevelB'])) {
									?>
                                    <td> </td>
                                    <?php } ?>
                                    <td> </td>
                                    <td><?php echo $Result->RegOn;?></td> 
						    	</tr> 	        
                                        <?php    }
                                            
                                            
                                            }
                                        }
                                     }
                    ?>  
                 
              </table>
         </div>
  </div>
  
  <h3>Level 9</h3>
  <div>
     
        <div class="tableBox">
            <table>
                
                <tr>
                        <th   >S No.</th> 
                        <th   >Id</th>   
                        <th   >Full Name</th> 
                        <?php 
                        if(isset($_REQUEST['LevelB'])) {
                        ?>
                        <th   >Amount</th> 
                        <?php  } ?>
                        <th   >Top Up On</th>  
                        <th   >Registered On</th>    
                </tr>
                
                    
                    <?php 
                                            $sr=1;  
                                            foreach($stepCt['step9']['id'] as $dtm) 
                                            {      
                                            
                                            foreach($dtm as $dtmx) 
                                            {
                                                
                                                 $Idp = 0; 
                                                        if( (($_SESSION['userId']=='DP647792') ||  ($_SESSION['userId']=='DP609575')  ||  ($_SESSION['userId']=='DP889773')) && (($dtmx->cuurentId=='DP213439') || ($dtmx->cuurentId=='DP360639') || ($dtmx->cuurentId=='DP244196') )   )
                                                            $Idp = 1;     
                                                        
                                            if($Idp==0)
                                            {   
                                            $stmt=$conn->prepare("select *  from UI__Rgst where cuurentId=:cuurentId ");   
                                            $stmt->bindValue(':cuurentId', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            $Result = $stmt->fetch(PDO::FETCH_OBJ);   
                                            
                                            $stmt=$conn->prepare("select *  from UI__DChstr where Rid=:Rid and typ=1");   
                                            $stmt->bindValue(':Rid', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            
                                            if($stmt->rowCount() > 0) 
                                            {
                                            $Resultx = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                            foreach($Resultx as $mpp)
                                            {
                        ?> 
                    <tr>
                            <th><?php echo $sr++;?></th>
                            <td><?php echo $dtmx->cuurentId;?></td>
                            <td><?php echo $Result->nm;?></td>
                            <?php 
                            if(isset($_REQUEST['LevelB'])) {
                            ?>
                            <td><?php echo $mpp->amt;?></td>
                            <?php } ?>
                            <td><?php echo $mpp->Tdate;?></td>
                            <td><?php echo $Result->RegOn;?></td> 
                    </tr>
                     <?php  
                                            }
                                            
                                            }
                                            else  if(!isset($_REQUEST['ActiveT']))
                                            {
                                                 
                    ?>
                     <tr>
                                    <th><?php echo $sr++;?></th>
                                    <td><?php echo $dtmx->cuurentId;?></td>
                                    <td><?php echo $Result->nm;?></td>
                                    <?php 
									    if(isset($_REQUEST['LevelB'])) {
									?>
                                    <td> </td>
                                    <?php } ?>
                                    <td> </td>
                                    <td><?php echo $Result->RegOn;?></td> 
						    	</tr> 	        
                                        <?php    }
                                            
                                            
                                            }
                                            
                                        }
                                     }
                    ?>  
                 
              </table>
         </div>
  </div>
  
  
  <h3>Level 10</h3>
  <div>
     
        <div class="tableBox">
            <table>
                
                <tr>
                        <th   >S No.</th> 
                        <th   >Id</th>   
                        <th   >Full Name</th> 
                        <?php 
                        if(isset($_REQUEST['LevelB'])) {
                        ?>
                        <th   >Amount</th> 
                        <?php  } ?>
                        <th   >Top Up On</th>  
                        <th   >Registered On</th>    
                </tr>
                
                    
                    <?php 
                                            $sr=1;  
                                            foreach($stepCt['step10']['id'] as $dtm) 
                                            {      
                                            
                                            foreach($dtm as $dtmx) 
                                            {
                                                
                                                 $Idp = 0; 
                                                        if( (($_SESSION['userId']=='DP647792') ||  ($_SESSION['userId']=='DP609575')  ||  ($_SESSION['userId']=='DP889773')) && (($dtmx->cuurentId=='DP213439') || ($dtmx->cuurentId=='DP360639')|| ($dtmx->cuurentId=='DP244196') )   )
                                                            $Idp = 1;     
                                                        
                                            if($Idp==0)
                                            {   
                                            $stmt=$conn->prepare("select *  from UI__Rgst where cuurentId=:cuurentId ");   
                                            $stmt->bindValue(':cuurentId', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            $Result = $stmt->fetch(PDO::FETCH_OBJ);   
                                            
                                            $stmt=$conn->prepare("select *  from UI__DChstr where Rid=:Rid and typ=1");   
                                            $stmt->bindValue(':Rid', $dtmx->cuurentId , PDO::PARAM_STR);  
                                            $stmt->execute(); 
                                            
                                            if($stmt->rowCount() > 0) 
                                            {
                                            $Resultx = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                            foreach($Resultx as $mpp)
                                            {
                        ?> 
                    <tr>
                            <th><?php echo $sr++;?></th>
                            <td><?php echo $dtmx->cuurentId;?></td>
                            <td><?php echo $Result->nm;?></td>
                            <?php 
                            if(isset($_REQUEST['LevelB'])) {
                            ?>
                            <td><?php echo $mpp->amt;?></td>
                            <?php } ?>
                            <td><?php echo $mpp->Tdate;?></td>
                            <td><?php echo $Result->RegOn;?></td> 
                    </tr>
                     <?php  
                                            }
                                            
                                            }
                                            else  if(!isset($_REQUEST['ActiveT']))
                                            {
                                                 
                    ?>
                     <tr>
                                    <th><?php echo $sr++;?></th>
                                    <td><?php echo $dtmx->cuurentId;?></td>
                                    <td><?php echo $Result->nm;?></td>
                                    <?php 
									    if(isset($_REQUEST['LevelB'])) {
									?>
                                    <td> </td>
                                    <?php } ?>
                                    <td> </td>
                                    <td><?php echo $Result->RegOn;?></td> 
						    	</tr> 	        
                                        <?php    }
                                            
                                            
                                            }
                                        }
                                     }
                    ?>  
                 
              </table>
         </div>
  </div>  
</div>     
   </div> 
</div>
 
<?php 
  //include_once("../view/header-footer/footer.php");  
    unset($_SESSION['TpMsg']);