Source for file mod_components.php
Documentation is available at mod_components.php
* @author Mambo Foundation Inc see README.php
* @copyright Mambo Foundation Inc.
* See COPYRIGHT.php for copyright notices and details.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see
* Mambo is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2 of the
/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$canConfig =
$acl->acl_check( 'administration', 'config', 'users', $my->usertype );
$manageTemplates =
$acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_templates' );
$manageLanguages =
$acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_languages' );
$installModules =
$acl->acl_check( 'administration', 'install', 'users', $my->usertype, 'modules', 'all' );
$editAllModules =
$acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'modules', 'all' );
$installComponents =
$acl->acl_check( 'administration', 'install', 'users', $my->usertype, 'components', 'all' );
$editAllComponents =
$acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'all' );
$canMassMail =
$acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_massmail' );
$canManageUsers =
$acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_users' );
$query =
"SELECT * FROM #__components ORDER BY ordering,name";
$database->setQuery( $query );
$comps =
$database->loadObjectList(); // component list
$subs =
array(); // sub menus
// first pass to collect sub-menu items
foreach ($comps as $row) {
$subs[$row->parent] =
array();
$subs[$row->parent][] =
$row;
echo
'<div align="right">';
foreach ($comps as $row) {
if ( $editAllComponents |
$acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', $row->option ) ) {
if ($i >=
$topLevelLimit) {
if ($i ==
$topLevelLimit) {
if ($i <
$topLevelLimit ) {
// $alt = htmlspecialchars( $row->admin_menu_alt, ENT_QUOTES );
if ($row->admin_menu_link) {
echo
"\n".
'<a href="index2.php?'.
htmlspecialchars($row->admin_menu_link,ENT_QUOTES).
'"><strong>'.
$name.
'</strong></a><br/>';
echo
"\n".
'<strong>'.
$name.
'</strong><br/>';
foreach ($subs[$row->id] as $sub) {//print_r($row);
// $alt = htmlspecialchars( $sub->admin_menu_alt );
// $link = $sub->admin_menu_link ? "" : "null";
// $img = $sub->admin_menu_img ? "<img src=\"../includes/$sub->admin_menu_img\" />" : '';
if ($sub->admin_menu_link) {
echo
"\n<span dir=\"rtl\">".
' - <a href="index2.php?'.
htmlspecialchars($sub->admin_menu_link, ENT_QUOTES).
'">'.
$name.
'</a></span><br/>';
echo
"\n<span dir=\"rtl\">".
'- '.
$name.
'</span><br/>';
Documentation generated on Mon, 05 May 2008 16:21:14 +0400 by phpDocumentor 1.4.0