<?php
/*
 ########################################################################
#                                                                        #
#           Version 4       /                        /   /               #
#          -----------__---/__---__------__----__---/---/-               #
#           | /| /  /___) /   ) (_ `   /   ) /___) /   /                 #
#          _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___               #
#                       Free Content / Management System                 #
#                                   /                                    #
#                                                                        #
#                                                                        #
#   Copyright 2005-2006 by webspell.org                                  #
#                                                                        #
#   visit webSPELL.org, webspell.info to get webSPELL for free           #
#   - Script runs under the GNU GENERAL PUBLIC LICENSE                   #
#   - It's NOT allowed to remove this copyright-tag                      #
#   -- http://www.fsf.org/licensing/licenses/gpl.html                    #
#                                                                        #
#   Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at),   #
#   Far Development by Development Team - webspell.org                   #
#                                                                        #
#   visit webspell.org                                                   #
#                                                                        #
 ########################################################################
*/

chdir('../');
include("_mysql.php");
include("_settings.php");
include("_functions.php");
chdir('admin');

$admin=isanyadmin($userID);
if(!$loggedin) die('You are not logged in.');
if(!$admin) die('You have no access to the control panel');
$site = $_GET['site'];

if(!isset($_SERVER['REQUEST_URI'])) {
  $arr = explode("/", $_SERVER['PHP_SELF']);
  $_SERVER['REQUEST_URI'] = "/" . $arr[count($arr)-1];
  if ($_SERVER['argv'][0]!="")
   $_SERVER['REQUEST_URI'] .= "?" . $_SERVER['argv'][0];
}
?>
<html>
<head>
<title>webSPELL Admincenter</title>
<script src="../js/bbcode.js" language="JavaScript" type="text/javascript"></script>
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>

<body bgcolor="#CCCCCC">
<table width="800" align="center" cellpadding="5" cellspacing="1" bgcolor="#999999">
  <tr>
    <td width="160" valign="top" bgcolor="#FFFFFF" align="center"><img src="clanpackage.gif">
      <br>
      <br>
<? if(isuseradmin($userID)) { ?>
<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#999999">
        <tr>
          <td bgcolor="#CCCCCC"><strong>Users:</strong></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF"><p>&#8226; <a href="admincenter.php?site=squads">Squads</a><br>
              &#8226; <a href="admincenter.php?site=members">Clanmembers</a><br>
              &#8226; <a href="admincenter.php?site=users">Registered Users</a><br>
              &#8226; <a href="admincenter.php?site=newsletter">Newsletter</a>
            </p></td>
        </tr>
      </table>
<? } if(isnewsadmin($userID) || isfileadmin($userID) ) { ?>
      <br> <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#999999">
        <tr>
          <td bgcolor="#CCCCCC"><strong>Rubrics / Categories</strong></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF"><p> &#8226; <a href="admincenter.php?site=rubrics">News-Rubrics</a>
              <br>
              &#8226; <a href="admincenter.php?site=linkcategorys">Link-Categories</a>
              <br>
              &#8226; <a href="admincenter.php?site=filecategorys">File-Categories</a>
            </p></td>
        </tr>
      </table> <? } if(ispageadmin($userID)) { ?>
      <br> <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#999999">
        <tr>
          <td bgcolor="#CCCCCC"><strong>Pagelayout:</strong></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF">&#8226; <a href="admincenter.php?site=styles">Styles</a><br>
            &#8226; <a href="admincenter.php?site=settings">Settings</a> <br>
            &#8226; <a href="admincenter.php?site=history">Clan-History</a><br>
            &#8226; <a href="admincenter.php?site=about">About us</a><br>
            &#8226; <a href="admincenter.php?site=faq">FAQ</a><br>
            &#8226; <a href="admincenter.php?site=partners">Partners</a><br>
            &#8226; <a href="admincenter.php?site=servers">Servers</a><br>
            &#8226; <a href="admincenter.php?site=static">Static pages</a><br>
            &#8226; <a href="admincenter.php?site=imprint">Imprint</a><br>
            &#8226; <a href="admincenter.php?site=icons">Icons</a><br>
            &#8226; <a href="admincenter.php?site=bannerrotation">Bannerrotation</a><br>
            &#8226; <a href="admincenter.php?site=scrolltext">Scrolltext</a><br>
            &#8226; <a href="admincenter.php?site=update&action=update">Update</a><br>
						&#8226; <a href="admincenter.php?site=database">Database</a></td>
        </tr>
      </table>
      <? } if(isforumadmin($userID)) { ?>
      <br>
      <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#999999">
        <tr>
          <td bgcolor="#CCCCCC"><strong>Forum:</strong></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF">&#8226; <a href="admincenter.php?site=boards">Boards</a><br>
            &#8226; <a href="admincenter.php?site=ranks">User-Ranks</a> </td>
        </tr>
      </table>
      <? } if(isgalleryadmin($userID)) { ?>
      <br>
      <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#999999">
        <tr>
          <td bgcolor="#CCCCCC"><strong>Gallery:</strong></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF">&#8226; <a href="admincenter.php?site=gallery&part=groups">Groups</a><br>
            &#8226; <a href="admincenter.php?site=gallery&part=gallerys">Gallerys</a> </td>
        </tr>
      </table> <? } ?>
      <br>
      <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#999999">
        <tr>
          <td bgcolor="#CCCCCC"><strong>Related Links:</strong></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF">&#8226; <a href="http://www.webspell.org" target="_blank">Webspell</a><br>
&#8226; <a href="http://cms.webspell.org/index.php?site=support" target="_blank">Support-System</a><br>
&#8226; <a href="http://cms.webspell.org/index.php?site=license" target="_blank">Licence Agreement</a></td>
        </tr>
      </table></td>
    <td width="640" valign="top" bgcolor="#FFFFFF"><h2>ADMINCENTER</h2><hr noshade size="1" color="333333">

        <?php
        if(isset($site) && $site!="news"){
        $invalide = array('/','//',':','.');
        $site = str_replace($invalide,' ',$site);
        include($site.'.php');}
        else echo'Welcome to Admincenter.';
        ?>
</td>
  </tr>
</table>
<div align="center"><br>
  &copy; 2002 - 2006 <a href="http://www.webspell.org" target="_blank"><strong>WebSPELL.org</strong></a>, <a href="http://www.webspell.at" target="_blank"><strong>WebSPELL.at</strong></a>
</div>
</body>
</html>