本文整理汇总了PHP中Browser::RowFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP Browser::RowFormat方法的具体用法?PHP Browser::RowFormat怎么用?PHP Browser::RowFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Browser
的用法示例。
在下文中一共展示了Browser::RowFormat方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: translate
$browser->Title(translate('Group Principals'));
break;
}
}
$browser->AddColumn('principal_id', translate('ID'), 'right', '##principal_link##');
$browser->AddColumn('username', translate('Name'));
$rowurl = $c->base_url . '/admin.php?action=edit&t=principal&id=';
$browser->AddHidden('principal_link', "'<a href=\"{$rowurl}' || principal_id || '\">' || principal_id || '</a>'");
$browser->AddColumn('displayname', translate('Display Name'));
$browser->AddColumn('email', translate('EMail'));
$browser->AddColumn('member_of', translate('Is Member of'), '', '', 'is_member_of_list(principal_id)');
if (!isset($principal_type) || $principal_type == 3) {
$browser->AddColumn('members', translate('Has Members'), '', '', 'has_members_list(principal_id)');
}
$browser->SetOrdering('username', 'A');
$browser->SetJoins("dav_principal ");
if (isset($principal_active) && $principal_active == 'f') {
$browser->SetWhere('NOT user_active');
} else {
$browser->SetWhere('user_active');
}
if (isset($principal_type)) {
$browser->AndWhere('type_id = ' . $principal_type);
}
$c->page_title = $browser->Title();
if ($c->enable_row_linking) {
$browser->RowFormat('<tr onMouseover="LinkHref(this,1);" title="' . htmlspecialchars(translate('Click to display user details')) . '" class="r%d">', '</tr>', '#even');
} else {
$browser->RowFormat('<tr class="r%d">', '</tr>', '#even');
}
$page_elements[] = $browser;
示例3: 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";
示例4: translate
$browser->AddColumn('delete', translate('Action'), 'center', '', "'<a class=\"submit\" href=\"{$delurl}\">" . translate('Delete') . "</a>'");
$browser->SetOrdering('target', 'A');
$browser->SetJoins('access_ticket t LEFT JOIN collection c ON (target_collection_id=collection_id) LEFT JOIN caldav_data d ON (target_resource_id=dav_id)');
$browser->SetWhere('target_collection_id = ' . intval($editor->Value('collection_id')));
$browser->RowFormat('<tr class="r%d">', '</tr>', '#even');
$browser->DoQuery();
$page_elements[] = $browser;
/**
bind_id | bigint | not null default nextval('dav_id_seq'::regclass)
bound_source_id | bigint |
access_ticket_id | text |
dav_owner_id | bigint | not null
parent_container | text | not null
dav_name | text | not null
dav_displayname | text |
*/
$browser = new Browser(translate('Bindings to this Collection'));
$browser->AddColumn('bind_id', translate('ID'), '', '');
$browser->AddHidden('b.dav_owner_id');
$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=##dav_owner_id##&bind_id=##URL: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)');
$browser->SetWhere('bound_source_id = ' . intval($editor->Value('collection_id')));
$browser->RowFormat('<tr class="r%d">', '</tr>', '#even');
$browser->DoQuery();
$page_elements[] = $browser;
}