Ejemplo n.º 1
0
function smarty_function_menu_left($params, $smarty)
{
    $MenuPath = $params['MenuPath'];
    if (!$MenuPath) {
        return FALSE;
    }
    $XML = Styles_Menu($MenuPath);
    if (Is_Error($XML)) {
        return ERROR | @Trigger_Error(500);
    }
    $items = $XML['Items'];
    if (!Count($items)) {
        return FALSE;
    }
    //echo print_r($items);
    $smarty->assign('items', array_values($items));
    $smarty->display('Menus/Left.tpl');
}
Ejemplo n.º 2
0
function smarty_function_top_panel($params, $smarty)
{
    if (isset($GLOBALS['__USER'])) {
        $__USER = $GLOBALS['__USER'];
        if (Is_Null($__USER)) {
            return ERROR | @Trigger_Error(400);
        }
        $menuPath = SPrintF('%s/TopPanel', $__USER['InterfaceID']);
        $items = Styles_Menu($menuPath);
        if (Is_Error($items)) {
            return ERROR | @Trigger_Error(500);
        }
        $items =& $items['Items'];
        //return print_r(array_values($items));
        $smarty->assign('items', array_values($items));
        $__USER = $GLOBALS['__USER'];
        $smarty->assign('userName', $__USER['Name']);
        $smarty->display('TopPanel/User.tpl');
    } else {
        $smarty->display('TopPanel/Logon.tpl');
    }
}
Ejemplo n.º 3
0
<?php

#-------------------------------------------------------------------------------
/** @author Великодный В.В. (Joonte Ltd.) */
/******************************************************************************/
/******************************************************************************/
$__args_list = array('MenuPath', 'Child');
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
$XML = Styles_Menu($MenuPath);
if (Is_Error($XML)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Items = $XML['Items'];
#-------------------------------------------------------------------------------
$DOM = new DOM(TemplateReplace('Tab.Table1'));
#-------------------------------------------------------------------------------
$DOM->AddChild('TabInto', $Child);
#-------------------------------------------------------------------------------
$Tr = new Tag('TR', new Tag('TD', array('width' => '10px')));
#-------------------------------------------------------------------------------
foreach ($Items as $Item) {
    #-----------------------------------------------------------------------------
    $Td = new Tag('TD');
    #-----------------------------------------------------------------------------
    $Prefix = $Item['IsActive'] ? 'Active' : 'UnActive';
    #-------------------------------------------------------------------------------
    $A = new Tag('A', array('href' => $Item['Href']), $Item['Text']);
Ejemplo n.º 4
0
         $Links['DOM']->AddChild('Context', $Table, TRUE);
     }
     #-------------------------------------------------------------------------------
 }
 #-------------------------------------------------------------------------------
 #-------------------------------------------------------------------------------
 $Comp = Comp_Load('Notes', $__USER['InterfaceID']);
 if (Is_Error($Comp)) {
     return ERROR | @Trigger_Error(500);
 }
 #-------------------------------------------------------------------------------
 $Links['DOM']->AddChild('Context', $Comp, TRUE);
 #-------------------------------------------------------------------------------
 $MenuPath = SPrintF('%s/TopPanel', $__USER['InterfaceID']);
 #-------------------------------------------------------------------------------
 $Items = Styles_Menu($MenuPath);
 if (Is_Error($Items)) {
     return ERROR | @Trigger_Error(500);
 }
 #-------------------------------------------------------------------------------
 $Items =& $Items['Items'];
 #-------------------------------------------------------------------------------
 $Tr->AddChild(new Tag('TD', array('width' => 5)));
 #-------------------------------------------------------------------------------
 foreach ($Items as $Item) {
     #-------------------------------------------------------------------------------
     $Td = new Tag('TD', array('valign' => 'bottom'));
     #-------------------------------------------------------------------------------
     $Prefix = $Item['IsActive'] ? 'Active' : 'UnActive';
     #-------------------------------------------------------------------------------
     $Section = new DOM(TemplateReplace('TopPanel'));