当前位置: 首页>>代码示例>>PHP>>正文


PHP Tag::AddAttribs方法代码示例

本文整理汇总了PHP中Tag::AddAttribs方法的典型用法代码示例。如果您正苦于以下问题:PHP Tag::AddAttribs方法的具体用法?PHP Tag::AddAttribs怎么用?PHP Tag::AddAttribs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tag的用法示例。


在下文中一共展示了Tag::AddAttribs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Tag

/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
$Table = new Tag('TABLE', array('class' => 'Standard'));
#-------------------------------------------------------------------------------
for ($i = 1; $i < Count($__args__); $i++) {
    #-----------------------------------------------------------------------------
    $__arg__ = $__args__[$i];
    #-----------------------------------------------------------------------------
    if (Is_Array($__arg__)) {
        if (Array_Key_Exists('cellspacing', $__arg__)) {
            $CellSpacing = 1;
        }
        #-----------------------------------------------------------------------------
        $Table->AddAttribs($__arg__);
    } else {
        $Table->AddChild(new Tag('CAPTION', $__arg__));
    }
}
#-------------------------------------------------------------------------------
if (!isset($CellSpacing)) {
    $Table->AddAttribs(array('cellspacing' => 5));
}
#-------------------------------------------------------------------------------
$Max = 1;
#-------------------------------------------------------------------------------
foreach ($Rows as $Row) {
    #-----------------------------------------------------------------------------
    $Count = Count($Row);
    #-----------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Extended.comp.php

示例2: Tag

                #-----------------------------------------------------------------------
                $Table->AddChild($Tr);
                #-----------------------------------------------------------------------
                $Tr = new Tag('TR');
            }
            #-------------------------------------------------------------------------
            $Size = Image_Get_Size($Image['FileData']);
            if (Is_Error($Size)) {
                return ERROR | @Trigger_Error(500);
            }
            #-------------------------------------------------------------------------
            $Index = $Size['Height'] / $Size['Width'];
            #-------------------------------------------------------------------------
            $Height = $Width * $Index;
            #-------------------------------------------------------------------------
            $Img = new Tag('IMG', array('border' => 0, 'width' => $Width, 'height' => $Height, 'style' => 'border:1px solid #DCDCDC;cursor:pointer;', 'title' => $Image['Comment'], 'src' => SPrintF('/ClauseImage?ImageID=%u&Width=%u', $Image['ID'], $Width)));
            #-------------------------------------------------------------------------
            $Img->AddAttribs(array('onclick' => SPrintF('ClauseImageShow(%u,this);', $Image['ID'])));
            #-------------------------------------------------------------------------
            $Tr->AddChild(new Tag('TD', $Img, new Tag('DIV', array('align' => 'center', 'style' => 'font-size:11px;color:#969696;'), $Image['Comment'])));
        }
        #---------------------------------------------------------------------------
        if (Count($Tr->Childs)) {
            $Table->AddChild($Tr);
        }
        #---------------------------------------------------------------------------
        return $Table;
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:ImagesGallery.comp.php

