Your IP : 3.145.12.100


Current Path : /home/lentoinv/covisclubinternational.com/profile/
Upload File :
Current File : /home/lentoinv/covisclubinternational.com/profile/searchteam.php

<?php
session_start(); ob_start();
include("lib/connect.inc.php");
$sponsor = $uidx;

if(isset($_POST['ShowStage'])){
    $_SESSION['stage']=$_POST['ShowStage'];
}
$signup = isset($_SESSION['signup'])?$_SESSION['signup']:0;

?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Search team</title>
     <link rel="shortcut icon" href="img/fav.png" />
    <!-- Tell the browser to be responsive to screen width -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="treant/Treant.css">
    <link rel="stylesheet" href="treant/examples/tree/basic-example.css">
    <?php include('head.php'); ?>
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">

    <?php include('nav.php'); ?>
     <div class="content-wrapper">
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1>Search Team</h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="index.php">Home</a></li>
              <li class="breadcrumb-item active">Search Team</li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->
    </section> 

    <!-- Content Wrapper. Contains page content -->

    <!-- Content Header (Page header) -->
    <div class="content">
        <div class="container-fluid">
  <div class="row">
   <div class="col-md-12">
                <div class="card">
                    <div class="card-header text-white bg-dark">
                                    <h5 style="float: left">Find Team Member</h5>

                                                            <form class="mt-3" method="post">
                                    <div class="float-right" style="margin-top: -20px"><table><tr><td><input type="text" name="q" required class="form-control" placeholder="Serach for"></td><td><select required name="filter" class="form-control">
                                                        <option value="">Select Option</option>
                                                        <option value="firstname">Firstname</option>
                                                        <option value="lastname">Lastname</option>
                                                        <option value="user">Username</option>
                                                        <option value="email">E-mail</option>
                                                        <option value="phone">Phone Number</option>
                                                    </select></td><td><button type="submit" name="Serach" class="btn btn-primary">Search Item</button></td><td></td></tr></table></div>
                                </form>
                                </div> 


                            
                            <div class="card-body">
                      
                                    
                                    <div class="overflow-x-auto">

                                     <table class="table table-bordered table-sm"  id="example1">
                                            <thead>
                                            <tr>
                                                <th>No</th>
                                                <th>Name(s)</th>
                                                <th>Email</th>
                                                <th>Username</th>
                                                <th>Joined On</th>
                                                <th>Action</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <?php
                                            $myid = sqLx('user','id',$_SESSION['user_id'],'sn');
                                            $i=1;
                                            if(isset($_POST['q'])){
                                                $q = $_POST['q']; $filter = $_POST['filter'];
                                                $sql = $db->query("SELECT * FROM user WHERE $filter LIKE '%$q%' AND (a1='$uidx' OR a2='$uidx' OR a3='$uidx' OR a4='$uidx' OR a5='$uidx' OR a6='$uidx' OR a7='$uidx' OR a8='$uidx' OR a9='$uidx' OR a10='$uidx' OR a11='$uidx' OR a12='$uidx' OR a13='$uidx' OR a14='$uidx' OR a15='$uidx' OR a16='$uidx' OR a17='$uidx' OR a18='$uidx' OR a19='$uidx' OR a20='$uidx' ) ");
                                            

                                            while($row = $sql->fetch_assoc()) { $e = $i++;

                                                ?>

                                                <tr>
                                                    <td><?php echo $e; ?></td>
                                                    <td><?php  echo $row['firstname'].' '.$row['lastname']    ?></td>
                                                    <td><?php echo $row['email'] ?></td>
                                                    <td><?php echo $row['user']; ?></td>
                                                    <td><?php echo substr($row['created'],0,10); ?></td>
                                                    <td><form method="post">
                                                        <button type="submit" value="<?php echo $row['id']; ?>" name="FindTeam">Profile</button>
                                                    </form></td>
                                                </tr>

                                            <?php } } ?>
                                            </tbody>
                                            <tfoot>

                                            </tfoot>
                                        </table>
                                      
                                    </div>
                                </div>
                            </div>
                            </div>
                            </div><!-- /.card-header -->
                            <!-- /.card-body -->

                        <!-- /.card -->
                     
                <!-- /.row (main row) -->
                <?php if(isset($_SESSION['FindTeam'])){ 
                $uid = isset($_SESSION['FindTeam'])?$_SESSION['FindTeam']:'';
                $uidx = $covis->idToKey($uid);
$stage = isset($_SESSION['stage'])?$_SESSION['stage']:$covis->stageCalc($uidx);
$st = $covis->stageCalc($uidx);

 ?>
                <div class="row">
                <div class="col-md-12">
               <div class="card">
                   <div class="card-header text-white bg-dark">
                                    <h5>Genealogy Matrix: <?php echo userName($uid) ?> </h5>
                                </div> 

               
                                    

                                    
                                        <div class="card-body">
                                            <h2 class=""><strong>STAGE: <?php echo $stage ?></strong></h2>

                                                <form method="post">
                                                    <?php $i = 1; while($i <=$st){ $e = $i++;?>
                                                        <button class="btn btn-sm btn-primary" name="ShowStage" value="<?php echo $e ?>">Stage <?php echo $e ?></button> <?php } ?>
                                                         
                                                </form>

                                            <div class="float-xs-right"><?php if($st==$stage){ ?>LEVEL: <?php echo $covis->stageLevel($uidx); } ?></div>
                                        </div>
                                        


                                            <div>
                                                <!--  Chart -->
                                             
                                                    <div class="chart" id="basic-example" style="width: 99%"></div>

                                            </div>
                                        
                                       
                                </div>
                            </div>
                        </div>
                <?php  //echo $covis->Downline($uidx) ?>
  
  <?php   if($covis->Downline($uidx) < 3){  ?>


                  <div class="row">
                <div class="col-md-12">
               <div class="card">
                   <div class="card-header text-white bg-dark">
                                    <h5>Register New User Under <?php echo userName($uid) ?> (<?php echo userName($uid,'user') ?>) </h5>
                                </div> 

               
                                    

                                    
                                        <div class="card-body">

                              

                                            <form method="post">
                                        <?php if($signup==0){  ?>
                                           
                                            <div class="form-group col-md-8">
                                                <label>Surname:</label>
                                                <input type="text" class="form-control" placeholder="Surname" name="firstname" value="<?php if(isset($_SESSION['firstname'])){ echo $_SESSION['firstname']; } ?>" required>
                                            </div>
                                            <div class="form-group col-md-8">
                                                <label>Firstname:</label>
                                                <input type="text" class="form-control" placeholder="Firstname" name="lastname" value="<?php if(isset($_SESSION['firstname'])){ echo $_SESSION['lastname']; } ?>" required>
                                            </div>
                                            <div class="form-group col-md-8">
                                                <label>Gender:</label>
                                                <select class="form-control" name="gender" >
                                                    <option>Select Gender..</option>
                                                    <option value="Male">Male</option>
                                                    <option value="Female">Female</option>
                                                </select>
                                            </div>
                                            <div class="form-group col-md-8">
                                                <label>State:</label>
                                                <input type="text" class="form-control" id="exampleInputResetPassword" placeholder="State" name="state">
                                            </div>
                                            <div class="form-group col-md-8">
                                                <label>Country:</label>
                                                <input type="text" class="form-control" id="exampleInputResetPassword" placeholder="Country" name="country">
                                            </div>
                                            <div class="form-group col-md-8">
                                                <label>Phone:</label>
                                                <input type="number" class="form-control" id="exampleInputUsername" placeholder="Phone Number" name="phone" value="<?php if(isset($_SESSION['firstname'])){ echo $_SESSION['phone']; } ?>" required>
                                            </div>
                                            <div class="form-group col-md-8">
                                                <label>Email:</label>
                                                <input type="email" class="form-control" id="exampleInputEmail" placeholder="Email"  name="email" value="<?php if(isset($_SESSION['firstname'])){ echo $_SESSION['email']; } ?>" required>
                                            </div>

                                            <div class="form-group col-md-8">
                                                <label>Username:</label>
                                                <input type="text" class="form-control" id="exampleInputUsername" placeholder="Username" name="username" value="<?php if(isset($_SESSION['firstname'])){ echo $_SESSION['username']; } ?>" required>
                                            </div>

                                            <div class="form-group col-md-8">
                                                <label>Password:</label>
                                                <input type="password" class="form-control" id="exampleInputPassword" placeholder="Password" name="password" required>
                                            </div>
                                            <div class="form-group mb-3 col-md-8">
                                                <label>Re-enter Password:</label>
                                                <input type="password" class="form-control" id="exampleInputResetPassword" placeholder="Confirm password" name="password2" required>
                                            </div>

                                            <div class="px-2 form-group mb-0 col-md-8">
                                                <label> </label>
                                                <button type="submit" class="btn btn-primary btn-block text-uppercase" name="InitialSignup" style="width:100%">Sign up</button>
                                            </div>

                                        <?php   } elseif($signup==3){  ?>
                                            <h5 align="center">REGISTRATION PAYMENT</h5>
                                            <br>
                                            <hr/>
                                            <div class="form-group mb-3 col-md-6">
                                                <label>Enter Registration Pin:</label>
                                                <input type="text" class="form-control"  placeholder="Registration PIN" name="epin" value="<?php if(isset($_SESSION['pin'])){ echo $_SESSION['pin']; } ?>" required>
                                            </div>
                                            <div class="px-2 form-group mb-0 col-md-8">
                                                <label></label>
                                                <input type="hidden" name="sponsor" value="<?php echo $sponsor ?>"/>
                                                <input type="hidden" name="upline" value="<?php echo $uidx ?>"/>
                                                <button type="submit" class="btn btn-primary btn-block text-uppercase" name="RegisterWithPin" style="width:100%">Register with PIN</button>
                                            </div>
                                        <?php } ?>
                                    </form>

                                </div>
                                  
                                       
                                </div>
                            </div>
                        </div>
  
    <?php } ?>

  


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

              <?php } ?>          <!-- /.tab-content -->
                    </div><!-- /.card-body -->
            </div>
            <!-- /.nav-tabs-custom -->
    </div>
    <!-- /.col -->


