當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CLink::setAction方法代碼示例

本文整理匯總了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]) : '');
             }
開發者ID:phedders,項目名稱:zabbix,代碼行數:31,代碼來源:popup.php


注:本文中的CLink::setAction方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。