86 lines
2.5 KiB
PHP
86 lines
2.5 KiB
PHP
<?php
|
|
|
|
/*
|
|
+---------------------------------------------------------------------------
|
|
| Invision Power Board 2.1.7
|
|
| =============================================
|
|
| by Matthew Mecham
|
|
| (c) 2001 - 2005 Invision Power Services, Inc.
|
|
| http://www.invisionpower.com
|
|
| =============================================
|
|
| Web: http://www.invisionboard.com
|
|
| http://www.ibresource.ru/products/invisionpowerboard/
|
|
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
|
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
|
| Licence Info: http://www.invisionboard.com/?license
|
|
| http://www.ibresource.ru/license
|
|
+---------------------------------------------------------------------------
|
|
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
|
+---------------------------------------------------------------------------
|
|
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
|
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
|
+---------------------------------------------------------------------------
|
|
|
|
|
| > CONTROL PANEL (COMPONENTS) PAGES FILE
|
|
| > Script written by Matt Mecham
|
|
| > Date started: Tue. 15th February 2005
|
|
|
|
|
+---------------------------------------------------------------------------
|
|
*/
|
|
|
|
//===========================================================================
|
|
// Simple library that holds all the links for the admin cp
|
|
// THIS PAGE CLASS: Generate menu from DB
|
|
//===========================================================================
|
|
|
|
|
|
global $ipsclass;
|
|
|
|
$CATS = array();
|
|
$PAGES = array();
|
|
|
|
//--------------------------------
|
|
// Get info from DB
|
|
//--------------------------------
|
|
|
|
foreach( $ipsclass->menu_components as $ix => $r )
|
|
{
|
|
//--------------------------------
|
|
// Process data
|
|
//--------------------------------
|
|
|
|
$menu_data = unserialize( $r['com_menu_data'] );
|
|
$tmp_pages = array();
|
|
|
|
//--------------------------------
|
|
// First item is title...
|
|
//--------------------------------
|
|
|
|
$CATS[] = array( $r['com_title'] );
|
|
|
|
//--------------------------------
|
|
// Work through rest
|
|
//--------------------------------
|
|
|
|
if ( is_array( $menu_data ) and count( $menu_data ) )
|
|
{
|
|
foreach( $menu_data as $id => $menu )
|
|
{
|
|
if ( $menu['menu_text'] AND $menu['menu_url'] )
|
|
{
|
|
if ( $menu['menu_redirect'] )
|
|
{
|
|
$tmp_pages[] = array( $menu['menu_text'], $menu['menu_url'], "", 0, 1 );
|
|
}
|
|
else
|
|
{
|
|
$tmp_pages[] = array( $menu['menu_text'], 'section=components&act='.$r['com_section'].'&'.$menu['menu_url'] );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
$PAGES[] = $tmp_pages;
|
|
}
|
|
|
|
?>
|