[ Index ]

PHP Cross Reference of Nuke-Evolution v2.0.5

title

Body

[close]

/includes/ -> nsnsp_func.php (source)

   1  <?php
   2  /*=======================================================================
   3   Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
   4   =======================================================================*/
   5  
   6  /********************************************************/
   7  /* NSN Supporters                                       */
   8  /* By: NukeScripts Network (webmaster@nukescripts.net)  */
   9  /* http://www.nukescripts.net                           */
  10  /* Copyright (c) 2000-2005 by NukeScripts Network         */
  11  /********************************************************/
  12  
  13  /*****[CHANGES]**********************************************************
  14  -=[Base]=-
  15        Nuke Patched                             v3.1.0       07/14/2005
  16        Caching System                           v1.0.0       10/31/2005
  17   ************************************************************************/
  18  
  19  if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
  20      exit('Access Denied');
  21  }
  22  
  23  function spsave_config($config_name, $config_value){
  24    global $prefix, $db, $cache;
  25    $db->sql_query("UPDATE `".$prefix."_nsnsp_config` SET `config_value`='$config_value' WHERE `config_name`='$config_name'");
  26  /*****[BEGIN]******************************************
  27   [ Base:    Caching System                     v3.0.0 ]
  28   ******************************************************/
  29    $cache->delete('supporters', 'config');
  30  /*****[END]********************************************
  31   [ Base:    Caching System                     v3.0.0 ]
  32   ******************************************************/
  33  }
  34  
  35  function spget_configs(){
  36    global $prefix, $db, $cache;
  37    static $config;
  38    if(isset($config)) return $config;
  39  /*****[BEGIN]******************************************
  40   [ Base:    Caching System                     v3.0.0 ]
  41   ******************************************************/
  42    if(($config = $cache->load('supporters', 'config')) === false) {
  43  /*****[END]********************************************
  44   [ Base:    Caching System                     v3.0.0 ]
  45   ******************************************************/
  46        $configresult = $db->sql_query("SELECT `config_name`, `config_value` FROM `".$prefix."_nsnsp_config`");
  47        while(list($config_name, $config_value) = $db->sql_fetchrow($configresult)) {
  48          $config[$config_name] = $config_value;
  49        }
  50        $db->sql_freeresult($configresult);
  51  /*****[BEGIN]******************************************
  52   [ Base:    Caching System                     v3.0.0 ]
  53   ******************************************************/
  54        $cache->save('supporters', 'config', $config);
  55    }
  56  /*****[END]********************************************
  57   [ Base:    Caching System                     v3.0.0 ]
  58   ******************************************************/
  59    return $config;
  60  }
  61  
  62  function spmenu() {
  63    global $admin_file;
  64    OpenTable();
  65    echo "<center>\n<table cellpadding='3' width='70%'>\n";
  66    echo "<tr>\n";
  67    echo "<td align='center' valign='top' width='50%'>";
  68    //echo "<a href='".$admin_file.".php?op=SPMain'>"._SP_ADMINMAIN."</a><br />\n";
  69    echo "<a href='".$admin_file.".php?op=SPConfig'>"._SP_CONFIGMAIN."</a><br />";
  70    echo "<a href='".$admin_file.".php?op=SPAdd'>"._SP_ADDSUPPORTER."</a><br />";
  71    echo "</td>\n";
  72    echo "<td align='center' valign='top' width='50%'>";
  73    echo "<a href='".$admin_file.".php?op=SPActive'>"._SP_ACTIVESITES."</a><br />";
  74    echo "<a href='".$admin_file.".php?op=SPPending'>"._SP_SUBMITTEDSITES."</a><br />";
  75    echo "<a href='".$admin_file.".php?op=SPInactive'>"._SP_INACTIVESITES."</a><br />";
  76    echo "</td>\n";
  77    echo "</tr>\n";
  78    //echo "<tr><td align='center' colspan='2'><a href='".$admin_file.".php'><i>"._SP_SITEADMIN."</i></a></td></tr>\n";
  79    echo "</table>\n</center>\n";
  80    CloseTable();
  81  }
  82  
  83  ?>


Generated: Wed Jun 6 11:38:01 2007 Cross-referenced by PHPXref 0.7