Genu 2.2 > GENU 2.2 / News / Browse.php

Questions? Need Help? Want to share? » PHP Forum
Script Name:
Genu 2.2

Download:
genu-2.2.zip

Category:
News Publishing

Archive Content:

GENU 2.2 > Admin

GENU 2.2 > Backends

GENU 2.2 > Comments

GENU 2.2 > Db

GENU 2.2 > Images > Admin

GENU 2.2 > Images > Bbcodes

GENU 2.2 > Images > Categories

GENU 2.2 > Images > Comments

GENU 2.2 > Images > Polls

GENU 2.2 > Images > Posts

GENU 2.2 > Images > Smilies

GENU 2.2 > Images

GENU 2.2 > Includes

GENU 2.2 > Install

GENU 2.2 > Languages

GENU 2.2 > News

GENU 2.2 > Polls

GENU 2.2 > Posts

GENU 2.2 > Sql

GENU 2.2 > Templates > Default > Admin > Categories

GENU 2.2 > Templates > Default > Admin > Comments

GENU 2.2 > Templates > Default > Admin > News

GENU 2.2 > Templates > Default > Admin > Polls

GENU 2.2 > Templates > Default > Admin > Posts

GENU 2.2 > Templates > Default > Admin > Settings

GENU 2.2 > Templates > Default > Admin > Smilies

GENU 2.2 > Templates > Default > Admin > Templates

GENU 2.2 > Templates > Default > Admin > Users

GENU 2.2 > Templates > Default > Admin

GENU 2.2 > Templates > Default > Comments

GENU 2.2 > Templates > Default > News

GENU 2.2 > Templates > Default > Polls

GENU 2.2 > Templates > Default > Posts

GENU 2.2 > Templates > Default > Users

GENU 2.2 > Templates > Default

GENU 2.2 > Templates > Original > Admin > Categories

GENU 2.2 > Templates > Original > Admin > Comments

GENU 2.2 > Templates > Original > Admin > News

GENU 2.2 > Templates > Original > Admin > Polls

GENU 2.2 > Templates > Original > Admin > Posts

GENU 2.2 > Templates > Original > Admin > Settings

GENU 2.2 > Templates > Original > Admin > Smilies

GENU 2.2 > Templates > Original > Admin > Templates

GENU 2.2 > Templates > Original > Admin > Users

GENU 2.2 > Templates > Original > Admin

GENU 2.2 > Templates > Original > Comments

GENU 2.2 > Templates > Original > News

GENU 2.2 > Templates > Original > Polls

GENU 2.2 > Templates > Original > Posts

GENU 2.2 > Templates > Original > Users

GENU 2.2 > Templates > Original

GENU 2.2 > Templates

GENU 2.2 > Users

GENU 2.2

Browse.php:


<?php
// -------------------------------------------------------------
//
// $Id: browse.php, v 1.4 2005/03/13 13:37:07 raoul Exp $
//
// Copyright:    (C) 2003-2005 Raoul Proença <raoul <at> genu <dot> org>
// License:    GNU GPL (see COPYING)
// Website:    http://genu.org/
//
// -------------------------------------------------------------

include('./../includes/common.php');

$sql->query('SELECT category_id,  category_name
        FROM ' 
TABLE_CATEGORIES '
        WHERE category_level != \'1\'
        ORDER BY category_name'
);
while (
$table_categories $sql->fetch())
{
    
$category_name_options .= '<option value="' $table_categories['category_id'] . '">' $table_categories['category_name'] . '</option>';
}
$sql->query('SELECT DISTINCT news_month
        FROM ' 
TABLE_NEWS '
        ORDER BY news_month'
);
while (
$table_news $sql->fetch())
{
    
$month_list = array(
        
'01' => $lang['JANUARY'],
        
'02' => $lang['FEBRUARY'],
        
'03' => $lang['MARCH'],
        
'04' => $lang['APRIL'],
        
'05' => $lang['MAY'],
        
'06' => $lang['JUNE'],
        
'07' => $lang['JULY'],
        
'08' => $lang['AUGUST'],
        
'09' => $lang['SEPTEMBER'],
        
'10' => $lang['OCTOBER'],
        
'11' => $lang['NOVEMBER'],
        
'12' => $lang['DECEMBER']);
    
$news_month_options .= '<option value="' $table_news['news_month'] . '">' $month_list[$table_news['news_month']] . '</option>';
}
$sql->query('SELECT DISTINCT news_year
        FROM ' 
TABLE_NEWS '
        ORDER BY news_year'
);
while (
$table_news $sql->fetch())
{
    
$news_year_options .= '<option>' $table_news['news_year'] . '</option>';
}
$template->set_file('browse',  'news/browse.tpl');
$template->set_var(array(
    
'BACK_HOME' => $lang['BACK_HOME'],
    
'BROWSE' => $lang['BROWSE'],
    
'CATEGORY_NAME_OPTIONS' => $category_name_options,
    
'FORM_CATEGORY_NAME' => $lang['FORM_CATEGORY_NAME'],
    
'FORM_NEWS_MONTH' => $lang['FORM_NEWS_MONTH'],
    
'FORM_NEWS_YEAR' => $lang['FORM_NEWS_YEAR'],
    
'NEWS_BROWSE_HEADER' => $lang['NEWS_BROWSE_HEADER'],
    
'NEWS_MONTH_OPTIONS' => $news_month_options,
    
'NEWS_YEAR_OPTIONS' => $news_year_options));

page_header($lang['NEWS_BROWSE_TITLE']);
$template->pparse('',  'browse');
page_footer();

?>


Other News Publishing Scripts:

WebMaster Resources Home

©RingsWorld.com