<?php
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.fr                                            */
/* dev@php-maximus.org                                                  */
/*                                                                      */
/* 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.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/
if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
	die ("Access Denied");
}
global $admin_file;
$aid = substr("$aid", 0,25);
$row = $GLOBALS['db']->sql_fetchrow($GLOBALS['db']->sql_query("SELECT `radminsuper` FROM `".TABLE_AUTHORS."` WHERE `aid`='$aid'"));
$acces = $GLOBALS['db']->XMFbin($row['radminsuper']);

if ($acces == 1) {

get_adminlang('messages');

function MenuMessage() {
global $admin_file;
Max_OpenTable();
echo "<center><a href=\"".$admin_file.".php?op=viewmessages\"><font class='title'><b>" . _MESSAGESADMIN . "</b></a></font><br /><br />"
    ."<a href=\"".$admin_file.".php?op=viewmessages\">" . _ALLMESSAGES . "</a>&nbsp;&nbsp;"
    ."<a href=\"".$admin_file.".php?op=messages\">" . _ADDMSG . "</a></center>";
Max_CloseTable();
br('1');
}

if($admintest && $adminsecu)  {
	switch ($op){

	case 'viewmessages':include_once('admin/modules/messages/viewmessages.php');break;
	case 'msgactive':include_once('admin/modules/messages/msgactive.php');break;
	case 'messages':include_once('admin/modules/messages/messages.php');break;
	case 'editmsg':include_once('admin/modules/messages/editmsg.php');break;
	case 'addmsg':include_once('admin/modules/messages/addmsg.php');break;
	case 'deletemsg':include_once('admin/modules/messages/deletemsg.php');break;
	case 'savemsg':include_once('admin/modules/messages/savemsg.php');break;

	}
}
} else {
	echo "Access Denied";
}