Location: PHPKode > projects > ProNuke. Postnuke To Oracle > postnuke/html/modules/NS-User/tools.php
<?php
#   include 'modules/NS-User/user/database.php';
   include 'modules/NS-User/user/menu.php';
   include 'modules/NS-User/user/access.php';
#   include 'modules/NS-User/user/language.php';

function redirect_index($message, $url="index.php")
{
    include(WHERE_IS_PERSO."config.php");
    $ThemeSel = $Default_Theme;
    echo "<html><head><META HTTP-EQUIV=Refresh CONTENT=\"2; URL=$url\">";
    echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/styleNN.css\" TYPE=\"text/css\">\n\n\n";
    echo "<style type=\"text/css\">";
    echo "@import url(\"themes/$ThemeSel/style/style.css\"); ";
    echo "</style>";
    echo "</head><body bgcolor=#2F363F text=#DADEE3>";
    echo "<table align=center border=0 cellpadding=2 cellspacing=0><tr><td><font class=\"pn-title\">$message</font></td></tr></table></body></html>";
}

function redirect_user()
{
    include(WHERE_IS_PERSO."config.php");
    $ThemeSel = $Default_Theme;
    echo "<html><head><META HTTP-EQUIV=Refresh CONTENT=\"2; URL=user.php\">";
    echo " <LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";
    echo "</head><body bgcolor=#2F363F text=#DADEE3>";
    echo "<table align=center border=0 cellpadding=2 "
         .'cellspacing=0><tr><td><font class=\"pn-title\">'._INFOCHANGED.'</font></td></tr></table></body></html>';
}

function docookie($setuid, $setuname, $setpass, $setstorynum, $setumode, $setuorder, $setthold, $setnoscore, $setublockon, $settheme, $setcommentmax)
{
    $info = base64_encode("$setuid:$setuname:$setpass:$setstorynum:$setumode:$setuorder:$setthold:$setnoscore:$setublockon:$settheme:$setcommentmax");
    setcookie("user","$info",time() + 15552000);
}

// for compatibility : use user_menu_add_option($url,$title,$image)
   function usermenu($url,$title,$image)
   {                                                       //
      global $userimg;
      if (!ereg('/',$image)) $image = $userimg."/".$image;
      user_menu_add_option($url,$title,$image);
   }

   function GraphicUser($help='')
   {
      //modified by Chris van de Steeg.. I guess this should display the menu
      //it didn't do that.
      //if ($help!='') user_menu_help($help,_ONLINEMANUAL);
      user_menu($help);
      //user_menu_detail(false);
      user_menu_draw();
   }

   function user_menu($help_file='')
   {
      global $pntable;
      user_menu_title('user.php',_THISISYOURPAGE);
      user_menu_graphic($GLOBALS['usergraphic']);                                    
      if ($help_file!='') user_menu_help($help_file,_ONLINEMANUAL);
      //include 'modules/NS-Modules/data.php';
      //foreach ($module_item as $k=>$item)
      //   user_menu_add_option('user.php?module='.$item['module'].'&op=main',$item['text'],$item['image']);
//    modules, old way
      $moddir = opendir('modules/');
      while ($modulename=readdir($moddir))
      {
         if (@is_dir($dir='modules/'.$modulename.'/user/links/'))
         {
            $linksdir = opendir("modules/$modulename/user/links/");
            while ($func = readdir($linksdir))
            {
               if (eregi('^links.',$func))
               {
                  //modified by Chris van de Steeg to have $ModName available in the links file
                  //$menulist[$func] = "modules/$modulename/user/links";
                  $menulist[$func]["dir"] = "modules/$modulename/user/links";
                  $menulist[$func]["modname"] = $modulename;
                  //end mofication by Chris van de Steeg
               }
            }
            closedir($linksdir);
         }
      }
      closedir($moddir);
//    display
      ksort($menulist);
      foreach ($menulist as $k=>$v)
      {
         //modified by Chris van de Steeg to have $ModName available in the links file
         $currMod = $GLOBALS['ModName'];
         $GLOBALS["ModName"] = $v["modname"];
         include $v["dir"]."/$k";
         $GLOBALS["ModName"] = $currMod;
         //end mofication by Chris van de Steeg
      }
      user_menu_add_option('user.php?module=NS-User&op=logout', _LOGOUTEXIT, 'images/admin/exit.gif');
   }

   function user_title($title)
   {
    OpenTable();
    echo "<center><font class=\"pn-title\"><b>".$title."</b></font></center>";
    CloseTable();
    echo "<br>";
   }

   function user_submit($module,$op,$text)
   {
      echo  '<input type="hidden" NAME="module" value="'.$module.'">'."\n"
           .'<input type="hidden" NAME="op" value="'.$op.'">'."\n"
           .'<input type="submit" VALUE="'.$text.'">'."\n";
   }
?>
Return current item: ProNuke. Postnuke To Oracle