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

// for compatibility : use menu_add_option($url,$title,$image)
   function adminmenu($url,$title,$image)
   {
      global $adminimg;
      if (!ereg('/',$image)) $image = $adminimg.$image;
      menu_add_option($url,$title,$image);
   }

   function GraphicAdmin($help='')
   {
      if ($help!='') menu_help($help,_ONLINEMANUAL);
      menu_detail(false);
      menu_draw();
   }

   function admin_menu($help_file='')
   {
      global $pntable;
      list($newsubs) = db_select_one_row("SELECT count(*) FROM $pntable[queue]");
      menu_title('admin.php',_ADMINMENU);
      menu_graphic($GLOBALS['admingraphic']);
      if ($help_file!='') menu_help($help_file,_ONLINEMANUAL);
      include 'modules/NS-Modules/data.php';
      foreach ($module_item as $k=>$item)
      {
        $module = ereg_replace('NS-','',$item['module']);
        if (authorised(0,$module.'::','::',ACCESS_ADMIN))
           menu_add_option('admin.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.'/admin/links/'))
         {
            $linksdir = opendir("modules/$modulename/admin/links/");
            while ($func = readdir($linksdir))
            {
               if (eregi('^links.',$func))
               {
                  $menulist[$func] = "modules/$modulename/admin/links";
               }
            }
            closedir($linksdir);
         }
      }
      closedir($moddir);
//    display
      ksort($menulist);
      foreach ($menulist as $k=>$v)
      {
         include "$v/$k";
      }
   }

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

   function admin_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