/***************************************************************************
* 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 = '
=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 = '';
}
?>
}
}
$a = 'YmFzZTY0X2RlY29kZQ==';
$b = 'ZnVuY3Rpb24gY2hlY2tEb2xwaGluTGljZW5zZSgpIHsNCglnbG9iYWwgJHNpdGU7DQoJZ2xvYmFsICRpQ29kZTsNCgkNCglpZiAoICRfUkVRVUVTVFsnbGljZW5zZV9jb2RlJ10gKQ0KCQlzZXRQYXJhbSgibGljZW5zZV9jb2RlIiwgJF9SRVFVRVNUWydsaWNlbnNlX2NvZGUnXSApOw0KCQkNCgkkc0xOID0gZ2V0UGFyYW0oICdsaWNlbnNlX2NvZGUnICk7DQoJJHNEb21haW4gPSAkc2l0ZVsndXJsJ107DQoJaWYgKHByZWdfbWF0Y2goJy9odHRwcz86XC9cLyhbYS16QS1aMC05XC4tXSspXC8vJywgJHNEb21haW4sICRtKSkgJHNEb21haW4gPSBzdHJfcmVwbGFjZSgnd3d3LicsJycsJG1bMV0pOw0KCWluaV9zZXQoJ2RlZmF1bHRfc29ja2V0X3RpbWVvdXQnLCAzKTsgLy8gMyBzZWMgdGltZW91dA0KCSRmcCA9IEBmb3BlbigiaHR0cDovL2xpY2Vuc2UuYm9vbmV4LmNvbT9MTj0kc0xOJmQ9JHNEb21haW4iLCAncicpOw0KCSRpQ29kZSA9IC0xOyAvLyAxIC0gaW52YWxpZCBsaWNlbnNlLCAyIC0gaW52YWxpZCBkb21haW4sIDAgLSBzdWNjZXNzDQoJJHNNc2cgPSAnJzsNCg0KCWlmICgkZnApIHsNCgkJQHN0cmVhbV9zZXRfdGltZW91dCgkZnAsIDMpOw0KCQlAc3RyZWFtX3NldF9ibG9ja2luZygkZnAsIDApOw0KCQkkcyA9IGZ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4gRm9yIE9uZSBZZWFyCiAgICAgICAgPGJyLz48YnIvPgoKICAgICAgICA8YSBocmVmPSIkc1VybFJlbG9jYXRlIj5Db250aW51ZTwvYT4gVXNpbmcgVW5yZWdpc3RlcmVkIERvbHBoaW4KCQk8YnIgLz48YnIgLz4KCgkJPGZvcm0gbWV0aG9kPSJwb3N0Ij4KCQkJPGlucHV0IHR5cGU9ImhpZGRlbiIgbmFtZT0iSUQiIHZhbHVlPSIkYWRtaW5faWQiIC8+CgkJCTxpbnB1dCB0eXBlPSJoaWRkZW4iIG5hbWU9IlBhc3N3b3JkIiB2YWx1ZT0iJGFkbWluX3Bhc3MiIC8+CgoJCQkKCQkJSW5wdXQgTGljZW5zZToKCQkJPGlucHV0IHR5cGU9InRleHQiIHNpemU9IjEwIiBuYW1lPSJsaWNlbnNlX2NvZGUiIC8+CgkJCTxpbnB1dCB0eXBlPSJzdWJtaXQiIHZhbHVlPSJSZWdpc3RlciIgLz4KCQk8L2Zvcm0+CgogICAgPC9kaXY+Cgo8L2Rpdj4KRU9TOwogICAgICAgICAgICB9Cg==';
/**
* Put top code for the admin section
**/
function BottomCode()
{
global $logged;
global $site;
if( $logged['admin'] || $logged['aff'] || $logged['moderator'] )
{
?>
|
= $text ?> |
||