示例3: UniqID

    #-----------------------------------------------------------------------------
    $LinkID = UniqID('Select');
    #-----------------------------------------------------------------------------
    $Links =& Links();
    #-----------------------------------------------------------------------------
    $Links[$LinkID] =& $Select;
    #-----------------------------------------------------------------------------
    $Comp = Comp_Load('Form/Prompt', $LinkID, $Prompt);
    if (Is_Error($Comp)) {
        return ERROR | @Trigger_Error(500);
    }
    #-----------------------------------------------------------------------------
    unset($Links[$LinkID]);
}
#-------------------------------------------------------------------------------
$Select->AddAttribs($Attribs);
#-------------------------------------------------------------------------------
$OptionsIDs = Array_Keys($Options);
#-------------------------------------------------------------------------------
foreach ($OptionsIDs as $OptionID) {
    #-----------------------------------------------------------------------------
    $Option = $Options[$OptionID];
    #-----------------------------------------------------------------------------
    if (Is_Scalar($Option)) {
        #---------------------------------------------------------------------------
        $Option = new Tag('OPTION', array('value' => $OptionID), $Options[$OptionID]);
        #---------------------------------------------------------------------------
        if (!Is_Null($SelectedIDs)) {
            #-------------------------------------------------------------------------
            if (!Is_Array($SelectedIDs)) {
                $SelectedIDs = array($SelectedIDs);
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Select.comp.php

示例4: String_Xml_Parse

function String_Xml_Parse($String, $IsUseCache = TRUE)
{
    #-------------------------------------------------------------------------------
    # костыль для удаления не-UTF8 символов
    $String = iconv('UTF-8', 'UTF-8//IGNORE', $String);
    #-------------------------------------------------------------------------------
    $Length = Mb_StrLen($String);
    #-------------------------------------------------------------------------------
    $IsUseCache = $IsUseCache && $Length > 1024;
    #-------------------------------------------------------------------------------
    if ($IsUseCache) {
        #-------------------------------------------------------------------------------
        $CacheID = SPrintF('String_XML_Parse[%s]', Md5(Crc32($String)));
        #-------------------------------------------------------------------------------
        $Result = CacheManager::get($CacheID);
        if ($Result) {
            return $Result;
        }
    }
    #-------------------------------------------------------------------------------
    #-------------------------------------------------------------------------------
    Debug(SPrintF('[String_XML_Parse]: парсирование строки (%u bytes)', $Length));
    #-------------------------------------------------------------------------------
    $XmlParser = Xml_Parser_Create('UTF-8');
    #-------------------------------------------------------------------------------
    if (!Xml_Parser_Set_Option($XmlParser, XML_OPTION_CASE_FOLDING, FALSE)) {
        return ERROR | Trigger_Error('[String_Xml_Parse]: не удалось установить опцию парсирования (XML_OPTION_CASE_FOLDING)');
    }
    #-------------------------------------------------------------------------------
    if (!Xml_Parser_Set_Option($XmlParser, XML_OPTION_SKIP_WHITE, FALSE)) {
        return ERROR | Trigger_Error('[String_Xml_Parse]: не удалось установить опцию парсирования (XML_OPTION_SKIP_WHITE)');
    }
    #-------------------------------------------------------------------------------
    if (!Xml_Parse_Into_Struct($XmlParser, $String, $Nodes)) {
        #-------------------------------------------------------------------------------
        $ByteIndex = Xml_Get_Current_Byte_Index($XmlParser);
        #-------------------------------------------------------------------------------
        Debug(SPrintF('[system/libs/auto/String.php]: xml_error_string = %s', Xml_Error_String(Xml_Get_Error_Code($XmlParser))));
        #-------------------------------------------------------------------------------
        Debug(SPrintF('[system/libs/auto/String.php]: %s', Mb_SubStr($String, $ByteIndex - 100, $ByteIndex + 100)));
        #-------------------------------------------------------------------------------
        $Buffer = Mb_SubStr($String, 0, $ByteIndex);
        #-------------------------------------------------------------------------------
        $Line = Preg_Match_All("/(\r\n|\n)/sU", $Buffer, $Matches) + 1;
        #-------------------------------------------------------------------------------
        return new gException('XML_PARSE_ERROR', SPrintF('%s в линии %u', Xml_Error_String($XmlParser), $Line));
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
    #-------------------------------------------------------------------------------
    #-----------------------------------------------------------------------------
    Xml_Parser_Free($XmlParser);
    #-----------------------------------------------------------------------------
    $Root = new Tag('__ROOT__');
    #-----------------------------------------------------------------------------
    $Links = array(&$Root);
    #-----------------------------------------------------------------------------
    foreach ($Nodes as $Node) {
        #---------------------------------------------------------------------------
        $Current = $Links[Count($Links) - 1];
        #---------------------------------------------------------------------------
        switch ($Node['type']) {
            case 'open':
                #-----------------------------------------------------------------------
                $Tag = new Tag($Node['tag']);
                #-----------------------------------------------------------------------
                if (isset($Node['attributes'])) {
                    $Tag->AddAttribs($Node['attributes']);
                }
                #-----------------------------------------------------------------------
                if (isset($Node['value'])) {
                    #---------------------------------------------------------------------
                    $Value = $Node['value'];
                    #---------------------------------------------------------------------
                    if (Trim($Value)) {
                        $Tag->AddChild(new Tag('CDATA', $Value));
                    }
                }
                #-----------------------------------------------------------------------
                $Current->Childs[] = $Tag;
                #-----------------------------------------------------------------------
                $Links[] =& $Current->Childs[Count($Current->Childs) - 1];
                break;
            case 'cdata':
                #-----------------------------------------------------------------------
                $Value = $Node['value'];
                #-----------------------------------------------------------------------
                if (Trim($Value)) {
                    #---------------------------------------------------------------------
                    $Tag = new Tag('CDATA', $Value);
                    #---------------------------------------------------------------------
                    $Current->Childs[] = $Tag;
                }
                break;
            case 'complete':
                #-----------------------------------------------------------------------
                $Tag = new Tag($Node['tag']);
                #-----------------------------------------------------------------------
                if (isset($Node['attributes'])) {
                    $Tag->AddAttribs($Node['attributes']);
//.........这里部分代码省略.........
开发者ID:carriercomm,项目名称:jbs,代码行数:101,代码来源:String.php

示例5: Tag

    $Tr = new Tag('TR');
    #-----------------------------------------------------------------------------
    for ($i = 1; $i < ($Count = $Gradetion['Count']) * 2; $i++) {
        #---------------------------------------------------------------------------
        $IsLeft = $i >= $Count;
        #---------------------------------------------------------------------------
        $Shift = ($IsLeft ? $i - $Count : $Count - $i) * $Gradetion['Step'];
        #---------------------------------------------------------------------------
        $Shifted = Color_Shift(HexDec($Color), $IsLeft ? 0xffffff : 0x0, $Shift);
        #---------------------------------------------------------------------------
        $Colors[] = $Shifted;
        #---------------------------------------------------------------------------
        $Td = new Tag('TD', array('align' => 'center', 'bgcolor' => $Shifted, 'height' => 50, 'width' => 50), $Shifted);
        #---------------------------------------------------------------------------
        if ($i == $Count) {
            $Td->AddAttribs(array('style' => 'border:1px solid #DCDCDC;'));
        }
        #---------------------------------------------------------------------------
        $Tr->AddChild($Td);
    }
    #-----------------------------------------------------------------------------
    $Table->AddChild($Tr);
}
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Table);
#-------------------------------------------------------------------------------
foreach ($HostsIDs as $HostsID) {
    #-----------------------------------------------------------------------------
    $Files = IO_Files(SPrintF('%s/styles/%s', SYSTEM_PATH, $HostsID));
    if (Is_Error($Files)) {
        return ERROR | @Trigger_Error(500);
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Palette.comp.php

示例6: Tag

 $Replace = Array_ToLine($Row, '%');
 #-----------------------------------------------------------------------------
 $Tr = new Tag('TR');
 #-----------------------------------------------------------------------------
 if (StrLen($Comp = $Appearance['Row']['Comp'])) {
     #---------------------------------------------------------------------------
     $Args = Table_Super_Replace($Appearance['Row']['Args'], $Replace);
     #---------------------------------------------------------------------------
     Array_UnShift($Args, $Comp);
     #---------------------------------------------------------------------------
     $Comp = Call_User_Func_Array('Comp_Load', $Args);
     if (Is_Error($Comp)) {
         return ERROR | @Trigger_Error(500);
     }
     #---------------------------------------------------------------------------
     $Tr->AddAttribs($Comp);
 }
 #-----------------------------------------------------------------------------
 foreach ($Sequence as $ColumnID) {
     #---------------------------------------------------------------------------
     $Column = $Columns[$ColumnID];
     #---------------------------------------------------------------------------
     if (isset($Column['Hidden'])) {
         continue;
     }
     #---------------------------------------------------------------------------
     $Td = new Tag('TD');
     #---------------------------------------------------------------------------
     $Value = isset($Row[$ColumnID]) ? $Row[$ColumnID] : '';
     #---------------------------------------------------------------------------
     if (StrLen($Comp = $Column['Comp'])) {
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Vertical.comp.php

示例7: Explode

#-------------------------------------------------------------------------------
$lPosition = 0;
$rPosition = 0;
$IsOpened = TRUE;
#-------------------------------------------------------------------------------
if (isset($_COOKIE[$WidgetID])) {
    #-----------------------------------------------------------------------------
    $Settings = Explode(':', $_COOKIE[$WidgetID]);
    #-----------------------------------------------------------------------------
    $lPosition = (int) Current($Settings);
    $rPosition = (int) Next($Settings);
    #-----------------------------------------------------------------------------
    $IsOpened = (bool) Next($Settings);
}
#-------------------------------------------------------------------------------
$Table->AddAttribs($lPosition && $rPosition ? array('style' => SPrintF('position:absolute;left:%u;top:%u;', $lPosition, $rPosition)) : array('style' => 'display:inline-table;'));
#-------------------------------------------------------------------------------
$Move = new Tag('IMG', array('class' => 'Button', 'alt' => 'Переместить', 'width' => 16, 'height' => 16, 'onmousedown' => SPrintF("WidgetInit(event,'%s');document.body.onmouseup = function(){ document.body.onmousemove = null;document.body.onmouseup = null;WidgetRender('%s'); };document.body.onmousemove = function(event){ WidgetMove(event,'%s'); };", $WidgetID, $WidgetID, $WidgetID), 'src' => 'SRC:{Images/Icons/WidgetMove.gif}'));
#-------------------------------------------------------------------------------
$Switch = new Tag('IMG', array('class' => 'Button', 'alt' => 'Показать (скрыть)', 'width' => 16, 'height' => 16, 'onclick' => SPrintF("WidgetSwitch('%s');", $WidgetID), 'src' => 'SRC:{Images/Icons/WidgetSwitch.gif}'));
#-------------------------------------------------------------------------------
$Dock = new Tag('IMG', array('class' => 'Button', 'alt' => 'Закрепить', 'width' => 16, 'height' => 16, 'onclick' => SPrintF("WidgetDock('%s');", $WidgetID), 'src' => 'SRC:{Images/Icons/WidgetDock.gif}'));
#-------------------------------------------------------------------------------
$Panel = new Tag('TR', array('height' => 16), new Tag('TD', array('width' => 16), $Move), new Tag('TD', $Title), new Tag('TD', array('width' => 16), $Switch), new Tag('TD', array('width' => 16, 'align' => 'right'), $Dock));
#-------------------------------------------------------------------------------
$Table->AddChild($Panel);
#-------------------------------------------------------------------------------
$Table->AddChild(new Tag('TR', array('id' => SPrintF('%sInner', $WidgetID), 'style' => SPrintF('display:%s;', $IsOpened ? '' : 'none')), new Tag('TD', array('colspan' => 3), $Inner)));
#-------------------------------------------------------------------------------
return $Table;
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Widget.comp.php

示例8: Tag

 $Replace = Array_ToLine($Row, '%');
 #-----------------------------------------------------------------------------
 $Inner = new Tag('TABLE', array('class' => 'Widget', 'cellspacing' => 0, 'style' => 'max-width:300px;display:inline-table;'));
 #-----------------------------------------------------------------------------
 if (StrLen($Comp = $Appearance['Row']['Comp'])) {
     #---------------------------------------------------------------------------
     $Args = Table_Super_Replace($Appearance['Row']['Args'], $Replace);
     #---------------------------------------------------------------------------
     Array_UnShift($Args, $Comp);
     #---------------------------------------------------------------------------
     $Comp = Call_User_Func_Array('Comp_Load', $Args);
     if (Is_Error($Comp)) {
         return ERROR | @Trigger_Error(500);
     }
     #---------------------------------------------------------------------------
     $Inner->AddAttribs($Comp);
 }
 #-----------------------------------------------------------------------------
 $Panel = new Tag('TD');
 #-----------------------------------------------------------------------------
 foreach ($Sequence as $ColumnID) {
     #---------------------------------------------------------------------------
     $Column = $Columns[$ColumnID];
     #---------------------------------------------------------------------------
     if (isset($Column['Hidden'])) {
         continue;
     }
     #---------------------------------------------------------------------------
     $Td = new Tag('TD', array('class' => 'Standard'));
     #---------------------------------------------------------------------------
     $Value = isset($Row[$ColumnID]) ? $Row[$ColumnID] : '';
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Horizontal.comp.php

示例9: Tag

            #-------------------------------------------------------------------------------
            $UserID = $User['ID'];
            #-------------------------------------------------------------------------------
            if ($UserID != $__USER['ID']) {
                #-------------------------------------------------------------------------------
                $A = new Tag('A', array('href' => SPrintF('javascript:UserSwitch(%u);', $UserID)), $User['Email']);
                #-------------------------------------------------------------------------------
                $Table->AddChild($UserID ? new Tag('TR', new Tag('TD', array('class' => 'Standard', 'width' => 10)), new Tag('TD', $UserID != @$Session->Data['RootID'] ? $A : new Tag('B', $A))) : new Tag('TD', array('colspan' => 2, 'align' => 'right', 'style' => 'border-top:1px solid #DCDCDC;'), $A));
                #-------------------------------------------------------------------------------
            }
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
        $Links['DOM']->AddChild('Floating', $Table);
        #-------------------------------------------------------------------------------
        $Span->AddAttribs(array('onclick' => "with(document.getElementById('TopPanelUserSwitch').style){ if(display != 'none'){ display = 'none'; } else { var Position = GetPosition(this); left = Position.clientX; top = Position.clientY + 10; display = 'block'; }}", 'style' => 'cursor:pointer;'));
        #-------------------------------------------------------------------------------
        $Span->AddChild(new Tag('IMG', array('width' => 5, 'height' => 10, 'src' => 'SRC:{Images/TopPanelUserSwitch.gif}')));
        #-------------------------------------------------------------------------------
        $Span->AddChild(new Tag('SPAN', '[сменить]'));
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
    $DOM->AddChild('TopPanelMiddle', new Tag('DIV', array('style' => 'font-size:12px;color:#505050;padding-left:5px;'), new Tag('SPAN', 'Пользователь:'), $Span));
    #-------------------------------------------------------------------------------
    $Script = new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/Logout.js}'));
    #-------------------------------------------------------------------------------
    $Links['DOM']->AddChild('Head', $Script);
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:TopPanel.comp.php

示例10: Tag

#******************************************************************************#
$TextArea = new Tag('TEXTAREA');
#-------------------------------------------------------------------------------
if (isset($Attribs['prompt'])) {
    #-----------------------------------------------------------------------------
    $Prompt = $Attribs['prompt'];
    #-----------------------------------------------------------------------------
    unset($Attribs['prompt']);
    #-----------------------------------------------------------------------------
    $LinkID = UniqID('TextArea');
    #-----------------------------------------------------------------------------
    $Links =& Links();
    #-----------------------------------------------------------------------------
    $Links[$LinkID] =& $TextArea;
    #-----------------------------------------------------------------------------
    $Comp = Comp_Load('Form/Prompt', $LinkID, $Prompt);
    if (Is_Error($Comp)) {
        return ERROR | @Trigger_Error(500);
    }
    #-----------------------------------------------------------------------------
    unset($Links[$LinkID]);
}
#-------------------------------------------------------------------------------
$TextArea->AddAttribs($Attribs);
#-------------------------------------------------------------------------------
if (!Is_Null($Value)) {
    $TextArea->AddText($Value);
}
#-------------------------------------------------------------------------------
return $TextArea;
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:TextArea.comp.php

示例11: array

$__args_list = array('Attribs');
/******************************************************************************/
eval(COMP_INIT);
#******************************************************************************#
#******************************************************************************#
$Input = new Tag('INPUT');
#-------------------------------------------------------------------------------
if (isset($Attribs['prompt'])) {
    #-----------------------------------------------------------------------------
    $Prompt = $Attribs['prompt'];
    #-----------------------------------------------------------------------------
    unset($Attribs['prompt']);
    #-----------------------------------------------------------------------------
    $LinkID = UniqID('Input');
    #-----------------------------------------------------------------------------
    $Links =& Links();
    #-----------------------------------------------------------------------------
    $Links[$LinkID] =& $Input;
    #-----------------------------------------------------------------------------
    $Comp = Comp_Load('Form/Prompt', $LinkID, $Prompt);
    if (Is_Error($Comp)) {
        return ERROR | @Trigger_Error(500);
    }
    #-----------------------------------------------------------------------------
    unset($Links[$LinkID]);
}
#-------------------------------------------------------------------------------
$Input->AddAttribs($Attribs);
#-------------------------------------------------------------------------------
return $Input;
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Input.comp.php

示例12: Tag

}
#-------------------------------------------------------------------------------
switch ($PriorityID) {
    case 'Notice':
        $Color = 'E3EAFA';
        break;
    case 'Waiting':
        $Color = 'FDF6D3';
        break;
    case 'Error':
        $Color = 'FFCCCC';
        break;
    default:
        $Color = 'F1FCCE';
}
#-------------------------------------------------------------------------------
$NoBody = new Tag('NOBODY', array('class' => 'Standard', 'style' => SPrintF('background-color:#%s;', $Color)), new Tag('U', $CreateDate), new Tag('CNAME', SPrintF(' [%s]', $Email)), new Tag('BR'));
#-------------------------------------------------------------------------------
$NoBody->AddChild(new Tag('DIV', $Text));
#-------------------------------------------------------------------------------
if (!$IsReaded) {
    #-----------------------------------------------------------------------------
    $Img = new Tag('IMG', array('width' => 16, 'height' => 16, 'src' => 'SRC:{Images/Icons/Event.gif}'));
    #-----------------------------------------------------------------------------
    $NoBody->AddChild($Img, TRUE);
    #-----------------------------------------------------------------------------
    $NoBody->AddAttribs(array('style' => 'border:1px solid #FF6666;'));
}
#-------------------------------------------------------------------------------
return $NoBody;
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Event.comp.php

示例13: Tag

        return new Tag('SPAN', SPrintF('Изображение не найдено (%s)', $FileID));
        break;
    case 'array':
        #---------------------------------------------------------------------------
        $Scale = Min(Max(50, $Scale), 200);
        #---------------------------------------------------------------------------
        $Size = Image_Get_Size($Image['FileData']);
        if (Is_Error($Size)) {
            return ERROR | @Trigger_Error(500);
        }
        #---------------------------------------------------------------------------
        $Index = $Size['Height'] / $Size['Width'];
        #---------------------------------------------------------------------------
        $Width = $Size['Width'] * ($Scale / 100);
        $Height = $Width * $Index;
        #---------------------------------------------------------------------------
        $Img = new Tag('IMG', array('border' => 0, 'title' => $Image['Comment'], 'width' => (int) $Width, 'height' => (int) $Height, 'src' => SPrintF('/ClauseImage?ImageID=%u&Scale=%u', $Image['ID'], $Scale)));
        #---------------------------------------------------------------------------
        if ($IsBorder) {
            $Img->AddAttribs(array('style' => 'border:1px solid #DCDCDC;'));
        }
        #---------------------------------------------------------------------------
        if ($Scale != 100) {
            $Img->AddAttribs(array('onclick' => SPrintF('ClauseImageShow(%u,this);', $Image['ID'])));
        }
        #---------------------------------------------------------------------------
        return $Img;
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Image.comp.php

示例14: Tag

        $Left -= $Right - $Pages;
    }
    #-----------------------------------------------------------------------------
    if ($Left > 0) {
        $Div->AddChild(new Tag('IMG', array('class' => 'Button', 'alt' => 'Прокрутить назад', 'width' => 12, 'height' => 10, 'onclick' => SPrintF('TableSuperSetIndex(%s);', $Index - 6), 'src' => 'SRC:{Images/ArrowLeft.gif}')));
    }
    #-----------------------------------------------------------------------------
    $Left = Max(0, $Left);
    $Right = Min($Pages, $Right);
    #-----------------------------------------------------------------------------
    for ($i = $Left; $i < $Right; $i++) {
        #---------------------------------------------------------------------------
        $Button = new Tag('BUTTON', array('class' => 'TableSuperIndexes', 'onclick' => SPrintF('TableSuperSetIndex(%s);', $i)), $i + 1);
        #---------------------------------------------------------------------------
        if ($i == $Index) {
            $Button->AddAttribs(array('disabled' => 'true'));
        }
        #---------------------------------------------------------------------------
        $Div->AddChild($Button);
    }
    #-----------------------------------------------------------------------------
    if ($Right < $Pages) {
        $Div->AddChild(new Tag('IMG', array('class' => 'Button', 'alt' => 'Прокрутить вперед', 'width' => 12, 'height' => 10, 'onclick' => SPrintF('TableSuperSetIndex(%s);', $Index + 6), 'src' => 'SRC:{Images/ArrowRight.gif}')));
    }
    #-----------------------------------------------------------------------------
    $NoBody = new Tag('NOBODY', $Div);
    #-----------------------------------------------------------------------------
    Cache_Add($CacheID, $NoBody);
}
#-------------------------------------------------------------------------------
return $NoBody;
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Indexes.comp.php

示例15: array

/** @author Великодный В.В. (Joonte Ltd.) */
/******************************************************************************/
/******************************************************************************/
$__args_list = array('Rows');
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
$Table = new Tag('TABLE', array('class' => 'Standard', 'cellspacing' => 5));
#-------------------------------------------------------------------------------
for ($i = 1; $i < Count($__args__); $i++) {
    #-----------------------------------------------------------------------------
    $__arg__ = $__args__[$i];
    #-----------------------------------------------------------------------------
    if (Is_Array($__arg__)) {
        $Table->AddAttribs($__arg__);
    } else {
        $Table->AddChild(new Tag('CAPTION', $__arg__));
    }
}
#-------------------------------------------------------------------------------
$UniqID = UniqID('ID');
#-------------------------------------------------------------------------------
$Group = new Tag('TBODY', array('id' => $UniqID));
#-------------------------------------------------------------------------------
foreach ($Rows as $Row) {
    #-----------------------------------------------------------------------------
    $Tr = new Tag('TR');
    #-----------------------------------------------------------------------------
    switch (ValueOf($Row)) {
        case 'array':
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Standard.comp.php


注:本文中的Tag::AddAttribs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。