本文整理汇总了PHP中DOM::Build方法的典型用法代码示例。如果您正苦于以下问题:PHP DOM::Build方法的具体用法?PHP DOM::Build怎么用?PHP DOM::Build使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOM
的用法示例。
在下文中一共展示了DOM::Build方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: smarty_function_table
function smarty_function_table($params, $smarty)
{
$tableName = $params['name'];
if (!$tableName) {
return "";
}
$DOM = new DOM();
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
$comp = Comp_Load('Tables/Super', $tableName);
if (Is_Error($comp)) {
return ERROR | @Trigger_Error(500);
}
$DOM->Object = $comp;
$Out = $DOM->Build();
if (Is_Error($Out)) {
return ERROR | @Trigger_Error(500);
}
return $Out;
}
示例2: array
}
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('type' => 'button', 'onclick' => 'form.submit();', 'value' => 'Сформировать'));
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Table[] = $Comp;
#-------------------------------------------------------------------------------
$Table[] = new Tag('IFRAME', array('height' => 120, 'width' => '100%', 'name' => 'Statistics'), 'Загрузка...');
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tables/Standard', $Table);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Form = new Tag('FORM', array('target' => 'Statistics', 'method' => 'POST', 'onsubmit' => 'return false;'), $Comp);
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('type' => 'hidden', 'name' => 'IsCreate', 'value' => 'yes'));
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Form->AddChild($Comp);
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Form);
#-------------------------------------------------------------------------------
$Out = $DOM->Build();
#-------------------------------------------------------------------------------
return $Out;
#-------------------------------------------------------------------------------
示例3: array
#-------------------------------------------------------------------------------
$Div->AddChild($Comp);
#-------------------------------------------------------------------------------
$Table[] = $Div;
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tables/Standard', $Table);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Form = new Tag('FORM', array('name' => 'DSSchemeEditForm', 'onsubmit' => 'return false;'), $Comp);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('name' => 'DSSchemeID', 'type' => 'hidden', 'value' => $DSSchemeID));
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Form->AddChild($Comp);
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Form);
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Build(FALSE))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
return array('Status' => 'Ok', 'DOM' => $DOM->Object);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
示例4: array
$Table[] = $Div;
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('type' => 'button', 'onclick' => "if(PasswordCheck(this.form,'Password')) UserRegister();", 'value' => 'Регистрация'));
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Table[] = $Comp;
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tables/Standard', $Table);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Form->AddChild($Comp);
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Form);
#-------------------------------------------------------------------------------
$Out = $DOM->Build(!XML_HTTP_REQUEST);
#-------------------------------------------------------------------------------
if (Is_Error($Out)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
return XML_HTTP_REQUEST ? array('Status' => 'Ok', 'DOM' => $DOM->Object) : $Out;
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
示例5: array
#-----------------------------------------------------
$DOM->AddText($LinkID, $Text ? $Text : '-', TRUE);
}
#-------------------------------------------------------
if ($IsStamp) {
#-----------------------------------------------------
@($DOM->Links['Sign']->Childs = array());
#-----------------------------------------------------
$DOM->AddChild('Sign', new Tag('IMG', array('src' => 'SRC:{Images/dSign.bmp}')));
#-----------------------------------------------------
@($DOM->Links['Stamp']->Childs = array());
#-----------------------------------------------------
$DOM->AddChild('Stamp', new Tag('IMG', array('src' => 'SRC:{Images/Stamp.bmp}')));
}
#-------------------------------------------------------
$Document = $DOM->Build();
if (Is_Error($Document)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------
foreach (Array_Keys($Replace) as $LinkID) {
#-----------------------------------------------------
$Text = (string) $Replace[$LinkID];
#-----------------------------------------------------
$Document = Str_Replace(SPrintF('%%%s%%', $LinkID), $Text ? $Text : '-', $Document);
}
#-------------------------------------------------------
$PDF = HTMLDoc_CreatePDF('WorksCompliteReport', $Document);
#-------------------------------------------------------
switch (ValueOf($PDF)) {
case 'error':
示例6: array
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
default:
return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
default:
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tables/Standard', $Table);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Form->AddChild($Comp);
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Form);
#-------------------------------------------------------------------------------
$Out = $DOM->Build(FALSE);
#-------------------------------------------------------------------------------
if (Is_Error($Out)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
return array('Status' => 'Ok', 'DOM' => $DOM->Object);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
示例7: foreach
}
#-------------------------------------------------------------------------------
foreach (Array_Keys($Send) as $ParamID) {
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('name' => $ParamID, 'type' => 'hidden', 'value' => $Send[$ParamID]));
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Form->AddChild($Comp);
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
if ($IsRemote) {
#-------------------------------------------------------------------------------
$Out = $Document->Build();
#-------------------------------------------------------------------------------
if (Is_Error($Out)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
return array('Status' => 'Ok', 'Document' => $Out, 'Cpp' => $PaymentSystem['Cpp'], 'Send' => $Send);
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
$Div->AddChild($Form);
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------