Your IP : 52.15.35.129


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

<?php
session_start(); ob_start();
include("lib/connect.inc.php");


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


?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Search User</title>
    <!-- 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 User</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 User</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 User</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-striped 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
                                            $i=1;
                                            if(isset($_POST['q'])){
                                                $q = $_POST['q']; $filter = $_POST['filter'];
                                                $sql = $db->query("SELECT * FROM user WHERE sponsor='$uidx' AND $filter LIKE '%$q%' ");
                                            

                                            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="FindUser">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['FindUser'])){ 
                $uid = isset($_SESSION['FindUser'])?$_SESSION['FindUser']:'';
                $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>

                                                <?php //echo $covis->covisTree4($uid);//$_SESSION['stage'];  echo $covis->stageTeam($uid,$stage); //$h = explode(',', $covis->covisTree2()); echo $h[2]  ?>

                                               <!--  Chart -->
                                                <div class="table-responsive">
                                                    <div class="chart" id="basic-example"></div>

                                                </div>
                                            </div>
                                        
                                        <!--                            <form method="post">-->
                                        <!---->
                                        <!---->
                                        <!--							<div class="card-footer clearfix">-->
                                        <!--                                <input type="text" name="user"/>-->
                                        <!--                                <input type="number" name="userNo"/>-->
                                        <!--                                <button type="submit" class="btn btn-danger label-left float-xs-right" name="automateRegister">-->
                                        <!--									<span class="btn-label"><i class="ti-download"></i></span>-->
                                        <!--									Register-->
                                        <!--								</button>-->
                                        <!--							</div>-->
                                        <!--                            </form>-->
                                
                                </div>
                            </div>
                        </div>
                    </div>

              <?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 -->
<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 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>
</body>
</html>

?>