PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Ahmed Khan   Custom PHP CMS   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Custom PHP CMS
Manage the content of a site that can be searched
Author: By
Last change:
Date: 1 year ago
Size: 1,459 bytes


Class file image Download
include 'header/header.php';

$view = new Articles();
$result = $view->viewarticles();
$rows = $result->num_rows;
$count = 0;
//echo print_r($result);
//echo "<br>".$rows;
<div class="jumbotron">
    <h1>Custom CMS</h1>
    <p>Bootstrap is the most popular HTML, CSS, and JS framework for developing
    responsive, mobile-first projects on the web.</p>
<div class='container'>
<div class='row'>
while ($row = $result->fetch_assoc()) {
    if (
$count == 3) {
"</div></div><div class='container'><div class='row'><br>";
$count = 0;
<div class="col-sm-4">
      <div class="panel panel-primary">
        <div class="panel-heading home links"><?php echo $row['article_name'];?></div>
        <div class="panel-body"><img src="articleimage/<?php echo $row['img'];?>" class="img-responsive img-circle" style="width:100%" alt="Image">
          <p> <?php
= $row['url'];
$view->limit_text($row['article_content']) . " " . "<a href='$aid'>read more...</a>";

//echo $row['article_content'];
?> </p>
        <div class="panel-footer"><p> Post by <?php echo ucwords($row['u_fname']) . " " . ucwords($row['u_lname']) . "," . $row['dates'];?>.
        <br><span class="label label-danger"><?php echo $row['category_name'];?></span></p></div>

<?php include 'footer/footer.php';?>