<?php

// +---------------------------------------------------------------------------+
// | Universal Plugin 1.0 for Geeklog - The Ultimate Weblog                    |
// +---------------------------------------------------------------------------+
// | index.php                                                                 |
// |                                                                           |
// +---------------------------------------------------------------------------+
// | Copyright (C) 2002 by the following authors:                              |
// |                                                                           |
// | Authors: Tom Willett        - tomw@pigstye.net                            |
// | Replace {plugin} with the name of your plugin                             |
// +---------------------------------------------------------------------------+
// |                                                                           |
// | This program is free software; you can redistribute it and/or             |
// | modify it under the terms of the GNU General Public License               |
// | 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.                              |
// |                                                                           |
// | You should have received a copy of the GNU General Public License         |
// | along with this program; if not, write to the Free Software Foundation,   |
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
// |                                                                           |
// +---------------------------------------------------------------------------+
//

require_once('../lib-common.php');

// Only let Root users access this page
if (!SEC_hasAccess('{plugin}.edit','{plugin}.view','OR')) {
    
// Someone is trying to illegally access this page
    
COM_errorLog("Someone has tried to illegally access the {plugin} page.  User id: {$_USER['uid']}, Username: {$_USER['username']}, IP: $REMOTE_ADDR",1);
    
$display = COM_siteHeader();
    
$display .= COM_startBlock($LANG_PL00['access_denied']);
    
$display .= $LANG_PL00['access_denied_msg'];
    
$display .= COM_endBlock();
    
$display .= COM_siteFooter(true);
    echo
$display;
    exit;
}

/*
* Main Function
*/

$display = COM_siteHeader();
$T = new Template();
$T->set_file('page',$_CONF['path'] . 'plugins/{plugin}/templates/index.thtml');
$T->set_var('header', $LANG_PL00['plugin']);
$T->set_var('site_url',$_CONF['site_url']);
// your code goes here
$T->parse('output','page');
$display .= $T->finish($T->get_var('output'));
$display .= COM_siteFooter();

echo
$display;
?>