* @license http://www.contenido.org/license/LIZENZ.txt * @link http://www.4fb.de * @link http://www.contenido.org * @since file available since contenido release <= 4.6 * * {@internal * created 2003-06-04 * modified 2008-06-27, Frederic Schneider, add security fix * * $Id: include.debug.php 2 2011-07-20 12:00:48Z oldperl $: * }} * */ if(!defined('CON_FRAMEWORK')) { die('Illegal call'); } $areaList = new Area(); $areas = $areaList = $areaList->getAvailableAreas(); $areaSelectTemplate= new Template; $areaSelectTemplate->set('s', 'NAME', 'areaselect'); foreach ($areas as $key => $value) { $areaSelectTemplate->set('d', 'VALUE', $key); $areaSelectTemplate->set('d', 'CAPTION', $value['name']); $areaSelectTemplate->set('d', 'SELECTED',''); $areaSelectTemplate->next(); } $areaSelector = $areaSelectTemplate->generate($cfg['path']['templates'].$cfg['templates']['generic_select'], true); $actionList = new Action(); $actions = $actionList = $actionList->getAvailableActions(); $actionSelectTemplate= new Template; $actionSelectTemplate->set('s', 'NAME', 'actionselect'); foreach ($actions as $key => $value) { $actionSelectTemplate->set('d', 'VALUE', $key); $actionSelectTemplate->set('d', 'CAPTION', $value['name']); $actionSelectTemplate->set('d', 'SELECTED',''); $actionSelectTemplate->next(); } $actionSelector = $actionSelectTemplate->generate($cfg['path']['templates'].$cfg['templates']['generic_select'], true); if ($querytype == "areaactionitem") { $res = $perm->have_perm_area_action_item($areaselect, $actionselect, $itemid); if ($res) { $result = "has right for have_perm_area_action_item($areaselect, $actionselect, $itemid)"; } else { $result = "has no right for have_perm_area_action_item($areaselect, $actionselect, $itemid)"; } } if ($querytype == "areaaction") { $res = $perm->have_perm_area_action($areaselect, $actionselect); if ($res) { $result = "has right for have_perm_area_action($areaselect, $actionselect)"; } else { $result = "has no right for have_perm_area_action($areaselect, $actionselect)"; } } if ($querytype == "area") { $res = $perm->have_perm_area_action($areaselect, 0); if ($res) { $result = "has right for have_perm_area_action($areaselect, 0)"; } else { $result = "has no right for have_perm_area_action($areaselect, 0)"; } } echo "

Debug

"; echo "

Check for right:

"; $form = '
'.$sess->hidden_session().' '; echo $form; echo "Area:".$areaSelector."
"; echo "Action:".$actionSelector."
"; echo 'Item:'; echo "
Type:
"; echo "have_perm_area_action_item
"; echo "have_perm_area_action
"; echo "have_perm_area_action without action (i.e. area access right)
"; echo "

Result:
"; echo "
"; ?>