本文整理汇总了PHP中DOM::AddAttribs方法的典型用法代码示例。如果您正苦于以下问题:PHP DOM::AddAttribs方法的具体用法?PHP DOM::AddAttribs怎么用?PHP DOM::AddAttribs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOM
的用法示例。
在下文中一共展示了DOM::AddAttribs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
#-------------------------------------------------------
if ($Profile['StatusID'] == 'OnFilling') {
#-----------------------------------------------------
$Window = JSON_Encode(array('Url' => '/DomainSelectOwner', 'Args' => array('DomainOrderID' => $DomainOrder['ID'], 'StepID' => 1, 'OwnerTypeID' => 'Profile')));
#-----------------------------------------------------
$Comp = Comp_Load('www/ProfileEdit', array('Window' => Base64_Encode($Window), 'ProfileID' => $Profile['ID']));
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-----------------------------------------------------
return $Comp;
}
}
#---------------------------------------------------------
if ($ProfileID) {
$DOM->AddAttribs('Body', array('onload' => 'DomainSelectOwner();'));
}
#---------------------------------------------------------
$Options = array();
#---------------------------------------------------------
foreach ($Profiles as $Profile) {
$Options[$Profile['ID']] = $Profile['Name'];
}
#---------------------------------------------------------
$Comp = Comp_Load('Form/Select', array('name' => 'ProfileID'), $Options, $ProfileID);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#---------------------------------------------------------
$NoBody = new Tag('NOBODY', $Comp);
#---------------------------------------------------------
示例2: DOM
/******************************************************************************/
if (Is_Error(System_Load('modules/Authorisation.mod', 'classes/DOM.class.php'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Base'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddAttribs('MenuLeft', array('args' => 'Administrator/Office'));
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Офис → Бонусы');
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Buttons/Standard', array('onclick' => "ShowWindow('/Administrator/BonusEdit');"), 'Новый бонус', 'Add.gif');
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Buttons/Panel', array('Comp' => $Comp, 'Name' => 'Новый бонус'));
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$NoBody = new Tag('NOBODY', $Comp);
#-------------------------------------------------------------------------------
示例3: DOM
#-------------------------------------------------------------------------------
if (Is_Error(System_Load('modules/Authorisation.mod', 'classes/DOM.class.php'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Base'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddAttribs('MenuLeft', array('args' => 'User/Office'));
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Мой офис → Счета на оплату');
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Buttons/Standard', array('onclick' => "ShowWindow('/InvoiceMake');"), 'Новый счёт', 'Add.gif');
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Buttons/Panel', array('Comp' => $Comp, 'Name' => 'Новый счёт'));
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$NoBody = new Tag('NOBODY', $Comp);
#-------------------------------------------------------------------------------
示例4: Tag
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Window'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Script = new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/Pages/TicketRead.js}'));
#-------------------------------------------------------------------------------
$DOM->AddChild('Head', $Script);
#-------------------------------------------------------------------------------
$Script = new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/TicketFunctions.js}'));
#-------------------------------------------------------------------------------
$DOM->AddChild('Head', $Script);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$DOM->AddAttribs('Body', array('onload' => "window.document.getElementById('Message').focus();"));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Formats/Edesk/Number', $TicketID);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddText('Title', HtmlSpecialChars(SPrintF('#%s | %s', $Comp, $Ticket['Theme'])));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('name' => 'TicketID', 'type' => 'hidden', 'value' => $Ticket['ID']));
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
示例5: array
if (Is_Error($DOM->Load('Base'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Центр поддержки → Запросы в поддержку');
#-------------------------------------------------------------------------------
if ($TicketID) {
#-------------------------------------------------------------------------------
$Count = DB_Count('Edesks', array('ID' => $TicketID));
if (Is_Error($Count)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
if ($Count) {
$DOM->AddAttribs('Body', array('onload' => SPrintF("ShowWindow('/TicketRead',{TicketID:%u})", $TicketID)));
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tables/Super', 'Tickets');
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$NoBody = new Tag('NOBODY', $Comp);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $NoBody);
#-------------------------------------------------------------------------------
示例6: Tag
$Form = new Tag('FORM', array('name' => 'ServerEditForm', 'onsubmit' => 'return false;'));
#-------------------------------------------------------------------------------
if ($Window) {
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('name' => 'Window', 'type' => 'hidden', 'value' => $Window));
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Form->AddChild($Comp);
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
if (!$ServerID) {
$DOM->AddAttribs('Body', array('onload' => 'SettingsUpdate();'));
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# IO_Scan по всем директориям servers - создать массив уникальных имён шаблонов
$HostsIDs = $GLOBALS['HOST_CONF']['HostsIDs'];
#-------------------------------------------------------------------------------
$Templates = $Array = $Array1 = $ServiceIDs = array();
#-------------------------------------------------------------------------------
foreach (Array_Reverse($HostsIDs) as $HostID) {
#-------------------------------------------------------------------------------
$Path = SPrintF('%s/hosts/%s/servers', SYSTEM_PATH, $HostID);
#-------------------------------------------------------------------------------
if (!Is_Dir($Path)) {
continue;
}
示例7: array
$Types = $Fields['Types'];
#-------------------------------------------------------------------------------
$Options = array();
#-------------------------------------------------------------------------------
$Script = array('var Disabled = {};');
#-------------------------------------------------------------------------------
foreach ($Types as $TypeID => $Type) {
#-----------------------------------------------------------------------------
$Options[$TypeID] = $Type['Name'];
#-----------------------------------------------------------------------------
$Script[] = SPrintF("Disabled['%s'] = %s;", $TypeID, JSON_Encode($Type['Disabled']));
}
#-------------------------------------------------------------------------------
$DOM->AddChild('Head', new Tag('SCRIPT', array('force-escape' => 'yes'), Implode("\n", $Script)));
#-------------------------------------------------------------------------------
$DOM->AddAttribs('Body', array('onload' => 'DisabledUpdate();'));
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Select', array('name' => 'TypeID', 'onchange' => 'DisabledUpdate();'), $Options, $ServiceField['TypeID']);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Table[] = array('Тип', $Comp);
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/TextArea', array('name' => 'Options', 'rows' => 5, 'cols' => 25), $ServiceField['Options']);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Table[] = array('Список выбора', $Comp);
#-------------------------------------------------------------------------------
示例8: array
} else {
#-----------------------------------------------------------------------------
$PromoCode = array('Code' => FALSE, 'ExpirationDate' => Time() + 365 * 24 * 3600, 'ServiceID' => 0, 'SchemeID' => 0, 'SchemesGroupID' => 0, 'Discont' => 0.5, 'DaysDiscont' => 363, 'MaxAmount' => 100, 'OwnerID' => 1, 'ForceOwner' => FALSE, 'Comment' => 'Промокод размещён на форуме профильного сайта forum.joonte.ru');
}
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Window'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddAttribs('Body', array('onload' => SPrintF("GetSchemes('%s','SchemeID','%s');", $PromoCode['ServiceID'], $PromoCode['SchemeID'])));
#-------------------------------------------------------------------------------
$DOM->AddChild('Head', new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/GetSchemes.js}')));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Title = $PromoCodeID ? 'Редактирование ПромоКода' : 'Добавление нового ПромоКода';
#-------------------------------------------------------------------------------
$DOM->AddText('Title', $Title);
#-------------------------------------------------------------------------------
$Table = array('Общая информация');
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$PromoCodeExample = StrToUpper(SPrintF('%s-%s-%s-%s', SubStr(md5(MicroTime()), 1, 4), SubStr(md5(MicroTime()), 6, 4), SubStr(md5(MicroTime()), 12, 4), SubStr(md5(MicroTime()), 20, 4)));
#-------------------------------------------------------------------------------
if (!$PromoCodeID) {
#-------------------------------------------------------------------------------
示例9: DOM
#-------------------------------------------------------------------------------
if (Is_Error(System_Load('modules/Authorisation.mod', 'classes/DOM.class.php', 'libs/WhoIs.php'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Base'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddAttribs('MenuLeft', array('args' => 'User/Services'));
#-------------------------------------------------------------------------------
$DOM->AddChild('Head', new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/Pages/DomainOrder.js}')));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Заказ доменного имени');
#-------------------------------------------------------------------------------
$Form = new Tag('FORM', array('name' => 'DomainOrderForm', 'onsubmit' => 'return false;'));
#-------------------------------------------------------------------------------
if ($HostingOrderID) {
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('name' => 'HostingOrderID', 'type' => 'hidden', 'value' => $HostingOrderID));
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
示例10: DOM
#-------------------------------------------------------------------------------
if (Is_Error(System_Load('modules/Authorisation.mod', 'classes/DOM.class.php', 'libs/WhoIs.php'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Base'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddAttribs('MenuLeft', array('args' => 'User/Services'));
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Заказ вторичного DNS');
#-------------------------------------------------------------------------------
$Script = new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/Pages/Order.js}'));
#-------------------------------------------------------------------------------
$DOM->AddChild('Head', $Script);
#-------------------------------------------------------------------------------
$Form = new Tag('FORM', array('name' => 'DNSmanagerOrderForm', 'onsubmit' => 'return false;'));
#-------------------------------------------------------------------------------
$Config = Config();
#-------------------------------------------------------------------------------
if ($StepID) {
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('name' => 'ContractID', 'type' => 'hidden', 'value' => $ContractID));
if (Is_Error($Comp)) {
示例11: array
} else {
#-----------------------------------------------------------------------------
$Bonus = array('UserID' => 1, 'ServiceID' => 0, 'SchemeID' => 0, 'SchemesGroupID' => 0, 'ExpirationDate' => Time() + 365 * 24 * 3600, 'DaysReserved' => 30, 'DaysRemainded' => 30, 'Discont' => 0.5, 'Comment' => 'Как партнеру');
}
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Window'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddAttribs('Body', array('onload' => SPrintF("GetSchemes(%s,'SchemeID','%s');", $Bonus['ServiceID'], $Bonus['SchemeID'])));
#-------------------------------------------------------------------------------
$DOM->AddChild('Head', new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/GetSchemes.js}')));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Title = $BonusID ? 'Редактирование бонуса' : 'Добавление нового бонуса';
#-------------------------------------------------------------------------------
$DOM->AddText('Title', $Title);
#-------------------------------------------------------------------------------
$Table = array('Общая информация');
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Users/Select', 'UserID', $Bonus['UserID']);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
示例12: DOM
return NULL;
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
#-------------------------------------------------------------------------------
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Base'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddAttribs('MenuLeft', array('args' => 'Site'));
#-------------------------------------------------------------------------------
$NoBody = new Tag('NOBODY');
#-------------------------------------------------------------------------------
$NoBody->AddChild(new Tag('BR'));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# проверяем, что гостям вообще разрешена оплата заказов
if (!$Settings['IsActive']) {
#-------------------------------------------------------------------------------
Debug(SPrintF('[comp/www/InvoiceDocumentGuest]: оплата от гостей отключена'));
#-------------------------------------------------------------------------------
$NoBody->AddChild(new Tag('P', 'Гостевая оплата запрещена.'));
$NoBody->AddChild(new Tag('P', 'Если вы владелец этого сайта, войдите в биллинговую систему и оплатите от своего имени.'));
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $NoBody);
示例13: array
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
if (isset($ServersGroup['Params'][$IsZeroPricePay]) && $ServersGroup['Params'][$IsZeroPricePay]) {
$Comp->AddAttribs(array('checked' => 'yes'));
}
#-------------------------------------------------------------------------------
$Table[] = array(new Tag('SPAN', array('style' => 'cursor:pointer;', 'onclick' => SPrintF('ChangeCheckBox(\'%s\'); return false;', $IsZeroPricePay)), 'Нулевая цена на оплату'), $Comp);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Scripts[] = SPrintF("GetSchemes('%s','%s','%s');", $ServersGroup['Params'][$Service], $Scheme, $ServersGroup['Params'][$Scheme]);
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#Debug(SPrintF('[comp/www/Administrator/ServersGroupEdit]: onload = %s',Implode(' ',$Scripts)));
$DOM->AddAttribs('Body', array('onload' => Implode(' ', $Scripts)));
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Table[] = 'Прочие параметры';
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/TextArea', array('rows' => 3, 'cols' => 41, 'name' => 'Comment', 'prompt' => 'Описание группы серверов, для внутреннего использования'), $ServersGroup['Comment']);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Table[] = array('Комментарий', $Comp);
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('type' => 'text', 'name' => 'SortID', 'style' => 'width: 100%;', 'value' => $ServersGroup['SortID'], 'prompt' => 'В каком порядке сортировать группы, при отображении'));
if (Is_Error($Comp)) {
示例14: DOM
}
#-------------------------------------------------------------------------------
Debug(SPrintF('[comp/www/DomainWhoIs]: DomainName = %s', $DomainName));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Base'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddAttribs('MenuLeft', array('args' => 'User/Services'));
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Услуги → Домены → Проверка домена');
#-------------------------------------------------------------------------------
$DOM->AddChild('Head', new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/Pages/DomainWhoIs.js}')));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Table = array();
#-------------------------------------------------------------------------------
$Messages = Messages();
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('name' => 'DomainName', 'value' => $DomainName, 'onkeydown' => 'if(IsEnter(event)) document.location = "/DomainWhoIs?DomainName=" + document.forms.WhoIsForm.DomainName.value;', 'prompt' => $Messages['Prompts']['Domain']['Name'], 'type' => 'text'));
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
示例15: ImageColorAllocate
}
#-----------------------------------------------------------------------
$Color = ImageColorAllocate($Im, 0, 0, 0);
#-----------------------------------------------------------------------
ImageTTFText($Im, 60, 0, 0, 80, $Color, $Font, SPrintF('$%s', $pIndex));
#-----------------------------------------------------------------------
$Tmp = System_Element('tmp');
if (Is_Error($Tmp)) {
return ERROR | @Trigger_Error(500);
}
#-----------------------------------------------------------------------
$Image = SPrintF('%s/%s.png', $Tmp, UniqID('tmp'));
#-----------------------------------------------------------------------
ImagePng($Im, $Image);
#-----------------------------------------------------------------------
$DOM->AddAttribs('pIndexImage', array('src' => $Image), TRUE);
#-----------------------------------------------------------------------
$Out = $DOM->Build();
#-----------------------------------------------------------------------
if (Is_Error($Out)) {
return ERROR | @Trigger_Error(500);
}
#-----------------------------------------------------------------------
$Replace = Array_ToLine($Replace);
#-----------------------------------------------------------------------
foreach (Array_Keys($Replace) as $LinkID) {
#---------------------------------------------------------------------
$Text = (string) $Replace[$LinkID];
#---------------------------------------------------------------------
$Out = Str_Replace(SPrintF('%%%s%%', $LinkID), $Text ? $Text : '-', $Out);
}