OverLord Shell

Path : G:/PleskVhosts/jaincensus.com/macciaweb.ultraliant.com/
File Upload :
Current File : G:/PleskVhosts/jaincensus.com/macciaweb.ultraliant.com/getData.php

<?php
session_start();
if(isset($_POST['page'])){
	/*if(!isset($_SESSION['user_id'])){?>
		<script>
		alert('Your are not register user. otherwise login or register? ');
		</script>
		<?php session_destroy();header("location:login.php");
		}*/
    //Include pagination class file
    include('Pagination.php');
    
    //Include database configuration file
    include("db/conn.php");
    
    $start = !empty($_POST['page'])?$_POST['page']:0;
    $limit = 10;
    
    //set conditions for search
    $whereSQL = $orderSQL = '';
    $keywords = $_POST['keywords'];
    $sortBy = $_POST['sortBy'];
	$sid = $_POST['sid'];
	$l_name = $_POST['l_name'];
	$mobile = $_POST['mobile'];
   
   
   if($keywords!='')
		{
		 $whereSQL.=" AND Contact_Name like '%".$keywords."%'";	
		}
		
		if($l_name!='')
		{
		 $whereSQL.=" AND Contact_Person like '%".$l_name."%'";	
		}
		
		if($mobile!='')
		{
		 $whereSQL.=" AND Membership_No like '%".$mobile."%'";	
		}
	/*	   
   
    if(!empty($keywords)){
        $whereSQL = " AND f_name LIKE '%".$keywords."%'";
    }*/
    if(!empty($sortBy)){
        $orderSQL = " ORDER BY srno ".$sortBy;
    }else{
        $orderSQL = " ORDER BY srno DESC ";
   }
   
   if($keywords!='' || $l_name!='' || $mobile!=''){
	   $limit = $limit;
   }else
   {
	    $limit = 10;
   }
   //echo "SELECT COUNT(1) as postNum FROM jc_mst_user where  asdf=".$sid.$whereSQL.$orderSQL;
  // exit;
    //get number of rows
    $queryNum = $connection->query("SELECT COUNT(1) as postNum FROM macciaroll where  asdf=".$sid.$whereSQL.$orderSQL);
	$resultNum = $queryNum->fetch_assoc();
    $rowCount = $resultNum['postNum'];

    //initialize pagination class
    $pagConfig = array(
        'currentPage' => $start,
        'totalRows' => $rowCount,
        'perPage' => $limit,
        'link_func' => 'searchFilter'
    );
    $pagination =  new Pagination($pagConfig);
    
    //get rows
	
    $query = $connection->query("SELECT * FROM macciaroll where asdf=".$sid." $whereSQL $orderSQL LIMIT $start,$limit");
    
    if($query->num_rows > 0){ ?>
        <div class="posts_list">
        <table class="table table-striped table-hover">
        <thead>
            <tr>
               <!-- <th width="30%">Photo</th>-->
                <th width="100%">Member Details</th>
            </tr>
        </thead>
        <tbody>
        <?php
            while($row = $query->fetch_assoc()){ 
                //$postID = $row['id'];
				/*$conID = $row['countryid'];
				$query1 = $connection->query("SELECT * FROM jc_state_master where stateid=".$row["asdf"]." and active='y'");
			$state = $query1->fetch_assoc();
			$query2 = $connection->query("SELECT * FROM jc_district_master where dist_id=".$row["distid"]."");
			$distli = $query2->fetch_assoc();
			$query3 = $connection->query("SELECT * FROM jc_countries where id=".$row["countryid"]." and active='y'");
			$contry= $query3->fetch_assoc();*/
			/*$query4 = $connection->query("SELECT * FROM jc_caste where casteid=".$row["casteid"]." and active='y'");
			$caste= $query4->fetch_assoc();*/
        ?>
         <tr><td colspan="2">
            <div class="row">
            
             <div class="col-md-12">
             				<span class="name1" style="font-size: 16px;"><?php echo $row["Membership_No"];?></span><br/>
              <?php if($row["Contact_Name"]!=''){?><span class="name1" style="font-size: 16px;"> <?php echo $row["Contact_Name"];?></span><br/><?php }?>
                            <span class="name1" style="font-size: 16px;"><?php echo $row["Contact_Person"];?></span><br/>
                           <span class="name1" style="font-size: 16px;"><?php echo $row["address"];?></span><br/>
						  <span class="name1" style="font-size: 16px;"><?php echo $row["Mobile_No"];?></span><br/>
                           <span class="name1" style="font-size: 16px;"><?php echo $row["E_Mail"];?></span><br/>
                        </div>
              <div class="col-md-2" style="vertical-align:center !important; margin-top:2% !important;">
                        </div></td>
                <div class="clearfix"></div>
              </div>
            </tr>
          <?php  //include('imagesearchmodel.php');
        } ?>
        </div>
        <tr>
        <td colspan="2">
        <?php echo $pagination->createLinks(); ?>
        </td></tr> <?php }
		//else 
		/*{?>
        <tr>
        <td colspan="2">
        <?php echo "Member not Found !!!" ?>
        </td></tr>
<?php }*/
} ?>

xRyukZ - Copyright 2k19