本文整理汇总了PHP中CLink::setAction方法的典型用法代码示例。如果您正苦于以下问题:PHP CLink::setAction方法的具体用法?PHP CLink::setAction怎么用?PHP CLink::setAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLink
的用法示例。
在下文中一共展示了CLink::setAction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
while ($row = DBfetch($db_groups)) {
$row['node_name'] = isset($row['node_name']) ? '(' . $row['node_name'] . ') ' : '';
if (!$all) {
$name = new CLink(bold(S_MINUS_ALL_GROUPS_MINUS), '#', 'action');
if (isset($_REQUEST['reference']) && $_REQUEST['reference'] == 'dashboard') {
$action = get_window_opener($dstfrm, $dstfld1, $srcfld2) . get_window_opener($dstfrm, $dstfld2, create_id_by_nodeid(0, $nodeid)) . "window.opener.setTimeout('add2favorites();', 1000);";
} else {
$action = get_window_opener($dstfrm, $dstfld1, create_id_by_nodeid(0, $nodeid)) . get_window_opener($dstfrm, $dstfld2, $row['node_name'] . S_MINUS_ALL_GROUPS_MINUS);
}
$name->setAction($action . " close_window(); return false;");
$table->addRow($name);
$all = true;
}
$name = new CLink($row['name'], '#', 'action');
$row['name'] = $row['node_name'] . $row['name'];
$name->setAction(get_window_opener($dstfrm, $dstfld1, $row[$srcfld1]) . get_window_opener($dstfrm, $dstfld2, $row[$srcfld2]) . (isset($_REQUEST['reference']) && $_REQUEST['reference'] == 'dashboard' ? "window.opener.setTimeout('add2favorites();', 1000);" : '') . ' return close_window();');
$table->addRow($name);
}
$table->show();
} else {
if ($srctbl == "drules") {
$table = new CTableInfo(S_NO_DISCOVERY_RULES_DEFINED);
$table->SetHeader(S_NAME);
$result = DBselect('SELECT DISTINCT * FROM drules WHERE ' . DBin_node('druleid', $nodeid));
while ($row = DBfetch($result)) {
$name = new CLink($row["name"], "#", "action");
if (isset($_REQUEST['reference']) && $_REQUEST['reference'] == 'dashboard') {
$action = get_window_opener($dstfrm, $dstfld1, $srcfld2) . get_window_opener($dstfrm, $dstfld2, $row[$srcfld2]) . "window.opener.setTimeout('add2favorites();', 1000);";
} else {
$action = get_window_opener($dstfrm, $dstfld1, $row[$srcfld1]) . (isset($srcfld2) ? get_window_opener($dstfrm, $dstfld2, $row[$srcfld2]) : '');
}