| 971 |
* Constructor |
* Constructor |
| 972 |
*/ |
*/ |
| 973 |
function mosMenuHandler() { |
function mosMenuHandler() { |
|
global $my; |
|
| 974 |
$database =& mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 975 |
$sql = "SELECT * FROM #__menu ORDER BY name"; |
$sql = "SELECT * FROM #__menu ORDER BY name"; |
| 976 |
$this->_menus =& $database->doSQLget($sql, 'mosMenu'); |
$this->_menus =& $database->doSQLget($sql, 'mosMenu'); |
| 1144 |
* @return boolean True if the visitor's group at least equal to the menu access |
* @return boolean True if the visitor's group at least equal to the menu access |
| 1145 |
*/ |
*/ |
| 1146 |
function menuCheck( $Itemid, $menu_option, $task, $gid ) { |
function menuCheck( $Itemid, $menu_option, $task, $gid ) { |
| 1147 |
$exceptions = array ('com_banner', 'com_poll', 'com_registration', 'com_rss'); |
// Construct a link to this component - if no menu for it, assume it is OK |
|
if (in_array($menu_option, $exceptions)) return true; |
|
| 1148 |
$dblink="index.php?option=$menu_option"; |
$dblink="index.php?option=$menu_option"; |
| 1149 |
|
if ($this->getIDLikeLink($dblink) == 0) return true; |
| 1150 |
if ($Itemid) { |
if ($Itemid) { |
| 1151 |
$menu =& $this->getMenuByID($Itemid); |
$menu =& $this->getMenuByID($Itemid); |
| 1152 |
if (strpos($menu->link,$dblink) ===0) $access = $menu->access; |
if (strpos($menu->link,$dblink) ===0) $access = $menu->access; |
| 1235 |
*/ |
*/ |
| 1236 |
function mosShowVIMenu( &$params ) { |
function mosShowVIMenu( &$params ) { |
| 1237 |
global $my, $cur_template, $Itemid; |
global $my, $cur_template, $Itemid; |
|
|
|
| 1238 |
if (mamboCore::get('mosConfig_shownoauth')) $maxaccess = 0; |
if (mamboCore::get('mosConfig_shownoauth')) $maxaccess = 0; |
| 1239 |
else $maxaccess = $my->gid; |
else $maxaccess = $my->gid; |
| 1240 |
$rows =& $this->getByParentOrder(0, $params->get('menutype'), $maxaccess); |
$rows =& $this->getByParentOrder(0, $params->get('menutype'), $maxaccess); |
| 2421 |
if (count($parser->html)) return implode("\n", $parser->html); |
if (count($parser->html)) return implode("\n", $parser->html); |
| 2422 |
} |
} |
| 2423 |
$raw = $this->_raw; |
$raw = $this->_raw; |
| 2424 |
return "<textarea name='$name' cols='40' rows='10' class='text_area'$raw</textarea>"; |
return "<textarea name='$name' cols='40' rows='10' class='text_area'>$raw</textarea>"; |
| 2425 |
} |
} |
| 2426 |
|
|
| 2427 |
/** |
/** |
| 2507 |
$act = strtolower(mosGetParam($_REQUEST, 'act', '')); |
$act = strtolower(mosGetParam($_REQUEST, 'act', '')); |
| 2508 |
$section = mosGetParam($_REQUEST, 'section', ''); |
$section = mosGetParam($_REQUEST, 'section', ''); |
| 2509 |
$no_html = strtolower(mosGetParam($_REQUEST, 'no_html', '')); |
$no_html = strtolower(mosGetParam($_REQUEST, 'no_html', '')); |
| 2510 |
|
$cid = (array) mosGetParam( $_POST, 'cid', array() ); |
| 2511 |
|
|
| 2512 |
ini_set('session.use_trans_sid', 0); |
ini_set('session.use_trans_sid', 0); |
| 2513 |
ini_set('session.use_cookies', 1); |
ini_set('session.use_cookies', 1); |
| 2514 |
ini_set('session.use_only_cookies', 1); |
ini_set('session.use_only_cookies', 1); |
| 2515 |
|
|
| 2516 |
|
|
| 2517 |
if ($adminside) { |
if ($adminside) { |
| 2518 |
// Start ACL |
// Start ACL |
| 2519 |
require_once($configuration->rootPath().'/includes/gacl.class.php' ); |
require_once($configuration->rootPath().'/includes/gacl.class.php' ); |