本文整理汇总了PHP中CTag::setAttribute方法的典型用法代码示例。如果您正苦于以下问题:PHP CTag::setAttribute方法的具体用法?PHP CTag::setAttribute怎么用?PHP CTag::setAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTag
的用法示例。
在下文中一共展示了CTag::setAttribute方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeSImgStr
private function makeSImgStr($id)
{
$tr = new CRow();
$count = isset($this->tree[$id]['nodeimg']) ? strlen($this->tree[$id]['nodeimg']) : 0;
for ($i = 0; $i < $count; $i++) {
$td = new CCol();
$img = null;
switch ($this->tree[$id]['nodeimg'][$i]) {
case 'O':
$img = new CImg('images/general/tree/zero.gif', 'o', '22', '14');
break;
case 'I':
$td->setAttribute('style', 'background-image: url(images/general/tree/pointc.gif);');
$img = new CImg('images/general/tree/zero.gif', 'i', '22', '14');
break;
case 'L':
$td->setAttribute('valign', 'top');
$div = new CTag('div', 'yes');
$div->setAttribute('style', 'height: 10px; background-image: url(images/general/tree/pointc.gif);');
if ($this->tree[$id]['nodetype'] == 2) {
$img = new CImg('images/general/tree/plus.gif', 'y', '22', '14');
$img->setAttribute('onclick', $this->treename . '.closeSNodeX("' . $id . '", this);');
$img->setAttribute('id', 'idi_' . $id);
$img->setAttribute('class', 'pointer');
} else {
$img = new CImg('images/general/tree/pointl.gif', 'y', '22', '14');
}
$div->addItem($img);
$img = $div;
break;
case 'T':
$td->setAttribute('valign', 'top');
if ($this->tree[$id]['nodetype'] == 2) {
$td->setAttribute('style', 'background-image: url(images/general/tree/pointc.gif);');
$img = new CImg('images/general/tree/plus.gif', 't', '22', '14');
$img->setAttribute('onclick', $this->treename . '.closeSNodeX("' . $id . '", this);');
$img->setAttribute('id', 'idi_' . $id);
$img->setAttribute('class', 'pointer');
$img->setAttribute('style', 'top: 1px; position: relative;');
} else {
$td->setAttribute('style', 'background-image: url(images/general/tree/pointc.gif);');
$img = new CImg('images/general/tree/pointl.gif', 't', '22', '14');
}
break;
}
$td->addItem($img);
$tr->addItem($td);
}
return $tr;
}
示例2: CSpan
$description = new CSpan($description, 'link_menu');
// trigger description js menu {{{
$hosts = reset($trigger['hosts']);
$menu_trigger_conf = 'null';
if ($admin_links) {
$menu_trigger_conf = "['" . S_CONFIGURATION_OF_TRIGGERS . "',\"javascript:\n\t\t\t\tredirect('triggers.php?form=update&triggerid=" . $trigger['triggerid'] . '&switch_node=' . id2nodeid($trigger['triggerid']) . "')\",\n\t\t\t\tnull, {'outer' : ['pum_o_item'],'inner' : ['pum_i_item']}]";
}
$menu_trigger_url = 'null';
if (!zbx_empty($trigger['url'])) {
$menu_trigger_url = "['" . S_URL . "',\"javascript: window.location.href='" . $trigger['url'] . "'\",\n\t\t\t\tnull, {'outer' : ['pum_o_item'],'inner' : ['pum_i_item']}]";
}
$description->addAction('onclick', "javascript: create_mon_trigger_menu(event, new Array({'triggerid': '" . $trigger['triggerid'] . "', 'lastchange': '" . $trigger['lastchange'] . "'}, " . $menu_trigger_conf . ", " . $menu_trigger_url . ")," . zbx_jsvalue($items, true) . ");");
// }}} trigger description js menu
if ($_REQUEST['show_details']) {
$font = new CTag('font', 'yes');
$font->setAttribute('color', '#000');
$font->setAttribute('size', '-2');
$font->addItem(explode_exp($trigger['expression'], 1, false, true));
$description = array($description, BR(), $font);
}
// DEPENDENCIES {{{
if (!empty($trigger['dependencies'])) {
$dep_table = new CTableInfo();
$dep_table->setAttribute('style', 'width: 200px;');
$dep_table->addRow(bold(S_DEPENDS_ON . ':'));
foreach ($trigger['dependencies'] as $dep) {
$dep_table->addRow(' - ' . expand_trigger_description($dep['triggerid']));
}
$img = new Cimg('images/general/down_icon.png', 'DEP_UP');
$img->setAttribute('style', 'vertical-align: middle; border: 0px;');
$img->setHint($dep_table);
示例3: CCol
//--
$table->addRow(array($show_event_col ? SPACE : NULL, new CCol(get_severity_description($row['priority']), get_severity_style($row['priority'], $row['value'])), $value, $clock, get_node_name_by_elid($row['triggerid']), $host, $tr_desc, $actions, $show_event_col ? SPACE : NULL, new CLink(zbx_empty($row['comments']) ? S_ADD : S_SHOW, 'tr_comments.php?triggerid=' . $row['triggerid'], 'action')));
$event_limit = 0;
foreach ($row['events'] as $eventid => $row_event) {
$value = new CSpan(trigger_value2str($row_event['value']), get_trigger_value_style($row_event['value']));
if ($config['event_ack_enable']) {
if ($row_event['acknowledged'] == 1) {
$acks_cnt = DBfetch(DBselect('SELECT COUNT(*) as cnt FROM acknowledges WHERE eventid=' . $row_event['eventid']));
$ack = array(new CSpan(S_YES, 'off'), SPACE . '(' . $acks_cnt['cnt'] . SPACE, new CLink(S_SHOW, 'acknow.php?eventid=' . $row_event['eventid'], 'action'), ')');
} else {
$ack = new CLink(S_NOT_ACKNOWLEDGED, 'acknow.php?eventid=' . $row_event['eventid'], 'on');
}
}
$description = expand_trigger_description_by_data(array_merge($row, array('clock' => $row_event['clock'])), ZBX_FLAG_EVENT);
$font = new CTag('font', 'yes');
$font->setAttribute('color', '#808080');
$font->addItem(array(' - ', $description));
$description = $font;
$description = new CCol($description);
$description->setAttribute('style', 'white-space: normal; width: 90%;');
$clock = new CLink(zbx_date2str(S_DATE_FORMAT_YMDHMS, $row_event['clock']), 'tr_events.php?triggerid=' . $row['triggerid'] . '&eventid=' . $row_event['eventid'], 'action');
$table->addRow(array($config['event_ack_enable'] ? $row_event['acknowledged'] == 1 ? SPACE : new CCheckBox('events[' . $row_event['eventid'] . ']', 'no', NULL, $row_event['eventid']) : NULL, new CCol(get_severity_description($row['priority']), get_severity_style($row['priority'], $row_event['value'])), $value, $clock, get_node_name_by_elid($row['triggerid']), $host, $description, $actions, $config['event_ack_enable'] ? new CCol($ack, 'center') : NULL, new CLink($row['comments'] == '' ? S_ADD : S_SHOW, 'tr_comments.php?triggerid=' . $row['triggerid'], 'action')));
$event_limit++;
if ($event_limit >= $config['event_show_max']) {
break;
}
}
unset($row, $description, $actions);
}
//----- GO ------
if ($config['event_ack_enable']) {
示例4: makeSImgStr
private function makeSImgStr($id)
{
$tr = new CRow();
$td = new CCol();
$count = isset($this->tree[$id]['nodeimg']) ? strlen($this->tree[$id]['nodeimg']) : 0;
for ($i = 0; $i < $count; $i++) {
switch ($this->tree[$id]['nodeimg'][$i]) {
case 'O':
$td->setAttribute('style', 'width: 22px');
$img = new CImg('images/general/tree/zero.gif', 'o', '22', '14');
break;
case 'I':
$td->setAttribute('style', 'width:22px; background-image:url(images/general/tree/pointc.gif);');
$img = new CImg('images/general/tree/zero.gif', 'i', '22', '14');
break;
case 'L':
$td->setAttribute('valign', 'top');
// $td->setAttribute('style','width:22px; background-image:url(images/general/tree/pointc.gif);');
$div = new CTag('div', 'yes');
$div->setAttribute('style', 'height: 10px; width:22px; background-image:url(images/general/tree/pointc.gif);');
if ($this->tree[$id]['nodetype'] == 2) {
$img = new CImg('images/general/tree/plus.gif', 'y', '22', '14');
$img->setAttribute('onclick', 'javascript: ' . $this->treename . '.closeSNodeX(' . $id . ',this);' . " showPopupDiv('div_node_tree','select_iframe');");
// IE6 Fix
$img->setAttribute('id', 'idi_' . $id);
$img->setClass('imgnode');
} else {
$img = new CImg('images/general/tree/pointl.gif', 'y', '22', '14');
}
$div->addItem($img);
$img = $div;
break;
case 'T':
$td->setAttribute('valign', 'top');
if ($this->tree[$id]['nodetype'] == 2) {
$td->setAttribute('style', 'width:22px; background-image:url(images/general/tree/pointc.gif);');
$img = new CImg('images/general/tree/plus.gif', 't', '22', '14');
$img->setAttribute('onclick', 'javascript: ' . $this->treename . '.closeSNodeX(' . $id . ',this);' . " showPopupDiv('div_node_tree','select_iframe');");
// IE6 Fix
$img->setAttribute('id', 'idi_' . $id);
$img->setClass('imgnode');
} else {
$td->setAttribute('style', 'width:22px; background-image:url(images/general/tree/pointc.gif);');
$img = new CImg('images/general/tree/pointl.gif', 't', '22', '14');
}
break;
}
$td->addItem($img);
$tr->addItem($td);
$td = new CCol();
}
// echo $txt.' '.$this->tree[$id]['Name'].'<br />';
return $tr;
}
示例5: get_timeperiod_form
//.........这里部分代码省略.........
$tblPeriod->addItem(new Cvar('new_timeperiod[month]', bindec($bit_month)));
$tblPeriod->addItem(new Cvar('new_timeperiod[day]', $new_timeperiod['day']));
$tblPeriod->addItem(new Cvar('new_timeperiod[date]', $new_timeperiod['date']));
$tblPeriod->addItem(new Cvar('new_timeperiod[month_date_type]', $new_timeperiod['month_date_type']));
$tblPeriod->addRow(array(S_EVERY_DAY_S, new CNumericBox('new_timeperiod[every]', $new_timeperiod['every'], 3)));
} else {
if ($new_timeperiod['timeperiod_type'] == TIMEPERIOD_TYPE_WEEKLY) {
$tblPeriod->addItem(new Cvar('new_timeperiod[month]', bindec($bit_month)));
$tblPeriod->addItem(new Cvar('new_timeperiod[day]', $new_timeperiod['day']));
$tblPeriod->addItem(new Cvar('new_timeperiod[date]', $new_timeperiod['date']));
$tblPeriod->addItem(new Cvar('new_timeperiod[month_date_type]', $new_timeperiod['month_date_type']));
$tblPeriod->addRow(array(S_EVERY_WEEK_S, new CNumericBox('new_timeperiod[every]', $new_timeperiod['every'], 2)));
$tabDays = new CTable();
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_mo]', $dayofweek[0], null, 1), S_MONDAY));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_tu]', $dayofweek[1], null, 1), S_TUESDAY));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_we]', $dayofweek[2], null, 1), S_WEDNESDAY));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_th]', $dayofweek[3], null, 1), S_THURSDAY));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_fr]', $dayofweek[4], null, 1), S_FRIDAY));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_sa]', $dayofweek[5], null, 1), S_SATURDAY));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_su]', $dayofweek[6], null, 1), S_SUNDAY));
$tblPeriod->addRow(array(S_DAY_OF_WEEK, $tabDays));
} else {
if ($new_timeperiod['timeperiod_type'] == TIMEPERIOD_TYPE_MONTHLY) {
$tblPeriod->addItem(new Cvar('new_timeperiod[date]', $new_timeperiod['date']));
$tabMonths = new CTable();
$tabMonths->addRow(array(new CCheckBox('new_timeperiod[month_jan]', $month[0], null, 1), S_JANUARY, SPACE, SPACE, new CCheckBox('new_timeperiod[month_jul]', $month[6], null, 1), S_JULY));
$tabMonths->addRow(array(new CCheckBox('new_timeperiod[month_feb]', $month[1], null, 1), S_FEBRUARY, SPACE, SPACE, new CCheckBox('new_timeperiod[month_aug]', $month[7], null, 1), S_AUGUST));
$tabMonths->addRow(array(new CCheckBox('new_timeperiod[month_mar]', $month[2], null, 1), S_MARCH, SPACE, SPACE, new CCheckBox('new_timeperiod[month_sep]', $month[8], null, 1), S_SEPTEMBER));
$tabMonths->addRow(array(new CCheckBox('new_timeperiod[month_apr]', $month[3], null, 1), S_APRIL, SPACE, SPACE, new CCheckBox('new_timeperiod[month_oct]', $month[9], null, 1), S_OCTOBER));
$tabMonths->addRow(array(new CCheckBox('new_timeperiod[month_may]', $month[4], null, 1), S_MAY, SPACE, SPACE, new CCheckBox('new_timeperiod[month_nov]', $month[10], null, 1), S_NOVEMBER));
$tabMonths->addRow(array(new CCheckBox('new_timeperiod[month_jun]', $month[5], null, 1), S_JUNE, SPACE, SPACE, new CCheckBox('new_timeperiod[month_dec]', $month[11], null, 1), S_DECEMBER));
$tblPeriod->addRow(array(S_MONTH, $tabMonths));
$radioDaily = new CTag('input');
$radioDaily->setAttribute('type', 'radio');
$radioDaily->setAttribute('name', 'new_timeperiod[month_date_type]');
$radioDaily->setAttribute('value', '0');
$radioDaily->setAttribute('onclick', 'submit()');
$radioDaily2 = new CTag('input');
$radioDaily2->setAttribute('type', 'radio');
$radioDaily2->setAttribute('name', 'new_timeperiod[month_date_type]');
$radioDaily2->setAttribute('value', '1');
$radioDaily2->setAttribute('onclick', 'submit()');
if ($new_timeperiod['month_date_type']) {
$radioDaily2->setAttribute('checked', 'checked');
} else {
$radioDaily->setAttribute('checked', 'checked');
}
$tblPeriod->addRow(array(S_DATE, array($radioDaily, S_DAY, SPACE, SPACE, $radioDaily2, S_DAY_OF_WEEK)));
if ($new_timeperiod['month_date_type'] > 0) {
$tblPeriod->addItem(new Cvar('new_timeperiod[day]', $new_timeperiod['day']));
$cmbCount = new CComboBox('new_timeperiod[every]', $new_timeperiod['every']);
$cmbCount->addItem(1, S_FIRST);
$cmbCount->addItem(2, S_SECOND);
$cmbCount->addItem(3, S_THIRD);
$cmbCount->addItem(4, S_FOURTH);
$cmbCount->addItem(5, S_LAST);
$td = new CCol($cmbCount);
$td->setColSpan(2);
$tabDays = new CTable();
$tabDays->addRow($td);
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_mo]', $dayofweek[0], null, 1), S_MONDAY));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_tu]', $dayofweek[1], null, 1), S_TUESDAY));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_we]', $dayofweek[2], null, 1), S_WEDNESDAY));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_th]', $dayofweek[3], null, 1), S_THURSDAY));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_fr]', $dayofweek[4], null, 1), S_FRIDAY));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_sa]', $dayofweek[5], null, 1), S_SATURDAY));
示例6: get_timeperiod_form
//.........这里部分代码省略.........
if ($new_timeperiod['timeperiod_type'] == TIMEPERIOD_TYPE_DAILY) {
$tblPeriod->addItem(new CVar('new_timeperiod[dayofweek]', bindec($bit_dayofweek)));
$tblPeriod->addItem(new CVar('new_timeperiod[month]', bindec($bit_month)));
$tblPeriod->addItem(new CVar('new_timeperiod[day]', $new_timeperiod['day']));
$tblPeriod->addItem(new CVar('new_timeperiod[start_date]', $new_timeperiod['start_date']));
$tblPeriod->addItem(new CVar('new_timeperiod[month_date_type]', $new_timeperiod['month_date_type']));
$tblPeriod->addRow(array(_('Every day(s)'), new CNumericBox('new_timeperiod[every]', $new_timeperiod['every'], 3)));
} elseif ($new_timeperiod['timeperiod_type'] == TIMEPERIOD_TYPE_WEEKLY) {
$tblPeriod->addItem(new CVar('new_timeperiod[month]', bindec($bit_month)));
$tblPeriod->addItem(new CVar('new_timeperiod[day]', $new_timeperiod['day']));
$tblPeriod->addItem(new CVar('new_timeperiod[start_date]', $new_timeperiod['start_date']));
$tblPeriod->addItem(new CVar('new_timeperiod[month_date_type]', $new_timeperiod['month_date_type']));
$tblPeriod->addRow(array(_('Every week(s)'), new CNumericBox('new_timeperiod[every]', $new_timeperiod['every'], 2)));
$tabDays = new CTable();
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_mo]', $dayofweek[0], null, 1), _('Monday')));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_tu]', $dayofweek[1], null, 1), _('Tuesday')));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_we]', $dayofweek[2], null, 1), _('Wednesday')));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_th]', $dayofweek[3], null, 1), _('Thursday')));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_fr]', $dayofweek[4], null, 1), _('Friday')));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_sa]', $dayofweek[5], null, 1), _('Saturday')));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_su]', $dayofweek[6], null, 1), _('Sunday')));
$tblPeriod->addRow(array(_('Day of week'), $tabDays));
} elseif ($new_timeperiod['timeperiod_type'] == TIMEPERIOD_TYPE_MONTHLY) {
$tblPeriod->addItem(new CVar('new_timeperiod[start_date]', $new_timeperiod['start_date']));
$tabMonths = new CTable();
$tabMonths->addRow(array(new CCheckBox('new_timeperiod[month_jan]', $month[0], null, 1), _('January'), SPACE, SPACE, new CCheckBox('new_timeperiod[month_jul]', $month[6], null, 1), _('July')));
$tabMonths->addRow(array(new CCheckBox('new_timeperiod[month_feb]', $month[1], null, 1), _('February'), SPACE, SPACE, new CCheckBox('new_timeperiod[month_aug]', $month[7], null, 1), _('August')));
$tabMonths->addRow(array(new CCheckBox('new_timeperiod[month_mar]', $month[2], null, 1), _('March'), SPACE, SPACE, new CCheckBox('new_timeperiod[month_sep]', $month[8], null, 1), _('September')));
$tabMonths->addRow(array(new CCheckBox('new_timeperiod[month_apr]', $month[3], null, 1), _('April'), SPACE, SPACE, new CCheckBox('new_timeperiod[month_oct]', $month[9], null, 1), _('October')));
$tabMonths->addRow(array(new CCheckBox('new_timeperiod[month_may]', $month[4], null, 1), _('May'), SPACE, SPACE, new CCheckBox('new_timeperiod[month_nov]', $month[10], null, 1), _('November')));
$tabMonths->addRow(array(new CCheckBox('new_timeperiod[month_jun]', $month[5], null, 1), _('June'), SPACE, SPACE, new CCheckBox('new_timeperiod[month_dec]', $month[11], null, 1), _('December')));
$tblPeriod->addRow(array(_('Month'), $tabMonths));
$radioDaily = new CTag('input');
$radioDaily->setAttribute('type', 'radio');
$radioDaily->setAttribute('name', 'new_timeperiod[month_date_type]');
$radioDaily->setAttribute('value', '0');
$radioDaily->setAttribute('onclick', 'submit()');
$radioDaily2 = new CTag('input');
$radioDaily2->setAttribute('type', 'radio');
$radioDaily2->setAttribute('name', 'new_timeperiod[month_date_type]');
$radioDaily2->setAttribute('value', '1');
$radioDaily2->setAttribute('onclick', 'submit()');
if ($new_timeperiod['month_date_type']) {
$radioDaily2->setAttribute('checked', 'checked');
} else {
$radioDaily->setAttribute('checked', 'checked');
}
$tblPeriod->addRow(array(_('Date'), array($radioDaily, _('Day'), SPACE, SPACE, $radioDaily2, _('Day of week'))));
if ($new_timeperiod['month_date_type'] > 0) {
$tblPeriod->addItem(new CVar('new_timeperiod[day]', $new_timeperiod['day']));
$cmbCount = new CComboBox('new_timeperiod[every]', $new_timeperiod['every']);
$cmbCount->addItem(1, _('First'));
$cmbCount->addItem(2, _('Second'));
$cmbCount->addItem(3, _('Third'));
$cmbCount->addItem(4, _('Fourth'));
$cmbCount->addItem(5, _('Last'));
$td = new CCol($cmbCount);
$td->setColSpan(2);
$tabDays = new CTable();
$tabDays->addRow($td);
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_mo]', $dayofweek[0], null, 1), _('Monday')));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_tu]', $dayofweek[1], null, 1), _('Tuesday')));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_we]', $dayofweek[2], null, 1), _('Wednesday')));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_th]', $dayofweek[3], null, 1), _('Thursday')));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_fr]', $dayofweek[4], null, 1), _('Friday')));
$tabDays->addRow(array(new CCheckBox('new_timeperiod[dayofweek_sa]', $dayofweek[5], null, 1), _('Saturday')));
示例7: explode_exp
function explode_exp($expression, $html, $template = false)
{
// echo "EXPRESSION:",$expression,"<Br>";
$functionid = '';
if (0 == $html) {
$exp = '';
} else {
$exp = array();
}
$state = '';
for ($i = 0, $max = strlen($expression); $i < $max; $i++) {
if ($expression[$i] == '{') {
$functionid = '';
$state = 'FUNCTIONID';
continue;
}
if ($expression[$i] == '}') {
$state = '';
if ($functionid == 'TRIGGER.VALUE') {
if (0 == $html) {
$exp .= '{' . $functionid . '}';
} else {
array_push($exp, '{' . $functionid . '}');
}
} else {
if (is_numeric($functionid) && ($function_data = DBfetch(DBselect('SELECT h.host,i.key_,f.function,f.parameter,i.itemid,i.value_type' . ' FROM items i,functions f,hosts h' . ' WHERE f.functionid=' . $functionid . ' AND i.itemid=f.itemid ' . ' AND h.hostid=i.hostid')))) {
if ($template) {
$function_data['host'] = '{HOSTNAME}';
}
if ($html == 0) {
$exp .= '{' . $function_data['host'] . ':' . $function_data['key_'] . '.' . $function_data['function'] . '(' . $function_data['parameter'] . ')}';
} else {
$link = new CLink($function_data['host'] . ':' . $function_data['key_'], 'history.php?action=' . ($function_data['value_type'] == ITEM_VALUE_TYPE_FLOAT || $function_data['value_type'] == ITEM_VALUE_TYPE_UINT64 ? 'showgraph' : 'showvalues') . '&itemid=' . $function_data['itemid']);
array_push($exp, array('{', $link, '.', bold($function_data['function'] . '('), $function_data['parameter'], bold(')'), '}'));
}
} else {
if (1 == $html) {
$font = new CTag('font', 'yes');
$font->setAttribute('color', '#AA0000');
$font->addItem('*ERROR*');
array_push($exp, $font);
} else {
$exp .= '*ERROR*';
}
}
}
continue;
}
if ($state == 'FUNCTIONID') {
$functionid = $functionid . $expression[$i];
continue;
}
if (1 == $html) {
array_push($exp, $expression[$i]);
} else {
$exp .= $expression[$i];
}
}
# echo "EXP:",$exp,"<Br>";
return $exp;
}