PHP Classes
elePHPant
Icontem

File: punFramework/controllers/punnews.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Piotr Malinski  >  punFramework  >  punFramework/controllers/punnews.php  >  Download  
File: punFramework/controllers/punnews.php
Role: Example script
Content type: text/plain
Description: news example - controller
Class: punFramework
MVC framework to extend punBB discussion boards
Author: By
Last change:
Date: 8 years ago
Size: 352 bytes
 

Contents

Class file image Download
<?PHP
class punnews extends punController
{
public function
index()
    {
   
$news = punnews::load_model('news');
   
$query = $news->get_latest_news();
    IF(isset(
$query[0]['id']))
        {
       
$content = '';
        foreach(
$query as $new)
            {
           
$content .= punnews::load_view('latestNews', $new);
            }
        }
    return
punnews::render_template('Latest News', $content);
    }
}