<!-- /.content-wrapper -->
<?php include('foot.php'); ?>

<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->


<!-- jQuery -->
<script src="../plugins/jquery/jquery.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<script src="../plugins/jquery-ui/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
    $.widget.bridge('uibutton', $.ui.button)
</script>
<!-- Bootstrap 4 -->
<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<!-- Summernote -->
<script src="../plugins/summernote/summernote-bs4.min.js"></script>
<!-- overlayScrollbars -->
<script src="../plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
<!-- AdminLTE App -->
<script src="../dist/js/adminlte.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="../dist/js/pages/dashboard.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../dist/js/demo.js"></script>
<!-- DataTables -->

<!-- page script -->
<script type="text/javascript">
    <?php  
    if($stage ==1){ echo $covis->covisTree($uid);  } else {echo $covis->covisTree4($uid);} ?>
</script>

<script src="treant/vendor/raphael.js"></script>
<script src="treant/Treant.js"></script>


<script>
    new Treant( chart_config );
</script>
<!-- DataTables -->
<script src="../plugins/datatables/jquery.dataTables.min.js"></script>
<script src="../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="../plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="../plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>


<!-- page script -->
<script>
    $(function () {
        $("#example1").DataTable({
            "responsive": true,
            "autoWidth": false,
        });
        $("#example3").DataTable({
            "responsive": true,
            "autoWidth": true,
            "responsive": true,
        });
        $('#example2').DataTable({
            "paging": true,
            "lengthChange": false,
            "searching": false,
            "ordering": true,
            "info": true,
            "autoWidth": false,
            "responsive": true,
        });
    });
</script>
</body>
</html>

?>