本文整理汇总了PHP中Browser::DoQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP Browser::DoQuery方法的具体用法?PHP Browser::DoQuery怎么用?PHP Browser::DoQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Browser
的用法示例。
在下文中一共展示了Browser::DoQuery方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bindings_to_us_browser
function bindings_to_us_browser()
{
global $c, $page_elements, $id, $editor;
$browser = new Browser(translate('Bindings to this Principal\'s Collections'));
$browser->AddColumn('bind_id', translate('ID'), '', '');
$browser->AddHidden('b.dav_owner_id');
$browser->AddHidden('p.principal_id');
$browser->AddColumn('dav_name', translate('Collection'), '', '<td style="white-space:nowrap;">%s</td>', 'c.dav_name');
$browser->AddColumn('bound_as', translate('Bound As'), '', '<td style="white-space:nowrap;">%s</td>', 'b.dav_name');
$browser->AddColumn('access_ticket_id', translate('Ticket ID'), '', '');
$browser->AddColumn('privs', translate('Privileges'), '', '', "privileges_list(privileges)");
$delurl = $c->base_url . '/admin.php?action=edit&t=principal&id=##principal_id##&bind_id=##bind_id##&subaction=delete_binding';
$browser->AddColumn('delete', translate('Action'), 'center', '', "'<a class=\"submit\" href=\"{$delurl}\">" . translate('Delete') . "</a>'");
$browser->SetOrdering('target', 'A');
$browser->SetJoins('dav_binding b LEFT JOIN collection c ON (bound_source_id=collection_id) LEFT JOIN access_ticket t ON (ticket_id=access_ticket_id) LEFT JOIN principal p USING(user_no)');
$browser->SetWhere('p.principal_id = ' . intval($editor->Value('principal_id')));
$browser->RowFormat('<tr class="r%d">', '</tr>', '#even');
$browser->DoQuery();
return $browser;
}
示例2: USING
$browser->AddColumn('user_no', 'User#', 'center', '<a href="/user.php?user_no=##user_no##">%d</a>');
} else {
$browser->AddHidden('user_no');
}
$browser->AddColumn('query_name', 'Query Name', 'left', '<a href="/wrsearch.php?style=plain&saved_query=##URL:query_name##">%s</a>');
$browser->AddColumn('query_type', 'Type', 'center', '%s');
// $browser->AddColumn( 'query_sql', 'SQL', 'left', '%s' );
// $browser->AddColumn( 'query_params', 'Params', 'left', '%s' );
$browser->AddColumn('maxresults', 'Max#', 'left', '%s');
$browser->AddColumn('rlsort', 'SortBy', 'center', '%s');
$browser->AddColumn('rlseq', 'Up/Dn', 'center', '%s');
$browser->AddColumn('updated', 'Last Modified', 'center', '%-16.16s');
$browser->AddColumn('public_checkbox', 'Public?', '', '<td class="center"><input name="query_is_public[##user_no##][##URL:query_name##]" value="off" type="hidden"><input name="query_is_public[##user_no##][##URL:query_name##]" class="fcheckbox" type="checkbox"%s></td>', "CASE WHEN public THEN ' checked' ELSE '' END");
$browser->AddColumn('menu_checkbox', 'Menu?', '', '<td class="center"><input name="show_in_menu[##user_no##][##URL:query_name##]" value="off" type="hidden"><input name="show_in_menu[##user_no##][##URL:query_name##]" class="fcheckbox" type="checkbox"%s></td>', "CASE WHEN in_menu THEN ' checked' ELSE '' END");
$browser->AddColumn('query_params', 'Actions', 'center', '<a href="/wrsearch.php?saved_query=##URL:query_name##" class="submit">Edit Query</a>');
$browser->SetJoins("saved_queries JOIN usr USING(user_no) ");
$browser->SetWhere("usr.user_no = " . $session->user_no);
if (isset($_GET['o']) && isset($_GET['d'])) {
$browser->AddOrder($_GET['o'], $_GET['d']);
} else {
$browser->AddOrder('query_name', 'A');
}
$browser->RowFormat("<tr onMouseOver=\"LinkHref(this,1);\" title=\"Click to Display Search Detail\" class=\"r%d\">\n", "</tr>\n", '#even');
$browser->DoQuery();
$c->page_title = "Saved Searches";
include "page-header.php";
echo "<form method=\"POST\">\n";
echo $browser->Render();
echo "<input type=\"submit\" name=\"submit\" class=\"submit\" value=\"Save Changes\">";
echo "</form>\n";
include "page-footer.php";