<?php
// $Id: pntables.php,v 1.2 2002/02/18 22:08:15 adam_baum Exp $ $Name:  $
// ----------------------------------------------------------------------
// POSTNUKE Content Management System
// Copyright (C) 2001 by the PostNuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WIthOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file: adam_baum
// Purpose of file: Table information for topx module
// ----------------------------------------------------------------------

function quotes_pntables()
{
    // Initialise table array
    $pntable = array();

    // Stories table info
    $stories = pnConfigGetVar('prefix') . '_stories';
    $pntable['stories'] = $stories;
    $pntable['stories_column'] = array('sid'    => $stories . '.pn_sid',
                                      'title'   => $stories . '.pn_title',
				      'time'    => $stories .'.pn_time',
                                      'counter' => $stories . '.pn_counter');


    // Stories category table info
    $stories_cat = pnConfigGetVar('prefix') . '_stories_cat';
    $pntable['stories'] = $stories;
    $pntable['stories_cat_column'] = array('catid'   => $stories_cat . '.pn_sid',
					   'title'   => $stories_cat . '.pn_title',
					   'counter' => $stories_cat . '.pn_counter');

    // Sections table info
    $seccont = pnConfigGetVar('prefix') . '_seccont';
    $pntable['seccont'] = $seccont;
    $pntable['seccont_column'] = array('artid'   => $seccont . '.pn_artid',
				       'secid'   => $seccont . '.pn_secid',
				       'title'   => $seccont . '.pn_title',
				       'content' => $seccont . '.pn_content',
				       'counter' => $seccont . '.pn_counter');

    // users table info
    $users = pnConfigGetVar('prefix') . '_users';
    $pntable['users'] = $users;
    $pntable['users_column'] = array('uname' => $users . '.pn_uname',
				     'counter' => $users . '.pn_counter');

    // polls table info
    $poll_desc = pnConfigGetVar('prefix') . '_poll_desc';
    $pntable['poll_desc'] = $poll_desc;
    $pntable['poll_desc_column'] = array('pollid'    => $poll_desc . '.pn_pollid',
					 'polltitle' => $poll_desc . '.pn_polltitle',
					 'voters'    => $poll_desc . '.pn_voters');

    // polls data info
    $poll_data = pnConfigGetVar('prefix') . '_poll_data';
    $pntable['poll_data'] = $poll_data;
    $pntable['poll_data_column'] = array('pollid'      => $poll_data . '.pn_pollid',
					 'optioncount' => $poll_data . '.pn_optioncount');

    // reviews table info
    $reviews = pnConfigGetVar('prefix') . '_reviews';
    $pntable['reviews'] = $reviews;
    $pntable['reviews_column'] = array('id'    => $reviews . '.pn_id',
				       'title' => $reviews .'pn_title',
				       'hits'  => $reviews . '.pn_hits');

    // downloads table info
    $downloads = pnConfigGetVar('prefix') . '_downloads_downloads';
    $pntable['downloads_downloads'] = $downloads;
    $pntable['downloads_downlods_column'] = array('lid'   => $downloads . '.pn_lid',
						  'cid'   => $downloads . '.pn_cid',
						  'title' => $downloads .'pn_title',
						  'hits'  => $downloads . '.pn_hits');

    // download categories table info
    $downloads_categories = pnConfigGetVar('prefix') . '_downloads_categories';
    $pntable['downloads_categories'] = $downloads_categories;
    $pntable['downloads_categories_column'] = array('cid'   => $downloads_categories . '.pn_cid',
						    'title' => $downloads_categories .'pn_title');

    // Return table information
    return $pntable;
}
?>