示例#1
0
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Standard'))) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Цветовая палитра');
#-------------------------------------------------------------------------------
$HostsIDs = IO_Scan(SPrintF('%s/styles/', SYSTEM_PATH));
if (Is_Error($HostsIDs)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
# Все цвета в палитре
$Colors = array('FFFFFF', '000000');
#-------------------------------------------------------------------------------
$Palette = Styles_XML('Palette.xml');
if (Is_Error($Palette)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Table = new Tag('TABLE', array('class' => 'Standard', 'cellspacing' => 0, 'cellpadding' => 0));
#-------------------------------------------------------------------------------
$Gradetion = $Palette['Gradetion'];
#-------------------------------------------------------------------------------
foreach ($Palette['Colors'] as $Color) {
    #-----------------------------------------------------------------------------
    $Tr = new Tag('TR');
    #-----------------------------------------------------------------------------
    for ($i = 1; $i < ($Count = $Gradetion['Count']) * 2; $i++) {
        #---------------------------------------------------------------------------
        $IsLeft = $i >= $Count;
示例#2
0
<?php

#-------------------------------------------------------------------------------
Header('Content-type: text/plain; charset=utf-8');
#-------------------------------------------------------------------------------
$XML = Styles_XML('Menus/TopPanel.xml');
if (Is_Error($XML)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
print_R($XML);
#-------------------------------------------------------------------------------
示例#3
0
if (Is_Error($DOM->Load('Base'))) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddAttribs('MenuLeft', array('args' => 'Administrator/AddIns'));
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Дополнения → Мастера настройки → Прочее');
#-------------------------------------------------------------------------------
$NoBody = new Tag('NOBODY');
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$NoBody->AddChild(new Tag('BR'));
$List = new Tag('UL', array('class' => 'Standard'));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Menus = Styles_XML('Menus/Administrator/Masters.Other.xml');
#Debug(SPrintF("[comp/www/Administrator/SystemMaintenance]: Menus = %s",print_r($Menus,true)));
#-------------------------------------------------------------------------------
foreach ($Menus['Items'] as $Menu) {
    #-------------------------------------------------------------------------------
    $A = new Tag('A', array('class' => 'Standard', 'href' => $Menu['Href']), $Menu['Text']);
    #-------------------------------------------------------------------------------
    if (isset($Menu['Prompt'])) {
        #-------------------------------------------------------------------------------
        $LinkID = UniqID('Href');
        #-------------------------------------------------------------------------------
        $Links[$LinkID] =& $A;
        #-------------------------------------------------------------------------------
        $Comp = Comp_Load('Form/Prompt', $LinkID, $Menu['Prompt']);
        #-------------------------------------------------------------------------------
        if (Is_Error($Comp)) {
示例#4
0
$DOM =& $Links['DOM'];
#-------------------------------------------------------------------------------
if (!Comp_IsLoaded('Menus/List')) {
    #-------------------------------------------------------------------------------
    $Script = new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/ListMenu.js}'));
    #-------------------------------------------------------------------------------
    $DOM->AddChild('Head', $Script);
    #-------------------------------------------------------------------------------
    $Table = new Tag('TABLE', array('id' => 'ListMenu', 'class' => 'Standard', 'cellspacing' => 0, 'cellpadding' => 0, 'style' => 'display:none;position:absolute;top:-1000;left:-1000;'));
    #-------------------------------------------------------------------------------
    $DOM->AddChild('Floating', $Table);
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$XML = Styles_XML(SPrintF('Menus/%s', $MenuPath));
if (Is_Error($XML)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$CacheID = Md5($MenuPath);
#-------------------------------------------------------------------------------
$Items = $XML['Items'];
#-------------------------------------------------------------------------------
if (!isset($Links[$CacheID])) {
    #-------------------------------------------------------------------------------
    foreach ($Items as $Item) {
        #-------------------------------------------------------------------------------
        if (isset($Item['JavaScript'])) {
            #-------------------------------------------------------------------------------
示例#5
0
function Styles_Menu($Path)
{
    /****************************************************************************/
    $__args_types = array('string');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    $Result = $Chain = array();
    #-----------------------------------------------------------------------------
    do {
        #---------------------------------------------------------------------------
        $Menu = Styles_XML(SPrintF('Menus/%s.xml', $Path));
        if (Is_Error($Menu)) {
            return ERROR | @Trigger_Error('[Styles_Menu]: не удалось загрузить файл меню');
        }
        #---------------------------------------------------------------------------
        Array_UnShift($Chain, $Menu);
        #---------------------------------------------------------------------------
        $Path = isset($Menu['RootID']) ? $Menu['RootID'] : FALSE;
        #---------------------------------------------------------------------------
    } while ($Path);
    #-----------------------------------------------------------------------------
    foreach ($Chain as $Menu) {
        Array_Union($Result, $Menu);
    }
    #-----------------------------------------------------------------------------
    $Items =& $Result['Items'];
    #-----------------------------------------------------------------------------
    if (isset($Result['Comp'])) {
        #---------------------------------------------------------------------------
        $Comp = Comp_Load($Result['Comp']);
        if (Is_Error($Comp)) {
            return ERROR | @Trigger_Error(500);
        }
        #---------------------------------------------------------------------------
        if (Is_Array($Comp)) {
            Array_Union($Items, $Comp);
        }
    }
    #-----------------------------------------------------------------------------
    foreach (Array_Keys($Items) as $ItemID) {
        #---------------------------------------------------------------------------
        $Item =& $Items[$ItemID];
        #---------------------------------------------------------------------------
        if (!Is_Array($Item)) {
            continue;
        }
        #---------------------------------------------------------------------------
        if (isset($Item['UnActive'])) {
            unset($Items[$ItemID]);
        }
        #---------------------------------------------------------------------------
        $IsActive = FALSE;
        #---------------------------------------------------------------------------
        foreach ($Item['Paths'] as $Path) {
            #-------------------------------------------------------------------------
            $IsActive = Preg_Match(SPrintF('/%s/', $Path), $GLOBALS['__URI']) || Preg_Match(SPrintF('/%s/', $Path), $_SERVER['REQUEST_URI']);
            #-------------------------------------------------------------------------
            if ($IsActive) {
                break;
            }
        }
        #---------------------------------------------------------------------------
        $Item['IsActive'] = $IsActive;
    }
    #-----------------------------------------------------------------------------
    KSort($Items);
    #-----------------------------------------------------------------------------
    return $Result;
}
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Template =& $Links[$LinkID];
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$CacheID = 'TableSuper[AdministratorMenu]';
#-------------------------------------------------------------------------------
if (!($NoBody = Cache_Get($CacheID))) {
    Debug(SPrintF("[comp/Tables/Forms/AdministratorMenu]: EdeskID = %s", print_r($GLOBALS['_GET']['TicketID'], true)));
    #-------------------------------------------------------------------------------
    $NoBody = new Tag('NOBODY');
    #-------------------------------------------------------------------------------
    $Menus = Styles_XML('Menus/Administrator/ListMenu/Tickets.xml');
    #Debug(SPrintF("[comp/Tables/Forms/AdministratorMenu]: Menus = %s",print_r($Menus,true)));
    #-------------------------------------------------------------------------------
    foreach ($Menus['Items'] as $Menu) {
        #-------------------------------------------------------------------------------
        $Href = Str_Replace('"', "'", $Menu['Href']);
        $Href = Str_Replace('%Replace%', $GLOBALS['_GET']['TicketID'], $Href);
        #-------------------------------------------------------------------------------
        $Comp = Comp_Load('Buttons/Standard', array('onclick' => $Href, 'style' => 'cursor: pointer;'), $Menu['Text'], $Menu['Icon']);
        if (Is_Error($Comp)) {
            return ERROR | @Trigger_Error(500);
        }
        #-------------------------------------------------------------------------------
        $NoBody->AddChild($Comp);
        #-------------------------------------------------------------------------------
    }
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Base'))) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddAttribs('MenuLeft', array('args' => 'Administrator/AddIns'));
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Дополнения → Обслуживание системы');
#-------------------------------------------------------------------------------
$NoBody = new Tag('NOBODY');
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$List = new Tag('UL', array('class' => 'Standard'));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Menus = Styles_XML('Menus/Administrator/Billing.xml');
#Debug(SPrintF("[comp/www/Administrator/SystemMaintenance]: Menus = %s",print_r($Menus,true)));
#-------------------------------------------------------------------------------
foreach ($Menus['Items'] as $Menu) {
    #-------------------------------------------------------------------------------
    $A = new Tag('A', array('class' => 'Standard', 'href' => $Menu['Href']), $Menu['Text']);
    #-------------------------------------------------------------------------------
    if (isset($Menu['Prompt'])) {
        #-------------------------------------------------------------------------------
        $LinkID = UniqID('Href');
        #-------------------------------------------------------------------------------
        $Links[$LinkID] =& $A;
        #-------------------------------------------------------------------------------
        $Comp = Comp_Load('Form/Prompt', $LinkID, $Menu['Prompt']);
        #-------------------------------------------------------------------------------
        if (Is_Error($Comp)) {