Location: PHPKode > projects > Open source classifieds (osclass) > category.php
<?php

require 'config.php';
require 'common.php';
require 'osclass/web.php';
require 'osclass/db.php';
require 'osclass/classes/DAO.php';
require 'osclass/plugins.php';
require 'osclass/themes.php';
require 'osclass/locale.php';
require 'osclass/model/Item.php';
require 'osclass/model/Category.php';
require_once 'osclass/model/Preference.php';

osc_dbAutoConnect();
$preferences = Preference::newInstance()->toArray();
$theme = $preferences['theme'];

$category = Category::newInstance()->findByID($_GET['id']);
$ads = Item::newInstance()->findByCategoryID($category['pk_i_id']);

$headerConf = array('pageTitle' => $category['s_name']);
osc_renderHeader($headerConf);
osc_renderView('category.php');
osc_renderFooter();

osc_dbClose();

Return current item: Open source classifieds (osclass)