<?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                                 */
/************************************************************************/
/********************************************************/
/* NSN Supporters                                       */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright  2000-2005 by NukeScripts Network         */
/********************************************************/
defined('MAXIMUS') or Header("Location: index.php");

function spsave_config($config_name, $config_value){
  $GLOBALS['db']->sql_query("UPDATE `".TABLE_NSNSP_CONFIG."` SET `config_value`='$config_value' WHERE `config_name`='$config_name'");
}

function spget_configs(){
  $configresult = $GLOBALS['db']->sql_query("SELECT `config_name`, `config_value` FROM `".TABLE_NSNSP_CONFIG."`");
  while ($raw1  = $GLOBALS['db']->sql_fetchrow($configresult)) {
  $config_name  = $raw1['config_name'];
    $config_value = $raw1['config_value'];
    $config[$config_name] = $config_value;
  }
  return $config;
}

function spmenu() {
  global $admin_file;
  Max_OpenTable();
  echo "<center>\n<table cellpadding='3' width='70%'>\n";
  echo "<tr>\n";
  echo "<td align='center' valign='top' width='50%'>";
  echo "<a href='".$admin_file.".php?op=SPMain'>"._SP_ADMINMAIN."</a><br />\n";
  echo "<a href='".$admin_file.".php?op=SPConfig'>"._SP_CONFIGMAIN."</a><br />";
  echo "<a href='".$admin_file.".php?op=SPAdd'>"._SP_ADDSUPPORTER."</a><br />";
  echo "</td>\n";
  echo "<td align='center' valign='top' width='50%'>";
  echo "<a href='".$admin_file.".php?op=SPActive'>"._SP_ACTIVESITES."</a><br />";
  echo "<a href='".$admin_file.".php?op=SPPending'>"._SP_SUBMITTEDSITES."</a><br />";
  echo "<a href='".$admin_file.".php?op=SPInactive'>"._SP_INACTIVESITES."</a><br />";
  echo "</td>\n";
  echo "</tr>\n";
  echo "<tr><td align='center' colspan='2'><a href='".$admin_file.".php'><i>"._SP_SITEADMIN."</i></a></td></tr>\n";
  echo "</table>\n</center>\n";
  Max_CloseTable();
}